Ho
e6500918a0
refactor: adapt to standalone zktrie module ( #165 )
...
* adapt zktrie: zktrie part
* adapt unittests
* pass tests
* refactor for new zktrie module
* run go imports
2022-10-17 14:32:42 +08:00
iczc
b3a7c9b691
p2p: define DiscReason as uint8 ( #164 )
...
p2p: define DiscReason as uint8 (#24507 )
All other implementations store disconnect reasons as a single byte,
so go-ethereum should do it too.
Co-authored-by: Felix Lange <fjl@twurst.com>
2022-10-12 20:05:56 +08:00
Ho
4ee7885525
Fix witness generator for failed call/create op and tx ( #146 )
...
* update test examples
* update tests
* solidify account deleting
* update zkwriter for reverting
* solid handling for call, and update test examples
* fix status capture for CREATE issue, update test examples
* add fail case for deploy
* update test example (call non-exist address)
* move test and stuffs to internal path, make required exports
* fix issue in selfdestruct
* update destruct test
* lint
* rename traces
2022-10-10 17:13:24 +08:00
maskpp
ca2e576d81
avoid the unexpected situation ( #163 )
2022-09-26 10:32:47 +08:00
maskpp
3a7da33cd5
fix: fix not using point for sync.Pool recycling ( #158 )
...
fix bug
2022-09-20 15:05:44 +08:00
maskpp
15391eeaf7
feat: add replay blockResult API ( #139 )
...
* replay trace
* replay trace
* add sdk
* fix trace test case
* fix bug
* Update eth/tracers/api_blockResult.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update eth/tracers/api_blockResult.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update eth/tracers/api_blockResult.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update eth/tracers/api_blockResult.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* add comments
* fail the rpc call if get error
* adjust channel length
* fix bug
* fix bug
* remove redundant codes in worker
* add test case
* fix bug
* fix goimports
* Update eth/tracers/api_blockResult.go
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
* fix comments
* Update ethclient/ethclient.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update ethclient/ethclient.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* rm coinbase api in miner
* fix comment
* Update eth/tracers/api.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* fix comment
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
2022-09-20 14:30:57 +08:00
Ho
edbb595e66
Trace the account accessed by EXTCODE op ( #157 )
...
add account touch by 'EXTCODE' for storeTrace
2022-09-17 22:44:29 -07:00
maskpp
9182a74334
fix logs error tracing ( #154 )
...
* fix err handle
* fix err handle
* fix err handle
2022-09-13 11:15:31 +08:00
Péter Garamvölgyi
304af60f50
feat: change bytecode hash function from Keccak to Poseidon ( #149 )
...
* feat: change bytecode hash function from Keccak to Poseidon
* fix TestStateProcessorErrors
* rename files
* copy iden3's poseidon package to local
* update poseidon hash
* apply new hash in codehash
* extend hash method, use actual code size as cap
* prune keccak(nil) for empty code
* update empty code hash references to Poseidon
* add TestPoseidonCodeHash
* use keccak for empty code hash
* go mod tidy
* goimports
* use Poseidon code hash in state and sync tests
* run goimports
* run goimports
* remove unnecessary reallocation from CodeHash
* goimports
* move codehash API to separate module
* add missing package
* fix review comments
* improve comments
Co-authored-by: Ho Vei <noelwei@gmail.com>
2022-09-08 06:16:17 +08:00
Péter Garamvölgyi
346bfc82e8
feat: re-enable p2p layer ( #152 )
2022-09-07 10:00:40 +02:00
maskpp
ff9405b2fa
Update change logs ( #125 )
...
* Update changelogs file
* Update changelogs
2022-08-24 23:49:09 -07:00
Péter Garamvölgyi
00ed553a57
feat: disable SELFDESTRUCT opcode in l2geth ( #147 )
...
* feat: disable SELFDESTRUCT opcode in l2geth
* remove deadcode
2022-08-22 14:17:57 -07:00
maskpp
01a0618b02
fix: reset trace Error field when finalizing ( #143 )
2022-08-18 10:22:36 +08:00
maskpp
dd76f3425a
feat: add txHash in blockResult ( #142 )
...
add txHash in blockResult
2022-08-15 16:43:08 +08:00
maskpp
d421337df5
Disable memory trace ( #134 )
...
disable memory trace
2022-07-30 08:15:08 +08:00
Ho
f9952a396f
unify byte order in zktrie node's fields being stored ( #133 )
2022-07-28 21:32:42 +08:00
Ho
fefa8b99c7
fix getProof API when zktrie is enabled ( #132 )
...
fix getProof under zktrie
2022-07-27 13:01:38 +08:00
HAOYUatHZ
eb11a84c56
fix(trace): add more opcode handlings ( #128 )
2022-07-24 21:39:33 +08:00
Ho
37dbb86aa6
fix: add the mutation of coinbase address under clique mode ( #126 )
...
fix clique coinbase issue
2022-07-21 16:00:50 +08:00
Ho
3682e05f3f
zktrie part3: include zktrie witness in block trace; add demo for generating witness data for mpt circuit ( #123 )
...
* demo for witness generator
* add simple binary for witness generating
* revert the witgen utility
* purge some code
* induce mptwitness argument
* handle case for failed tx, and special block in POA
* mptwitness: refactor for enabling output ops with different order
* induce witness gen with rwtable order
* self-documenting options for mptwitness
* fix trace flag according to review
* fix issue in handling failed tx
* refactor
* update according to reviews
Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>
2022-07-16 07:00:07 +08:00
Ho
c516a9e477
zktrie part2: add zktrie; allow switch trie type by config; ( #113 )
...
* induce zktrie
* refactoring zktrie
* fix crash issue in logger
* renaming JSON field
* unify hash scheme
* goimport and mod lint
* backward compatible with go 1.17
* lints
* add option on genesis file
* corrections according to the reviews
* trivial fixes: ValueKey entry, key in prove nodes
* fixing for the proof fix ...
* avoiding panic before loading stateDb in genesis setup
* revert ExtraData.StateList json annotation for compatibility
* fix goimports lint
* fix goimports lint
* better encoding for leaf node
* fix proof's printing issue, add handling on coinbase
* update genesis, and rule out snapshot in zktrie mode
* update readme and lint
* fix an issue
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>
2022-06-27 11:17:02 +08:00
ChuhanJin
3410a56d86
Fix CI docker build issue ( #121 )
...
delete node
Co-authored-by: chuhanjin <419436363@qq.com>
2022-06-27 09:02:25 +08:00
maskpp
f731427282
fix(trace): change error type to string ( #119 )
...
* Fix bug of error type
* Fix bug of error type
2022-06-23 16:00:36 +08:00
HAOYUatHZ
21b65f4944
core/vm: Make INVALID a defined opcode ( #118 )
...
core/vm: Make INVALID a defined opcode (#24017 )
* core/vm: Define 0xfe opcode as INVALID
* core/vm: Remove opInvalid as opUndefined handles it
Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
Co-authored-by: Andrei Maiboroda <andrei@ethereum.org>
Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
2022-06-22 17:18:47 +08:00
maskpp
e15d0d35cb
fix: fix codeList type ( #117 )
2022-06-21 18:25:07 +08:00
Zhang Zhuo
d3bc8322dc
zktrie part1: change storage proof from per step to per block ( #102 )
...
* change storage proof from step-wise to block-wise. Step-wise proof will be reconstructed in prover side
* minor
* minor
* Update worker.go
* purge hexInt
* Update l2trace.go
* Refactor l2witness/opt-storage-proof (#112 )
* rename GetStateData to GetLiveStateObject
* revert EvmTxTraces type
* rename GetLiveStateObject to GetLiveStateAccount
* fix typo
* some renamings
* format codes
* fix typo
* fix typos
* format codes
some reverts
some renamings
some renamings
format codes
* update comments
update comments
* update comments
update comments
update comments
* update comments
update comments
update comments
* rename
* rename
* update
* update comments
Co-authored-by: maskpp <maskpp266@gmail.com>
Co-authored-by: Ho Vei <noelwei@gmail.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
2022-06-08 12:26:50 +08:00
ChuhanJin
35f6a91cd5
chore: remove docker push ( #111 )
...
Co-authored-by: chuhanjin <419436363@qq.com>
2022-05-30 22:20:09 +08:00
maskpp
9b99f2e174
fix bug and optimize fill_trace logic for gc ( #104 )
...
* fix bug and upgrade trace code
* minor
* refactor (#105 )
* move
* add comments
* fix typo
* update comments
* rename extraData()
* update comments
Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
2022-05-26 10:35:27 +08:00
maskpp
9199413d21
opt: improve trace handling logic to decrease GC pressure. ( #92 )
...
* Upgrade trace code to decrease GC pressure.
* Fix golangci bug
* Add goproxy
* update docker file
* trigger ci
* trigger ci
* Upgrade code
* Upgrade code
* trigger ci
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
2022-05-18 22:38:15 +08:00
HAOYUatHZ
571dcad4be
feat: add to AccountProof to trace ( #98 )
...
* init to
* update
* fix `to` address
* fix
* fix
* refactor
2022-05-18 05:43:43 +08:00
HAOYUatHZ
6e872d0826
add CHANGELOGS-2022-05-04 ( #88 )
2022-05-17 15:17:27 +08:00
maskpp
0541145fd6
feat: add config for blockResult cache_limit ( #97 )
...
* Let blockResult limit settable
* fix bug
* Update cmd/geth/usage.go
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
2022-05-16 18:41:40 +08:00
maskpp
a79e72f697
refactor: optimize and improve tps for contract call. ( #83 )
...
* upgrade block trace
* upgrade block trace
* Correct comments
2022-05-04 10:12:17 +08:00
maskpp
c180aa2e75
enable berlin & london ( #76 )
2022-04-06 11:27:15 +08:00
HAOYUatHZ
06190d0642
fix FormatLogs memory ( #75 )
2022-04-02 11:25:07 +08:00
HAOYUatHZ
3d3c9d3edf
fix bigInt encoding ( #74 )
...
* fix bigInt encoding
* fix balance
2022-04-02 10:13:04 +08:00
maskpp
b714e22893
fix bug of null baseFee ( #73 )
...
* fix bug of null baseFee
* Update l2trace_block.go
* Update l2trace_block.go
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
2022-04-01 20:40:34 +08:00
HAOYUatHZ
33fcd2bf6d
fix(trace): use string for big.Int ( #72 )
2022-04-01 16:56:01 +08:00
maskpp
2329d32409
fix(trace): fix incorrect sender state info. ( #71 )
2022-04-01 16:07:26 +08:00
maskpp
40e8f088b6
opt: upgrade blockResult process flow ( #68 )
...
* upgrade blockResult process flow
* fix format optimization
2022-03-31 18:01:14 +08:00
HAOYUatHZ
a96775b3ff
fix code_hash json annotation ( #64 )
2022-03-31 15:08:04 +08:00
maskpp
fccb5bf6ec
fix bug about get the trace of opcode ( #67 )
2022-03-31 15:00:55 +08:00
HAOYUatHZ
9f1d8552e4
feat: add RefundCounter to StructLogRes ( #66 )
2022-03-31 13:11:34 +08:00
maskpp
e55d05d3ab
optimizate code ( #63 )
2022-03-31 11:37:33 +08:00
HAOYUatHZ
360115e61f
add code_hash to trace
2022-03-30 15:17:57 +08:00
HAOYUatHZ
8ccc10541d
feat(trace): add coinbase account_proof ( #58 )
2022-03-30 13:46:16 +08:00
Steven
5128154925
fix CaptureState ( #56 )
...
* Move code of `captureStateAfter` to `captureState`, and refactor some
code.
* Fix to use the right key in `traceStorageProof`.
* clean up
* Update `capatureStateAfter`.
* fix
* fix
* Get storage key from stack of last log.
* Revert wrong fix.
* minor
Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>
2022-03-28 23:02:48 +08:00
HAOYUatHZ
bb17b87f71
Update l2geth_ci.yml
2022-03-25 12:08:49 +08:00
Steven
b6cc89fabe
Add goimports lint ( #54 )
...
* Add `goimports` lint.
* Fix `goimports` issue.
* Fix group to `github.com/scroll-tech/go-thereum`.
2022-03-24 16:53:59 +08:00
HAOYUatHZ
f8532484a6
improve doc for OpcodeExecs ( #48 )
2022-03-21 13:10:11 +08:00