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
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
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
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
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
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
7024a7a35f
mining uncles ( #1581 )
2021-03-22 18:29:33 +07:00
Alex Sharov
40dd00fee7
remove ideal batch size ( #1582 )
2021-03-22 13:47:01 +07:00
Artem Vorotnikov
6a6f5469a1
KV: Split RO and RW transactions ( #1577 )
2021-03-21 20:15:25 +07:00
alex.sharov
67e1f9f6d4
Revert "remove old flags"
...
This reverts commit 009c098b87
.
2021-03-21 17:50:07 +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
009c098b87
remove old flags
2021-03-21 17:07:28 +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
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
Alex Sharov
909fd42bee
go 1.16 support ( #1509 )
2021-03-19 16:32:52 +07:00
Artem Vorotnikov
0b2e4df0ff
Align Cursor API with LMDB/MDBX ( #1558 )
2021-03-19 14:45:01 +07:00
Alexey Sharp
0d24a38813
Fix TestEIP2718Transition
2021-03-18 13:19:21 +01:00
Igor Mandrigin
0a55895b33
Merge branch 'master' into geth-1-10-1
2021-03-17 16:50:20 +01:00
Igor Mandrigin
6fbc0cfff8
fix compilation in blockchain_test.go
2021-03-16 11:55:42 +01: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
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
060f3b9a60
Grafana: add Btree metrics ( #1547 )
2021-03-10 10:58:57 +07:00
Martin Holst Swende
adf219ea76
go.mod: use github.com/holiman/bloomfilter/v2 ( #22044 )
...
* deps: use improved bloom filter implementation
* eth/handler, trie: use 4 keys for syncbloom + minor fixes
* eth/protocols, trie: revert change on syncbloom method signature
# Conflicts:
# core/state/snapshot/difflayer.go
# go.mod
# go.sum
# trie/sync.go
# turbo/trie/sync_bloom.go
2021-03-09 10:36:02 +01:00
Alex Sharov
4fe019a099
add periodical db statistic metrics ( #1545 )
2021-03-09 13:34:13 +07: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
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
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
Alex Sharov
722f1a387a
trie: do not use extension hash ( #1535 )
2021-03-03 15:54:42 +07:00
Alex Sharov
6d0d84cda6
log git branch and git commit ( #1523 )
2021-03-01 11:02:06 +07:00
ledgerwatch
da74bd8f38
Fixes to unwind logic for the new staged sync ( #1521 )
...
* Make DB visible
* Further fixes to unwind logic
* Fix lint
* Fix lint
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-02-28 08:47:31 +00:00
Alex Sharov
f556af6276
Prometheus metrics: more virtual memory visibility, more cross-platform metrics ( #1520 )
2021-02-28 11:11:28 +07:00
Evgeny Danilenko
e4e36c152e
Extract validating interface ( #1120 )
...
* interface
* generalize interface
* linters
* fix deadlock
* fix linters
* close goroutine
* fix
* debug
* id+ttl
* refactor downloader tests
* tests
* lru
* handle genesis, extract fake consensuses
* fix fake consensus
* test uncles, verify
* after a new master
* fmt
* fix close
* debug
* debug
* fix chain length
* remove test field
* use single account
* fix data race on closing channel
* remove postponed blocks queue
* miner test
* VerifyHeaderRequests
* fmt
* fmt
* fix data race
* handle validating errors
* simplify matchParents
* remove copy-paste
* move sort to constructor
* clean up
* debug for 10 parents
* debug
* debug
* batch responses
* batch requests
* works for many ancestors
* remove debug
* always Close an engine
* linters
* ancestors deduplication
* fix test
* reduce interface
* api
* clique
* green clique sync
* stable
* perpermance per second
* full sync
* linters
* gitignore
* deps
* fix panic after master merge
* init consensus
* clique tests
* fix tests
* fix tests
* clean up
* reuse snap
* store vefified snapshots
* optimize snapshots
* safe close
* cleanup loop
* after downloader
* downloader and consensus tests
* update tests
* hack.go
* clique flags
* fix cliuqe config
* review
* gitignore
* remove additional bucket
* blk/sec instead of blk/microsecond
* rename
* deps
* optimize
* debug
* test
* tests without extracted validation process
* same base performance as on master
* benchmark
* simplify ethash verification
* ethash
* ethash
* linters
* ethash
* master stats
* cleanup
* gomod
* linters
* tests
* better locks
* Fix
* Remove logging for verifyHeaders
* Verification speed in the logs
* Fix compile error
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-02-25 19:40:45 +00:00
ledgerwatch
be7b93d809
Fixes and simplifications for headers download ( #1511 )
...
* Simplify header insert, fix recovery from files
* Fix to the header processed log
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-02-24 07:57:02 +00:00
ledgerwatch
c30ad646db
Better ergonomics for new header/bodies downloader, more test friendly, README ( #1507 )
...
* Ergonomic changes
* Add little doc and remove coreAddr
* Fix gRPC streaming
* Fix lint
* Remove peer penalty logging
* Fix lint
* Fix lint
* Fix lint
* Fix peerID in error message
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-02-22 21:59:23 +00:00
Alex Sharov
f1ee8d507e
New Trie db layout - store trie structure info and multiple hashes per record ( #1500 )
...
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* SE
* SE
* SE
* SE
* SE
* SE
* SE
* SE
* SE
* SE
* SE
* SE
* SE
* SE
* SE
2021-02-21 18:41:59 +00:00
ledgerwatch
b9acd62280
Embed header/bodies download into a mini-staged sync ( #1498 )
...
* Embed header/bodies download into a mini-staged sync
* Move code around to prevent import cycles
* Include new files
* Fix lint
* Fix lint
* Fix lint
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-02-16 15:47:15 +00:00
ledgerwatch
6e56097056
Bring in refactored p2p sentry interface and adjust downloader for it ( #1497 )
...
* 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>
* Use new p2psentry interface
* Remove
* Fix lint
* Fix lint
* Separate upload messages into its own stream (#6 )
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
* Add header upload
* Remove
* Add upload of block headers
* Add block bodies upload
* Fix lint
* Bugfix for blockBodies
* Fix for body upload logging
* Print peerId for GetBlockHeaders
* Invoke block hashes stage to enable block body upload
* Fix test
* Fix stuck bodies download
Co-authored-by: Artem Vorotnikov <artem@vorotnikov.me>
Co-authored-by: b00ris <b00ris@mail.ru>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-02-15 18:54:45 +00:00