-
Notifications
You must be signed in to change notification settings - Fork 35
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
test: Enable Shanghai and Cancun EIPs blockchain test by Cancun and Prague forks #211
test: Enable Shanghai and Cancun EIPs blockchain test by Cancun and Prague forks #211
Conversation
930d209
to
abb1237
Compare
9bd1211
to
877e495
Compare
default: | ||
// It's an EIP-2718 typed TX envelope. | ||
// First read the tx payload bytes into a temporary buffer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We must not decode 01~04 prefixes. It's Kaia's spec to disallow them. Because,
- Case A. allow both Eth and Kaia type bytes
f9... -> legacy
01... -> eth accesslist
08... -> kaia valuetransfer
what if Eth defines 08 in the future?
- Case B. Eth and Kaia types are distinguished with envelope
f9... -> legacy
01... -> disallowed
7801... -> eth accesslist
08... -> kaia valuetransfer
7808... -> eth type 8
and we chose type B in 2022. TxInternalDataSerializer.DecodeRLP accepting 0x01
prefix is an explicit spec violation. Please try to convert the test JSON, for instance,
- decode EthBlock RLP
- extract EthTx RLPs array
[][]bytes
(don't further decode txs here) - attach 0x78 if first byte of each tx RLP is 01,02,03,04
- then decode into Kaia's
[]types.Transaction
.
if UseKaiaCancunExtCodeHashFee && chainConfig.Rules(header.Number).IsCancun { | ||
// EIP-1052 must be activated for backward compatibility on Kaia. But EIP-2929 is activated instead of it on Ethereum | ||
vm.ChangeGasCostForTest(&vmenv.Config.JumpTable, vm.EXTCODEHASH, params.WarmStorageReadCostEIP2929) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If EIP-1052 fails, then let it fail and skip those JSONs (unless most tests fail due to 1052). The skip list is the accurate representation of Kaia's compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then let it fail and skip it
Does it means vm.ChangeGasCostForTest
?
b474ad6
into
kaiachain:feat/eets-blockchain-test
Proposed changes
This PR enables Shanghai, Cancun EETS blockchain testing with the Cancun and Prague forks.
The flow has been slightly changed to enable blockchain testing.
It includes some code to check for eth compatibility, but these may not be optimal.
Please review these only for the logic to proceed with the test task first.
Types of changes
Please put an x in the boxes related to your change.
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
I have read the CLA Document and I hereby sign the CLA
in first time contribute$ make test
)Related issues
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...