-
Notifications
You must be signed in to change notification settings - Fork 327
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
EIP2930 tests #774
EIP2930 tests #774
Conversation
I have not checked the actual files, but based upon the list of items on your first post, I'd say that we should also verify that the access list is cleared after every transaction. So if transaction 0 has on the access list address A and storage slot B, when we access this slot, we get a discount. If transaction 1 in the same block, which has an empty access list, also accesses address A and storage slot B, then this transaction should not get a discount and instead charge the default gas cost. The |
I should have updated the list - I now have one on a spreadsheet. I'll do that soon, thank you for reminding me. I agree that we need to also run checks at the block level. We do, see https://github.com/qbzzt/tests/blob/eip2930/src/BlockchainTestsFiller/ValidBlocks/bcValidBlockTest/eip2930Filler.yml. |
There are now eighteen tests of using the access list in multiple contexts: https://github.com/qbzzt/tests/blob/eip2930/src/GeneralStateTestsFiller/stEIP2930/variedContextFiller.yml |
I'm also getting
I think the blockchain tests may need to be regenerated, there was a bug in the rlp decoding of receipts which caused certain types of failures, when importing blocks from the network. This may have caused the reciept roots to become bad somwhere in the retesteth <-> geth generation flow |
I don't have broadband (we had a record breaking snow storm), so it is
harder for me to work. I will deal with this over the weekend
…On Fri, Feb 19, 2021, 7:22 AM Martin Holst Swende ***@***.***> wrote:
I'm also getting
=== RUN TestBlockchain/GeneralStateTests/stEIP2930/addressOpcodes.json/addressOpcodes_d0g0v0_Berlin
block_test.go:49: test without snapshotter failed: block #1 insertion into chain failed: invalid receipt root hash (remote: 11effa66837b7a5862d19efbad498ebe70fdc2bc0c6a34e5a6d778d9418a0b96 local: 456363f366e20ef1d551bee5fd49391178243b0b6a38a99b0e9342d85b699ac9)
I think the tests may need to be regenerated
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#774 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADBCGGMUR76PFUJTER5I3MLS7ZQXVANCNFSM4WYDSDZQ>
.
|
Thanks -- but it wasn't my intention to dump this on you on a Friday afternoon and make you work over the weekend, so take the time you need :) |
No problem. Most of my Ethereum work is done over weekends.
…On Fri, Feb 19, 2021, 2:43 PM Martin Holst Swende ***@***.***> wrote:
Thanks -- but it wasn't my intention to dump this on you on a Friday
afternoon and make you work over the weekend, so take the time you need :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#774 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADBCGGJJJY4DVVOMRQ2PEL3S73EQBANCNFSM4WYDSDZQ>
.
|
Imo: Type 0 should be null for access list. Type 1 should be non-null, but empty. Empty list, not empty object, though.
|
Empty array [] is for empty list. |
That makes no sense. And primarily: it's mixing and matching types within a list. Does the list contain lists or objects? One or the other, please.Why not let null represent null?
|
I regenerated the tests. Can you verify they work now? |
Hello, I had run these tests in OpenEthereum and they all fail with receiptRoot mismatch. @holiman are you getting the same? |
Haven't gotten to the block tests yet, but as far as the berlin statetests goes, it seems alright so far |
Both geth and OE is ok with Your
Geth:
So both geth and OE thinks the root should be |
Can you check the poststate that produces this receipt? Then we can compare
it with the poststate produced by retesteth and see what is the difference.
…On Mon, Feb 22, 2021, 6:16 AM Martin Holst Swende ***@***.***> wrote:
Both geth and OE is ok with transactionCosts_d0g0v0_Berlin but rejects
transactionCosts_d1g0v0_Berlin.
Your
Bad block detected: Error(Block(InvalidReceiptsRoot(Mismatch { expected: 0xa016a3e03d190d68ed522721348ab73e351de580cfe6cc0599c1ef3ce4e970ee, found: 0x485bb85f3a7e7fcf258228d475d08c3e835dc101052212a25a83afd061b2fd6e })), State { next_error: None, backtrace: InternalBacktrace { backtrace: None } })
Geth:
=== RUN TestBlockchain/GeneralStateTests/stEIP2930/transactionCosts.json/transactionCosts_d1g0v0_Berlin
block_test.go:54: test without snapshotter failed: block #1 insertion into chain failed: invalid receipt root hash (remote: a016a3e03d190d68ed522721348ab73e351de580cfe6cc0599c1ef3ce4e970ee local: 485bb85f3a7e7fcf258228d475d08c3e835dc101052212a25a83afd061b2fd6e)
So both geth and OE thinks the root should be
0x485bb85f3a7e7fcf258228d475d08c3e835dc101052212a25a83afd061b2fd6e
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#774 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADBCGGKL7TZSEFTHIL7I3WLTAJDIRANCNFSM4WYDSDZQ>
.
|
Which branch of geth did you use? There was an issue with receipt hashes. |
I'm running with the very latest. This is definitely an issue with how retesteth creates the receipt root hash. I can provide more info, but I'm not sure what info is most useful to you. I could provide all the key-value pairs going into the receipt trie if you want? |
Actually, the problem may be in the |
The |
How do I do that? I tried to run
```
git clone --depth 1 https://github.com/ethereum/go-ethereum.git /geth
cd geth
git checkout 6304c7b
```
But I get this error:
```
error: pathspec '6304c7b' did not match any file(s) known to git
```
Is there a different mechanism to checkout a specific commit?
Thanks,
Ori
…On Tue, Feb 23, 2021 at 2:27 AM Martin Holst Swende < ***@***.***> wrote:
The t8n tool problem should be fixed by this commit: ethereum/go-ethereum@
6304c7b
<ethereum/go-ethereum@6304c7b>
. Please check if that solves the problem
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#774 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADBCGGO4JS5XF6G2B6QI27LTANRGRANCNFSM4WYDSDZQ>
.
|
you should just be able to
|
@qbzzt it appears that retesteth doesn't like the receipt encoding, particularly:
It rejects the |
I pushed a commit to the geth-PR which now makes the receipt type a 0x-prefixed string
|
hm. now when the format is changed I need to change the parser check of the response files. the receipt or state root hash I get from evm t8n tool. |
Tell me when I can create a new docker that would work.
…On Wed, Feb 24, 2021 at 12:49 PM winsvega ***@***.***> wrote:
hm. now when the format is changed I need to change the parser check of
the response files.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#774 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADBCGGJEAJ2UNAAUHLVAZHTTAVC33ANCNFSM4WYDSDZQ>
.
|
Now. But the head of light client branch doesn't compile. Use head - 1 |
Phew, I finally got it! I'm going to commit and push another update, hopefully the last one. |
According to @MariusVanDerWijden , these now seem fine! Please merge, and we'll pull the latest and greatest into our go-ethereum CI test harness |
For OE we have failed eip2930 state tests, with state root mismatch: https://gist.github.com/rakita/7418931666fe5ed54ab3144d88579352 edit: it is OE problem i need to add support for access list in state tests. |
@rakita as long as the tests pass in the form of block-tests, I think we can be confident that the tests are fine. They do, right? |
We had some back-and-forth about this with @winsvega . In the end, yes, the |
How about we include transaction rlps into generated state test as well? Let's say in post section near to state root. |
I have two problems with the current format. (1) The EIP2930 tests do not have a chain id field. There should be one, we cannot assume that if none exists, then the chain id is 1 (if the field is empty, then we would normally encode this as the empty buffer) |
Actually, every single test requires a chainID, at least since we introduced the
I kind of agree. I think the idea of tying it with an existing index is that we then don't have to regenerate all existing tests. Or, it might also be that the combinatorics explode too much if we permute on four different indices..? Not sure. I'm kind of ok with how it is, but I would also have been ok with not having access lists indexed at all. My personal preference is to just use what we have now, and move on.. |
The problem is that currently it does not work if we have a test where we have both AccessList transactions and Legacy transactions. |
It's an accesslist-transaction if the field is non-null. It's a legacy if |
So this is a LegacyTransaction? |
Yes. But let's check. It's at index Transaction here: https://github.com/ethereum/tests/pull/774/files#diff-4499e014502f7dca537b9a0e511b4c330d9aafa04483b3732e9493dcc513b842R93-R104
Yep, indeed |
And yes, we discussed it a bit further up: #774 (comment) |
Ah great, thanks for the explanation @holiman! 😄 |
Yes its getting quite complicated. To make things clear I want to introduce transaction rlps into gstate tests so there would be no need to build and sign the transaction on clients side, just take the rlp. And no indexing issue. |
You keep mentioning transaction |
ok. since the lightclient branch is merged. we merge this to develop. |
it is still rlp. because when you encode a block rlp transactions are encoded into that rlp. there for a list element in transaction list is a valid rlp. like (data encoded as byte array) |
You can see the list of tests added at https://docs.google.com/spreadsheets/d/1VsM4e0lsBNTe_6nYtr_8P-IVZaJT321ZnDjpxkT8XAg/edit?usp=sharing .