Commit Graph

3681 Commits

Author SHA1 Message Date
Alex Sharov
fe77819458
Snap: use tmp sub-dir to allow mount datadir/snapshot to another drive (#4349) 2022-06-04 10:13:55 +07: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
f838268e44
[wip] Snapshots: more runtime invariants check (#4350) 2022-06-03 18:50:01 +07:00
Enrique Jose Avila Asapche
49292346b3
Auto correcting sync mode instead of giving an error (#4337) 2022-06-03 09:38:10 +01:00
Andrew Ashikhmin
45cf6ee978
Fix LatestValidHash nil pointer (#4338) 2022-06-02 16:35:42 +02:00
Enrique Jose Avila Asapche
bc21ab9d97
syncmode changes (#4334)
* log syncmode

* little comment

* ops

* calling log in correct place

* got rid of error instead we warn

* no return
2022-06-02 14:15:00 +01:00
battlmonstr
0c5d1d64a3
observer: sentry candidates intake (#4321)
* sentry client: log connected peer info

* observer: unseen sentry peers report

* observer: refactoring node.go to node_utils

* observer: sentry candidates intake
2022-06-01 22:48:24 +01:00
leonardchinonso
878cc063b0
Draft PR to complete devnet automation (#4278)
* Fixing headers stuck in StageSync

* Removed ./dev folder and cleaned up code

* Removing the logs subscription tests
2022-06-01 22:47:12 +01:00
Alex Sharov
e13e212288
rpc: add all blockReader methods (#4320)
* save

* save
2022-06-01 09:57:12 +07:00
Alex Sharov
d37447727a
torrent: reduce deps of cfg #4305 2022-05-30 17:36:02 +07:00
Alex Sharov
e5c8a9a1bf
torrent: download rate (#4304) 2022-05-30 17:29:54 +07:00
Alex Sharov
955c669d21
Group few sync configs (#4303)
* save

* save
2022-05-30 17:08:49 +07:00
Alex Sharov
0795bcb865
integration: validate syncmode flag (#4300) 2022-05-30 09:59:38 +07:00
ledgerwatch
974e01bcd3
Allow skeleton requests to more peers (#4290)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-05-28 13:38:22 +01:00
Alex Sharov
11e96460cf
Torrent: verify is more informative (#4283)
* save

* save
2022-05-27 10:44:07 +07:00
battlmonstr
da45be9319
sentry: log peer events in erigon (#4275)
* sentry: log peer events in erigon

* refactor pumpStreamLoop to support streams with arbitrary message types
* subscribe to PeerEvents

* fixup! use generics
2022-05-27 08:33:00 +07:00
Andrew Ashikhmin
16950ebc2c
Fix OverrideTerminalTotalDifficulty when datadir is not empty (#4280) 2022-05-26 21:21:51 +02: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
Alex Sharov
6eb10ba9a8
Use ETL to fill kv.HeaderNumber from snapshots (#4272)
* merge devel

* save
2022-05-26 21:41:05 +07:00
leonardchinonso
3102a04d7f
Draft PR for the devnet automation (#4057)
* Draft PR for the devnet automation

* Committing to save for later edit

* Finished creating shells, to test

* Changes:
* Added a shell for picking eth commands
* Implemented erigon node running with the --http flag to save processes
* Shell commands for get-balance and send-tx implemented
TODO:
* Make UX more friendly by adding start, stop and exit commands
* Add progress bar to show wait in progress
* Add flag or input to enable mining option for erigon node
* Implemented stress tests for other eth methods

* Experimenting

* little clean up

* lint

* Transitioned to static runs and tests from shell

* Finished stress test methods

* Rendering fixes

* save

* Cleanup

* Fixed lint

* Still fixing lint

* Removed args append ineffect

* Removed println in genesis init.go

* Removed println in genesis init.go

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Enrique Avila <eavilaasapche@gmail.com>
2022-05-26 13:08:25 +01:00
Andrew Ashikhmin
86de64a2a3
TangerineWhistle instead of EIP150 & SpuriousDragon instead of EIP155/158 (#4273)
* EIP150Block -> TangerineWhistleBlock

* Merge EIP158Block into EIP155Block

* EIP155Block -> SpuriousDragonBlock
2022-05-26 12:08:59 +02:00
primal_concrete_sledge
5c055b9697
Fix/block new filters (#4271)
* Add filters functions

* Fix: forbid new filters for requests

* Merge devel fix
2022-05-26 16:16:11 +07:00
Alex Sharov
66248c4bfb
Torrent: verify all files (#4270) 2022-05-26 12:27:44 +07:00
battlmonstr
8a47a7ce33
sentry: PeerById method (#4260) 2022-05-26 10:53:23 +07:00
battlmonstr
6b1f91407d
sentry: multi sentry client refactoring (#4265) 2022-05-26 10:45:35 +07:00
Alex Sharov
fc1a37e6dc
create turbo/services pkg (#4269) 2022-05-26 10:31:06 +07:00
Alex Sharov
d4d4c2ec13
Open Integration: use same db limit (#4259) 2022-05-25 16:22:02 +07:00
primal_concrete_sledge
a10d5910d5
Add filters functions (#4253) 2022-05-25 16:08:06 +07:00
Alex Sharov
9fd05cd812
lastDup no key (#4258) 2022-05-25 15:26:20 +07:00
Alex Sharov
1eb9aec08a
Better validate --torrent.verbosity flag (#4257)
* lastDup no key

* lastDup no key

* lastDup no key
2022-05-25 15:24:11 +07:00
Alex Sharov
b9bf97362b
save (#4251) 2022-05-24 18:04:26 +01:00
Alex Sharov
52d6f1d551
kv_mdbx: atomic closed flag #464 (#4247) 2022-05-24 12:24:20 +07:00
ledgerwatch
8ea2bb55d0
Prevent deletion of extra block worth of tx lookup records when pruning (#4232)
* Print

* Prevent underflow, return 0 block if tx lookup failed

* Return nil receipt for 0 block

* Update to main erigon-lib

* Fix other places

* Fix other places

* Comment

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-22 20:35:02 +01:00
Enrique Jose Avila Asapche
2ec9733cee
default api list (#4227)
* default api list

* Revert "default api list"

This reverts commit 8f0bf6cb440b35b3ab628cc297fa6ff822038ed3.

* added engine to default

* added to erigon
2022-05-21 22:48:36 +02:00
ledgerwatch
6974a98aca
Clean anchors, forward sort of headers (#4225)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-21 18:00:26 +01:00
Alex Sharov
c2e0956e3e
return err on invalid syncmode (#4219)
* save

* save

* save
2022-05-20 16:04:38 +07:00
Artem Tsebrovskiy
f4c8f44f61
removed obsolete trie variant (#4172) 2022-05-20 15:03:27 +07:00
Alex Sharov
7ecdf51d92
methods to read single txn by txnID (#4215) 2022-05-20 14:12:12 +07:00
Giulio rebuffo
c66bde2df8
fixed miner.sigfile option (#4210) 2022-05-19 20:16:21 +07:00
Alex Sharov
c43ae65bba
Bor: GetTransactionReceipt (#4209) 2022-05-19 20:03:58 +07:00
Alex Sharov
10bcbf4a68
Snap: faster Erigon re-start (#4201) 2022-05-19 12:28:33 +07:00
Alex Sharov
726ef081ce
option to disable runtime.ReadMemStats (#4200) 2022-05-19 11:48:07 +07:00
Alex Sharov
64508a7d4e
Snap: call AddHeadersFromSnapshot only at initialCycle (#4198) 2022-05-19 10:38:53 +07:00
battlmonstr
25b14edbf6
p2p: STUN external IP detection (#4195)
--nat stun is an automatic external IP detection alternative to manual --nat extip option.
It can be used both at home or on production servers without any extra setup.
It is fast (up to 5 ms) and more reliable than alternatives (as the request goes to the public internet).

This auto-detection is useful to run multiple instances of a service in cloud environments
where the node IPs are not known in advance.
2022-05-18 16:50:50 +01:00
Alex Sharov
78f1d01a82
Update readme.md (#4192) 2022-05-18 13:50:28 +07:00
Alex Sharov
80d1d8a114
Trackers: split file lines cross-platform way #4191 2022-05-18 10:28:14 +07:00
Alex Sharov
4e7807251a
Ensure snapshotDir not created by accident (#4164)
* save

* save

* save
2022-05-17 09:40:45 +07:00
ledgerwatch
a2a494a3d1
Fix eth_feeHistory (#4168)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-16 21:42:23 +01:00
battlmonstr
d845eb2a69
sentry: refactor eth handshake checks (#4163) 2022-05-16 20:28:03 +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
ledgerwatch
7125593cf5
Fix nil deference in ProcessHeadersPOS (#4155)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-05-15 17:09:27 +01:00
ledgerwatch
0e457ba9d7
Restore skip analysis (#4146)
* Restore skip analysis optimisation

* Make checkChangeSets work with snapshots

* Add syncmode to checkChangeSets

* Add block number for BSC

* Fix lint

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-14 20:17:23 +01:00
ledgerwatch
e02c77bf5a
Further simplify header download, req/resp metrics (#4121)
* Further simplify header download, req/resp metrics

* Not break the loop

* Move anchors correctly

* Log anchor state

* Print minNum

* Print hash

* Always add links

* Remove obsolete test

* cleanup

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alex Sharp <alexsharp@alexs-macbook-pro.home>
2022-05-13 11:18:30 +01:00
Alex Sharov
4e0f3c8c4c
Sentry: batch events (#4140) 2022-05-13 11:00:44 +07:00
Alex Sharov
1b82acd7ff
it's ok to not have snapshots dir (#4135)
* save

* save

* save
2022-05-12 15:14:16 +07:00
Alex Sharov
691ceb1c3d
save (#4126) 2022-05-12 10:31:45 +07:00
Alex Sharov
79e12edb52
Torrent: mmap store (#4123)
* save

* save
2022-05-12 10:20:30 +07:00
Alex Sharov
45adf8fba9
Torrent: don't drop db on "torrent_hashes --rebuild" #4118 Open 2022-05-11 14:38:37 +07:00
Alex Sharov
0fd12743e7
torrent: suspend more useless logs #4116 2022-05-11 09:40:20 +07:00
Alex Sharov
4d98ce697b
Open torrent: supress some useless logs (#4115) 2022-05-11 07:16:51 +07:00
Andrew Ashikhmin
15ddd32e75
Engine API: remove unauth port (#4111)
* Engine API: remove unauth port

* Remove reduntant auth from variable names
2022-05-10 13:04:52 +02:00
Alex Sharov
763563ec77
RPCDaemon: open snapshots on startup (because now snapshots dir is atomic), even if no Erigon available (#4110)
* save

* save

* save

* save

* save

* save
2022-05-10 09:54:44 +01:00
ledgerwatch
8001cf2ad6
Simplify header downloader (#4104)
* Simplify header downloader

* Remove VerifyQueue

* Fix

* More fixes

* Fix

* Break out of the loop

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-10 08:06:16 +01:00
Alex Sharov
2c26583f6f
Rename sentry.ControlServerImpl to sentry.MultyClient and sentry.SentryServerImpl to sentry.GrpcServer #444 2022-05-10 12:17:44 +07:00
Alex Sharov
3e4fb5dd49
up linter version (#4108)
* save

* save

* save
2022-05-10 10:14:09 +07:00
Alex Sharov
4ba1f03efe
Snapshots: atomic dir, step 3 (#4103) 2022-05-10 09:29:44 +07:00
Andrew Ashikhmin
05c4a57760
Amend description of override.mergeForkBlock flag (#4106) 2022-05-09 14:55:04 +02:00
Alex Sharov
e9dcc2e472
Torrent: increase network-request size to 2Mb (#4100) 2022-05-08 09:25:15 +07:00
Alex Sharov
62fddbe480
torrent not found fix (#4101) 2022-05-08 09:22:07 +07:00
Alex Sharov
ad74e8a716
switch toml lib to release version (#4095)
* save

* save
2022-05-07 15:02:34 +07:00
Alex Sharov
32d8ab34d9
atomic snapshot dir, step 2 (#4093)
* atomic snapshot dir

* atomic snapshot dir
2022-05-07 14:53:21 +07:00
ledgerwatch
ba987cf262
Remove preverified hashes (#4088)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-06 15:15:01 +01:00
Alex Sharov
f480865a26
Downloader atomic snapshot dir, step 1 (#4085)
* save

* save

* save
2022-05-06 09:59:23 +07:00
battlmonstr
0fc99b7c55
rpcdaemon: optimize tests (#4082)
* reuse the generated test blockchain across tests
* copy ChainPack to ensure test isolation

This improves the speed from 10s to 4s.

The package tests timeout can be reduced to 5s:

    go test ./cmd/rpcdaemon/commands -count 1 --timeout 5s
2022-05-06 08:54:26 +07:00
ledgerwatch
14557a2348
[erigon2] Support for binary tree commitments (#4077)
* binary tree

* Binary commitment tree

* [erigon2] Bin tree support

* Point to latest erigon-lib

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-05 13:54:29 +01:00
Alex Sharov
152998721a
Torrent: increase network request size (#4067)
* save

* save
2022-05-04 18:18:35 +07:00
Giulio rebuffo
6927ffc54b
penalize naughty peers on PoS (#4060)
* penalize naughty peers

* lint
2022-05-04 10:39:34 +02:00
Alex Sharov
f590bf682f
RPCDaemon - open snapshots only when they are ready (and indices ready). 2022-05-04 12:55:58 +07:00
Alex Sharov
beafe7db65
Test that torrent port is open for TCP and UDP (#4062) 2022-05-04 10:58:58 +07:00
Alex Sharov
533970d31c
trace read parent header from snapshot and lru #4042 2022-05-01 10:35:30 +07:00
Alex Sharov
93ab7f5d82
save (#4032) 2022-04-30 11:43:07 +07:00
Alex Sharov
a13c5ba904
Fix non-starting download (#4031)
* save

* save

* save

* save
2022-04-30 11:42:36 +07:00
Giulio rebuffo
af5bdceb14
added ovveride merge fork block (#4027) 2022-04-29 18:27:17 +02:00
Alex Sharov
77560b6732
More careful handle of sequences in stage_headers --reset (#4023)
* save

* save

* save

* save
2022-04-29 14:37:02 +07:00
ledgerwatch
285c782b1b
More efficient header verification of headers for Parlia when snapshots are used (#3998)
* Update stageloop.go

* Print

* Consider snapshot headers as parlia checkpoints

* Not fail after not loading snapshot

* Lazy snapshots

* Print number of validators

* More printing

* Use epoch instead of checkpoint interval

* Reduce logging

* Fix compilation

* Remove trace jump dest

* Fix lint

* Not store snapshots every epoch

* Separate snapshot for verification and finalisation

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-04-29 07:10:31 +01:00
Andrew Ashikhmin
f9858ff9f2
Add override.terminaltotaldifficulty flag (#4018)
* cmd/utils: initialize f.Value before setting variable

* override.terminaltotaldifficulty flag

* Add OverrideTerminalTotalDifficulty to default_flags
2022-04-28 19:01:51 +02:00
battlmonstr
4b3eb0ffac
Observer: fix panic on clean start (#4002) (#4017)
Problem: (nil, nil) from CountPingErrors was not handled.
This happens if the node is not in the db (a bootstrap node),
and was never crawled before.
2022-04-28 12:46:33 +02:00
Alex Sharov
76c36c2c09
typed sender (#4016)
* save

* save
2022-04-28 15:35:14 +07:00
Alex Sharov
352869fc3a
rename field "type" (#4015)
* save

* save

* save
2022-04-28 15:02:06 +07:00
ledgerwatch
bd3b734027
[integration tool] Clean BorReceipt when reset state (#4013)
* Update reset_state.go

* Update reset_state.go
2022-04-28 14:59:04 +07:00
Alex Sharov
831da9ba41
reduce downloader deps (#4011) 2022-04-28 12:42:14 +07:00
Alex Sharov
2655d57288
reduce downloader deps (#4010)
* reduce downloader deps

* reduce downloader deps
2022-04-28 12:13:30 +07:00
Alex Sharov
43ddea2adf
Torrent: maxpeers flag were used incorrectly 2022-04-28 11:38:16 +07:00
Alex Sharov
53d7b6d8c2
Fix empty "Tables" log line (#4008)
* save

* save

* save
2022-04-28 10:46:41 +07:00
Alex Sharov
8b8c442dc6
Open shorter logs #400 2022-04-28 10:11:07 +07:00
Alex Sharov
d0ce0df1ab
Open only existing torrent files (#4007)
* save

* save

* save

* save

* save
2022-04-28 10:10:40 +07:00
Alex Sharov
d2ce562034
downloader stuck on 99.9% fix #4004 2022-04-28 09:28:44 +07:00
battlmonstr
c6649f584b
p2p: refactor MaxPendingPeers handling (#3981)
* use semaphore instead of a chan struct{}
* move MaxPendingPeers default value to DefaultConfig.P2P
* log Error if Accept fails
* replace quit channel with context
2022-04-28 09:21:52 +07:00
Alex Sharov
ea8a347ece
Downloader: calc stat inside, add --torrent.download.slots and limit downloads inside (#3986)
* save

* save

* save

* save

* save

* save

* save

* save

* save
2022-04-28 09:10:00 +07:00