Commit Graph

254 Commits

Author SHA1 Message Date
Shane Bammel
93c50d59a5 Allow for increased Shanghai time with PulseChain 2024-02-14 13:10:46 -06:00
ddl
a2274f36e5
chore(cmd/evm):fix link jump in cmd/evm/README.md (#9114)
fix the relative path in cmd/evm/README.md


![image](https://github.com/ledgerwatch/erigon/assets/24953789/058b0486-f8cf-4fa3-ad53-e01b5ea6f0c3)
2024-01-03 18:59:45 +07:00
Mark Holt
19bc328a07
Added db loggers to all db callers and fixed flag settings (#9099)
Mdbx now takes a logger - but this has not been pushed to all callers -
meaning it had an invalid logger

This fixes the log propagation.

It also fixed a start-up issue for http.enabled and txpool.disable
created by a previous merge
2023-12-31 17:10:08 +07:00
ddl
e018bb062a
cmd/evm:fix Env struct json tag (#8986)
use geth found this doc problem
https://github.com/ethereum/go-ethereum/pull/28635
2023-12-15 07:24:03 +07:00
Alex Sharov
e006db6ed9
evm cli: no logs if --json (#8925) 2023-12-09 13:42:07 +07:00
a
436493350e
Sentinel refactor (#8296)
1. changes sentinel to use an http-like interface

2. moves hexutil, crypto/blake2b, metrics packages to erigon-lib
2023-10-22 01:17:18 +02:00
tk
8ddfbfd88c
Spell Check: Fix typos (#8480)
Spell Check: 

Concensus --> Consensus
prodiced --> produced
configuraion --> configuration
cabable --> capable
structue --> structure
eample --> example
nework --> network
configration --> configuration
regestering --> registering 
registratio --> registration
excuted --> executed
Simlarly --> Similarly
dictactes --> dictates
respresented --> represented
lengthes --> lengths
2023-10-17 11:21:27 +07:00
GoodDaisy
ea328137a7
fix typos (#8452) 2023-10-13 11:36:23 +07:00
sudeep
d39f03783f
fix t8n call to ExecuteBlockEphemerally by passing chainReader (#8298)
fixing crash on consensus/merge/merge.go#Initialize function, on this
line.

```
chain.Config().IsCancun(header.Time)
```
2023-09-29 09:04:13 +07:00
Alex Sharov
2b6c21fddb
move mdbx to new org (#8061) 2023-08-24 18:00:24 +07:00
Mark Holt
bd9896bf4b
added bor tx indexing with tests (#7826)
This request implements the insertion of Bor ephemeral transactions into
snapshot indexes.

I does this by taking the block hash from the header index and passing
it to the transaction indexer to add an additional index entry per block
into the transaction hash -> block index.

The passed entries are currently contained in an in memory array which
is (32 * number of blocks / sprint size) bytes.

In addition to the functional code there is also an update to the
`dump_test.go` so that it runs `DumpBlocks` to exercise the indexing
code. To facilitate this the `InsertChain` method in `mock_sentry` has
been modified so that it can process >128 blocks.

The code in this request also includes additional bor/consensus code
with the following functions:

`CalculateSprint`
`CalculateSprintCount`

The first function is a modification of the code in erigon-lib so that
the sprints are numerically rather than lexically ordered. This code
should be migrated to erigon-lib and should have its sprint set
calculated once from its underlying map rather than this process being
repeated every calculation.

---------

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
Co-authored-by: ledgerwatch <akhounov@gmail.com>
Co-authored-by: Enrique Jose  Avila Asapche <eavilaasapche@gmail.com>
Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2023-07-12 23:31:38 +01:00
Giulio rebuffo
20b8e156db
moved cmd/rpcdaemon/commands -> turbo/jsonrpc (#7858) 2023-07-08 19:01:26 +02:00
Andrew Ashikhmin
252e57b76f
Base BlobTx on DynamicFeeTransaction (#7736)
Continuation of PR #7715
2023-06-15 10:57:27 +02:00
Andrew Ashikhmin
862d7b6bc6
Move ChainID from CommonTx to DynamicFeeTransaction (#7732)
For legacy transactions ChainID is optional (missing in
pre-[EIP155](https://eips.ethereum.org/EIPS/eip-155) transactions) and
is derived from `V` anyway.

Also, cherry pick https://github.com/ethereum/go-ethereum/pull/27452.
2023-06-14 11:44:05 +02:00
Alex Sharov
5ff8246e2a
e4: release some tests (#7729) 2023-06-14 10:01:00 +07:00
Alex Sharov
afa4f53ae2
e3: use deserializeV3 for history (#7691) 2023-06-09 10:53:04 +07:00
Martin Holst Swende
c042afb4af
cmd/evm: support batched statetest-mode (#7598)
This implements batched state-test exectution, similar to
https://github.com/ethereum/go-ethereum/pull/27318 .
Some speedtests, executing a state-test twice on current master takes
~4-5 seconds, and scales linerarly.
```
Doing 2 execs old style

real    0m8.185s
user    0m8.081s
sys     0m0.110s
```
Doing `100` executions on this PR -- a few seconds of ramp-up time, but
very quick execution after that :
```
Doing 100 execs v2

real    0m5.009s
user    0m4.560s
sys     0m0.508s
```
I also tested a version where I moved the db instantiation into the top
callsite, with the `MustOpen` and `.Close` only performed once, instead
of `100` times -- however, I noticed no additional speed gains from
doing so (my branch `batched_evm_v2`).

Therefore, I suspect that the slowdowns comes not from the db, but the
kzg library initialization.
2023-05-29 18:28:24 +07:00
ledgerwatch
7272c00681
Update t8n_test.go (#7550) 2023-05-19 21:49:51 +01:00
Andrew Ashikhmin
771c6fc202
Rename Serenity consensus engine to Merge (#7475)
[EIP-2982](https://eips.ethereum.org/EIPS/eip-2982) "Serenity Phase 0"
was superseded by [EIP-3675](https://eips.ethereum.org/EIPS/eip-3675)
"Upgrade consensus to Proof-of-Stake"
2023-05-09 18:45:33 +01:00
Enrique Jose Avila Asapche
fbd18516ae
Deneb container changes beacon-chain (#7420)
Adding container changes for Deneb:
https://github.com/ethereum/consensus-specs/blob/dev/specs/deneb/beacon-chain.md

Changed to use pointers for BlobSideCar
 
 #7389
2023-05-06 18:50:58 +02:00
Alex Sharov
2a37cc8513
fix devel evm tests (#7444) 2023-05-05 09:16:13 +07:00
Alex Sharov
fe30cf8c6f
up urwafe and docker version (#7435) 2023-05-04 10:48:43 +07:00
Alex Sharov
ded8283df7
erigon backup: v0 of sub-command (#7396) 2023-04-27 10:42:12 +07:00
Alex Sharov
ca088bd68e
fix build of cli flags (#7377) 2023-04-24 17:47:23 +07:00
sudeep
74ca124a62
Shanghai update for evm tool (#7304) 2023-04-13 14:55:51 +00:00
Andrew Ashikhmin
02f6cac7b7
Move hexutil.Bytes to erigon-lib (#7305) 2023-04-13 11:19:02 +00:00
alex.sharov
2515b9c069 evm use shared db 2023-04-04 11:32:40 +07:00
alex.sharov
634f07ddd5 save 2023-04-04 11:32:12 +07:00
Alex Sharov
a42d362cbd
move aura epoch data from chainDB to auraDB. remove epochReader parameter from consensus interface (#7250) 2023-04-04 03:30:07 +00:00
alex.sharov
d9f8cc25d3 close memdb in ./cmd/evm 2023-03-30 12:21:22 +07:00
Alex Sharov
417a437584
Break dependency of ethcfg package to core/consensus/etc... move genesis struct to 'types' package (#7206) 2023-03-29 07:27:06 +00:00
Alex Sharov
b685407175
attempt to fix TestGolangBindings (#7041) 2023-03-07 06:14:35 +00:00
Alex Sharov
999899d66d
e3: read files list from db (#6833) 2023-02-13 05:17:01 +00:00
ledgerwatch
ee83447fa1
CL lightclient to create memdb in the tmpdir which gets cleaned up on… (#6829)
… startup

---------

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-02-11 20:44:51 +00:00
Giulio rebuffo
03f737c458
Added processing for Attestation (#6772) 2023-02-03 16:39:09 +01:00
Alex Sharov
2998aa6386
e3: debug_accountRange (#6726) 2023-01-28 12:03:24 +07:00
hexoscott
7dcbfbc283
reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00: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
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
Martin Holst Swende
40b28d70a2
cmd/evm: show staterooot in result from running statetest (#6252)
Closes #6244
2022-12-08 21:37:02 +00:00
Andrew Ashikhmin
7eab12d90d
Shanghai & Cancun forks should be based on timestamp (#6238) 2022-12-07 18:45:44 +01:00
Alex Sharov
82c7779a85
evm: txContext.gasPrice to uint256 type (#6188) 2022-12-04 11:44:50 +07:00
Alex Sharov
9b65c533c9
e3: optimize incremental hashstate (#6179) 2022-12-03 12:23:01 +07:00
Andrew Ashikhmin
d82c778ab3
Withdrawals part 1 (#6009)
This PR partially implements
[EIP-4895](https://eips.ethereum.org/EIPS/eip-4895): Beacon chain push
withdrawals as operations. The new Engine API methods
(https://github.com/ethereum/execution-apis/pull/195) are implemented.

_Body downloader and saving withdrawals into DB are not implemented
yet!_
2022-12-01 09:15:01 +01: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
0b28c7ad13
Support genesis constructors for Chiado (#6103)
This is a continuation of PR #6058 and fixes Chiado genesis state root
by supporting genesis constructors (deployment code).
2022-11-21 17:21:59 +01:00
Alex Sharov
92e6e56120
Fix test e3 (#6087) 2022-11-20 10:58:20 +07:00
Andrew Ashikhmin
32629bdce4
Upgrade urfave/cli to v2 (#6047)
See also
https://github.com/urfave/cli/blob/main/docs/migrate-v1-to-v2.md
2022-11-14 17:33:57 +01:00
Alex Sharov
26fdf9169d
move all packages from "internal" folder - to simplify users live (#5857) 2022-10-25 09:58:25 +07:00
Andrew Ashikhmin
64a3156112
Support BaseFee in AuRa headers (#5820)
BaseFee is required in AuRa headers when
[EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) is activated.

Also:
- Basic AuRa header verification
- Extract some common RLP methods
- Tiny log clean-up
2022-10-21 12:43:44 +02:00