Commit Graph

463 Commits

Author SHA1 Message Date
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
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
b3e8a1a02a
hack: remove createIdx and txLookup methods (#3000) 2021-11-21 12:06:36 +07:00
Alex Sharov
f3aebbe1aa
Snapshot: common indexing func (#2999) 2021-11-21 11:14:37 +07:00
Alex Sharov
e55256296b
snapshots: read block from snapshots, add sender to txs file (#2996) 2021-11-21 10:32:14 +07:00
Alex Sharov
d4850b6adc
Hack: dump bodies and headers (#2994) 2021-11-20 09:41:01 +07:00
Alex Sharov
2a08dbd3d9
Recsplit: move files read/write helpers to erigon-lib (#2993) 2021-11-19 12:12:25 +07: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
Alex Sharov
861ef7a6c1
Open blocks snapshots (#2957) 2021-11-16 15:33:41 +07:00
TBC Dev
5ddbf843d1
Avoid a redundant rlpHash() in FeedHeader() (#2959) 2021-11-15 08:52:14 +00:00
TBC Dev
9e5ae33eb0
Use IsZero() instead of Sign() for uint256.int (#2960) 2021-11-14 22:18:47 +07:00
TBC Dev
669b5dd3ab
Add trusted peers flag (#2958)
* Refactor and consolidate enode-list config parsing

* Add trustedpeers flag
2021-11-14 18:44:44 +07:00
Alex Sharov
aad0d0c777
grpc GetBlock api (#2955) 2021-11-14 11:08:52 +07: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
Giulio rebuffo
ab4c080cbc
Merge pull request #2939 from ledgerwatch/enginev1
Dropped ETH65
2021-11-10 21:44:39 +01:00
Alex Sharov
deed48c01a
Small step towards torrent downloader (#2929) 2021-11-08 20:40:56 +07:00
Giulio Rebuffo
02d3c697d1 removed eth64/65 tests 2021-11-07 22:16:49 +01:00
Giulio Rebuffo
f34ccb75e5 refactor downloader 2021-11-07 20:25:37 +01: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
5d7904c133
erl.collector - move logPrefix to constructor (#2866) 2021-10-25 15:09:43 +07: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
Andrea Lanfranchi
a477aaadd9
Enable DeveloperPeriodFlag (#2838)
Setting a period !=0 allows mining of empty blocks
2021-10-19 07:50:25 +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
Alex Sharov
f81ade1b2b
enable poolv2 by default (#2831) 2021-10-16 12:37:43 +07:00
alex.sharov
7885cc6809 Revert "enable by default"
This reverts commit 7f58290a45.
2021-10-16 09:55:38 +07:00
alex.sharov
7f58290a45 enable by default 2021-10-16 09:55:23 +07: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
da00e949c4
RemoteRPC: coherentCache for kv.Code; LocalRPC: enable small blocksLRU (#2815) 2021-10-12 12:04:04 +07: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
Alex Sharov
2e93434a94
Enable "State stream" by default (#2780) 2021-10-05 16:06:45 +07: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