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
Giulio rebuffo
ae6d00747e
removed debug util now not necessary ( #6149 )
2022-11-29 09:46:52 +01:00
J1ang
83dae8dad3
feat: enhance API erigon_getLatestLogs
( #6078 )
...
feat:
1. `erigon_getLatestLogs` doesn't have to match the exact position of
the topics. It will match logs that contain the topics regardless of the
topics' position with original bloom filter. And it accepts `blockCount`
& `crit.ToBlock` params for better pagination.
2022-11-29 15:14:41 +07:00
Manav Darji
80e29f29d3
sprint length and base fee denominator change for mumbai testnet ( #6142 )
...
This PR includes changes required for delhi hard fork schedule at block
`29638656` on mumbai testnet. It changes few major parameters.
1. Sprint length - the number of bor blocks post which a new validator
mines has been reduced from 64 to 16.
2. Block time - the block time which was increased earlier for some
experiments to 5 seconds has been reduced to 2 seconds (along with
backup multiplier and producer delay).
3. Base fee denominator - this fields has been increased from 8 to 16 to
smoothen the effect of EIP 1559.
2022-11-29 08:11:29 +07:00
Giulio rebuffo
025839afd5
moved out protobuffers for sentinel ( #6145 )
2022-11-29 00:00:40 +01:00
Giulio rebuffo
05be20b70b
smol refactor of lightclient CI + logs demotion ( #6144 )
2022-11-28 23:29:48 +01:00
Max Revitt
41278c165c
tidy(hive): remove badge and generation code ( #6141 )
...
Was not working as expected, and probably necessary now we can see hive
result nightly.
2022-11-28 19:16:05 +07:00
hexoscott
0094d1301a
reusable evm caller for purpose of eth_estimateGas ( #6112 )
...
One simple change to send the header in rather than the body allowing
re-use in a loop which saves the copy call when looping.
The other one for a reusable evm seems potentially dangerous so feedback
more than welcome on that one, local testing shows it gains me around
6k±rps so if it's safe is a good win, but I feel it will need more work.
I could only validate against goerli chain which seems to always return
the same value for eth_estimateGas so if anybody could validate it
against another chain that would be awesome.
2022-11-28 09:03:03 +07:00
Giulio rebuffo
e431815202
Added account preimages generation ( #6139 )
2022-11-27 18:46:32 +01:00
Giulio rebuffo
8c38eeda5a
Added skeleton for beacon chain state transition ( #6135 )
2022-11-27 00:03:58 +01:00
Mike Neuder
eb7e5c2c6e
Adding processSlots functionality and unit test for transitionState and processSlots ( #6136 )
...
Part of the CL implementation.
https://github.com/ledgerwatch/erigon/issues/5965
2022-11-26 23:34:17 +01:00
Giulio rebuffo
54d1895542
updated go-verkle ( #6126 )
2022-11-26 19:36:10 +01:00
Giulio rebuffo
8c67c55cc7
Created Erigon beacon downloader ( #6130 )
2022-11-25 16:38:22 +01:00
awskii
e10e75fb3e
rename erigon23->erigon4 ( #6128 )
...
Rename directories db23/erigon23 to db4/erigon4
rename file ergion23.go to erigon4.go as well as `state` command (to
`erigon4`)
2022-11-25 15:11:01 +07:00
Max Revitt
8cbf316e49
dep(erigon-lib): update to version with hotfix for ipv6 detection ( #6121 )
...
#6117
2022-11-24 21:34:04 +07:00
Max Revitt
79fc64e7f2
fix(hive): prevent concurrent execution cancellation for same commit ( #6122 )
2022-11-24 21:33:43 +07:00
Alex Sharov
a0d2d585b8
sentinel: add logs prefix ( #6124 )
2022-11-24 21:29:51 +07:00
Alex Sharov
975c4960c7
mdbx: remove deprecated cmp_suffix32 feature ( #6118 )
2022-11-24 09:25:34 +07:00
Max Revitt
f362856836
ci(hive): also allow workflow_dispatch to trigger ( #6115 )
2022-11-24 09:11:00 +07:00
Max Revitt
1122e865be
ci(hive): use run context rather than artifacts for results ( #6114 )
...
When running from forks results would need to be uploaded as artifacts
and separately parsed. This is no longer true when running as a
scheduled job and we can therefore fix and get a speedup by reading the
results straight from the workspace.
2022-11-23 15:02:53 +00: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
Philippe Schommers
6f61f556a2
test: add fork id tests for Gnosis and Chiado ( #6110 )
...
Feels like there's an issue with the latest hardfork
(https://docs.gnosischain.com/specs/hard-forks/21735000 ), as the fork id
didn't change?
Related: https://github.com/NethermindEth/nethermind/pull/4925
2022-11-22 16:03:36 +01:00
Giulio rebuffo
a1de39d25c
added beacon state-transition first structure ( #6105 )
2022-11-22 15:36:08 +01:00
Leonard Chinonso
f76736e14a
Implemented mining of contract transactions on the devnet tool ( #6102 )
...
- Added a new method and type for contract transactions.
- Added functions to emit fallback events from contract transactions.
- Added GetLogs request generator
- Added tests for GetLogs request generator
2022-11-22 20:28:53 +07:00
Mike Neuder
9352ea3b57
Add get blocks by range request to recent block sync ( #6104 )
...
Part of https://github.com/ledgerwatch/erigon/issues/5965 .
2022-11-22 18:28:15 +07:00
awskii
cd508a65c5
E4 commit key replace ( #6109 )
...
https://github.com/ledgerwatch/erigon-lib/pull/684#issuecomment-1321577450
2022-11-22 11:02:43 +00:00
Max Revitt
4669954fc5
ci(hive): move hive run to nightly job ( #6100 )
...
- remove hive run from CI yaml
- create nightly hive yaml which runs hive at 1am each day on a hosted
runner (can move to self hosted if needs be in future)
2022-11-22 17:12:17 +07:00
alexqrid
e81c074fe6
added miner address extracting for Bor in block api response ( #6080 )
...
This PR adds correct miner address to the response of
`eth_getBlockByNumber`/`eth_getBlockByHash` API methods.
Currently miner address is returned as zero address (`0x000...000`) for
Polygon -
https://wiki.polygon.technology/docs/edge/faq/validators/#why-do-the-json-rpc-commands-eth_getblockbynumber-and-eth_getblockbyhash-not-return-the-miners-address
.
Unfortunately this behaviour confuses a lot, I've succeeded in restoring
the miner address in block related API, want this to be the default
behaviour.
Co-authored-by: alexqrid <>
2022-11-22 17:11:44 +07:00
Manav Darji
d08c052193
consensus/bor: return txs and receipts in FinalizeAndAssemble ( #6108 )
...
Due to a change in a previous
[commit](https://github.com/ledgerwatch/erigon/pull/5212/files#diff-335eb65f5a52a99fd4cb182ce6385022828dfc04118b85336754d5a142f45be7R134 ),
the txs and receipts are overridden. This breaks compatibility with bor
consensus as the `bor.FinalizeAndAssemble` method returns nil txs and
receipts. This PR fixes that.
2022-11-22 13:06:18 +07:00
Alex Sharov
6cf3af8208
e3: some recon logs ( #6107 )
2022-11-22 10:49:33 +07:00
Mike Neuder
f33ec06572
Add Status fetching and made sentinel request logic generic ( #6094 )
...
Part of https://github.com/ledgerwatch/erigon/issues/5965 .
An example logging output shows that we are getting accurate data:
the current finalized checkpoint block:
https://beaconcha.in/slot/5180288
the current head block: https://beaconcha.in/slot/5180361
```
INFO[11-20|16:52:36.631] Retrieved status. status="&{ForkDigest:[74 38 197 139] FinalizedRoot:[133 83 36 34 8 25 208 12 77 180 192 189 151 179 237 244 192 20 216 226 40 178 142 28 242 91 4 66 250 58 200 92] FinalizedEpoch:161884 HeadRoot:[164 219 216 224 200 71 201 76 70 253 61 144 64 238 11 14 224 173 49 5 107 109 238 32 215 126 85 23 10 170 107 223] HeadSlot:5180361}"
INFO[11-20|16:52:36.631] Current finalized root. root=855324220819d00c4db4c0bd97b3edf4c014d8e228b28e1cf25b0442fa3ac85c
INFO[11-20|16:52:36.631] Current finalized epoch. epoch=161884
INFO[11-20|16:52:36.631] Current head root. root=a4dbd8e0c847c94c46fd3d9040ee0b0ee0ad31056b6dee20d77e55170aaa6bdf
INFO[11-20|16:52:36.631] Current head slot. slot=5180361
```
2022-11-21 18:50:20 +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
c582f750be
e3: 1-thread exec, send signal ( #6101 )
2022-11-21 17:22:51 +07:00
Alex Sharov
e47c4f7a7a
e3: use usual headerfunc ( #6099 )
2022-11-21 12:39:51 +07:00
Alex Sharov
0bc56a4fd1
Revert "e3: enable integration testss" ( #6098 )
...
Reverts ledgerwatch/erigon#6097
2022-11-21 11:21:23 +07:00
Alex Sharov
17bbc7f262
e3: enable integration testss ( #6097 )
2022-11-21 10:50:01 +07:00
Alex Sharov
9bcd7fe6c3
e3: reduce state write lock ( #6096 )
2022-11-21 10:38:22 +07:00
Giulio rebuffo
d745b39df9
skip connection to private IPs ( #6093 )
...
Addresses #6079
2022-11-20 22:41:11 +01:00
Mike Neuder
45938124f5
WIP sync from checkpoint ( #6042 )
...
https://github.com/ledgerwatch/erigon/issues/5965 . This PR starts the
implementation of syncing from a checkpoint to head.
Co-authored-by: Andrew Ashikhmin <34320705+yperbasis@users.noreply.github.com>
Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
Co-authored-by: Giulio rebuffo <giulio.rebuffo@gmail.com>
Co-authored-by: Nebojsa Urosevic <nebojsa94@users.noreply.github.com>
Co-authored-by: Mark Shields <4237425+beejiujitsu@users.noreply.github.com>
Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Co-authored-by: Enrique Jose Avila Asapche <eavilaasapche@gmail.com>
Co-authored-by: Nathan (Blaise) Bruer <thegreatall@gmail.com>
Co-authored-by: lupin012 <58134934+lupin012@users.noreply.github.com>
Co-authored-by: Philippe Schommers <philippe@schommers.be>
2022-11-20 18:44:42 +01:00
Giulio rebuffo
487ea4e5f3
Refactored Lightclient prefix system ( #6092 )
2022-11-20 17:16:30 +01:00
Giulio rebuffo
5c5c19aa4c
added basic lightclient stream handlers ( #6085 )
2022-11-20 14:23:51 +01:00
Alex Sharov
7d485414c0
TxLookup: limit incremental prune range ( #6086 )
2022-11-20 13:03:21 +07:00
Alex Sharov
40264fd4d9
E3: state lock reduce ( #6088 )
2022-11-20 12:34:45 +07:00
Alex Sharov
68f3edf06a
devel fix ( #6089 )
2022-11-20 11:01:25 +07:00
Alex Sharov
92e6e56120
Fix test e3 ( #6087 )
2022-11-20 10:58:20 +07:00
Alex Sharov
8afeee56c8
Downloader extract, step2 ( #6076 )
2022-11-20 10:41:30 +07:00
Philippe Schommers
806117fbab
feat: add chiado config ( #6058 )
...
Hey guys, I'm trying to add the Chiado network ([Gnosis'
testnet](https://docs.gnosischain.com/about/networks/chiado )) now that
Gnosis can be synced fully with Erigon, so we can test it on the testnet
as well.
This is mostly inspired from
cd5ef32f37
.
Probably missing:
- [ ] The right consensus config (currently only a copy of Gnosis)
- [ ] Fixes to the chainspec?
- [ ] Presumably something in `cl/clparams/config.go`
Current state:
```
$ ./build/bin/erigon --chain=chiado --log.console.verbosity=debug
WARN[11-16|11:52:28.188] no log dir set, console logging only
WARN[11-16|11:52:28.193] no log dir set, console logging only
INFO[11-16|11:52:28.193] Build info git_branch=feat/chiado git_tag=v2021.10.03-2291-g17fae73f8 git_commit=17fae73f8af5348ba7c04684f2a2978daf81b67e
INFO[11-16|11:52:28.193] Starting Erigon on devnet=chiado
INFO[11-16|11:52:28.194] Maximum peer count ETH=100 total=100
INFO[11-16|11:52:28.194] starting HTTP APIs APIs=eth,erigon,engine
INFO[11-16|11:52:28.194] torrent verbosity level=WRN
INFO[11-16|11:52:30.300] Set global gas cap cap=50000000
INFO[11-16|11:52:30.302] Opening Database label=chaindata path=/home/filoozom/.local/share/erigon/chiado/chaindata
INFO[11-16|11:52:30.310] Initialised chain configuration config="{ChainID: 10200, Homestead: 0, DAO: <nil>, DAO Support: false, Tangerine Whistle: 0, Spurious Dragon: 0, Byzantium: 0, Constantinople: 0, Petersburg: 0, Istanbul: 0, Muir Glacier: <nil>, Berlin: 0, London: 0, Arrow Glacier: <nil>, Gray Glacier: <nil>, Terminal Total Difficulty: <nil>, Merge Netsplit: <nil>, Shanghai: <nil>, Cancun: <nil>, Engine: aura}" genesis=0xf463abeb7ee27fa62be3ac36a264e8174ee3458da451e6403df47618fd2cf415
WARN[11-16|11:52:30.311] Incorrect snapshot enablement got=true change_to=false
INFO[11-16|11:52:30.311] Effective prune_flags= snapshot_flags= history.v3=false
INFO[11-16|11:52:30.312] Initialising Ethereum protocol network=10200
INFO[11-16|11:52:30.329] Starting private RPC server on=127.0.0.1:9090
INFO[11-16|11:52:30.329] new subscription to logs established
INFO[11-16|11:52:30.329] rpc filters: subscribing to Erigon events
DBUG[11-16|11:52:30.330] Establishing event subscription channel with the RPC daemon ...
INFO[11-16|11:52:30.330] New txs subscriber joined
INFO[11-16|11:52:30.330] new subscription to newHeaders established
INFO[11-16|11:52:30.330] Reading JWT secret path=/home/filoozom/.local/share/erigon/chiado/jwt.hex
INFO[11-16|11:52:30.331] HTTP endpoint opened for Engine API url=localhost:8551 ws=true ws.compression=true
INFO[11-16|11:52:30.332] HTTP endpoint opened url=localhost:8545 ws=false ws.compression=true grpc=false
DBUG[11-16|11:52:30.336] Couldn't add port mapping proto=tcp extport=30304 intport=30304 interface="UPnP or NAT-PMP" err="no UPnP or NAT-PMP router discovered"
DBUG[11-16|11:52:30.336] Couldn't add port mapping proto=udp extport=30304 intport=30304 interface="UPnP or NAT-PMP" err="no UPnP or NAT-PMP router discovered"
DBUG[11-16|11:52:30.336] QuerySeeds read nodes from the node DB count=0
DBUG[11-16|11:52:30.341] [1/16 Snapshots] DONE in=134.7µs
INFO[11-16|11:52:30.341] [txpool] Started
INFO[11-16|11:52:30.341] [2/16 Headers] Waiting for headers... from=0
DBUG[11-16|11:52:30.341] [Downloader] Request skeleton anchors=0 top seen height=0 highestInDb=0
DBUG[11-16|11:52:30.343] Couldn't add port mapping proto=tcp extport=30303 intport=30303 interface="UPnP or NAT-PMP" err="no UPnP or NAT-PMP router discovered"
DBUG[11-16|11:52:30.343] Couldn't add port mapping proto=udp extport=30303 intport=30303 interface="UPnP or NAT-PMP" err="no UPnP or NAT-PMP router discovered"
DBUG[11-16|11:52:30.344] QuerySeeds read nodes from the node DB count=0
DBUG[11-16|11:52:30.346] QuerySeeds read nodes from the node DB count=0
INFO[11-16|11:52:30.347] Started P2P networking version=67 self=enode://47d2e31d90fe140bfd967f147c1d4e8a4834b4c6b895a4bb7082100be60aa5e9a73e98e996da9b0257f02f9ad39b683755abe6ca3e9aefe0170a478a8559dcfb@127.0.0.1:30304 name=erigon/v2.30.0-dev-17fae73f/linux-amd64/go1.18.1
DBUG[11-16|11:52:30.351] QuerySeeds read nodes from the node DB count=0
INFO[11-16|11:52:30.351] Started P2P networking version=66 self=enode://47d2e31d90fe140bfd967f147c1d4e8a4834b4c6b895a4bb7082100be60aa5e9a73e98e996da9b0257f02f9ad39b683755abe6ca3e9aefe0170a478a8559dcfb@127.0.0.1:30303 name=erigon/v2.30.0-dev-17fae73f/linux-amd64/go1.18.1
DBUG[11-16|11:52:31.342] [Downloader] Request skeleton anchors=0 top seen height=0 highestInDb=0
[...]
DBUG[11-16|11:52:32.342] [Downloader] Request skeleton anchors=0 top seen height=0 highestInDb=0
INFO[11-16|11:37:00.062] [p2p] GoodPeers eth66=0 eth67=0
INFO[11-16|11:37:00.077] [txpool] stat block=0 pending=0 baseFee=0 queued=0 alloc=42.7MB sys=79.5MB
INFO[11-16|11:37:00.089] [2/16 Headers] No block headers to write in this log period block number=0
INFO[11-16|11:37:00.089] Req/resp stats req=0 reqMin=0 reqMax=0 skel=0 skelMin=0 skelMax=0 resp=0 respMin=0 respMax=0 dups=0
DBUG[11-16|11:37:00.089] [Downloader] Queue sizes anchors=0 links=0 persisted=1
DBUG[11-16|11:37:00.089] [Downloader] Request skeleton anchors=0 top seen height=0 highestInDb=0
[...]
DBUG[11-16|11:37:06.095] [Downloader] Request skeleton anchors=0 top seen height=0 highestInDb=0
```
I guess it comes down to:
```
--- FAIL: TestDefaultBSCGenesisBlock (0.34s)
genesis_test.go:27:
Error Trace: /home/filoozom/projects/erigon/core/genesis_test.go:27
/home/filoozom/projects/erigon/core/genesis_test.go:30
Error: Not equal:
expected: []byte{0xe8, 0x72, 0x46, 0x2c, 0x6b, 0xd5, 0xf4, 0x2, 0xec, 0x81, 0xde, 0x7c, 0x5b, 0xd2, 0x82, 0x3e, 0x13, 0x7c, 0x66, 0x6b, 0x78, 0xe8, 0x2b, 0x7e, 0xb0, 0xbe, 0x95, 0xaf, 0x5e, 0xce, 0xa1, 0x8d}
actual : []byte{0xad, 0xa4, 0x4f, 0xd8, 0xd2, 0xec, 0xab, 0x8b, 0x8, 0xf2, 0x56, 0xaf, 0x7, 0xad, 0x3e, 0x77, 0x7f, 0x17, 0xfb, 0x43, 0x4f, 0x8f, 0x8e, 0x67, 0x8b, 0x31, 0x2f, 0x57, 0x62, 0x12, 0xba, 0x9a}
Diff:
--- Expected
+++ Actual
@@ -1,4 +1,4 @@
([]uint8) (len=32) {
- 00000000 e8 72 46 2c 6b d5 f4 02 ec 81 de 7c 5b d2 82 3e |.rF,k......|[..>|
- 00000010 13 7c 66 6b 78 e8 2b 7e b0 be 95 af 5e ce a1 8d |.|fkx.+~....^...|
+ 00000000 ad a4 4f d8 d2 ec ab 8b 08 f2 56 af 07 ad 3e 77 |..O.......V...>w|
+ 00000010 7f 17 fb 43 4f 8f 8e 67 8b 31 2f 57 62 12 ba 9a |...CO..g.1/Wb...|
}
Test: TestDefaultBSCGenesisBlock
Messages: chiado
FAIL
FAIL github.com/ledgerwatch/erigon/core 0.823s
```
----------
Turns out that the `code` in Erigon's chainspec is not the same as
`constructor` in Nethermind for example.
Comparison for Sokol:
- Erigon:
https://github.com/ledgerwatch/erigon/blob/devel/core/allocs/sokol.json#L20-L34
- Nethermind:
https://github.com/NethermindEth/nethermind/blob/master/src/Nethermind/Chains/sokol.json#L248-L252
2022-11-18 12:54:18 +01:00
Alex Sharov
4ba8a6a381
Update README.md
2022-11-18 12:48:04 +03:00
alex.sharov
faa92f9bbc
save
2022-11-18 04:31:11 +03:00