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
fc196d4b9b
pending txs methods ( #1869 )
2021-05-04 06:51:28 +01:00
ledgerwatch
8c9a76d3bc
Add Baikal checks properly ( #1868 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-04 06:50:06 +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
ledgerwatch
5168287784
Make trace_block results closer to what OpenEthereum returns ( #1862 )
...
* Add block rewards to trace_block
* Add rewards to trace_block
* Remove printouts
* Fix trace_block and trace_transaction
* Fix getBlockByNumber
* Fix for parent/non parent block
* Reverse fix for trace_call
* Fix eth_getTransactionBy
* Fixes for TIMESTAMP etc opcodes
* More fixes
* Fixes to tracers
* Don't call CaptureEnd twice
* Corrent gasUsed for CaptureEnd in create
* Do CaptureFault consistently
* Correct gasUsed for create
* Remove insufficient balance trace
* Catch contract collision error
* Compatibility
* Compatibility
* More error names
* Out of gas
* Clean up
* more error messages
* Restore CaptureFault
* Errors
* Fix test
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-05-03 20:49:55 +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
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
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
7bf95c773c
Update skip_analysis.go ( #1842 )
2021-04-29 16:16:56 +02:00
ledgerwatch
92c20e1f67
[eip-1559] Apply gas limit elasticity ( #1834 )
...
* Apply gas limit elasticity
* Fix unmarshalling tx
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-04-28 15:32:48 +01:00
Alex Sharov
9d82456f17
remove chain indexer and core.setHead func ( #1826 )
2021-04-27 14:48:59 +07:00
Artem Vorotnikov
57c88868a3
GetAsOf: do not return error on nil ( #1820 )
2021-04-26 18:05:29 +01:00
Alex Sharov
c40c3b7a7a
exec unwind etl ( #1806 )
2021-04-26 10:41:31 +01:00
Artem Vorotnikov
63835b6a30
Remove locking from IntraBlockState ( #1795 )
2021-04-26 10:40:25 +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
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
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
851769f833
Update skip_analysis.go ( #1783 )
2021-04-22 14:28:26 +01:00
Alex Sharov
0af3085461
Revert "GetAsOf: do not return error on nil ( #1769 )" ( #1782 )
...
This reverts commit 60196abf50
.
2021-04-22 13:45:04 +01:00
Alex Sharov
e7a78a2d9f
Mdbx: speedup tests ( #1776 )
2021-04-21 20:03:08 +07:00
Artem Vorotnikov
60196abf50
GetAsOf: do not return error on nil ( #1769 )
2021-04-21 10:47:46 +07:00
Artem Vorotnikov
c967655c1d
More cleanups ( #1765 )
2021-04-21 08:48:37 +07:00
Alex Sharov
bf1c219531
Move txPool.Get method behind direct-grpc ( #1760 )
2021-04-20 21:41:46 +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
ad6526c318
check block for nil in ReadBlockWithSenders ( #1737 )
2021-04-19 10:18:13 +07:00
Alex Sharov
368f37a02f
Simplify blockchain obj, step 5 ( #1739 )
2021-04-18 12:27:07 +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
Igor Mandrigin
d7d85af8c4
update skip analysis
2021-04-15 11:01:09 +02:00
Alex Sharov
4ef5e4b2f6
Continue move to rwtx ( #1722 )
2021-04-15 12:23:10 +07:00
Alex Sharov
fd22c39611
Share logic between handlers.go and new downloader ( #1716 )
2021-04-14 14:26:32 +07:00
Alex Sharov
e473e0b4d9
lint fixes ( #1717 )
2021-04-13 21:48:20 +07:00
ledgerwatch
6febaf8dd1
Refine turbo mine parameters ( #1702 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-04-09 17:44:25 +01:00
ledgerwatch
c78e467cef
Replace genesis pre-alloc strings with json files using embed
feature of go1.16 ( #1700 )
...
* more flesh on turbo-mine network
* Replace genesis preallocs with json
* Update README.md
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-04-09 13:00:50 +01: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
Igor Mandrigin
30874284d5
update skip_analysis
2021-04-08 12:25:30 +02:00
Alex Sharov
dda138e8b7
fix tx pool punic ( #1693 )
2021-04-08 14:35:33 +07:00
Alex Sharov
49791f322d
rm ( #1691 )
2021-04-08 07:37:54 +01:00
Alex Sharov
7222cdd640
delete tds.unwindTo method ( #1688 )
2021-04-08 10:47:10 +07: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
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
Artem Vorotnikov
d56c41a926
Remove ReadAllHashes ( #1678 )
2021-04-05 16:11:27 +07:00
Alex Sharov
07e96fc055
clean ( #1677 )
2021-04-05 14:48:16 +07:00
Artem Vorotnikov
19924040bc
KV: Unified Has ( #1671 )
2021-04-03 19:04:58 +07:00
Artem Vorotnikov
d66555268d
Harmonize DB APIs ( #1669 )
2021-04-03 09:26:00 +03:00
Artem Vorotnikov
dbc0db0856
Nuke old miner and mux ( #1666 )
2021-04-03 13:09:31 +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
fbd9690251
Remove tds in few tests ( #1657 )
2021-04-02 12:14:43 +07:00
ledgerwatch
e47ed7ce15
Update skip_analysis.go ( #1649 )
2021-04-01 12:52:24 +01: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
Alex Sharov
043c5b789c
set locals in tx pool constructor ( #1637 )
2021-03-31 12:42:54 +07:00
Artem Vorotnikov
d4c10c9a47
Port rpcdaemon to KV interface ( #1627 )
2021-03-30 12:53:54 +03: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
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
ledgerwatch
5fdeb5a0e6
Update skip_analysis ( #1602 )
...
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-03-25 09:52:11 +00:00
Alex Sharov
8e385d9648
Mining: use noop writer when applyTx, pending logs subscription ( #1600 )
2021-03-25 13:42:45 +07: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
Artem Vorotnikov
a6742a4cf8
Kill cmd/state/stateless ( #1592 )
...
* Move stuff around
* Remove
* tidy
* Fix for writeReceipt printing
* fix lint typo
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-03-23 16:33:58 +00:00
Alex Sharov
aff859edc0
Mining stage ( #1554 )
2021-03-23 16:00:07 +07:00
ledgerwatch
0986ce43fb
Fix some conformance tests broken after rebase ( #1587 )
...
* Uncomment
* Try to fix
* Try again
* Compile fix
* Compile fix
* Compile fix
* Compile fix
* Compile fix
* fix lint
* Enable more tests
* Fix core tests
* Remove comment outs
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-03-23 07:25:10 +00: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
b49717e48f
revert
2021-03-21 17:53:50 +07:00
alex.sharov
e7034c0eba
revert
2021-03-21 17:50:05 +07:00
alex.sharov
1fcf349ce2
fix tests
2021-03-21 17:41:09 +07:00
alex.sharov
a649eef6b9
fix tests
2021-03-21 17:26:54 +07:00
alex.sharov
970c7e93a8
remove old flags
2021-03-21 17:05:42 +07:00
Alex Sharov
97eec4288a
Tests: use transaction instead of db.MemCopy in chain_makers.go ( #1570 )
...
* mdbx tests speedup
* mdbx tests speedup
* devel up
* devel up
* devel up
* lint
* less db copy
* don't loose error in test
* clean
2021-03-20 19:33:40 +00:00
Artem Vorotnikov
b5f9cdd7b2
KV: split Sequence into ReadSequence and MakeSequence ( #1569 )
2021-03-20 21:12:54 +07:00
Alex Sharov
ba37706681
move remote eth backend from ethdb to core package ( #1567 )
2021-03-20 10:52:00 +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
Artem Vorotnikov
0b2e4df0ff
Align Cursor API with LMDB/MDBX ( #1558 )
2021-03-19 14:45:01 +07:00
Alexey Sharp
cb88d649e0
Update skip analysis
2021-03-18 12:35:56 +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
36297dd057
more linter fixes
2021-03-18 11:44:22 +01:00
Igor Mandrigin
7b000b5644
linter fixups
2021-03-18 11:17:04 +01:00
Igor Mandrigin
b9bb65e025
skip headerchain test
2021-03-18 11:00:34 +01:00
Alexey Sharp
534f38f756
Fix lints
2021-03-18 08:30:14 +00:00
Alexey Sharp
1ff525e6a3
Fix lints
2021-03-18 08:00:21 +00:00
Alexey Sharp
469e2534da
Fix lints
2021-03-18 07:38:06 +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
Igor Mandrigin
0a55895b33
Merge branch 'master' into geth-1-10-1
2021-03-17 16:50:20 +01:00
Igor Mandrigin
6dbe1871d2
fix graphql tests
2021-03-17 16:11:45 +01:00
Igor Mandrigin
76811b98f1
fixup core/types
2021-03-17 14:31:22 +01:00
Igor Mandrigin
39bd48fbb6
debug
2021-03-17 13:50:10 +01:00
Igor Mandrigin
f89a489dea
fix DeriveFields test
2021-03-17 13:37:18 +01:00
Igor Mandrigin
57c8813aec
fix core state processor test
2021-03-17 12:56:39 +01:00
Igor Mandrigin
ecb08fe2f7
skip tx pool deadlock
2021-03-17 12:24:07 +01:00
Alexey Sharp
c3300cdfc5
For fox stage_senders
2021-03-16 16:11:43 +00:00
Igor Mandrigin
e5206bc584
fix some eth handler tests
2021-03-16 15:18:14 +01:00
Igor Mandrigin
cbd47e9b5b
compile core/types (tests still fail)
2021-03-16 14:12:42 +01:00
Igor Mandrigin
162044fe10
remove duplicate tests
2021-03-16 13:49:24 +01:00
Igor Mandrigin
3c354ed642
cleanup runtime_test from the unimplemented EIP
2021-03-16 13:41:42 +01:00
Igor Mandrigin
b48b11d920
fix core/rawdb
2021-03-16 13:38:14 +01:00
Igor Mandrigin
1a55b8e05a
core/vm tests fixes
2021-03-16 13:10:20 +01:00
Igor Mandrigin
b62cefbe50
core tests compile now
2021-03-16 12:53:42 +01:00
Igor Mandrigin
fd37289665
fixes to core tests (compilation)
2021-03-16 12:44:38 +01:00
Alexey Sharp
132da24d0f
Fixes
2021-03-15 18:34:22 +00:00
Alexey Sharp
0b083d8557
Fixes
2021-03-15 18:21:10 +00:00
Alexey Sharp
519b19f8aa
Compilation fixes
2021-03-14 08:00:37 +00:00
Péter Szilágyi
7f776be26e
Revert "core/forkid, params: unset Berlin fork number ( #22413 )"
...
This reverts commit ba999105ef89473cfe39e5e53354f7099e67a290.
2021-03-12 16:12:40 +01:00
Péter Szilágyi
9ef50edea3
core/forkid, params: unset Berlin fork number ( #22413 )
2021-03-12 16:09:19 +01:00
Péter Szilágyi
03eafd8580
core/vm/runtime: more unshipping
...
# Conflicts:
# core/vm/runtime/runtime_test.go
2021-03-12 16:08:00 +01: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
Martin Holst Swende
d85afb7d20
core/state: fix eta calculation on pruning ( #22386 )
2021-03-12 15:52:25 +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
Martin Holst Swende
1f9850da82
core/state/pruner: fix compaction range error
2021-03-10 10:58:50 +01:00
Péter Szilágyi
97fc3ba0d2
core/state/pruner: fix compaction after pruning
2021-03-10 10:58:39 +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
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
Marius van der Wijden
d6266d7230
core: reset txpool state on sethead ( #22247 )
...
fixes an issue where local transactions that were included in the chain before a SetHead were rejected if resubmitted, since the txpool had not reset the state to the current (older) state.
2021-03-10 10:07:01 +01:00
Alex Sharov
060f3b9a60
Grafana: add Btree metrics ( #1547 )
2021-03-10 10:58:57 +07:00
ucwong
e7cc88e4af
trie : use trie.NewStackTrie instead of new(trie.Trie) ( #22246 )
...
The PR makes use of the stacktrie, which is is more lenient on resource consumption, than the regular trie, in cases where we only need it for DeriveSha
# Conflicts:
# cmd/evm/internal/t8ntool/execution.go
# consensus/clique/clique.go
# consensus/ethash/consensus.go
# core/genesis.go
# core/tx_pool_test.go
# eth/fetcher/block_fetcher.go
# eth/fetcher/block_fetcher_test.go
# les/odr_requests.go
# miner/miner_test.go
# miner/worker.go
# turbo/stages/blockchain_test.go
2021-03-09 15:57:28 +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
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
c2181323b3
core: speed up header import ( #21967 )
...
This PR implements the following modifications
- Don't shortcut check if block is present, thus avoid disk lookup
- Don't check hash ancestry in early-check (it's still done in parallel checker)
- Don't check time.Now for every single header
Charts and background info can be found here: https://github.com/holiman/headerimport/blob/main/README.md
With these changes, writing 1M headers goes down to from 80s to 62s.
# Conflicts:
# consensus/ethash/consensus.go
# core/rawdb/freezer_table.go
2021-03-09 12:50:06 +01:00
Péter Szilágyi
40a366086e
core/state: convert prefetcher to concurrent per-trie loader
...
# Conflicts:
# accounts/abi/bind/backends/simulated.go
# core/blockchain.go
# core/state/state_object.go
# core/state/state_test.go
# core/state/statedb.go
# core/state/statedb_test.go
# eth/api_tracer.go
# miner/worker.go
2021-03-09 12:30:09 +01:00
Martin Holst Swende
6c3d78d0d9
core: implement background trie prefetcher
...
Squashed from the following commits:
core/state: lazily init snapshot storage map
core/state: fix flawed meter on storage reads
core/state: make statedb/stateobjects reuse a hasher
core/blockchain, core/state: implement new trie prefetcher
core: make trie prefetcher deliver tries to statedb
core/state: refactor trie_prefetcher, export storage tries
blockchain: re-enable the next-block-prefetcher
state: remove panics in trie prefetcher
core/state/trie_prefetcher: address some review concerns
sq
# Conflicts:
# core/blockchain.go
# core/state/database.go
# core/state/state_object.go
# core/state/statedb.go
2021-03-09 11:15:19 +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
Martin Holst Swende
5d418f317b
common,crypto: move fuzzers out of core ( #22029 )
...
* common,crypto: move fuzzers out of core
* fuzzers: move vm fuzzer out from core
* fuzzing: rework cover package logic
* fuzzers: lint
2021-03-09 10:06:00 +01:00