Alex Sharov
b2f424e2cd
Canonical fix in --download.v2 ( #1886 )
2021-05-07 09:06:00 +07:00
ledgerwatch
9fa21db40e
Qucker reaction to new block headers ( #1894 )
...
* Qucker reaction to new block headers
* Always print header lag
* Print verification time
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-06 19:40:12 +01: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
ledgerwatch
618acbffc1
Remove storageMode override ( #1889 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-06 08:39:10 +01:00
Alex Sharov
b1dc618b95
update stage progress before commit - to keep db always consistent ( #1888 )
2021-05-06 08:18:43 +01:00
Alex Sharov
e87d4932f7
Changeset writer move to tx ( #1871 )
2021-05-05 14:31:40 +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
Artem Vorotnikov
2148885637
Simplify ChangeSet implementation and tests ( #1878 )
...
* Move storage changeset code into one file
* Simplify storage changeset tests
* simplify more
* more
* more
* more
* move account changeset into one file
* simplify account changeset test
* NewStorageChangesetPlain -> NewStorageChangeSet
* EncodeStoragePlain -> EncodeStorage
* StorageChangeSetPlain -> StorageChangeSet
* AccountChangeSetPlain -> AccountChangeSet
* more
* more
* more
* Simplify EncodeStorage
* more
* Simplify FromDBFormat
* more rename
* rename changeset buckets (constant names only)
2021-05-04 13:34:08 +01:00
ledgerwatch
793c13e20e
trace_filter and CallTrace Index (derivative of #1626 ) ( #1867 )
...
* Trace Index
* trace_filter
* hrtc -> hrt
* Fix CallTraces
* wip
* wip
* Fix for incorrect gas
* fix
* Fix Tracer
* Add block and uncle coinbases to trace index
* rewind coinbase
* Commit every 100k blocks after block 3m
* Simplify
* Safe unwinds
* Safe unwind 2
* Cleanup
* Simplification
* Remove intermediate JSON transform
* Reinstate optional CallIndex stage
* Create rpctest bench for trace_filter
* Fix trace_filter generator
* Restore unwind order
* Ignore the storage mode
* Ignore the storage mode
Co-authored-by: Artem Vorotnikov <artem@vorotnikov.me>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-04 07:23:54 +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
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
df8c5e3095
All stages - finish fast if current progress > target ( #1773 )
2021-05-01 17:08:59 +07:00
Alex Sharov
aacc457ea8
rawdb deprecated methods with Database interface ( #1854 )
2021-05-01 14:42:23 +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
Alex Sharov
c313238e4a
less blockchain objects in tests ( #1844 )
2021-04-29 16:14:19 +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
ledgerwatch
6cbfff354d
[download-v2] Use Clique instead of EtHash for clique networks ( #1832 )
...
* Use Clique instead of EtHash for clique networks
* Start tx fetcher, enable GetPooledTx in sentry
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-04-28 14:44:29 +01:00
ledgerwatch
03beaf4df7
Connect txPool to download.v2 to resolve 1 reason for "frozen download" ( #1830 )
...
* Pass txPool into new staged sync
* Remove poolStart function
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-04-27 16:37:03 +01:00
Alex Sharov
9cc4a0a97c
rebort db metrics - not guilty ( #1828 )
2021-04-27 15:32:41 +07:00
Alex Sharov
9d82456f17
remove chain indexer and core.setHead func ( #1826 )
2021-04-27 14:48:59 +07:00
ledgerwatch
04bbd07749
Move sentry message to log.Debug for download.v2 mode ( #1817 )
...
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-04-26 15:40:46 +01:00
Alex Sharov
01ae962459
Clean tmp on start ( #1808 )
...
* fininish to remove chain context
* clean
* move migrations folder from
<datadir>/etl-tmp/migrations
to
<datadir>/migrations
2021-04-26 13:51:01 +01:00
emhane
4823039a3d
Update README.md ( #1815 )
...
Correct typo.
2021-04-26 11:21:51 +01:00
Alex Sharov
4e80d6eeed
Pending txs subscription ( #1810 )
2021-04-26 16:53:38 +07:00
Alex Sharov
c40c3b7a7a
exec unwind etl ( #1806 )
2021-04-26 10:41:31 +01:00
Alex Sharov
472e161e33
fininish to remove chain context ( #1807 )
2021-04-26 14:23:21 +07:00
Alex Sharov
eee9438625
deprecate PlainDbState in favor of PlainKvState ( #1805 )
2021-04-26 12:37:48 +07:00
Alex Sharov
3af0b9b591
add hashstate, trie, history, logIndex stages ( #1799 )
...
* add hashstate and trie stages
* add history stages
* add history stages
* add history stages
* add logindex stage
* add logindex stage
* add other stages
2021-04-25 09:29:39 +01:00
ledgerwatch
88e8828bbd
Not rewind chain on hard forks ( #1798 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-04-25 07:14:10 +01:00
Alex Sharov
d959986466
Connect TxFetcher to Sentry, Add --download.v2 option to TG ( #1796 )
2021-04-25 11:20:50 +07:00
ledgerwatch
e3f3dd3c9b
Integration tests 1 ( #1793 )
...
* Initial commit
* Add sentry gRPC interface
* p2psentry directory
* Update README.md
* Update README.md
* Update README.md
* Add go package
* Correct syntax
* add external downloader interface (#2 )
* Add txpool (#3 )
* Add private API (#4 )
* Invert control.proto, add PeerMinBlock, Separare incoming Tx message into a separate stream (#5 )
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
* Separate upload messages into its own stream (#6 )
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
* Only send changed accounts to listeners (#7 )
* Txpool interface doc (#9 )
* Add architecture diagram source and picture (#10 )
* Typed hashes (#11 )
* Typed hashes
* Fix PeerId
* 64-bit tx nonce
* Add proper golang packages, max_block into p2p sentry Status (#12 )
* Add proper golang packages, max_block into p2p sentry Status
* Change EtherReply to address
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
* Add Rust infrastructure (#13 )
* DB stats methods removed by https://github.com/ledgerwatch/turbo-geth/pull/1665
* more p2p methods (#15 )
* add mining methods (#16 )
* First draft of Consensus gRPC interface (#14 )
* Update Rust build
* Fix interfaces in architecture diagram (#17 )
* Fix KV interface provider
* Fix Consensus interface provider
* drop java attributes (#18 )
* tx pool remove unused import (#19 )
* ethbackend: add protocol version and client version (#20 )
* Add missing ethbackend I/F (#21 )
* Add interface versioning mechanism (#23 )
Add versioning in KV interface
Co-authored-by: Artem Vorotnikov <artem@vorotnikov.me>
* spec of tx pool method (#24 )
* spec of tx pool method (#25 )
* Update version.proto
* Refactor interface versioning
* Refactor interface versioning
* Testing interface
* Remove tree
* Fix
* Build testing protos
* Fix
* Fix
* Update to the newer interfaces
* Add ProtocolVersion and ClientVersion stubs
* Hook up ProtocolVersion and ClientVersion
* Remove service
* Add compatibility checks for RPC daemon
* Fix typos
* Properly update DB schema version
* Fix test
* Add test for KV compatibility|
* Info messages about compability for RPC daemon
* DB schema version to be one key
* Update release intructions
Co-authored-by: Artem Vorotnikov <artem@vorotnikov.me>
Co-authored-by: b00ris <b00ris@mail.ru>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
Co-authored-by: canepat <16927169+canepat@users.noreply.github.com>
Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
Co-authored-by: canepat <tullio.canepa@gmail.com>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-04-24 16:46:29 +01:00
Alex Sharov
ac7ece4a4d
Revert txpool grpc ( #1794 )
2021-04-24 10:48:06 +07:00
Evgeny Danilenko
984daa4d7a
Clique snapshot timer fixed ( #1789 )
...
* fix clique snapshot storage by timer
* after merge
* remove debug
* remove debug
* debug logging
* correct t.Fatal
2021-04-23 20:47:06 +03:00
Alex Sharov
d7d790725b
Add stage exec to downloader ( #1788 )
2021-04-23 17:27:07 +07:00
Alex Sharov
10c41491fa
Use Config struct for headers/body/senders stages. Add StageSenders to new downloader. ( #1787 )
...
* config for headers/body/senders
* clean
2021-04-23 16:16:45 +07:00
ledgerwatch
12cde41772
Aleut support (Eip1559) ( #1704 )
...
* Where I am at
* Refactoring of transaction types
* More refactoring
* Use Homested signer in rpc daemon
* Unified signer
* Continue unified signer
* A bit more
* Fixes and down the rabbit hole...
* More tx pool fixes
* More refactoring fixes
* More fixes'
* more fixes
* More fixes
* More compile fixes
* More RLP hand-writing
* Finish RLP encoding/decoding of transactions
* Fixes to header encoding, start on protocol packets
* Transaction decoding
* Use DecodeTransaction function
* Decoding BlockBodyPacket
* Encode and decode for pool txs
* Start fixing tests
* Introduce SigningHash
* Fixes to SignHash
* RLP encoding fixes
* Fixes for encoding/decoding
* More test fixes
* Fix more tests
* More test fixes
* More test fixes
* Fix core tests
* More fixes for signer
* Fix for tx
* Fixes to string encoding/size
* Fix eip2930 test
* Fix rest of ./tests
* More fixes
* Fix compilation
* More test fixes
* More test fixes
* Test fixes
* More fixes
* Reuse EncodingSize in EncodeRLP for accessList
* Rearrange things in dynamic fee tx
* Add MarshalBinary
* More fixes
* Make V,R,S non-pointers
* More NPE fixes
* More fixes
* Receipt fixes
* Fix core/types
* Fix ./eth
* More compile fixes for tests
* More test fixes
* More test fixes
* Try to see lint errors better
* Try to see lint errors better
* Fix lint
* Debugging eip1559 test
* Fix TestEIP1559Transition test
* Fix NewBlockPacket encoding/decoding
* Fix calculation of TxHash
* Fix perf problem with senders
* Update aleut config values
* Try adding static peers
* Add staticpeers to defaul flags
* Change aleut networkID
* Fix test
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-04-22 18:11:37 +01:00
ledgerwatch
80a3edae2f
Fixes to the sentry/downloader ( #1767 )
...
* Complete eth/66 migration, temporary disable broadcast
* Update header stage progress correctly
* Fix restarting
* Not pass blockPropagator to headers stage
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-04-21 23:24:01 +01:00
Alex Sharov
4b803bfa6a
Notify RPCDaemon after sync cycle commit ( #1772 )
2021-04-21 17:58:23 +07:00
Artem Vorotnikov
9a3e47a498
Remove StateCache where unused ( #1770 )
2021-04-21 16:14:23 +07:00
Alex Sharov
bbe9af3e25
Stages as const ( #1774 )
2021-04-21 15:02:21 +07:00
Alex Sharov
41fa29d421
Mining fixes ( #1771 )
2021-04-21 12:01:25 +07:00
Artem Vorotnikov
c967655c1d
More cleanups ( #1765 )
2021-04-21 08:48:37 +07:00
alex.sharov
e25b57511d
fix nil pointer in peer
2021-04-20 23:34:54 +07:00
alex.sharov
b08532b278
fix nil pointer in peer
2021-04-20 23:24:09 +07:00
Alex Sharov
bf1c219531
Move txPool.Get method behind direct-grpc ( #1760 )
2021-04-20 21:41:46 +07:00
Alex Sharov
22980c11a1
create make_protocols_method similar to eth.MakeProtocols ( #1754 )
2021-04-20 12:36:25 +07:00
Alex Sharov
bf6f042a5d
Start mining on new tx ( #1740 )
2021-04-20 09:12:08 +07:00
Evgeny Danilenko
17c07c50a5
Move clique buckets to separate DB ( #1703 )
...
* debug
* debug
* it works
* rename clique bucket
* remove genesis special case
* copy snapshot
* remove debug
* migration
* debug
* regenerate snapshots
* simplify
* regeneration
* after merge
* tests
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-04-19 22:58:05 +01:00
Alex Sharov
e44b5eb84e
less blockchain object use step 5 ( #1751 )
2021-04-19 15:36:50 +07:00
Alex Sharov
5019610cfb
remove database field from Ethereum object ( #1750 )
2021-04-19 14:56:44 +07:00
Alex Sharov
368f37a02f
Simplify blockchain obj, step 5 ( #1739 )
2021-04-18 12:27:07 +07:00
Alex Sharov
b6a58b8263
Eth 66 sentry ( #1721 )
...
* eth66
* eth66
* test v0
* save
* sentry handshake test
* sentry handshake test
* sentry handshake test
* clean
* clean
* clean
* clean
* clean
* clean
2021-04-16 14:05:35 +01:00
Alex Sharov
9273090761
Move TxPool stage to rwtx ( #1734 )
2021-04-16 13:30:58 +07:00
Alex Sharov
a6541b5402
[merge after release] remove trie cache cli flags and logic ( #1725 )
2021-04-15 17:06:38 +07:00
Alex Sharov
5703059f29
[merge after release] Move history stage to rwtx ( #1727 )
2021-04-15 17:06:30 +07:00
Alex Sharov
f4a0839ff7
[merge after release] move ih stage to rwtx ( #1726 )
2021-04-15 17:05:55 +07:00
Alex Sharov
4aa90a347c
remove blockchain object from handler test ( #1723 )
2021-04-15 12:02:16 +07:00
Alex Sharov
fd22c39611
Share logic between handlers.go and new downloader ( #1716 )
2021-04-14 14:26:32 +07:00
Alex Sharov
2050127f01
Remove eth64 ( #1715 )
2021-04-13 21:48:36 +07:00
Alex Sharov
e473e0b4d9
lint fixes ( #1717 )
2021-04-13 21:48:20 +07:00
Artem Vorotnikov
eb64d4738d
More KVGetter ( #1697 )
2021-04-08 23:16:33 +07:00
Alex Sharov
c3776f7539
[merge after release] handle case when no senders in db yet ( #1695 )
2021-04-08 22:03:22 +07:00
Alex Sharov
9cff853d1e
tx less wrappers ( #1694 )
2021-04-08 18:03:45 +07:00
Alex Sharov
55904950c2
enr discovery ( #1690 )
2021-04-08 07:37:33 +01:00
Alex Sharov
9527671e5e
Remove blockchain object step3 ( #1684 )
2021-04-07 12:38:43 +07:00
Alex Sharov
a913ae8847
Remove chainContext object ( #1683 )
2021-04-06 16:52:53 +07:00
Alex Sharov
7452cc7f7f
Broadcast new blocks - basic functions ( #1675 )
2021-04-06 12:54:50 +07:00
Alex Sharov
cc539ce266
Remove blockchain.InsertChain method ( #1681 )
2021-04-06 12:06:07 +07:00
Artem Vorotnikov
b71c6323a0
KVGetter, replace old geth interfaces with it ( #1676 )
2021-04-05 20:04:58 +07:00
Alex Sharov
07e96fc055
clean ( #1677 )
2021-04-05 14:48:16 +07:00
Alex Sharov
eb1897cb7d
remove blockchain.InsertChain call from downloader ( #1674 )
2021-04-05 13:00:54 +07:00
Artem Vorotnikov
dbc0db0856
Nuke old miner and mux ( #1666 )
2021-04-03 13:09:31 +07:00
Alex Sharov
ad342b27ab
Mdb no db size log ( #1665 )
2021-04-03 10:30:28 +07:00
Alex Sharov
9a9c5b298a
bitmapdb to use rwtx ( #1661 )
2021-04-03 08:52:45 +07:00
Artem Vorotnikov
1bedfc1965
Nuke remnants of non-staged-sync modes ( #1664 )
2021-04-03 08:48:57 +07:00
Alex Sharov
fbfc43da7e
etl to use rwtx ( #1660 )
2021-04-02 18:22:25 +07:00
Alex Sharov
ef77eb3053
tx.RwCursor() to return err (first step of removing lazy cursors) ( #1656 )
2021-04-02 13:36:49 +07:00
Alex Sharov
abe5bd879c
Remove old loader, step 3 (remove some tds and blockchain objects in tests) ( #1647 )
2021-04-01 12:36:22 +07:00
Alex Sharov
f6effa5b48
Remove old loader, part 2 ( #1642 )
2021-03-31 22:30:09 +07:00
Alex Sharov
dcd081412e
remove unused metrics ( #1643 )
2021-03-31 16:24:39 +07:00
Alex Sharov
b4a2d823c4
old loader remove v1 ( #1641 )
2021-03-31 14:43:12 +07:00
Artem Vorotnikov
d4c10c9a47
Port rpcdaemon to KV interface ( #1627 )
2021-03-30 12:53:54 +03:00
Alex Sharov
4a176e4409
Mining docs ( #1628 )
2021-03-30 16:18:57 +07:00
Alex Sharov
86ccfd0338
RPC: Pending transactions/blocks/logs ( #1625 )
2021-03-30 14:09:00 +07:00
Artem Vorotnikov
9b8cdc0f22
Fix lints and remove more unused code ( #1621 )
2021-03-29 10:58:45 +07:00
Alex Sharov
0685250095
metrics for header/body/exec stages ( #1618 )
2021-03-28 21:40:42 +07:00
Alex Sharov
8ccc6b2664
Mining: remove local pow mining (from ethash), --miner.notify is required now, cycle is non-blocking now ( #1617 )
2021-03-28 21:40:27 +07:00
Alex Sharov
5f6513de31
Remove blockchain object from some tests ( #1612 )
2021-03-28 20:41:47 +07:00
Alex Sharov
416a69ecb3
Genesis.toBlock remove db from arguments ( #1611 )
2021-03-28 16:27:06 +07:00
ledgerwatch
270f866b06
rpctest commands to support block ranges, integration tool to allow tx tracing into files ( #1616 )
...
* block range options for rpctest
* convert bench8 to fastjson
* Add txtrace to integration tool
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-03-27 21:43:38 +00:00
Artem Vorotnikov
afe551ba1c
Remove puppeth & account management ( #1610 )
2021-03-26 21:05:42 +03:00
Alex Sharov
2bb70fca9f
Genesis: calculate root by common components ( #1608 )
2021-03-26 17:05:35 +07:00
Artem Vorotnikov
e67be2b1be
Remove unused code ( #1604 )
...
* Remove graphql, legacy options
* Remove CODEOWNERS
* Remove EWASM and custom EVM interpreter
2021-03-26 09:08:01 +07:00
Alex Sharov
2e1f880046
Mining test: set correct header.Timestamp and header.GasLimit ( #1603 )
2021-03-25 21:26:12 +07:00
Alex Sharov
bdd04f6674
Mining: to use correct ibs snapshot ( #1601 )
2021-03-25 14:57:20 +07:00
Alex Sharov
8e385d9648
Mining: use noop writer when applyTx, pending logs subscription ( #1600 )
2021-03-25 13:42:45 +07:00
ledgerwatch
ea15c4a4fd
Fixes to new downloader ( #1599 )
...
* Fix for prefetched bodies
* Do not reset headers stage to 0
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-03-24 22:37:29 +00:00
ledgerwatch
69702c8235
Correct forkID computation in sentry, use blocks prefetched by NewBlockPacket, Fix NaN delivery speed output ( #1596 )
...
* Use proper forkID
* Remove NaN from Write block bodies messages
* Move Prefetched blocks
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-03-24 09:46:31 +00:00
Alex Sharov
b31813dcb5
Mining - don't write changesets to batch ( #1595 )
2021-03-24 12:09:29 +07:00
Alex Sharov
bedf092c73
remove_warning_when_mining_disabled ( #1591 )
2021-03-23 16:25:14 +07:00
alex.sharov
0a76cdc274
temporary return miner to avoid nil pointer
2021-03-23 16:06:51 +07:00
Alex Sharov
aff859edc0
Mining stage ( #1554 )
2021-03-23 16:00:07 +07:00
Alex Sharov
47c6bdce9d
RPCDaemon: increase throughput by allowing more parallel grpc streams and not lockthread for read tx ( #1580 )
2021-03-23 14:28:04 +07:00
Alex Sharov
df8b94e977
Senders table size regression: loadfunc preventing use of APPEND ( #1585 )
2021-03-23 11:32:01 +07:00
Alex Sharov
91e4126ca7
db commit - remove unused return param ( #1584 )
2021-03-22 19:41:52 +07:00
Alex Sharov
40dd00fee7
remove ideal batch size ( #1582 )
2021-03-22 13:47:01 +07:00
ledgerwatch
a6be390fd5
Handshake in tests, correct ENR updates, etc. ( #1578 )
...
* Remove Blockchain dependency from forkID, fix ENR update
* Fix handshake_test
* Remove db access from handshake
* Undo
* Use StagedSync in test handlers
* Compile fix
* Debugging
* dependency fixes
* More info
* Print test name
* Increase timeout
* Disable checkpoint test
* Optimise RW message pipe
* Fix test
* Print handshake errors
* See where the pipe is closing
* Remove checkpoints
* Remove printouts
* Revert "Fix test"
This reverts commit d154e07b5f97f0b54485b50d572fb27c6c61af4b.
* Revert "Optimise RW message pipe"
This reverts commit 6936111a7ffdf166a19c6cf6fa9c8de725b449e0.
* Revert "Increase timeout"
This reverts commit 9dc0e234bbb80a1ff5146788a308fb7d76ce69de.
* Revert "See where the pipe is closing"
This reverts commit 3cf22afc43f2b2a254b63b86a0e24b58f84bdc2b.
* Remove printing
* Relax peerEventCh
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-03-21 21:23:47 +00:00
Artem Vorotnikov
6a6f5469a1
KV: Split RO and RW transactions ( #1577 )
2021-03-21 20:15:25 +07:00
alex.sharov
e7034c0eba
revert
2021-03-21 17:50:05 +07:00
alex.sharov
1a00e01063
don't loose error in test
2021-03-20 17:52:01 +07:00
Andrew Ashikhmin
e303aeb5ee
Simple test for layout of TrieOfAccountsBucket ( #1563 )
2021-03-20 16:38:45 +07:00
ledgerwatch
81ea5bab78
More updates to downloader, new p2psentry protocol ( #1559 )
...
* Initial commit
* Add sentry gRPC interface
* p2psentry directory
* Update README.md
* Update README.md
* Update README.md
* Add go package
* Correct syntax
* add external downloader interface (#2 )
* Add txpool (#3 )
* Add private API (#4 )
* Invert control.proto, add PeerMinBlock, Separare incoming Tx message into a separate stream (#5 )
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
* Separate upload messages into its own stream (#6 )
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
* Only send changed accounts to listeners (#7 )
* Txpool interface doc (#9 )
* More additions
* More additions
* Fix locking
* Intermediate
* Fix separation of phases
* Intermediate
* Fix test
* More transformations
* New simplified way of downloading headers
* Fix hard-coded header sync
* Fixed syncing near the tip of the chain
* Add architecture diagram source and picture (#10 )
* More fixes
* rename tip to link
* Use preverified hashes instead of preverified headers
* Fix preverified hashes generation
* more parametrisation
* Continue parametrisation
* Fix grpc data limit, interruption of headers stage
* Add ropsten preverified hashes
* Typed hashes (#11 )
* Typed hashes
* Fix PeerId
* 64-bit tx nonce
* Disable penalties
* Add goerli settings, bootstrap nodes
* Try to fix goerly sync
* Remove interfaces
* Add proper golang packages, max_block into p2p sentry Status
* Prepare for proto overhaul
* Squashed 'interfaces/' content from commit ce36053c2
git-subtree-dir: interfaces
git-subtree-split: ce36053c24db2f56e48ac752808de60afa1dfb4b
* Change EtherReply to address
* Adaptations to new types
* Switch to new types
* Fixes
* Fix formatting
* Fix lint
* Lint fixes, reverse order in types
* Fix lint
* Fix lint
* Fix lint
* Fix test
* Not supporting eth/66 yet
* Fix shutdown
* Fix lint
* Fix lint
* Fix lint
* return stopped check
Co-authored-by: Artem Vorotnikov <artem@vorotnikov.me>
Co-authored-by: b00ris <b00ris@mail.ru>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
Co-authored-by: canepat <16927169+canepat@users.noreply.github.com>
2021-03-19 21:24:49 +00:00
b00ris
c03da8fb8e
Split header prefix bucket to headers, td and canonical ( #1556 )
...
* split headers prefix
* migration
* fix downloader bug
* test for migration
* fix lint
* uncomment t.Prallel
* fix postprocessing test
2021-03-19 12:54:47 +00:00
Igor Mandrigin
807495b6db
skip failing test 1
2021-03-18 12:27:39 +01:00
Igor Mandrigin
f6dd33e3f4
lint passes
2021-03-18 11:58:19 +01:00
Igor Mandrigin
a122920fa8
and more lint fixes
2021-03-18 11:53:34 +01:00
Igor Mandrigin
90edad9852
and more linter fixes
2021-03-18 11:46:13 +01:00
Igor Mandrigin
36297dd057
more linter fixes
2021-03-18 11:44:22 +01:00
Igor Mandrigin
f1f849e691
fix linter
2021-03-18 11:18:57 +01:00
Igor Mandrigin
7b000b5644
linter fixups
2021-03-18 11:17:04 +01:00
Igor Mandrigin
da629cceed
fix ./eth
2021-03-18 10:58:26 +01:00
Alexey Sharp
1ff525e6a3
Fix lints
2021-03-18 08:00:21 +00:00
Alexey Sharp
c1de4bd0f7
Fix lints
2021-03-18 07:27:50 +00:00
Alexey Sharp
8e4dea56a8
Fix lints, fork split test
2021-03-18 07:17:33 +00:00
Alexey Sharp
74dbb6e7ac
Fix lints
2021-03-18 06:58:14 +00:00
Alexey Sharp
cdca7f94ad
Fix lints
2021-03-17 22:24:46 +00:00
Alexey Sharp
e155b7f985
Fix for 1 test in eth
2021-03-17 20:28:03 +00:00
Alexey Sharp
4e2b20371d
Fix eth/protocols/eth
2021-03-17 20:03:25 +00:00
Alexey Sharp
b8d9202ac3
Fix eth/tracwers
2021-03-17 19:03:22 +00:00
Igor Mandrigin
5510de2fae
add tracer_test
2021-03-17 17:47:01 +01:00
Igor Mandrigin
b5b16d38ea
return testdata
2021-03-17 17:37:16 +01:00
Igor Mandrigin
2f4ea03c09
fixups
2021-03-17 17:35:40 +01:00
Igor Mandrigin
a04d6f0e45
semi-cleanup of eth/tracers
2021-03-17 17:28:04 +01:00
Igor Mandrigin
0a55895b33
Merge branch 'master' into geth-1-10-1
2021-03-17 16:50:20 +01:00
Igor Mandrigin
ff4868bcdd
fix eth/downloader
2021-03-17 14:41:14 +01:00
Igor Mandrigin
154ccf5fce
fixups to handler_test
2021-03-17 11:40:31 +01:00
Igor Mandrigin
8037bcb99a
change handler_test
2021-03-17 11:34:34 +01:00
Igor Mandrigin
0136e2b61f
skip downloader tests that hang
2021-03-16 16:14:02 +01:00
Igor Mandrigin
03f02d4e51
./eth tests builds
2021-03-16 15:22:59 +01:00
Igor Mandrigin
e5206bc584
fix some eth handler tests
2021-03-16 15:18:14 +01:00
Igor Mandrigin
c5c8099163
some fixes
2021-03-16 15:12:02 +01:00
Igor Mandrigin
14a3b8d676
eth/downloader compiles
2021-03-16 15:06:47 +01:00
Igor Mandrigin
18bdd57b82
fix eth/filters
2021-03-16 14:21:17 +01:00
Alexey Sharp
a2f9ed2a5d
more compilation fixes
2021-03-15 19:17:15 +00:00
Alexey Sharp
122791ba75
Fix tg crash again
2021-03-15 18:37:27 +00:00
Alexey Sharp
132da24d0f
Fixes
2021-03-15 18:34:22 +00:00
Alexey Sharp
a486baa0a0
Fixes
2021-03-15 09:50:41 +00:00
Alexey Sharp
af495562e4
Fix rcpdaemon compilation
2021-03-14 18:52:15 +00:00
Alexey Sharp
519b19f8aa
Compilation fixes
2021-03-14 08:00:37 +00:00
Alex Sharov
3f305673aa
Trie: add invariant - first level of trie must be in DB (to ensure having 100% trie structure in trie_account table) ( #1522 )
2021-03-13 09:30:54 +07:00
Péter Szilágyi
d00a121246
core, eth: unship EIP 2315
...
# Conflicts:
# core/vm/contract.go
# core/vm/gen_structlog.go
# core/vm/instructions.go
# core/vm/instructions_test.go
# core/vm/interpreter.go
# core/vm/logger.go
# core/vm/logger_json.go
# core/vm/logger_test.go
# core/vm/stack/stack.go
# eth/tracers/tracer.go
# eth/tracers/tracer_test.go
2021-03-12 16:05:37 +01:00
Péter Szilágyi
d23002e76a
all: define Berlin hard fork spec
...
# Conflicts:
# cmd/geth/config.go
# cmd/geth/main.go
# core/genesis.go
# core/state_transition.go
# core/vm/evm.go
# core/vm/interpreter.go
# eth/backend.go
# eth/ethconfig/config.go
# les/client.go
# light/txpool.go
# tests/state_test_util.go
2021-03-12 15:50:09 +01:00
lightclient
50d975302d
all: add support for EIP-2718, EIP-2930 transactions ( #21502 )
...
This adds support for EIP-2718 typed transactions as well as EIP-2930
access list transactions (tx type 1). These EIPs are scheduled for the
Berlin fork.
There very few changes to existing APIs in core/types, and several new APIs
to deal with access list transactions. In particular, there are two new
constructor functions for transactions: types.NewTx and types.SignNewTx.
Since the canonical encoding of typed transactions is not RLP-compatible,
Transaction now has new methods for encoding and decoding: MarshalBinary
and UnmarshalBinary.
The existing EIP-155 signer does not support the new transaction types.
All code dealing with transaction signatures should be updated to use the
newer EIP-2930 signer. To make this easier for future updates, we have
added new constructor functions for types.Signer: types.LatestSigner and
types.LatestSignerForChainID.
This change also adds support for the YoloV3 testnet.
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Ryan Schneider <ryanleeschneider@gmail.com>
# Conflicts:
# accounts/abi/bind/backends/simulated.go
# cmd/evm/internal/t8ntool/execution.go
# cmd/evm/internal/t8ntool/transition.go
# cmd/geth/main.go
# cmd/geth/usage.go
# core/bench_test.go
# core/state/statedb.go
# core/state_prefetcher.go
# core/state_processor.go
# core/state_transition.go
# core/tx_pool.go
# core/types/block.go
# core/types/derive_sha.go
# core/types/gen_tx_json.go
# core/types/receipt.go
# core/types/receipt_test.go
# core/types/transaction.go
# core/types/transaction_signing.go
# core/types/transaction_test.go
# ethclient/ethclient.go
# ethclient/signer.go
# graphql/graphql.go
# internal/ethapi/api.go
# internal/guide/guide_test.go
# les/benchmark.go
# les/odr_test.go
# light/odr_test.go
# light/txpool.go
# miner/worker.go
# miner/worker_test.go
# signer/core/api.go
# tests/state_test_util.go
# trie/stacktrie_test.go
# turbo/stages/blockchain_test.go
2021-03-12 15:40:24 +01:00
Alex Sharov
5ef9a3feb9
Trie: use APPEND when re-generating trie. Also including db-migration for PR#1535 ( #1549 )
2021-03-12 16:26:39 +07:00
gary rong
e602a34fb8
cmd, eth, les: enable serving light clients when non-synced ( #22250 )
...
This PR adds a more CLI flag, so that the les-server can serve light clients even the local node is not synced yet.
This functionality is needed in some testing environments(e.g. hive). After launching the les server, no more blocks will be imported so the node is always marked as "non-synced".
# Conflicts:
# cmd/geth/main.go
# cmd/geth/usage.go
# cmd/utils/flags.go
# eth/ethconfig/gen_config.go
# les/server.go
2021-03-10 17:06:42 +01:00
Péter Szilágyi
901015daad
eth/protocols/snap: lower abortion and resumption logs to debug
2021-03-10 17:03:46 +01:00
Marius van der Wijden
96a424ee84
internal/ethapi: reject non-replay-protected txs over RPC ( #22339 )
...
This PR prevents users from submitting transactions without EIP-155 enabled. This behaviour can be overridden by specifying the flag --rpc.allow-unprotected-txs=true.
# Conflicts:
# cmd/geth/main.go
# eth/backend.go
# les/api_backend.go
# les/client.go
# node/config.go
2021-03-10 17:00:47 +01:00
Martin Holst Swende
d1b207ff7e
eth: implement eth66 ( #22241 )
...
* eth/protocols/eth: split up the eth protocol handlers
* eth/protocols/eth: define eth-66 protocol messages
* eth/protocols/eth: poc implement getblockheaders on eth/66
* eth/protocols/eth: implement remaining eth-66 handlers
* eth/protocols: define handler map for eth 66
* eth/downloader: use protocol constants from eth package
* eth/protocols/eth: add ETH66 capability
* eth/downloader: tests for eth66
* eth/downloader: fix error in tests
* eth/protocols/eth: use eth66 for outgoing requests
* eth/protocols/eth: remove unused error type
* eth/protocols/eth: define protocol length
* eth/protocols/eth: fix pooled tx over eth66
* protocols/eth/handlers: revert behavioural change which caused tests to fail
* eth/downloader: fix failing test
* eth/protocols/eth: add testcases + fix flaw with header requests
* eth/protocols: change comments
* eth/protocols/eth: review fixes + fixed flaw in RequestOneHeader
* eth/protocols: documentation
* eth/protocols/eth: review concerns about types
# Conflicts:
# eth/downloader/downloader_test.go
# eth/downloader/peer.go
2021-03-10 11:33:45 +01:00
Martin Holst Swende
5bcef5b9c7
eth/handler, broadcast: optimize tx broadcast mechanism ( #22176 )
...
This PR optimizes the broadcast loop. Instead of iterating twice through a given set of transactions to weed out which peers have and which do not have a tx, to send/announce transactions, we do it only once.
2021-03-10 11:09:01 +01:00
Péter Szilágyi
f4eb5572fd
eth: fix snap sync cancellation
...
# Conflicts:
# eth/downloader/downloader.go
2021-03-10 11:05:05 +01:00
Péter Szilágyi
e7bffb64eb
cmd/utils, eth/ethconfig: unindex txs older than ~1 year
...
# Conflicts:
# eth/ethconfig/config.go
2021-03-10 11:00:31 +01:00
gary rong
a9e6250e72
all: bloom-filter based pruning mechanism ( #21724 )
...
* cmd, core, tests: initial state pruner
core: fix db inspector
cmd/geth: add verify-state
cmd/geth: add verification tool
core/rawdb: implement flatdb
cmd, core: fix rebase
core/state: use new contract code layout
core/state/pruner: avoid deleting genesis state
cmd/geth: add helper function
core, cmd: fix extract genesis
core: minor fixes
contracts: remove useless
core/state/snapshot: plugin stacktrie
core: polish
core/state/snapshot: iterate storage concurrently
core/state/snapshot: fix iteration
core: add comments
core/state/snapshot: polish code
core/state: polish
core/state/snapshot: rebase
core/rawdb: add comments
core/rawdb: fix tests
core/rawdb: improve tests
core/state/snapshot: fix concurrent iteration
core/state: run pruning during the recovery
core, trie: implement martin's idea
core, eth: delete flatdb and polish pruner
trie: fix import
core/state/pruner: add log
core/state/pruner: fix issues
core/state/pruner: don't read back
core/state/pruner: fix contract code write
core/state/pruner: check root node presence
cmd, core: polish log
core/state: use HEAD-127 as the target
core/state/snapshot: improve tests
cmd/geth: fix verification tool
cmd/geth: use HEAD as the verification default target
all: replace the bloomfilter with martin's fork
cmd, core: polish code
core, cmd: forcibly delete state root
core/state/pruner: add hash64
core/state/pruner: fix blacklist
core/state: remove blacklist
cmd, core: delete trie clean cache before pruning
cmd, core: fix lint
cmd, core: fix rebase
core/state: fix the special case for clique networks
core/state/snapshot: remove useless code
core/state/pruner: capping the snapshot after pruning
cmd, core, eth: fixes
core/rawdb: update db inspector
cmd/geth: polish code
core/state/pruner: fsync bloom filter
cmd, core: print warning log
core/state/pruner: adjust the parameters for bloom filter
cmd, core: create the bloom filter by size
core: polish
core/state/pruner: sanitize invalid bloomfilter size
cmd: address comments
cmd/geth: address comments
cmd/geth: address comment
core/state/pruner: address comments
core/state/pruner: rename homedir to datadir
cmd, core: address comments
core/state/pruner: address comment
core/state: address comments
core, cmd, tests: address comments
core: address comments
core/state/pruner: release the iterator after each commit
core/state/pruner: improve pruner
cmd, core: adjust bloom paramters
core/state/pruner: fix lint
core/state/pruner: fix tests
core: fix rebase
core/state/pruner: remove atomic rename
core/state/pruner: address comments
all: run go mod tidy
core/state/pruner: avoid false-positive for the middle state roots
core/state/pruner: add checks for middle roots
cmd/geth: replace crit with error
* core/state/pruner: fix lint
* core: drop legacy bloom filter
* core/state/snapshot: improve pruner
* core/state/snapshot: polish concurrent logs to report ETA vs. hashes
* core/state/pruner: add progress report for pruning and compaction too
* core: fix snapshot test API
* core/state: fix some pruning logs
* core/state/pruner: support recovering from bloom flush fail
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
# Conflicts:
# cmd/geth/main.go
# cmd/geth/usage.go
# core/blockchain.go
# core/blockchain_snapshot_test.go
# core/genesis.go
# core/rawdb/database.go
# core/rawdb/schema.go
# core/state/snapshot/conversion.go
# core/state/snapshot/snapshot.go
# core/state/snapshot/snapshot_test.go
# eth/backend.go
# go.mod
# go.sum
# tests/block_test_util.go
# tests/state_test_util.go
# trie/stacktrie.go
2021-03-10 10:58:22 +01:00
Martin Holst Swende
aaeb4a40a3
eth: don't wait for snap registration if we're not running snap ( #22272 )
...
Prevents a situation where we (not running snap) connects with a peer running snap, and get stalled waiting for snap registration to succeed (which will never happen), which cause a waitgroup wait to halt shutdown
2021-03-10 10:26:58 +01:00
gary rong
7d799473e5
eth: move eth.Config to a common package ( #22205 )
...
This moves the eth config definition into a separate package, eth/ethconfig.
Packages eth and les can now import this common package instead of
importing eth from les, reducing dependencies.
Co-authored-by: Felix Lange <fjl@twurst.com>
# Conflicts:
# cmd/faucet/faucet.go
# cmd/geth/config.go
# cmd/utils/cmd.go
# cmd/utils/flags.go
# cmd/utils/flags_legacy.go
# console/console_test.go
# eth/backend.go
# eth/bloombits.go
# eth/ethconfig/config.go
# ethclient/ethclient_test.go
# graphql/graphql_test.go
# les/api_test.go
# les/client.go
# les/commons.go
# les/costtracker.go
# les/server.go
# les/test_helper.go
# mobile/geth.go
2021-03-10 10:25:55 +01:00
Alex Prut
1fb76cca04
all: remove unneeded parentheses ( #21921 )
...
* remove uneeded convertion type
* remove redundant type in composite literal
* omit explicit type where implicit
* remove unused redundant parenthesis
* remove redundant import alias duktape
# Conflicts:
# core/state/snapshot/conversion.go
# eth/tracers/tracer.go
# metrics/cpu_syscall.go
# trie/trie_test.go
2021-03-09 13:59:30 +01:00
Péter Szilágyi
08ad6aaec7
eth: check snap satelliteness, delegate drop to eth ( #22235 )
...
* eth: check snap satelliteness, delegate drop to eth
* eth: better handle eth/snap satellite relation, merge reg/unreg paths
# Conflicts:
# eth/handler.go
# eth/peer.go
2021-03-09 13:55:09 +01:00
Sina Mahmoodi
89846dec13
eth/tracers: fix unigram tracer ( #22248 )
2021-03-09 13:51:39 +01:00
Sina Mahmoodi
c376039049
cmd,core,eth,params,tests: define yolov3 + enable EIP-2565 ( #22213 )
...
Removes the yolov2 definition, adds yolov3, including EIP-2565. This PR also disables some of the erroneously generated blockchain and statetests, and adds the new genesis hash + alloc for yolov3.
This PR disables the CLI switches for yolo, since it's not complete until we merge support for 2930.
# Conflicts:
# cmd/evm/internal/t8ntool/execution.go
# cmd/geth/chaincmd.go
# cmd/geth/consolecmd.go
# cmd/geth/main.go
# cmd/geth/usage.go
# cmd/utils/flags.go
# core/state_processor.go
# core/vm/evm.go
# core/vm/interpreter.go
# tests/block_test.go
2021-03-09 13:47:37 +01:00
Martin Holst Swende
ff2b58887f
eth, p2p: reserve half peer slots for snap peers during snap sync ( #22171 )
...
* eth, p2p: reserve half peer slots for snap peers during snap sync
* eth: less logging
* eth: rework the eth/snap peer reservation logic
* eth: rework the eth/snap peer reservation logic (again)
2021-03-09 12:46:30 +01:00
gary rong
7cf0ff3b9f
eth/tracers: move tracing APIs into eth/tracers ( #22161 )
...
This moves the tracing RPC API implementation to package eth/tracers.
By doing so, package eth no longer depends on tracing and the duktape JS engine.
The change also enables tracing using the light client. All tracing methods work with the
light client, but it's a lot slower compared to using a full node.
# Conflicts:
# cmd/utils/flags.go
# eth/api.go
# eth/tracers/api.go
# les/api_backend.go
2021-03-09 12:46:20 +01:00
Martin Holst Swende
e6dd171f2f
eth/protocols/snap: snap sync testing ( #22179 )
...
* eth/protocols/snap: make timeout configurable
* eth/protocols/snap: snap sync testing
* eth/protocols/snap: test to trigger panic
* eth/protocols/snap: fix race condition on timeouts
* eth/protocols/snap: return error on cancelled sync
* squashme: updates + test causing panic + properly serve accounts in order
* eth/protocols/snap: revert failing storage response
* eth/protocols/snap: revert on bad responses (storage, code)
* eth/protocols/snap: fix account handling stall
* eth/protocols/snap: fix remaining revertal-issues
* eth/protocols/snap: timeouthandler for bytecode requests
* eth/protocols/snap: debugging + fix log message
* eth/protocols/snap: fix misspelliings in docs
* eth/protocols/snap: fix race in bytecode handling
* eth/protocols/snap: undo deduplication of storage roots
* synctests: refactor + minify panic testcase
* eth/protocols/snap: minor polishes
* eth: minor polishes to make logs more useful
* eth/protocols/snap: remove excessive logs from the test runs
* eth/protocols/snap: stress tests with concurrency
* eth/protocols/snap: further fixes to test cancel channel handling
* eth/protocols/snap: extend test timeouts on CI
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-03-09 12:34:26 +01:00
Sina Mahmoodi
92c1b86119
eth/filters: fix potential deadlock in filter timeout loop ( #22178 )
...
This fixes #22131 and adds a test reproducing the issue.
# Conflicts:
# eth/filters/filter_system_test.go
# les/client.go
2021-03-09 12:31:36 +01:00
meowsbits
71a78fafd0
downloader: extract findAncestor search functions ( #21744 )
...
This is a simple refactoring, extracting common ancestor
negotiation logic to named function
2021-03-09 11:13:39 +01:00
gary rong
773ca75cc9
eth, les: add new config field SyncFromCheckpoint ( #22123 )
...
This PR introduces a new config field SyncFromCheckpoint for light client.
In some special scenarios, it's required to start synchronization from some
arbitrary checkpoint or even from the scratch. So this PR offers this
flexibility to users so that the synchronization start point can be configured.
There are two relevant configs: SyncFromCheckpoint and Checkpoint.
- If the SyncFromCheckpoint is true, the light client will try to sync from the
specified checkpoint.
- If the Checkpoint is not configured, then the light client will sync from the
scratch(from the latest header if the database is not empty)
Additional notes: these two configs are not visible in the CLI flags but only
accessable in the config file.
Example Usage:
[Eth]
SyncFromCheckpoint = true
[Eth.Checkpoint]
SectionIndex = 100
SectionHead = "0xabc"
CHTRoot = "0xabc"
BloomRoot = "0xabc"
PS. Historical checkpoint can be retrieved from the synced full node or light
client via les_getCheckpoint API.
# Conflicts:
# eth/gen_config.go
# les/client_handler.go
# les/commons.go
# les/sync.go
# les/sync_test.go
# les/test_helper.go
2021-03-09 10:51:19 +01:00
Dan DeGreef
a3d76f177b
eth/protocols/eth: fix slice resize flaw ( #22181 )
2021-03-09 10:38:31 +01:00
rene
a12aeca94b
eth: return error from eth_chainID during sync before EIP-155 activates ( #21686 )
...
This changes the chainID RPC method to return an error when EIP-155 is not yet
active at the current block height. It used to simply return zero in this case, but
that's confusing.
2021-03-09 10:33:28 +01:00
Marius van der Wijden
993d973de4
eth: improve log message ( #22146 )
...
* eth: fixed typos
* eth: fixed log message
2021-03-09 10:32:29 +01:00
gary rong
df56644121
core: persist bad blocks ( #21827 )
...
* core: persist bad blocks
* core, eth, internal: address comments
* core/rawdb: add badblocks to inspector
* core, eth: update
* internal: revert
* core, eth: only save 10 bad blocks
* core/rawdb: address comments
* core/rawdb: fix
* core: address comments
# Conflicts:
# core/blockchain.go
# core/rawdb/accessors_chain_test.go
# core/rawdb/database.go
# core/rawdb/schema.go
2021-03-09 10:31:26 +01:00
Chris Ziogas
07503e3d11
eth/downloader: fix race condition in tests ( #22140 )
...
* downloader: fix race condition in tests
* eth/downloader: fix race condition in tests
* Revert "downloader: fix race condition in tests"
This reverts commit 108033ebc6985de83791d375b6e6647a77d28d5a.
2021-03-09 10:26:12 +01:00
Martin Holst Swende
ec6741bab0
eth/protocols/snap: speed up hash checks ( #22023 )
...
* eth/protocols/snap: speed up hash checks
* eth/protocols/snap: nit fix
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-03-09 10:23:30 +01:00
Martin Holst Swende
b128d8aeea
eth/protocols/snap: track reverts when peer rejects request ( #22016 )
...
* eth/protocols/snap: reschedule missed deliveries
* eth/protocols/snap: clarify log message
* eth/protocols/snap: revert failures async and update runloop
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-03-09 10:23:19 +01:00
Péter Szilágyi
a50f261e87
cmd/utils, eth/downloader: minor snap nitpicks
2021-03-09 10:22:04 +01:00
jk-jeongkyun
18852aa9b3
eth/downloader: enhanced test cases for downloader queue ( #22114 )
...
# Conflicts:
# eth/downloader/queue_test.go
2021-03-09 10:21:52 +01:00
ucwong
c288146cdc
core/rawdb, eth/protocols : Method name typo fix ( #22026 )
...
# Conflicts:
# core/rawdb/accessors_snapshot.go
2021-03-09 10:13:21 +01:00
jk-jeongkyun
b3e18e483d
eth/downloader: remove unnecessary condition ( #22052 )
2021-03-09 10:12:43 +01:00
Suriyaa Sundararuban
320d7d9130
eth/filters: replace wiki links with new doc pages ( #22070 )
2021-03-09 10:12:26 +01:00
Sina Mahmoodi
0907f5badc
eth, eth/tracers: include intrinsic gas in calltracer, expose for all tracers ( #22038 )
...
* eth/tracers: share tx gas price with js tracer
* eth/tracers: use `go generate`
* eth/tracers: try with another version of go-bindata
* eth/tracers: export txGas
* eth, eth/tracers: pass intrinsic gas to js tracers
eth/tracers: include tx gas in tracers usedGas
eth/tracers: fix prestate tracer's sender balance
eth/tracers: rm unnecessary import
eth/tracers: pass intrinsicGas separately to tracer
eth/tracers: fix tests broken by lack of txdata
eth, eth/tracers: minor fix
* eth/tracers: regenerate assets + unexport test-struct + add testcase
* eth/tracers: simplify tests + make table-driven
Co-authored-by: Guillaume Ballet <gballet@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
# Conflicts:
# eth/tracers/tracer.go
# eth/tracers/tracer_test.go
2021-03-09 10:11:49 +01:00
Mr-Leshiy
8e872c1188
eth/protocols/eth: remove magic numbers in test ( #21999 )
2021-03-09 10:02:53 +01:00
Péter Szilágyi
693459073e
core, eth: split eth package, implement snap protocol ( #21482 )
...
This commit splits the eth package, separating the handling of eth and snap protocols. It also includes the capability to run snap sync (https://github.com/ethereum/devp2p/blob/master/caps/snap.md ) , but does not enable it by default.
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Martin Holst Swende <martin@swende.se>
# Conflicts:
# cmd/geth/misccmd.go
# cmd/utils/flags.go
# core/blockchain.go
# core/blockchain_snapshot_test.go
# core/forkid/forkid.go
# core/rawdb/accessors_snapshot.go
# core/rawdb/schema.go
# core/state/snapshot/generate.go
# core/state/statedb.go
# eth/api_test.go
# eth/backend.go
# eth/downloader/downloader.go
# eth/downloader/downloader_test.go
# eth/downloader/modes.go
# eth/downloader/queue.go
# eth/downloader/statesync.go
# eth/gen_config.go
# eth/handler.go
# eth/handler_test.go
# eth/helper_test.go
# eth/peer.go
# eth/protocol.go
# eth/protocol_test.go
# eth/sync.go
# eth/sync_test.go
# ethstats/ethstats.go
# les/client.go
# les/enr_entry.go
# les/handler_test.go
# les/peer.go
# les/server_handler.go
# tests/block_test_util.go
# trie/proof.go
# trie/proof_test.go
# trie/trie.go
# turbo/trie/notary.go
# turbo/trie/sync_bloom.go
2021-03-08 17:07:38 +01:00
Martin Holst Swende
c64c3100f0
core, eth, les: implement unclean-shutdown marker ( #21893 )
...
This PR implements unclean shutdown marker. Every time geth boots, it adds a timestamp to a list of timestamps in the database. This list is capped at 10. At a clean shutdown, the timestamp is removed again.
Thus, when geth exits unclean, the marker remains, and at boot up we show the most recent unclean shutdowns to the user, which makes it easier to diagnose root-causes to certain problems.
Co-authored-by: Nagy Salem <me@muhnagy.com>
# Conflicts:
# core/rawdb/accessors_metadata.go
# core/rawdb/database.go
# core/rawdb/schema.go
# eth/backend.go
# les/client.go
2021-03-08 14:38:56 +01:00
lzhfromustc
4ef76f9a58
miner, test: fix potential goroutine leak ( #21989 )
...
In miner/worker.go, there are two goroutine using channel w.newWorkCh: newWorkerLoop() sends to this channel, and mainLoop() receives from this channel. Only the receive operation is in a select.
However, w.exitCh may be closed by another goroutine. This is fine for the receive since receive is in select, but if the send operation is blocking, then it will block forever. This commit puts the send in a select, so it won't block even if w.exitCh is closed.
Similarly, there are two goroutines using channel errc: the parent that runs the test receives from it, and the child created at line 573 sends to it. If the parent goroutine exits too early by calling t.Fatalf() at line 614, then the child goroutine will be blocked at line 574 forever. This commit adds 1 buffer to errc. Now send will not block, and receive is not influenced because receive still needs to wait for the send.
# Conflicts:
# miner/worker.go
2021-03-08 14:30:49 +01:00
Martin Holst Swende
a87def9af2
eth: fix error in tracing if reexec is set ( #21830 )
...
* eth: fix error in tracing if reexec is set
* eth: change pointer embedding to value-embedding
2021-03-08 12:47:26 +01:00
Felföldi Zsolt
ea7b33c639
les: fix nodiscover option ( #21906 )
...
# Conflicts:
# eth/backend.go
# eth/discovery.go
# les/client.go
# les/enr_entry.go
2021-03-08 12:47:13 +01:00
gary rong
b2351da9d6
all: disable recording preimage of trie keys ( #21402 )
...
* cmd, core, eth, light, trie: disable recording preimage by default
* core, eth: fix unit tests
* core: fix import
* all: change to nopreimage
* cmd, core, eth, trie: use cache.preimages flag
* cmd: enable preimages for archive node
* cmd/utils, trie: simplify preimage tracking a bit
* core: fix linter
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
# Conflicts:
# cmd/geth/main.go
# cmd/geth/usage.go
# cmd/utils/flags.go
# core/blockchain.go
# core/genesis.go
# core/state/database.go
# core/state/state_test.go
# eth/api_test.go
# eth/api_tracer.go
# eth/backend.go
# light/postprocess.go
# trie/secure_trie.go
# turbo/trie/database.go
2021-03-08 12:26:27 +01:00
Marius van der Wijden
bcc51ea117
core, all: split vm.Context into BlockContext and TxContext ( #21672 )
...
* all: core: split vm.Config into BlockConfig and TxConfig
* core: core/vm: reset EVM between tx in block instead of creating new
* core/vm: added docs
# Conflicts:
# accounts/abi/bind/backends/simulated.go
# cmd/evm/internal/t8ntool/execution.go
# cmd/geth/retesteth.go
# core/evm.go
# core/state_prefetcher.go
# core/state_processor.go
# core/state_transition.go
# core/vm/evm.go
# core/vm/gas_table_test.go
# core/vm/instructions.go
# core/vm/instructions_test.go
# eth/api_tracer.go
# eth/tracers/tracer_test.go
# eth/tracers/tracers_test.go
# les/api_backend.go
# les/odr_test.go
# light/odr_test.go
# tests/vm_test_util.go
2021-03-08 12:17:35 +01:00
Alex Sharov
cdc090ebfd
Delete MultiWalk and GetIndexChunk funcs from Database interface ( #1544 )
2021-03-08 12:08:37 +07:00
ledgerwatch
b743b88218
Revert "Extract validating interface ( #1120 )" ( #1543 )
...
* Revert "Extract validating interface (#1120 )"
This reverts commit e4e36c152e
.
* Fix go mod tidy
* Fix lint
* Fix lint
* fix lint
* Test fix
* Fix test
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-03-05 20:34:23 +00:00