Commit Graph

227 Commits

Author SHA1 Message Date
Alex Sharov
215623da80
Windows support (#1944) 2021-05-20 23:46:12 +07:00
Alex Sharov
50934fa5d3
Move chain maiker to kv (#1972) 2021-05-20 18:49:33 +07:00
Alex Sharov
9d66aa0fe3
better support for mdbx in snapshots (#1971) 2021-05-20 18:12:07 +07:00
ledgerwatch
4b897d679f
Reduce persistent link kept (#1969)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-05-20 07:57:17 +01:00
Alex Sharov
57880b8817
fixes for dv2 cancelation (#1968)
* fixes

* fixes

* fixes

* fixes

* fixes
2021-05-20 06:33:55 +01:00
ledgerwatch
79084ede47
[download.v2] Make default (#1963)
* [download.v2] Make default

* Update server.go

* Fix for tmp files appearing in the current dir

* Fix test

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
2021-05-19 16:19:29 +01:00
Alex Sharov
781a67a4ee
Auto-Close db in tests by using t.Cleanup (#1956) 2021-05-19 10:47:28 +07:00
ledgerwatch
2b2153f387
[download.v2] No double p2p server (#1960)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-19 00:49:38 +01:00
ledgerwatch
19b602a135
Stuck unwind fix, test, and recovery (#1959)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-19 00:00:57 +01:00
Alex Sharov
cceaf75b16
use t.TempDir() (#1955) 2021-05-18 19:13:16 +07:00
ledgerwatch
b2d00c97d8
Mock sentry and initial tests (#1952)
* More on mock

* Working test with mock sentry

* Simulate unwinding

* Fix MDBX overlapping txs

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-05-17 21:26:18 +01:00
Alex Sharov
0c91bfbf3e
RPCDaemon: support Pending block (#1942)
* clean

* save

* pubsub

* pubsub

* pubsub

* pubsub

* pubsub

* pubsub

* save

* tx pub-sub

* tx pub-sub

* clean

* clean

* save

* save

* save

* save

* save

* Squashed 'interfaces/' content from commit c469f3ae0

git-subtree-dir: interfaces
git-subtree-split: c469f3ae073b60c8821b61fed2910191080ef835

* save

* save

* save

* save

* Squashed 'interfaces/' changes from c469f3ae0..958dfc669

958dfc669 save

git-subtree-dir: interfaces
git-subtree-split: 958dfc669f8daeefe686a13aa852fb95f1537886

* save

* save

* up some deps

* up some deps

* clean

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test
2021-05-17 13:15:19 +01:00
Alex Sharov
617baac56b
move db tests to kv interface (#1946) 2021-05-17 16:54:29 +07:00
ledgerwatch
86a94e8478
Avoid parsing transactions at Stage3 (#1940)
* RawBody

* Do not parse transaction during Stage3

* Reinstate delivery channel capacity, add comment

* Correct calculation of tx encoding for hashing

* fix logging of senders stage

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-05-16 20:01:14 +01:00
ledgerwatch
f6ac04e53e
Skip flaky tests (#1943)
* Update send_transaction_test.go

* Update snapshot_builder_test.go
2021-05-16 19:09:12 +01:00
ledgerwatch
b47367eb8d
Defer tx pool start until the initial cycle end (#1937)
* Defer tx pool start until the initial cycle end

* Not print dropped messages

* Fix mock sentry test

* Fix test import cycle|

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-15 12:35:28 +01:00
ledgerwatch
7eefcbe6a6
fix RPC notification, add boilerplate for tests (#1936)
* fix RPC notification, add boilerplate for tests

* Fix test

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-14 22:16:16 +01:00
ledgerwatch
c4f746f54f
[download.v2] Recover from unwind panic (#1935)
* [download.v2] Recover from unwind panic

* Fix notifications and unwind

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-14 15:24:50 +01:00
Alex Sharov
2ff6ce7d92
move staged sync to tx (#1897) 2021-05-14 18:00:20 +07:00
b00ris
48733c31cd
test fix (#1930) 2021-05-13 21:04:47 +01:00
b00ris
7948eafcc2
Property tests for kv snapshot (#1928)
* model tests for snapshot kv

* cursor test

* first failing test

* fix

* fix lint

* remove fmt
2021-05-13 09:40:32 +01:00
ledgerwatch
44cb94b906
Use chainname for preverified hashes (#1927)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-13 09:32:09 +01:00
ledgerwatch
ebf20b1adc
Peer logging in sentry + fresh hashes for mainnet and ropsten (#1924)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-13 01:04:07 +01:00
ledgerwatch
61df34b080
Fix headers subscriptions for download.v2 (#1923)
* Fix headers subscriptions for download.v2

* Use datadir to place nodes database for sentry

* Enable request chaining only after initial cycle

* Support for baikal and other in sentry

* Properly solve problem of stage1

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-05-12 22:37:43 +01:00
Alex Sharov
47d22773b9
[wip] dv2: Validate body (#1913)
* validate body

* validate body

* save

* save

* body deliveries messages handling into staged sync

* body deliveries messages handling into staged sync

* body deliveries messages handling into staged sync

* body deliveries messages handling into staged sync

* body deliveries messages handling into staged sync

* penalize right after verifyUncles and stop, don't batch

* penalize right after verifyUncles and stop, don't batch

* penalize right after verifyUncles and stop, don't batch

* penalize right after verifyUncles and stop, don't batch

* penalize right after verifyUncles and stop, don't batch

* penalize right after verifyUncles and stop, don't batch

* penalize right after verifyUncles and stop, don't batch

* penalize right after verifyUncles and stop, don't batch

* penalize right after verifyUncles and stop, don't batch
2021-05-12 14:57:35 +01:00
ledgerwatch
319c167279
Improvements to stage1 in download.v2 (#1920)
* Improvements to stage1 in download.v2

* Stop timer earlier

* Stop timer earlier

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-12 12:40:23 +01:00
ledgerwatch
447f20d395
Baikal testnet configuration (#1910)
* Baikal testnet configuration

* Fixes

* Change AsMessage signature

* Fixes in t8ntool

* More updates

* Fix misspelling

* Skip eip1559 transition test

* More bootnodes

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-11 10:54:20 +01:00
Alex Sharov
921c6a53c9
set default mdbx log level to warning (#1912) 2021-05-11 15:22:34 +07:00
ledgerwatch
a99d22c313
Trace filter 4 + fixes for download.v2 (#1907)
* Introduce TraceCallSet bucket and fill it up

* Fix compile

* Reset TraceCallSet

* Add database.verbosity

* Warn about dropped messages

* Unwind for call traces

* Fixes for headers download

* Fix for the slow stage 3

* Remove wakeup channels

* Permit system for peer load balancing

* Reduce aggressiveness

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-05-10 16:07:22 +01:00
Artem Vorotnikov
80bbbf62c2
Misc fixes (#1908)
* Fix debug levels

* try this

* remove adapter

* fix

* fix bodies stage
2021-05-10 06:59:29 +01:00
ledgerwatch
128f446e7c
Download v2 fixes (#1903)
* [download.v2] Fix endianness of Difficulty in Status message

* Add comments

* Finish stage to use RwTx

* Print header age in stage 1

* Print new block messages

* TopSeenHeight to be updated from any header

* block in the future handling and skip the test

* Fix downloader test

* Fix test

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-09 08:22:08 +01:00
ledgerwatch
8907e95d4a
Trace filter 3 (#1904)
* Prevent the leak

* Default storage mode, fix leak again

* TopSeenHeight to be updated from any header

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-05-08 23:07:16 +01:00
b00ris
565a4250d6
Snapshot sync headers stage (#1836)
* save state

* snapshot update works

* save state

* snapshot migrator

* tx test

* save state

* migrations stages refactor

* refactor snapshot migrator

* compilation fixed

* integrate snapshot migrator

* goerli sync headers

* debug async snapshotter on goerly

* move verify headers, remove experiments, fix remove old snapshot

* save state

* refactor snapshotsync injection

* fix deadlock

* replace snapshot generation stage logic to migrate method

* change done for body snapshot

* clean

* clean&&change deleted value

* clean

* fix hash len

* fix hash len

* remove one of wrap methods, add remove snapshots on start

* add err check

* fix shadowing

* stages unwind order debug

* matryoshka experiments

* steam test

* fix build

* fix test

* fix lint

* fix test

* fix test datarace

* add get test

* return timeout

* fix mdbx overlap

* fix after merge

* change epoch size

* clean todo

* fix

* return testdata

* added return from sndownloader gorutine

* fix review comments

* Fix

* More info

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-08 09:45:40 +01:00
Artem Vorotnikov
09788dbc02
Pruning flag, incremental staged sync (#1899) 2021-05-08 00:07:49 +03:00
Alex Sharov
80ee37540e
penalize for abandoned anchor (#1896) 2021-05-07 06:17:40 +01:00
Alex Sharov
b2f424e2cd
Canonical fix in --download.v2 (#1886) 2021-05-07 09:06:00 +07:00
ledgerwatch
59e5502744
Initial work on RPC streaming (#1880)
* Initial work on RPC streaming

* Create the stream and pass it on

* trace_filter expressed as streamable (not finished)

* Reenable call trace index

* Add new line

* Remove storage mode override

* Tool for overriding storage mode

* Diagnostics

* Make trace_filter more streamy

* Streaming debug_traceTransaction and debug_traceCall

* Fix test

* Log error on stream flush

* Enable streaming for http

* Flush the stream too

* Make trace_filter flush too

* Stop streaming if client is not interested

* Try to quiet annoying test|

* Revert "Try to quiet annoying test|"

This reverts commit 42849257bfa52e90140aa535af34b957cd97a222.

* Debug log for test

* Proceed with handshake regardless of whether peer notification worked

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-06 18:37:38 +01:00
Alex Sharov
e8255abdd0
deprecate tds and trie (#1890) 2021-05-06 15:48:30 +07:00
Alex Sharov
c7eedf0091
Add kv to stage settings (because it doesn't change in runtime, tx will be passed as Stage func argument) (#1872)
* add kv to config

* move forward tx use

* move forward tx use

* gc stat

* gc stat

* changeset writer - move to tx

* clean

* clean

* clean

* clean

* clean
2021-05-04 13:36:03 +01:00
Alex Sharov
f3d2af1e33
Rpcdaemon: move tx pool to own grpc service, subscribe to pending txs (#1863) 2021-05-04 08:37:17 +07:00
Alex Sharov
f230ba1da4
Less use rawdb deprecated methods (#1861)
* less use deprecated methods

* less use deprecated methods

* auto Dp limit

* auto Dp limit

* add test
2021-05-03 21:01:01 +01:00
ledgerwatch
39d3314b99
[download.v2] Prevent deadlock by starting txPool early (#1860)
* Prevent deadlock by starting txPool early

* Reduce error levels in the logs

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-02 12:15:53 +01:00
ledgerwatch
4432618cb9
Support for Baikal devnet (#1853)
* EIP-3529

* Test fix and EIP-3541

* Fix tests

* Fix

* Fix stagedsync test

* Fix

* Remove dup

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-02 10:34:19 +01:00
Alex Sharov
7eb088e862
Download request more headers on ext (#1858)
* use lru

* add comment

* add comment
2021-05-02 08:12:17 +01:00
Alex Sharov
08f6299257
broadcast new headers (#1847)
* broadcast new headers

* don't use eth type

* don't use eth type

* add seenAnnounces scet

* use lru
2021-05-01 21:03:51 +01:00
Alex Sharov
aacc457ea8
rawdb deprecated methods with Database interface (#1854) 2021-05-01 14:42:23 +07:00
Alex Sharov
ad598652cf
less blockchain object in tests (#1848) 2021-05-01 10:51:10 +07:00
ledgerwatch
34c1fdac21
Aleut fix for GASPRICE opcode (#1852)
* Aleut fix for GASPRICE opcode

* Fix for tip+basefee > feecap

* Unbork

* Fix tests

* Remove setHead test

* Test fix

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-04-30 19:20:18 +01:00
Alex Sharov
249b3098cb
add --sentry.api.addr flag (#1850)
* add --sentry.api.addr

* add --sentry.api.addr

* add --sentry.api.addr

* add --sentry.api.addr

* add --sentry.api.addr

* add --sentry.api.addr

* add --sentry.api.addr

* add --sentry.api.addr

* add --sentry.api.addr

* add --sentry.api.addr
2021-04-30 16:09:03 +01:00
ledgerwatch
75ca6b8c76
Initial work on integration tests (#1797)
* Initial work on integration tests

* Delete subtree

* Squashed 'interfaces/' content from commit 41a082ba4

git-subtree-dir: interfaces
git-subtree-split: 41a082ba4bde38647325eb0416cb1da1b4ca2b12

* Add consensus interfaces

* More stuff

* comments

* Fix compile

* Squashed 'interfaces/' changes from 41a082ba4..1b13a42a7

1b13a42a7 Add chainspec to consensus interface

git-subtree-dir: interfaces
git-subtree-split: 1b13a42a7803f5464722867a71065c27a7ebe8c3

* Squashed 'interfaces/' changes from 1b13a42a7..93a072c4c

93a072c4c Add missing import

git-subtree-dir: interfaces
git-subtree-split: 93a072c4c099d169322a3a53b95e40203276820b

* New consensus interfaces

* More on clique

* Fix tests

* Squashed 'interfaces/' changes from 93a072c4c..62f4ec4b2

62f4ec4b2 Add test service for consensus engine

git-subtree-dir: interfaces
git-subtree-split: 62f4ec4b263107635ffa3aabd5d634af22e813c6

* Squashed 'interfaces/' changes from 62f4ec4b2..061a63543

061a63543 Fix

git-subtree-dir: interfaces
git-subtree-split: 061a63543babdeb51ab7e3a96dec56b2485d4389

* Configuring clique engine with toml specs - start

* More toml parsing

* Constructed rinkeby genesis

* Simplify VerifyHeaders functions

* Fix lint

* Remove concurrent verification tests

* Fix lint

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-04-29 16:14:10 +01:00