Andrew Ashikhmin
56a3844656
Drop Default from GenesisBlock* functions ( #7147 )
...
Small cosmetic changes and clean-ups
2023-03-20 15:44:22 +00:00
hexoscott
fd49965932
check prune history on trace calls ( #6932 )
...
Not sure if this is too aggressive or not, but return early once we have
a block number if state history has been pruned for that block number.
2023-02-26 09:10:46 +07:00
Alex Sharov
dede1a2c9e
e3: more mergeFiles tests, refcnt for LocalityIndex ( #6765 )
2023-02-06 09:05:29 +07:00
ledgerwatch
52aef48748
Workaround for BSC nodes not propagating new block hashes and blocks ( #6777 )
...
It turns out that "standard" BSC nodes based on Geth, do not propagate
new block hashes and blocks, at least towards Erigon nodes. This is a
workaround
---------
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-02-05 18:42:51 +00:00
Alex Sharov
b71725ecb3
e3: reverse/limited iterators, stream tooling ( #6637 )
2023-01-20 18:08:20 +07:00
hexoscott
7dcbfbc283
reference hash, address, and chain config from lib ( #6536 )
2023-01-13 18:12:18 +00:00
Alex Sharov
dfa6505f93
e3: kv/temporal prototype ( #6367 )
2022-12-19 15:38:54 +07:00
Andrew Ashikhmin
ecefc53dd0
Remove Ropsten & Fermion ( #6262 )
...
See https://blog.ethereum.org/2022/11/30/ropsten-shutdown-announcement
2022-12-10 22:55:31 +00:00
ledgerwatch
b5a7faa8db
[e3] Incremental reconstitution ( #6270 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-12-10 09:34:17 +00:00
Alex Sharov
9b65c533c9
e3: optimize incremental hashstate ( #6179 )
2022-12-03 12:23:01 +07:00
Alex Sharov
92e6e56120
Fix test e3 ( #6087 )
2022-11-20 10:58:20 +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
ledgerwatch
5deaa9cec1
Fix panic in txpool (due to modificatin with read lock) and snapshot … ( #5931 )
...
…access (due to inconsistent indices)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-11-04 12:43:59 +00:00
Alex Sharov
fb5ce32de9
e3: more mainnet snapshots ( #5867 )
2022-10-31 09:20:58 +07:00
Alex Sharov
26fdf9169d
move all packages from "internal" folder - to simplify users live ( #5857 )
2022-10-25 09:58:25 +07:00
Max Revitt
07ffa36d44
File system logging ( #5812 )
...
- lives in internal/logging
- all log flags moved to internal/logging/flags
- allows continued use of root logger via log.Info etc.
- update logger to take change allowing string to lvl for 'trace'
Verbosity flag is overridden by log.console.verbosity. Logs will be
colocated if all run as one process, only split where progs are run as
separate processes, in a future update this will be addressed so for
example rpcdeamon will always log to it's own file
2022-10-20 19:25:06 +01:00
Alex Sharov
dcf6216591
e3: tests ( #5779 )
2022-10-18 13:06:25 +07:00
ledgerwatch
fd52a788b7
Fix creation of block snapshots ( #5579 )
...
* Print snapshot prune
* More print
* Print
* Print
* Print
* Move snapshots stage forward
* Cleanup
* Fix tests
* Print
* Too much logging
* Remove print
* Log, check
* Revert
* No panic, print
* Fix tx numbering
* Harder condition to start retiring blocks
* Disable Pow verification after TTD is reached
* Fix POW verifying
* Print
* Prints
* Fix?
* cleanup
* Add migrations and hack
* More diagnostics
* More print
* Reset sequence only once
* Fix migration
* Remove print reset
* Fix lint
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-10-04 11:14:18 +01:00
Alex Sharov
cb60382e6d
erigon3: rename "history.v2" to "history.v3" to avoid naming miss-match with "erigon3" ( #5519 )
2022-09-26 10:54:42 +07:00
Alex Sharov
9fb8a190bc
erigon22: folder snapshots/history ( #5351 )
2022-09-18 17:41:01 +07:00
ledgerwatch
43f592ed0e
Fixes for trace_block ( #5402 )
...
* Fixes for trace_block
* Print
* Print
* extra bodies
* extra bodies
* Add canonical check
* First fix for bodies mismatch
* More cleanup
* Advance progress
* Reset snapshots in integration
* Cleanup
* Way to reset snapshots stage
* Not reset sequence if not needed
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-09-17 12:53:27 +01:00
Andrew Ashikhmin
610e648dc4
Kill Kiln ( #5339 )
2022-09-12 12:59:33 +02:00
Alex Sharov
caa23b9532
erigon22: simplify interhashes stage ( #5315 )
2022-09-08 14:02:50 +07:00
Andrew Ashikhmin
992ae01a7e
WithTablessCfg -> WithTableCfg ( #5163 )
2022-08-24 11:29:07 +02:00
Alex Sharov
cb9f86fcbc
erigon22: incremental hash state stage ( #5111 )
2022-08-19 10:00:47 +07:00
Alex Sharov
25d85d88c5
state erigon22: use right db ( #5028 )
2022-08-12 21:45:09 +07:00
Alex Sharov
351cd49c21
go1.19 gofmt ( #4988 )
2022-08-10 19:04:13 +07:00
ledgerwatch
2b517b7630
Erigon22 prototype to support BSC ( #4867 )
...
* Reduce workers and queue size
* Add traces and event logs
* Add chain flag
* Print
* Open consensus db as read only
* Use only one engine instance
* chainDb
* Display palia error
* Not to panic
* Not to exit
* Add syscall
* Print
* Pointer to TxTask
* Not register senders
* Print
* Relax check
* Skip system transactions
* increase workerCount again
* Remove print
* Change recon
* Fix types
* Skip system txs
* Print
* No rules for genesis commit
* Print genesis
* Print|
* Print
* Print
* Update
* Fix
* Remove print
* No print
* Support contract upgrades
* Use the same dif
* Print create2
* Fix
* Fix
* Print
* Hack iterate
* Print empty vals
* Fix hack
* Code hashes
* Code hashes
* Print
* No panic
* No panic
* Fix?
* another incarnation fix
* Remove print
* Remove print
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-07-31 21:54:23 +01:00
Alex Sharov
b6ea28ea80
kv.Del() remove second parameter ( #4832 )
...
* save
* save
* save
* save
* save
* save
* save
2022-07-26 12:47:05 +07:00
primal_concrete_sledge
cd5ef32f37
Add config for Gnosis Chain ( #4671 )
...
* Draft: gnosis-chain
* Fix Gnosis allocation
Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com>
2022-07-12 17:21:52 +02:00
ledgerwatch
8599dceec7
[erigon2.2] State reconstitution prototype ( #4508 )
...
* reconstitution
* Add history access without state function
* More on state reconstitution
* More on state recon
* More on state recon
* More
* More
* support dao fork
* More on state reconstitution
* Update to erigon-lib
* More
* Added genesis block and filling with history
* update
* Genesis works
* Start on parallel
* Preparation for parallel reconstitution, stats for EfSearch
* continue with parallel work
* Fix history reader
* Remove time measurements
* Fixes
* Fixes and UX improvements
* Fixes
* More tracing
* More fixes
* More fixes
* Fix code size
* Update to latest erigon-lib
* Fix for dao fork
* Remove hacks
* Update to erigon-lib, fix lint
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-07-02 20:48:42 +01:00
ledgerwatch
93151f0ae6
[erigon2.2] Reduce allocations when replaying historical txs ( #4460 )
...
* [erigon2.2] Reduce allocations when replaying historical txs
* import new API, fix code
* Add hack decompress function
* update erigon-lib
* Fix hack
* Update to latest erigon-lib
* Fix reindexing
* Enable skip analysis for tracing calls too
* Enable for eth_getLogs
* Fix skip analysis
* Optimise
* Stop grpc server in the tests
* Print
* No panic on server stop
* Update to latest erigon-lib
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-17 13:40:49 +01:00
ledgerwatch
2e4e7bd4de
[erigon2.2] Log stats tool ( #4453 )
...
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-15 07:10:37 +01:00
ledgerwatch
e47dd15e68
[erigon2.2] Prototype of eth_getLogs ( #4437 )
...
* Initial work
* Fix compile errors
* Update
* Debug
* Cleanup
* Temp changes
* Temp
* Remove temp
* Remove print
* Upgate to erigon-lib main
* go mod tidy
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-13 21:25:17 +01:00
ledgerwatch
fd8adddce8
trace_filter implementation based on erigon 2 update 2 data ( #4431 )
...
* trace_filter implementation based on erigon 2 update 2 data
* Fix test compile, extract txNums
* Update to erigon-lib, add generic heap
* Fix getHeaderHash for RPC methods
* Missing files
* Skip tests
* Add reward traces
* Filter trace lint
* Reinstate filtering
* Print
* Print
* Fix
* Print
* Print txNums
* Fix
* Fix
* Fix
* Fix
* Fix
* Fix
* Fix
* Remove prints
* Fix nil dereference
* Inclusive toBlock bound
* Print
* Print
* Hack
* remove some deps
* Fix lint
* Update erigon-lib
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-06-12 12:44:01 +01:00
ledgerwatch
96603f14da
Print changes ( #4351 )
...
* Print changes
* Comment out prints, add hack to find prefix
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-03 22:50:20 +01:00
Alex Sharov
726ef081ce
option to disable runtime.ReadMemStats ( #4200 )
2022-05-19 11:48:07 +07:00
Alex Sharov
e1dec529d4
Generic sort of slices (no allocs, inlinable) ( #4161 )
...
* save
* save
* save
* save
* save
2022-05-16 08:24:12 +01:00
ledgerwatch
25208964e5
Export chainspecs into json files ( #4148 )
...
* Export chainspecs into json files
* Add sepolia
* Add more chains
* Extract rest of the chains
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-15 17:37:42 +01:00
Alex Sharov
8b8c442dc6
Open shorter logs #400
2022-04-28 10:11:07 +07:00
Håvard Anda Estensen
6844e74ad2
Replace ioutil with io and os ( #3946 )
2022-04-23 15:43:00 +01:00
Alex Sharov
6aa4999729
Parallel indexing ( #3921 )
2022-04-21 10:34:10 +07:00
TBC Dev
bf06095811
hack: Allow blockTotal <= 0 as offset from head ( #3818 )
2022-04-05 08:07:07 +07:00
Alex Sharov
8b03582558
compressor: log lvl #408
...
* save
* save
2022-04-01 10:44:30 +07:00
battlmonstr
47df98a499
Use "err" key for logging errors. ( #3632 )
...
log.Warn/Error uses "err" key to log errors in most places.
This renames "error" to "err" in some places to adhere to this convention.
2022-03-01 15:40:51 +00:00
ledgerwatch
ef6013faff
Automation for gathering erigon2 history data ( #3501 )
...
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-02-12 22:16:06 +00:00
ledgerwatch
2074b98568
Tools for gathering data on erigon2 history and bitmaps ( #3488 )
...
* Tools for gathering data on erigon2 history and bitmaps
* Always start with 0
* Always start with 0
* Clean up commitment files, trace block
* traceblock
* Add tracing to checkChangeSets
* Fixes to DeleteAccount
* Update to latest erigon-lib
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-02-12 15:48:38 +00:00
Alex Sharov
c9cee7a884
path -> filepath (path package is for urls) ( #3493 )
2022-02-12 20:33:09 +07:00
ledgerwatch
079a177614
[erigon2] Computing data dependencies between transactions ( #3290 )
...
* Use ibs per transaction instead of per block
* Remove copy functions, introduce balance increase map
* Fix test
* Fix lint
* Introduce balanceIncrease journal action
* Introduce balanceIncrease journal action
* Simplifications
* Fix
* Reset
* Simplify
* Fix
* Fixes
* Fix for reading nil accounts
* Fix edge cases with reverts
* Clean up test output
* Fix transfers
* Handle special case of ripemd
* Try with fixed compress, only commit every commfreq blocks
* Updates
* Updates
* Update to fixed erigon-lib
* Update to erigon-lib
* Remove stop
* Update to latest erigon-lib
* fixup
* Cleanup
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-01-24 23:12:25 +00:00
Alex Sharov
93e28ed3dd
fix some linter warns ( #3310 )
2022-01-20 14:00:31 +07:00