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

Add support for block tests #414

Closed
Gustav-Simonsson opened this issue Mar 3, 2015 · 4 comments
Closed

Add support for block tests #414

Gustav-Simonsson opened this issue Mar 3, 2015 · 4 comments
Milestone

Comments

@Gustav-Simonsson
Copy link

Support for these tests: https://github.com/ethereum/tests/blob/develop/BlockTests/blValidBlockTest.json

Branch: https://github.com/Gustav-Simonsson/go-ethereum/tree/add_blockchain_tests2

Status: When running https://github.com/ethereum/tests/blob/develop/BlockTests/bcValidBlockTest.json the seedhash used by Go is not the one in the given block header, but the one from the preceding block, in this case the genesis block.

This mismatch of seedhash causes a mismatch in the generated ethash cache, giving different result of PoW verification which is logged as a PoW nonce mismatch.

This could be a problem with the pow.Chainmanager state, and may only apply to the actual blocktests and not when running the Go client in general.

@obscuren obscuren modified the milestone: Frontier Mar 9, 2015
@Gustav-Simonsson
Copy link
Author

Update: with changes now merged into develop, we still get a mismatch on the PoW nonce. Debugging shows that all values passed to ethash_light is same as C++ except for the actual cache.

While C++ develop branch works with BlockTests/blValidBlockTest.json SimpleTx, it has a pending PR waiting with changes to ethash: ethereum/aleth#1304

The branch (918c1cd7998767d455876dd760094a47638a7340) in that PR is not currently building:

