Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filecoin-message-confirmer should verify the response message CID #65

Open
olizilla opened this issue Apr 19, 2021 · 1 comment
Open

Comments

@olizilla
Copy link

The StateSearchMsg method is suprising. If the message you ask for was replaced then it will return the replacing message rather than the specific message for the CID provided.

	// NOTE: If a replacing message is found on chain, this method will return
	// a MsgLookup for the replacing message - the MsgLookup.Message will be a different
	// CID than the one provided in the 'cid' param, MsgLookup.Receipt will contain the
	// result of the execution of the replacing message.
	//
	// If the caller wants to ensure that exactly the requested message was executed,
	// they must check that MsgLookup.Message is equal to the provided 'cid', or set the
	// `allowReplaced` parameter to false. Without this check, and with `allowReplaced`
	// set to true, both the requested and original message may appear as
	// successfully executed on-chain, which may look like a double-spend.

https://github.com/filecoin-project/lotus/blob/2e6369012517972eb3f4f24f8a28e5a834cc66ad/api/api_full.go#L435-L451

The caller should be able set a allowReplaced parameter to make it clear when they want to confirm the exact message for the CID provided.

@olizilla
Copy link
Author

While whomever takes this on is in there, this comment is need fix

// 75 seconds is the default timeout, so we always capture 2 blocks regardless of when it happened (credit to Riba from PL)
const defaultTimeout = 90000

unless defaultTimout uses a particularly weird unit.

olizilla added a commit to protocol/w3dt-sudo that referenced this issue Apr 19, 2021
we should fix glifio/modules#65

License: MIT
Signed-off-by: Oli Evans <[email protected]>
rvagg pushed a commit to protocol/w3dt-sudo that referenced this issue May 10, 2021
we should fix glifio/modules#65

License: MIT
Signed-off-by: Oli Evans <[email protected]>
Serhii0317 added a commit to Serhii0317/w3dt-sudo that referenced this issue Mar 2, 2022
we should fix glifio/modules#65

License: MIT
Signed-off-by: Oli Evans <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant