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

Tool for applying test vectors from Ethereum on FEVM #1482

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

wenxinnnnn
Copy link

@wenxinnnnn wenxinnnnn commented Jan 16, 2023

Tracking issue filecoin-project/devgrants#1202.

  1. We implemented a command-line tool that extracts transactions from ethereum and generates test vectors.

  2. We extended TestVector to provide more contextual information:

    • Added chain_id field to TestVector ( for the opcode CHAINID to read )
    • Added tipset_cids field to TestVector ( for the opcode BLOCKHASH to read )
    • Added timestamp field to Variant ( for the opcode TIMESTAMP to read )
    • Added _debug field to Metadatato provide information about transaction.
  3. We extend the way test vectors are compared to :

    • Added skip_compare_gas_used field to TestVector to allow comparisons that ignore gasUsed.
    • Added skip_compare_addresses field to TestVector to allow comparisons that ignore some addresses.
      (Due to the difference in gas consumption between filecoin and ethereum, So we can't compare from address)
    • Added skip_compare_actor_ids field to TestVector to allow comparisons that ignore some builtin actors.
      (Since there is no way to compare RewardActor and BurntFundsActor, we need to ignore the comparison of these two builtin actors)
    • Added additional_compare_addresses field to TestVector to allow comparison of more contract addresses.
      (Since an ethereum transaction may involve more contract addresses than the to address)

@wenxinnnnn
Copy link
Author

another PR: filecoin-project/test-vectors#192

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.

None yet

4 participants