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
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
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
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
maskpp
09a31ccc66
Upgrade txpool module to increase tps ( #43 )
2022-03-21 08:52:13 +08:00
HAOYUatHZ
13ea5c234b
fix(trace): update proofList struct ( #46 )
2022-03-19 13:28:25 +08:00
HAOYUatHZ
9fb413d702
fix(trace): rename BlockTrace.Transaction to BlockTrace.Transactions ( #47 )
2022-03-18 11:24:57 +08:00
HAOYUatHZ
3b4875c0d5
minor: update comments ( #45 )
2022-03-16 20:46:16 +08:00
HAOYUatHZ
a5999cee90
fix(trace): change codeHash to code ( #44 )
2022-03-16 16:17:50 +08:00
maskpp
69c291cf7a
feat: add more data into the execution trace ( #20 )
2022-02-21 10:15:57 +08:00
maskpp
7745fd5840
Extract execution trace from EVM execution and provide subscription API ( #19 )
...
* Create go.yml
* Merge from zkrollup and fix conflict
* go mod tidy
* fix worker_test test case
* fix worker_test test case
* Delete go.yml
* add log content, enable memory trace
* add tracer pool handler
* Add comments and format code
* add evmTrace subscribe api
* Move the evmTrace struct.
* Fix miner bug.
* upgrade evmTrace api
* fix bug about evmTracesByHash api
* Fix the bug about block.timestamp and remove unnecessary copy.
* Update eth/filters/api.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Upgrade comments.
* Delete useless code in test file
* Update miner/worker.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Change the return result to BlockResult.
* Change return type.
* Change blockResult to blockResults.
* Add ReturnValue.
* Update core/rawdb/l2trace.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update core/rawdb/l2trace.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update core/types/l2trace.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Add indent to the comment and rm json encoding flag.
* Rm json encoding flag.
* Update core/rawdb/l2trace.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Rm json encoding flag.
* Update ethclient/ethclient.go
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
* Update eth/filters/api.go
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
* Use as the blockResult prefix flag.
* Update eth/filters/filter_system.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update eth/filters/filter_system.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update ethclient/ethclient.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
* Update eth/filters/api.go
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
2022-01-23 20:41:15 +08:00
maskpp
b4d60884d2
Fix import fmt and run tests for given architecture ( #18 )
...
* fix gofmt
* Run tests for given architecture
* Speed up CI execution.
2022-01-12 19:45:06 -08:00
Jules
de7ed6af40
Update mod file and all imports to use scroll-tech URL ( #15 )
...
* Update mod file and all imports to use scroll-tech URL
Fixes #14
* Update Discord link
2021-12-24 10:59:22 +01:00
Martin Holst Swende
347c37b362
core/rawdb: use AncientRange when initializing leveldb from freezer ( #23612 )
...
* core/rawdb: utilize AncientRange when initiating from freezer
* core/rawdb: remove debug sanity check
2021-11-23 12:37:26 +01:00
Péter Szilágyi
50e07a1e16
Merge pull request #23928 from holiman/no_iota
...
core/vm: don't use iota for opcode definitions
2021-11-23 11:50:17 +02:00
Péter Szilágyi
d9c13d407f
core, eth/downloader: fix resetting below freezer threshold
2021-11-22 11:12:51 +02:00
Martin Holst Swende
ab31fbbde1
core/vm: don't use iota for opcode definitions
2021-11-18 09:50:52 +01:00
Jesse Tane
33f2813809
cmd/geth: add flag --dev.gaslimit for dev mode ( #23686 )
...
* cmd, core: add flag --dev.gaslimit to allow configuring initial block gas limit in dev mode
* core: use provided gaslimit
Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-11-16 13:45:02 +01:00
Martin Holst Swende
b7a6409cc1
core/rawdb: better error message in freezer ( #23901 )
...
* core/rawdb: better error message in freezer
* Apply suggestions from code review
2021-11-16 11:33:56 +02:00
Sina Mahmoodi
c57df9ca28
core/rawdb: add slow path for getting legacy logs ( #23879 )
...
* eth/tracers: add slow path for getting legacy logs
* core/rawdb: fix test
2021-11-11 15:04:06 +01:00
Andrei Maiboroda
f32feeb260
core/vm: implement EIP-2681: Limit account nonce to 2^64-1 ( #23853 )
...
This retroactively implements requirements or EIP-2681 for the account nonce upper limit.
2021-11-11 15:00:58 +01:00
Martin Holst Swende
6b9c77f060
eth/tracers: package restructuring ( #23857 )
...
* eth/tracers: restructure tracer package
* core/vm/runtime: load js tracers
* eth/tracers: mv bigint js code to own file
* eth/tracers: add method docs for native tracers
* eth/tracers: minor doc fix
* core,eth: cancel evm on nativecalltracer stop
* core/vm: fix failing test
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2021-11-09 12:09:35 +01:00
Felix Lange
9489853321
core: check effective tip in txpool pricelimit validation ( #23855 )
...
The price limit is supposed to exclude transactions with too low fee
amount. Before EIP-1559, it was sufficient to check the limit against
the gas price of the transaction. After 1559, it is more complicated
because the concept of 'transaction gas price' does not really exist.
When mining, the price limit is used to exclude transactions below a
certain effective fee amount. This change makes it apply the same check
earlier, in tx validation. Transactions below the specified fee amount
cannot enter the pool.
Fixes #23837
2021-11-08 16:25:35 +02:00
Martin Holst Swende
e1c000b0dd
cmd/geth: add support for sepolia testnet ( #23730 )
...
* cmd/geth: add support for sepolia testnet
* core: last details on sepolia genesis
* params: fix sepolia hash + reduce testing code
* Update params/bootnodes.go
* cmd/geth: fix attach path for sepolia
* params: update bootnodes
* params: fix
* core: fix docstring
* params: add sepolia CHT
2021-11-08 13:06:01 +02:00
Sina Mahmoodi
8d7e6062ec
eth/tracers: support for golang tracers + add golang callTracer ( #23708 )
...
* eth/tracers: add basic native loader
* eth/tracers: add GetResult to tracer interface
* eth/tracers: add native call tracer
* eth/tracers: fix call tracer json result
* eth/tracers: minor fix
* eth/tracers: fix
* eth/tracers: fix benchTracer
* eth/tracers: test native call tracer
* eth/tracers: fix
* eth/tracers: rm extra make
Co-authored-by: Martin Holst Swende <martin@swende.se>
* eth/tracers: rm extra make
* eth/tracers: make callFrame private
* eth/tracers: clean-up and comments
* eth/tracers: add license
* eth/tracers: rework the model a bit
* eth/tracers: move tracecall tests to subpackage
* cmd/geth: load native tracers
* eth/tracers: minor fix
* eth/tracers: impl stop
* eth/tracers: add native noop tracer
* renamings
Co-authored-by: Martin Holst Swende <martin@swende.se>
* eth/tracers: more renamings
* eth/tracers: make jstracer non-exported, avoid cast
* eth/tracers, core/vm: rename vm.Tracer to vm.EVMLogger for clarity
* eth/tracers: minor comment fix
* eth/tracers/testing: lint nitpicks
* core,eth: cancel evm on nativecalltracer stop
* Revert "core,eth: cancel evm on nativecalltracer stop"
This reverts commit 01bb908790 .
* eth/tracers: linter nits
* eth/tracers: fix output on err
Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-11-05 11:48:21 +01:00
Martin Holst Swende
03bc8b7858
core: more efficient nonce-update in txpool ( #22231 )
...
* Adjust pending nonce update operation
Benchmark the speed of transaction insertion under multiple accounts
core: fix rebase issues + docstring
core: make benchmark test use sync:ed method
* core: address review comments
* core: add memreport to benchmark
Co-authored-by: WeiLoy <wei_loy@163.com>
2021-11-02 18:32:23 +01:00
rjl493456442
2e8b58f076
cmd/geth: implement data import and export ( #22931 )
...
This PR offers two more database sub commands for exporting and importing data.
Two exporters are implemented: preimage and snapshot data respectively.
The import command is generic, it can take any data export and import into leveldb.
The data format has a 'magic' for disambiguation, and a version field for future compatibility.
2021-11-02 11:31:45 +01:00
Martin Holst Swende
551bd6e721
eth/tracers: invoke enter/exit on 0-value calls to inex accounts ( #23828 )
2021-11-01 19:06:33 +01:00
Ziyuan Zhong(仲梓源)
c576fa153a
core: fix snapshot missing when recovery from crash ( #23496 )
...
It is because write known block only checks block and state without snapshot, which could lead to gap between newest snapshot and newest block state. However, new blocks which would cause snapshot to become fixed were ignored, since state was already known.
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-11-01 14:09:36 +01:00
Martin Holst Swende
32150f8aa9
cmd/geth, cmd/evm, params: implement Arrow Glacier (EIP 4345) ( #23810 )
...
This PR adds support for ArrowGlacier, as defined by
https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md
https://eips.ethereum.org/EIPS/eip-4345
> Starting with FORK_BLOCK_NUMBER the client will calculate the difficulty based on a fake block number suggesting to the client that the difficulty bomb is adjusting 10,700,000 blocks later than the actual block number.
This also adds support for evm t8n to return the calculated difficulty, so it can be used to construct test.
2021-10-28 22:18:14 +02:00
Marius van der Wijden
bff330335b
core: fixed stale comment in txlist ( #23825 )
2021-10-28 14:59:51 +02:00
Martin Holst Swende
eab4d898fd
core: fix benchmark tests ( #23803 )
...
Fixes crashes in various benchmarks in the core package
2021-10-27 13:08:51 +02:00
Martin Holst Swende
526c3f6b9e
core/state/snapshot: fix benchmarks ( #23804 )
2021-10-26 11:01:01 +02:00
meowsbits
c72b16c340
core: use block difficulty for genesis ( #23793 )
...
* core: write test showing that TD is not stored properly at genesis
The ToBlock method applies a default value for an empty
difficulty value. This default is not carried over through the Commit
method because the TotalDifficulty database write writes the
original difficulty value (nil) instead of the defaulty value
present on the genesis Block.
Date: 2021-10-22 08:25:32-07:00
Signed-off-by: meows <b5c6@protonmail.com>
* core: write TD value from Block, not original genesis value
This an issue where a default TD value was not written to
the database, resulting in a 0 value TD at genesis.
A test for this issue was provided at 90e3ffd393
Date: 2021-10-22 08:28:00-07:00
Signed-off-by: meows <b5c6@protonmail.com>
* core: fix tests by adding GenesisDifficulty to expected result
See prior two commits.
Date: 2021-10-22 09:16:01-07:00
Signed-off-by: meows <b5c6@protonmail.com>
* les: fix test with genesis change
Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-10-26 08:44:43 +02:00