[17/03/15 13:44:49] Gustav Simonsson: [ 24%] Building CXX object libethcore/CMakeFiles/ethcore.dir/ProofOfWork.cpp.o
/home/gs/eth/cpp-ethereum/libethcore/Ethasher.cpp: In static member function ‘static bool dev::eth::Ethasher::verify(const dev::eth::BlockInfo&)’:
/home/gs/eth/cpp-ethereum/libethcore/Ethasher.cpp:104:24: error: ‘ETHASH_EPOCH_LENGTH’ was not declared in this scope
if (_header.number >= ETHASH_EPOCH_LENGTH * 2048)
^
/home/gs/eth/cpp-ethereum/libethcore/Ethasher.cpp:113:2: error: ‘ethash_quick_hash’ was not declared in this scope
);
^
make[2]: *** [libethcore/CMakeFiles/ethcore.dir/Ethasher.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

Suggestion is to wait for C++ PR to be merged and the tests updated accordingly before we update Go (again).

@Gustav-Simonsson
Copy link
Author

Update: We now have bcValidBlockTest.json "SimpleTx" passing block header validations (insert of the block works). However, the "dataTx" test in the same file runs into a gas validation:

2015/03/20 04:38:12 [BLOCK] TX err: out of gas! require 20000, have 2870

@Gustav-Simonsson
Copy link
Author

Update: PR which adds post state validations, disables network and adds RPC flag: #537

We have a regression from last Friday in bcValidBlockTest.json "SimpleTx" :

> ./ethereum blocktest /home/gs/eth/tests/BlockTests/bcValidBlockTest.json SimpleTx r
2015/03/21 20:30:42 [SERV] Protocol Version: 58, Network Id: 0
2015/03/21 20:30:42 [CHAIN] Last block (#0) fd4af92a79c7fc2fd8bf0d342f2e832e1d4f485c85b9152d2039e03bc604fdca TD=0
2015/03/21 20:30:42 [POW] Making Cache
2015/03/21 20:30:44 [POW] Took: 1.411470917s
2015/03/21 20:30:44 [POW] Making Cache
2015/03/21 20:30:45 [POW] Took: 1.440854539s
2015/03/21 20:30:45 [CHAIN] INVALID block #1 (3d3e8a3b)
2015/03/21 20:30:45 [CHAIN] Difficulty check failed for block 131072, 131008
Fatal: Block Test load error: Difficulty check failed for block 131072, 131008

@obscuren
Copy link
Contributor

obscuren commented Apr 2, 2015

All tests currently pass in bcValidBlockTest JS_API

@obscuren obscuren closed this as completed Apr 2, 2015
AusIV pushed a commit to NoteGio/go-ethereum that referenced this issue Jan 18, 2022
…-evmc-sources

build: don't download already-existing evmc sources for testing
tony-ricciardi pushed a commit to tony-ricciardi/go-ethereum that referenced this issue Jan 20, 2022
tanishqjasoria pushed a commit to tanishqjasoria/go-ethereum that referenced this issue Oct 31, 2023
* add proof for predeployed storages

* reverse inneeded code

* update for mainbranch merging

* add pertx storage trace

* dummy tx proof

* add txstorage trace

* add coinbase storage as trace

* enable (sync) tracing by default

* basic

* init cgo framework

* fix break loop

* integrate the right zkevm version (ethereum#323)

* finish rust codes

* use dylib (ethereum#325)

* flip

* ?

* use cdylib

* revert

* fix

* apply_tx

* rename

* fixing types

fixing types

fixing types

* clean up

* ExecutionResults (ethereum#328)

* filling

* filling

* more

* clean up

* filling

* coinbase

* add

* MPTWitness

* ExecutionResults WIP

* L1fee

L1fee

* sender

* to

* Failed & ReturnValue

* createdAcc & after

* remove MPTWitness

* txStorageTrace

* add FeeRecipient

* add StorageTrace

* fix FFI types

* better logger

* cargo fmt

* fix

* add build tags

* update Makefile

* fix library

* improve ld path

* correctly deal with circuit_capacity_checker returned result

* fix return value

* update cargo (ethereum#333)

* update cargo

* update

* update go

* refactor

* raname `circuits capacity checker` to `circuit capacity checker`

* some refactorings

* [Fix] storage proof generation in capacity checker (ethereum#348)

* make per-tx storage and deletion proof work

* format

* fix misplaced markdeletion

---------

Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>

* docker (ethereum#363)

* update Dockerfile

* build: update go version to 1.19

* update

* fix

* fix

* try

* simplify

* revert go version

update l2geth Dockerfiles

* fix

* fix coinbase

* fix (ethereum#369)

* format

* Update version.go

* address comments

* Capacity refactor (ethereum#374)

* init

* id

* support multiple instances

* fix id

* fix conflicts

* refactor to use same codes (ethereum#379)

* re-init

* WIP

* WIP

* refactor

* go

* minor

* fix storage proof of l1gas price oracle

* move 1

* move 2

* move 3

* move 4

* move 5

move 5

* move 6

move 6

* move 7

* move 8

* move 9

* move 10

* clean up

clean up

---------

Co-authored-by: Ho Vei <noelwei@gmail.com>

* finish basic

* minor

* config capacity check in block_validator (ethereum#380)

* init

* done

ref

* fix tests

fix tests

fix tests

fix tests

* add more comments

* apply_block

* improve logs

* cargo fmt

* Capacity big refactor (ethereum#383)

* CreateTraceEnv

* WIP

* draft

more

fix

* for test

* fortet

* clean up

* add more comments

* goimports -local github.com/scroll-tech/go-ethereum -w .

* fix typos

* attempt 1

* attempt 2

* attempt 3

* gogogo

* clean up

* fix

* fix

* rename

* minor

* fix

* minor

* minor

* improve doc

* use dedicated `checkCircuitCapacity` flag (ethereum#394)

* refactor

* fix

* add lock

* [feat] capacity checking: upgrade libzkp (ethereum#395)

* upgrade

* upgrade libzkp

* write RowConsumption (ethereum#396)

* write RowConsumption

* name alignments

* revert some formatting

* add lock to CircuitCapacityChecker in BlockValidator

* remove mutex pointer

* improve github workflow

* improve

* store row consumption in mining (ethereum#397)

* prepare

* finish

* add more logs

* mark `ApplyBlock` as ready

* update libzkp (ethereum#401)

* fix

* Capacity detail (ethereum#402)

* fix(block-validation): consider skipping in ValidateL1Messages (ethereum#405)

* fix(block-validation): consider skipping in ValidateL1Messages

* fix(block): consider skipping in L1MessageCount

* fix l1 validation tests

* fix NumL1Messages

* fix impl.go return types

fix

* better error handling (ethereum#407)

* add

add

* add

* add

* add

* add

* cargo fmt

* add

* update

* add

* WIP

* minor

* gogogo

* gogogo

* fix

* fix

* fix

* cargo clippy

* improve

* improve

* creation lock (ethereum#408)

* creation lock

* update

* Debug log (ethereum#409)

* add more logs

* more

* more

* fix

* improve

* Update cmd/utils/flags.go

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>

* refactor worker.commit()

* avoid re-calculate

* txpool ccc err handling (ethereum#411)

* more explicit error comments

* add more logs

* fix unnecessary commit

* add more logs

* fix `ineffassign`

* add more comments

* log id for `NewCircuitCapacityChecker` (ethereum#414)

add log to `NewCircuitCapacityChecker`

* Persist skip info for block where all L1 msgs are skipped (ethereum#415)

persist skip info for block where all L1 msgs are skipped

* Update version.go

---------

Co-authored-by: Ho Vei <noelwei@gmail.com>
Co-authored-by: Zhang Zhuo <mycinbrin@gmail.com>
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
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

No branches or pull requests

2 participants