Commit Graph

240 Commits

Author SHA1 Message Date
Giulio Rebuffo
e76bc807bb better api 2021-11-29 15:47:08 +01:00
Giulio rebuffo
cfed35921c
Merge branch 'devel' into enginev1 2021-11-29 09:57:56 +01:00
TBC Dev
57d641b6f9
Avoid redundant Block.Header() deep-copy (#3050)
* Add separate Block.Nonce() and Block.NonceU64()

* Add Block.Seal()

* Avoid redundant Block.Header() deep-copy

* Add warning comment for Block.Header()
2021-11-29 08:52:36 +00:00
Alex Sharov
8104a90993
Snapshot: exec and trie to support snapshot files (#3033) 2021-11-29 10:43:19 +07:00
ledgerwatch
c3e361eadb
Update skip analysis and preverified (#3045)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-11-28 12:59:11 +00:00
TBC Dev
16058267c4
Use sub-slices for ChainSegment actions (#3043)
* Extract pruneLinkQueue() out of ProcessSegment()

* Use sub-slices for segment actions
2021-11-28 08:21:06 +00:00
TBC Dev
2f0758e817
ChainSegment efficiency (#3042)
* De-dup blockHeaders66() and blockHeaders65()

* Simplify loops and EOL detection

* Add ChainSegmentHeader struct and refactor

* Add RawRlpHash() to avoid re-encode for header hash

* Avoid multiple redundant rlpHash()

* Sort headers by height,hash to make dups consecutive

* Flip condition to reduce map lookups

* Remove redundant check

* Use rlp.RawValue rather than []byte to help self-document
2021-11-27 17:28:17 +00:00
Giulio Rebuffo
768617f412 added proper errors 2021-11-24 23:19:40 +01:00
Giulio Rebuffo
435d1d1519 channels implemented 2021-11-24 23:00:00 +01:00
Alex Sharov
6d24a30a01
Drop txpool v1 (#3017)
* drop_txpool_v1

* drop_txpool_v1

Co-authored-by: Alex Sharp <alexsharp@alexs-macbook-pro.home>
2021-11-22 18:38:51 +00:00
TBC Dev
e1c44cd19b
Change sentry peer_id from H512 pubkey to H256 keccak256(pubkey) (#3013)
* Rename protoHandshake.ID to protoHandshake.Pubkey

* Fix enode.ID comment descriptions

* Change sentry peer_id from H512 pubkey to H256 keccak256(pubkey)

* Simplify PeerInfo helpers
2021-11-22 05:39:31 +00:00
ledgerwatch
3335532481
Update preverified hashes for mainnet and ropsten (#3010)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-11-21 16:43:40 +00:00
Alex Sharov
5b634a790e
Canonical tx ids (#2986)
* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save
2021-11-18 14:07:55 +00:00
Giulio rebuffo
e6916d4d00
[EIP-4399 2/3] Added total difficulty stage and transition logic (#2964)
* added diff stage

* added td stage

* improvements + more tests

* added err check

* added err check

* transition raw interfaces

* interface for transition

* unwind updates

* maybe this fix

* now fixed?

* fixes

* better db-format

* better db-format

* sum and mod

* sum and mod

* fixed headers unwind
2021-11-17 15:50:41 +00:00
ledgerwatch
2ad6ca10cf
Ropsten and main net preverified hashes, skip analysis (#2973)
* Ropsten preverified hashes

* Pre-verified hashes for mainnet, skip analysis

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-11-16 20:14:26 +00:00
TBC Dev
5ddbf843d1
Avoid a redundant rlpHash() in FeedHeader() (#2959) 2021-11-15 08:52:14 +00:00
TBC Dev
3df4197f2e
Fix header skeleton (#2945)
* Fix underflow only

* Rename queryRange to maxHeight

* Fix additional cases
2021-11-11 07:53:32 +00:00
alex.sharov
5d0f081a9c save 2021-11-04 15:45:55 +07:00
Alex Sharov
702631bf6f
prohibit change prune mode (#2908) 2021-11-03 20:05:52 +07:00
Alex Sharov
8c6c9527db
Drop --txpool.v1 flag (#2901) 2021-11-02 09:35:58 +07:00
Alex Sharov
fc010b77ee
Switch sentry mock to pool v2 (#2885)
* save

* save

* save

* save

* save

* save

* save

* pool v2 docs

* pool v2 docs

* pool v2 docs

* save

* save

* save

* save

* save

* save

* save
2021-10-28 21:18:34 +07:00
ledgerwatch
79b5de6d8e
Update header_algos.go (#2882) 2021-10-28 09:17:03 +01:00
Alex Sharov
84da57f62c
revert run only stage.Headers at first cycle (#2879) 2021-10-28 10:13:00 +07:00
ledgerwatch
3f21910963
Update preverified headers (main net, roosten), update skip analysis block (#2875)
* Preverified headers

* Update skip analysis

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-10-27 17:16:20 +01:00
ledgerwatch
113a9be3b8
[header download] Preserve heap invariant in SentRequest function (#2873)
* [header download] Preserve heap invariant in SentRequest function

* Update header_algos.go
2021-10-27 12:34:01 +01:00
Alex Sharov
e6bd6fbfcc
Add p2p msg to panic (#2861) 2021-10-22 09:51:49 +07:00
Alex Sharov
583a753e13
start_pool_at_genesis_on_devnet (#2856) 2021-10-21 16:01:34 +07:00
ledgerwatch
626a60d0cc
Update header_algos.go (#2846) 2021-10-20 00:18:41 +01:00
ledgerwatch
5e9c08ca92
Update header_algos.go (#2840) 2021-10-19 07:50:47 +01:00
ledgerwatch
1cbde9a5ef
More robust preverification of headers and remove kludge for header download (#2833)
* Update header_algos.go

* Update stage_headers.go

* Update header_algos.go
2021-10-17 19:13:34 +01:00
ledgerwatch
f4dee87794
Fail to insert headers with missing parent (#2822)
* Update header_algos.go

* Update header_algo_test.go

* Update header_algos.go

* Update header_data_struct.go
2021-10-13 16:18:09 +01:00
Alex Sharov
bd099e4e3e
Run first cycle in one db transaction if it's small enough (#2809) 2021-10-10 19:00:13 +07:00
ledgerwatch
21823e3dd3
Extend preverified hashes for mainnet and ropsten (#2793)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-10-07 11:42:27 +01:00
Andrea Lanfranchi
3bc3be4b5f
Clean up DEBUG category logs (#2776)
- move many DEBUG logs into TRACE category
2021-10-05 08:14:04 +07:00
Andrea Lanfranchi
c913f35c2e
Inner errors (#2774) 2021-10-04 22:16:52 +07:00
Alex Sharov
de16cb9e23
add logs in recoverFromDb func (#2769) 2021-10-04 19:46:05 +07:00
Andrea Lanfranchi
f70dd63a30
Update stage_finish.go : notifications to rpc daemon (#2755) 2021-10-04 07:30:42 +07:00
e-danko
0c93c314d4
added Fermion network (#2737) 2021-09-29 08:35:43 +07:00
e-danko
7d338f5e1c
#2660: added Kovan network (#2733) 2021-09-27 19:56:17 +07:00
Alex Sharov
a148e71d9d
Pool: switch to pendingBaseFee (#2732) 2021-09-26 23:09:36 +07:00
Alexandr Borodulin
d7159cd8bd
More convenient pruning for non-PoW consensus: add --prune.*.before flags (#2714) 2021-09-23 09:13:19 +07:00
Alex Sharov
b30ccd2ddf
Revert "Add prune before parameters" (#2701)
This reverts commit 49a98ad4b6.
2021-09-18 08:37:39 +07:00
Alexandr Borodulin
49a98ad4b6
Add prune before parameters 2021-09-17 19:01:15 +07:00
Alex Sharov
400c71b7ce
Pool: txID-based cache (#2697) 2021-09-17 10:31:20 +07:00
Alex Sharov
8b7b05fb1b
increase max jump in 1 tx from 1k to 8k 2021-09-16 21:09:14 +07:00
Alex Sharov
77db993cfc
Pool: add coherent cache (#2678) 2021-09-13 14:58:25 +07:00
ledgerwatch
15b4095718
Move ETL to erigon-lib (#2667)
* Move ETL to erigon-lib

* Update link in the readme

* go mod tidy

* Use common/chan.go from erigon-lib

* Clean up

* Fix lint

* Fix test

* Fix compilation

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-09-12 08:50:17 +01:00
Alex Sharov
ed33b651cd
Print goroutines trace to STDOUT without app stop on SIGUSR1 (#2663) 2021-09-11 18:16:39 +07:00
Alex Sharov
3193f95152
Apply mined block (#2650) 2021-09-09 14:26:58 +07:00
Alex Sharov
0d79c19f21
clean ipc string (#2644) 2021-09-08 15:25:10 +07:00