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

feat: conformance & tvx: support ReportConsensusFault messages #8302

Merged
merged 5 commits into from
Jun 7, 2022

Conversation

raulk
Copy link
Member

@raulk raulk commented Mar 11, 2022

Related Issues

filecoin-project/ref-fvm#381

Proposed Changes

Introduces the ability to extract test vectors that directly or indirectly rely on the VerifyConsensusFault syscall. That syscall ends up performing a chain lookback to load the state tree at the last final epoch, from which the worker key is loaded.

The solution here assumes that the worker key hasn't changed in the non-finalized portion of the chain, and returns the precondition state tree to perform the worker key lookup. See filecoin-project/ref-fvm#381 (comment) for more details (thanks @arajasek for the suggestion!).

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • All commits have a clear commit message.
  • The PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, INTERFACE BREAKING CHANGE, CONSENSUS BREAKING, build, chore, ci, docs,perf, refactor, revert, style, test
    • area: api, chain, state, vm, data transfer, market, mempool, message, block production, multisig, networking, paychan, proving, sealing, wallet, deps
  • This PR has tests for new functionality or change in behaviour
  • If new user-facing features are introduced, clear usage guidelines and / or documentation updates should be included in https://lotus.filecoin.io or Discussion Tutorials.
  • CI is green

@raulk raulk requested a review from a team as a code owner March 11, 2022 19:13
raulk added a commit to filecoin-project/fvm-test-vectors that referenced this pull request Mar 11, 2022
@raulk raulk requested a review from arajasek March 11, 2022 19:15
@@ -151,7 +152,7 @@ func doExtractMessage(opts extractOpts) error {
preroot = root
applyret, postroot, err = driver.ExecuteMessage(pst.Blockstore, conformance.ExecuteMessageParams{
Preroot: preroot,
Epoch: execTs.Height(),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The execution epoch was wrong, it should be the inclusion tipset.

Comment on lines +420 to +425
case mode == PrecursorSelectParticipants &&
msgSenderID == senderID ||
msgRecipientID == recipientID ||
msgSenderID == recipientID ||
msgRecipientID == senderID:
related = append(related, m.Message)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now find precursors by matching on all participants involved.

@arajasek arajasek merged commit 27eaeba into master Jun 7, 2022
@arajasek arajasek deleted the raulk/tvx-fixes branch June 7, 2022 03:34
Comment on lines +420 to +424
case mode == PrecursorSelectParticipants &&
msgSenderID == senderID ||
msgRecipientID == recipientID ||
msgSenderID == recipientID ||
msgRecipientID == senderID:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A parentheses seems to be missing around the OR parts.

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