Devon Bear
4bfcc1ee5c
Convert *vm.EVM to vm.VMInterface in Tracers ( #6590 )
...
Useful for integration with external tools as one can just utilize an
interface opposed to having to import and build a real EVM object.
2023-01-16 22:28:50 +00:00
hexoscott
7dcbfbc283
reference hash, address, and chain config from lib ( #6536 )
2023-01-13 18:12:18 +00:00
Andrew Ashikhmin
58893937b0
core/vm: Make INVALID a defined opcode ( #6477 )
...
Cherry-pick https://github.com/ethereum/go-ethereum/pull/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-12-30 17:13:54 +01:00
ledgerwatch
387b4d7f35
Native tracers step 10 - remove duplicate SelfDestruct capture, clean up ( #6440 )
...
Moved some of the tracers to `eth/tracers/logger` to make it more
similar to go-ethereum.
Removed Erigon-specific `Capture-` functions
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-26 04:56:39 +00:00
ledgerwatch
24040f3044
Native tracers step 9 - add native tracers ( #6434 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-25 07:28:41 +00:00
ledgerwatch
8198cc2740
Native tracers step 8 - added trace test suite, fixed some bugs ( #6430 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-24 13:18:11 +00:00
ledgerwatch
f364eff389
Native tracers step 7 - restructure js tracer files ( #6415 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-23 18:10:37 +00:00
ledgerwatch
a49e287618
Native tracers step 6: Rename Tracer to EVMLogger, reduce args CaptureExit ( #6410 )
...
Getting closer to Geth's tracer interfaces
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-23 05:43:08 +00:00
ledgerwatch
97c9a9108d
Native tracers - step 4 ( #6363 )
...
Remove `callType` argument from `CaptureStart`, and change `callType
vm.CallType` to `typ vm.OpCode` in `CaptureEnter` and move to the first
position (as it is in geth)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-19 03:12:08 +00:00
ledgerwatch
0761671607
Native tracers step 3 ( #6362 )
...
Remove `env` argument from all Capture functions except for
`CaptureStart`
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-18 17:06:40 +00:00
ledgerwatch
b8c6a4d263
Native tracers - step 2 ( #6360 )
...
Splitting function `CaptureStart` into `CaptureStart` (when depth == 0)
and `CaptureEnter` (when depth > 0), while removing argument `depth`.
Same with splitting `CaptureEnd` into `CaptureEnd` and `CaptureExit`
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-18 16:11:31 +00:00
ledgerwatch
3999c46046
Native tracers - step 1 ( #6356 )
...
In this first step, the new functions `CaptureTxStart` and
`CaptureTxEnd` are introduced to all tracers
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-18 04:36:57 +00:00
Alex Sharov
82c7779a85
evm: txContext.gasPrice to uint256 type ( #6188 )
2022-12-04 11:44:50 +07:00
Alex Sharov
0efda1f19f
trace: change type of self destruct arg to uint256 ( #6189 )
2022-12-03 21:43:53 +07:00
Alex Sharov
60cb4e2bbb
evm tracing interface to use uint256, to avoid value.ToBig() allocations ( #5781 )
2022-11-30 08:31:39 +07:00
Alex Sharov
16cd87748f
E3: fix unwind changes visibility ( #6147 )
2022-11-30 08:31:13 +07:00
Andrew Ashikhmin
03057c4e61
Update consensus tests to v11.2 ( #6111 )
...
[v11.2](https://github.com/ethereum/tests/releases/tag/v11.2 ) includes,
among other things, tests for
[EIP-3860](https://eips.ethereum.org/EIPS/eip-3860 ): Limit and meter
initcode.
2022-11-22 16:07:31 +01:00
Andrew Ashikhmin
9ffc457cbb
EIP-3860: Limit and meter initcode ( #5892 )
...
[EIP-3860](https://eips.ethereum.org/EIPS/eip-3860 ) is
[included](https://github.com/ethereum/execution-specs/pull/633 ) into
[Shanghai](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md ).
TODO: similar changes to `txpool`.
Co-authored-by: Andrei Maiboroda <andrei@ethereum.org>
2022-10-31 13:40:41 +01:00
Alex Sharov
26fdf9169d
move all packages from "internal" folder - to simplify users live ( #5857 )
2022-10-25 09:58:25 +07:00
J1ang
2177c8faa5
fix: issue #5723 type conversion bug ( #5763 )
...
fix:
fix for issue #5723 type conversion bug by adding check. `expValue`
should be `uint64[]`.
2022-10-17 11:25:17 +01:00
Enrique Jose Avila Asapche
bbea37a454
updated tracer js ( #5347 )
...
* updated tracer js
* using SUICIDE
* fixed test
2022-09-13 08:51:07 +07:00
ledgerwatch
693017c554
Cleanup Tevm experimental code ( #5259 )
...
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-09-01 19:49:29 +01:00
Håvard Anda Estensen
13322893cb
Enable gosimple linter ( #5071 )
...
* Run gofmt
* Simplify slice making
* Use simple channel to receive instead of select with single case
* Enable gosimple linter
2022-08-16 13:02:13 +07:00
Alex Sharov
351cd49c21
go1.19 gofmt ( #4988 )
2022-08-10 19:04:13 +07:00
Leonard Chinonso
ec67e80a8a
Fixed lint errors for gocritic linter ( #4904 )
2022-08-03 00:35:22 +07:00
Andrew Ashikhmin
0c76286509
Add rules to AsMessage to vet transaction types ( #4276 )
...
* Add rules to AsMessage to vet transaction types
* Fix TestState
2022-05-26 18:20:34 +02:00
battlmonstr
65966f765a
tracers: replace duktape with goja ( #4113 )
...
Reasons:
* duktape is not maintained
* on macOS it produces a warning: unused function '_duk_debugger_attach'
(this slows down incremental builds and pollutes the test logs)
Why goja?
Geth has migrated some parts to goja (console and clef signer tool),
although not migrated tracers yet.
* fix isPrecompiled() native function
* recursion limit test is obsolete
2022-05-11 06:50:28 +07:00
Håvard Anda Estensen
6844e74ad2
Replace ioutil with io and os ( #3946 )
2022-04-23 15:43:00 +01:00
Enrique Jose Avila Asapche
a65f12b248
State override support ( #3628 )
...
* added stateOverride type
* solved import cycle
* refactoring
* imported wrong package
* fixed Call arguments
* typo
* override for traceCall
2022-03-01 15:40:24 +00:00
Frojdi Dymylja
499c27d2e1
change: port js tracer changes ( #3128 )
...
* change: expose callCtx as ScopeContext
* change: update tracer API
* change: logger API
update: jst tracer
* add: port jst tracer 2
* add: port jst tracer 3
* add: access list tracer
* chore: lint
2021-12-15 13:19:58 +00:00
Alexandr Borodulin
bbb3cc978f
Starknet getcode ( #3038 )
...
* deploy_cairo_smartcontract
* deploy_cairo_smartcontract / 2
Add new transaction type for cairo and vm factory
* starknet_getcode
* deploy_cairo_smartcontract / 3
* deploy_cairo_smartcontract / 4
* deploy_cairo_smartcontract / 5
Co-authored-by: Aleksandr Borodulin <a.borodulin@axioma.lv>
2021-12-06 14:58:53 +00:00
ledgerwatch
0e6e47e913
Create access list ( #3048 )
...
* Create access list
* CreateAccessList compiles
* fixes
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-11-29 09:28:35 +00:00
Andrea Lanfranchi
c913f35c2e
Inner errors ( #2774 )
2021-10-04 22:16:52 +07:00
Evgeny Danilenko
4cd72c8328
Keep readonly value while changing interpreters back and forth ( #2508 )
...
* restore TEVM
* fuzzing and property based
* comment
* lint
* stack callback into defer ater checking an error
* sequential tests
2021-08-10 09:48:56 +07:00
ledgerwatch
350d7fe7a9
Adding support for vmTrace into trace_ routines ( #2497 )
...
* VmTrace
* Fixes to gasCall, beginning of vmTrace
* Fix opcode tracer
* Add mem and store, enable vmTrace for all methods
* Fix lint
* More nuances and debugging|
* More fixes
* Fix for trace_callMany
* Fix for trace_callMany
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-08-08 13:28:03 +01:00
Alex Sharov
6bd44eb26c
move kv to erigon-lib ( #2467 )
2021-07-29 18:53:13 +07:00
Alex Sharov
5069558752
Apache licensed logger ( #2460 )
2021-07-29 17:23:23 +07:00
Alex Sharov
838e5f9ef2
Move bucket constants into kv package, move kv interface to kv package ( #2455 )
2021-07-28 09:47:38 +07:00
Alex Sharov
733991018b
port active precompiles activation ( #2448 )
2021-07-27 09:39:41 +07:00
Alex Sharov
a36a613e61
move migrations to kv interfaces ( #2430 )
2021-07-24 11:28:05 +07:00
Alex Sharov
a68b5ba361
Replace ChainConfig.WithEIPsFlags by go-ethereum's ChainConfig.Rules ( #2304 )
...
* use chainRules
* use chainRules
* use chainRules
* use chainRules
* use chainRules
2021-07-05 19:52:50 +01:00
Alex Sharov
bc271f92ce
To break dependency to db implementation - move all db classes to "ethdb/kv" and leave in "ethdb" only interfaces ( #2195 )
2021-06-19 15:21:53 +07:00
Evgeny Danilenko
de26634d8d
TEVM status pruning ( #2034 )
...
* use trace for TEVM status
* restore testdata
* fix getting contract from plain state
* unwind
* linters
* reproducible build debug
* debug
* debug
* remove debug
2021-06-11 09:34:25 +01:00
Alex Sharov
1f13f73045
up version of uint256 lib ( #2082 )
...
* eip 1559_tx_constraints
* eip 1559_tx_constraints
* return error on uint256 overflow
* up uint256 version
* merge master
* fix master
Co-authored-by: ledgerwatch <akhounov@gmail.com>
2021-06-04 17:25:28 +01:00
Evgeny Danilenko
7352b81122
Tevm stage 1 ( #1845 )
...
* convert contracts after block execution
* check if has tevm code
* after review-1
* handle ErrNotFound
* typo
* tests
* tevm code bucket
* testdata
* execute pre-stage
* after merge
* test fix
* test fix
* fix test after merge
* disable translation stage
* after merge
* rename params
* rename to Erigon
* parallelize EVM translation
* fix
* logging and fixes
* fix
* todos
* cleanup
* revert erigorn renaming
* unwind
* tevm unwind
* fix AppData
* non-parallel version
* comments
2021-05-27 14:54:55 +01:00
Alex Sharov
0be3044b7e
rename ( #1978 )
...
* rename
* rename "make grpc"
* rename "abi bindings templates"
* rename "abi bindings templates"
2021-05-20 19:25:53 +01:00
Alex Sharov
781a67a4ee
Auto-Close db in tests by using t.Cleanup ( #1956 )
2021-05-19 10:47:28 +07:00
Artem Vorotnikov
66a8c23c37
Remove TrieDbState + other things ( #1925 )
...
* Remove old table from script
* Simplify ChangeSetWriter
* Move state tests to KV
* Simplify TrieCfg
* Port state tests away from TrieDbState
* Remove old MakePreState
* Upgrade t8ntool's MakePreState
* MakePreState2 -> MakePreState
* Remove TrieDbState
2021-05-16 06:21:29 +01:00
ledgerwatch
447f20d395
Baikal testnet configuration ( #1910 )
...
* Baikal testnet configuration
* Fixes
* Change AsMessage signature
* Fixes in t8ntool
* More updates
* Fix misspelling
* Skip eip1559 transition test
* More bootnodes
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-11 10:54:20 +01:00
ledgerwatch
34c1fdac21
Aleut fix for GASPRICE opcode ( #1852 )
...
* Aleut fix for GASPRICE opcode
* Fix for tip+basefee > feecap
* Unbork
* Fix tests
* Remove setHead test
* Test fix
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-04-30 19:20:18 +01:00