ref-fvm
ref-fvm copied to clipboard
Tool for applying test vectors from Ethereum on FEVM
Tracking issue https://github.com/filecoin-project/devgrants/issues/1202.
-
We implemented a command-line tool that extracts transactions from ethereum and generates test vectors.
-
We extended TestVector to provide more contextual information:
- Added
chain_idfield toTestVector( for the opcodeCHAINIDto read ) - Added
tipset_cidsfield toTestVector( for the opcodeBLOCKHASHto read ) - Added
timestampfield toVariant( for the opcodeTIMESTAMPto read ) - Added
_debugfield toMetadatato provide information about transaction.
- Added
-
We extend the way test vectors are compared to :
- Added
skip_compare_gas_usedfield toTestVectorto allow comparisons that ignore gasUsed. - Added
skip_compare_addressesfield toTestVectorto allow comparisons that ignore some addresses. (Due to the difference in gas consumption between filecoin and ethereum, So we can't comparefrom address) - Added
skip_compare_actor_idsfield toTestVectorto allow comparisons that ignore somebuiltin 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_addressesfield toTestVectorto allow comparison of more contract addresses. (Since an ethereum transaction may involve more contract addresses than the to address)
- Added
another PR: https://github.com/filecoin-project/test-vectors/pull/192