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

API docs clarification: Document StateSearchMsg replaced message behavior #5838

Merged
merged 5 commits into from
Mar 18, 2021

Conversation

magik6k
Copy link
Contributor

@magik6k magik6k commented Mar 18, 2021

State[Wait/Search]Msg methods will return successfully when messages on-chain are gas-repriced. This means that when those methods are used to check if a message has landed on-chain, the caller needs to make sure that the returned MsgLookup.Message is the same message CID they are expecting

The StateGetReceipt method will also accept gas-repriced messages, but it unfortunately doesn't provide a way to check if the message which was executed on-chain was repriced.

@magik6k magik6k force-pushed the docs/searchmsg-replace-note branch from f026827 to 4fb4313 Compare March 18, 2021 18:17
@magik6k magik6k merged commit 32a0c88 into master Mar 18, 2021
@magik6k magik6k deleted the docs/searchmsg-replace-note branch March 18, 2021 18:48
@filecoin-project filecoin-project deleted a comment from magik6k Mar 18, 2021
@arajasek arajasek changed the title api: Document StateSearchMsg replaced message behavior API clarification: Document StateSearchMsg replaced message behavior Mar 18, 2021
@momack2 momack2 changed the title API clarification: Document StateSearchMsg replaced message behavior API docs clarification: Document StateSearchMsg replaced message behavior Mar 18, 2021
@BigLep
Copy link
Member

BigLep commented Mar 19, 2021

Thoughts concerning the documentation improvement:

  1. There is a lot of copy/paste. Is there a way to reduce this?
  2. Related, is the content in api-methods.md generated from api_full.go automatically?
  3. Should we maybe state that some of our APIs are "replacement message sensitive" (I'm not saying that is the right/best term)? We can then define somewhere what that means and ideally link to that definition where someone can learn more about the specifics. Specifics can cover how this happens, which message replaces another in the tipset, etc.
  4. Where can we document guidance for how exchange-like entities should use the API (e.g., consider StateCompute, DON’T use ChainGetBlockMessages and StateGetReceipt -- DO use ChainGetParentMessages, StateSearchMsg, and StateCompute).
  • Ideally our "replacement message sensitive" documentation could link to this.

@magik6k
Copy link
Contributor Author

magik6k commented Mar 19, 2021

There is a lot of copy/paste. Is there a way to reduce this?

In v1 API we can consolidate those methods more

Related, is the content in api-methods.md generated from api_full.go automatically?

Yep, that file is generated

Should we maybe state that some of our APIs are "replacement message sensitive"

This is basically what we do in this PR, I don't thing we have more APIs which are replace-sensitive

@magik6k magik6k mentioned this pull request Apr 13, 2021
69 tasks
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

Successfully merging this pull request may close these issues.

3 participants