-
Notifications
You must be signed in to change notification settings - Fork 20.3k
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
t8ntool support merge rules #24003
Comments
Yes, we need to add this. |
I've implemented something here: #24141 |
Hi @MariusVanDerWijden, should we have the terminalTotalDifficulty somewhere as the input to the tests? In my opinion, I think the difficulty==0 should be a verification rather than an input to the test. @winsvega suggests that perhaps we should have a "Merge" fork to validate these. I'm inclined towards having TTD and then if totalDifficulty >= TTD, verify that difficulty==0, opcode difficulty()==currentRandom, etc. Let me know what you think. |
"terminalTotalDifficulty" needs to be in chain config for the client same way we used to have "berlinForkNumber" and so on. T8n tool should have --fork "Merge" to activate evm in pos mode. The input changes to have "currentRandom", the difficulty calculation dissapear |
any news? I can start updating the tests for the PoS format as the blockheaders will change it will affect all tests. need to check that PoS does not break existing tests. |
Speculating on some options here:
With an env like
Then when running
One possible drawback is that it won't be possible to know if the Also, the client should react differently in two cases:
With this schema, we would have to just pretend that the block being tested in @marioevz how does this ^ compare to your suggestion? |
terminal total difficulty is blockchain logic. tool does not do blockchain logic. it is like when running FrontierToHomesteadAt5 all that is required from t8n is access to evm in PoS mode. @marioevz says there is mode --fakepow to deal with the test blocks. perhaps can be something like --fakepos to accept blocks with difficulty=0 in pos mode |
Hm. Yeah I guess you're right! |
Regarding the --fakepos, this is related to the hive When we attempt to import a PoS block, it results in Bad Block error:
The genesis for the test does contain |
The hive consensus simulator itself will have to be modified -- first importing pow blocks, then importing via some other means -- possibly by feeding the PoS blocks over the rpc |
I think there could be a benefit to test importing PoS blocks by other means other than the Engine API, for example to test fields that the block header has but the Engine API doesn't, like the ommersHash or the nonce. |
Hey @MariusVanDerWijden , regarding this issue, the hive consensus simulator currently tries to import the block using Do you think it would be worth it to test importing these PoS blocks via the One upside I see of importing these blocks, using different means other than the Engine API, is that these imported blocks could contain fields that are not available in the Engine API newPayload, such as the ommersHash or the Nonce. Is this a valid testing scenario or should we simply import everything using the Engine API ? |
Hmm I think it makes sense for |
Define of terminal total difficulty as 0 in genesis.json should assume that client start in PoS mode since block 1 |
Add new fork to t8ntool
--fork Merge
for example.That tells the evm to work with PoS mode. meaning env section follows the nonce, mixhash, difficulty requrements.
random bytecode and so on.
The text was updated successfully, but these errors were encountered: