nanevardanyan
ab6239b30f
WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table ( #6754 )
2023-02-24 18:49:25 +00:00
Kian
72c01b2d88
Fix getBlockTransactionCount returning null ( #6793 )
...
So... for blocks that don't exist, the eth_getBlockTransactionCount RPCs
should return `null`. Erigon does this correctly right now and this is
covered by the unit test in
[rpcdaemon/commands/corner_cases_support_test.go](https://github.com/ledgerwatch/erigon/blob/devel/cmd/rpcdaemon/commands/corner_cases_support_test.go ).
But, for blocks that don't have any transactions, like
[703696](https://etherscan.io/block/703696 ), the RPC also returns
`null`.
I've changed this to correctly return `0` and have added 2 new tests to
handle it. (I had to add another block to the test chain in
rpcdaemon/rpcdaemontest/test_util.go and had to fix a few other tests
that broke as a result.)
Resolves #6775
2023-02-07 18:32:42 +07:00
Alex Sharov
1583cdb068
e3: debug_accountAt, read from history instead of block exec ( #6723 )
2023-01-27 19:09:51 +07:00
Max Revitt
6559c15ebb
feat(trace): use specific error string ( #6696 )
...
In v2.36.0 we correctly trace this transaction, however due to a code
ordering issue in previous releases, there was an 'out of gas' response,
because we fell through to the code here where
ErrContractAddressCollision will be returned as such. This change isn't
the fix, but ensures the actual error is returned.
2023-01-26 15:10:51 +01:00
hexoscott
7dcbfbc283
reference hash, address, and chain config from lib ( #6536 )
2023-01-13 18:12:18 +00:00
ledgerwatch
8433afd99a
Native tracers step 5 - tests for debug_traceBlock
and trace_block
before transformations ( #6405 )
...
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-22 10:13:38 +00:00
Andrew Ashikhmin
dd43d486f3
Enable London in AllEthashProtocolChanges ( #5891 )
...
`AllEthashProtocolChanges` should contain all the EIPs accepted by the
core developers into the Ethash consensus, including the
[London](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/london.md )
protocol upgrade.
2022-10-28 17:19:18 +02:00
ledgerwatch
73e2d1146e
Cleanup interfaces ( #5254 )
...
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-09-01 16:44:37 +01:00
Håvard Anda Estensen
8460fd8e25
Remove deprecated functions ( #5086 )
2022-08-17 12:17:32 +07:00
Andrew Ashikhmin
c1f848746d
Update consensus tests to v11 ( #4724 )
...
* Consensus tests update 11
* Add GrayGlacier fork
* Wire currentRandom from tests into PREVRANDAO
* Serenity engine
* Support insertion of PoS blocks in MockSentry
* Introduce marshallTypedTransactionsAsRlpStrings arg into (*Block) RawBody()
* Revert "Introduce marshallTypedTransactionsAsRlpStrings arg into (*Block) RawBody()"
This reverts commit 903fca572be03c7de33318ce177a03a4be34927b.
* Post-merge fix
* Don't wait for Beacon Chain in tests
* Skip powToPosBlockRejection transition test
* ForkChoice in insertPoSBlocks
* Add withPosDownloader arg to MockWithEverything in order to fix TestPoSDownloader
2022-07-26 09:35:38 +02:00
Giulio rebuffo
1cb6be02a5
Avoid constantly triggering stageloop when using Engine API ( #4797 )
...
* avoid constantly triggering stageloop when using Engine API
* fix lint + test
* fixed comments
* ops
* little fixes here and there
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-07-23 18:57:23 +02:00
ledgerwatch
93151f0ae6
[erigon2.2] Reduce allocations when replaying historical txs ( #4460 )
...
* [erigon2.2] Reduce allocations when replaying historical txs
* import new API, fix code
* Add hack decompress function
* update erigon-lib
* Fix hack
* Update to latest erigon-lib
* Fix reindexing
* Enable skip analysis for tracing calls too
* Enable for eth_getLogs
* Fix skip analysis
* Optimise
* Stop grpc server in the tests
* Print
* No panic on server stop
* Update to latest erigon-lib
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-17 13:40:49 +01:00
Andrew Ashikhmin
eb497372ae
Interruptible PoS block building ( #4438 )
...
* Fix a typo
* BlockBuilder dummy
* BlockProposerParametersPOS -> BlockBuilderParameters
* Pass tx to MiningStep
* BlockBuilderFunc
* Interrupt in MiningExec Stage
* Draft implementation of BlockBuilder
* Fail back to empty header
* Add a comment
* cosmetic change
* Cosmetic change again
* It's not safe to pass transactions between goroutines
2022-06-13 15:43:09 +02:00
battlmonstr
0fc99b7c55
rpcdaemon: optimize tests ( #4082 )
...
* reuse the generated test blockchain across tests
* copy ChainPack to ensure test isolation
This improves the speed from 10s to 4s.
The package tests timeout can be reduced to 5s:
go test ./cmd/rpcdaemon/commands -count 1 --timeout 5s
2022-05-06 08:54:26 +07:00
Andrew Ashikhmin
74a7d7c75a
Refactor PoS downloader ( #3717 )
...
* Remove blockHeight arg from FeedHeaderPoW
* Revert "Remove blockHeight arg from FeedHeaderPoW"
This reverts commit 9bf92921db11cd4e13386fcee29f30241d070fc6.
* Move PayloadMessage & ForkChoiceMessage to package engineapi
* RequestList instead of newPayloadCh & forkChoiceCh
* Introduce request status
* Send reply only when request status is New
* Move BeaconRequestList to HeaderDownload
* Don't SetFetching when PoS (Fetching means handling newBlockHashes)
* Merge Syncing & Synced into DataWasMissing
* Introduce SyncStatus
* onlyNew arg in WaitForRequest
* Move waitingForBeaconChain into RequestList
* Interrupt instead of skipCycleHack
* Introduce timeout for PoS headers
* Split downloadMissingPoSHeaders
* Move StartPoSDownloader into HeaderDownload
* Move Stopping interrupt to StartPoSDownloader
* Move stopping PayloadStatus back to HeadersPOS
* cleanUpPoSDownload
* Post-merge fix
* TestBogusForkchoice
* TestPoSDownloader
* requestStatus in attemptPoSDownload
* Broadcast in SetStatus
* Cosmetics
* attemptPoSDownload -> schedulePoSDownload
* Demote some logs to Trace
2022-03-22 17:49:12 +01:00
Andrew Ashikhmin
8466cb1b7b
New Engine API semantics (Kiln v1) ( #3340 )
...
* Disable PoS sync temporarily
* Resore PoS sync
* Handle Ctrl^C in HeadersPOS
* Consistent naming
* Extract verifyAndSavePoSHeader & downloadMissingPoSHeaders
* Preparation for EngineForkChoiceUpdated re-orgs
* Extract ForkingPoint
* Comments
* New proto for Engine API
* EngineExecutePayload -> EngineNewPayload
* Return INVALID_BLOCK_HASH if block hash is invalid
* Return EngineStatus_ACCEPTED for side chain blocks
* Update erigon-lib (PR 268)
* Fix payload2Hash
* reverseDownloadCh -> beaconPayloadCh
* Update erigon-lib
* Engine API updated
* ExecutionStatus -> PayloadStatus
* Introduce forkChoiceCh
* Mock ForkChoiceMessage/PayloadStatus
* Add ValidationError to PayloadStatus
* Small clean-ups
* Add INVALID_TERMINAL_BLOCK to EngineStatus
* Add a comment
* Extract handleNewPayload & handleForkChoice
* Partially implement handleForkChoice
* Update erigon-lib
* short vs long re-org
* Move header insertion out of downloadMissingPoSHeaders
* Update erigon-lib
* Refactor ProcessSegmentPOS
* Fix imports
* Wire downloadMissingPoSHeaders into handleForkChoice
* evictOldPendingPayloads
* nolint:unused for assertSegment
* Try nolint instead of nolint:unused
* Small comment improvements
* HeadHeaderHash/StageProgress in handleForkChoice
* TODO: bodyDownloader.AddToPrefetch(block)
* Review call suggestions
* Don't use ReadHeaderNumber in ProcessSegmentPOS
* Don't leave ethbackend waiting when server is stopping
* Update erigon-lib
* More explicit signature of downloadMissingPoSHeaders
2022-02-09 08:33:22 +01:00
Alex Sharov
29a4adfbaa
ParallelCompressor: Remove intermediate ETL collectors ( #3427 )
...
* save
* save
* save
2022-02-04 16:48:16 +07:00
e-danko
d0123f52fd
Starknet grpc ( #3312 )
...
* created starknet_call method
* updated erigon lib
* updated erigon lib
* lint issues
2022-01-20 15:34:00 +00:00
Giulio rebuffo
195eb9abaa
Added mining for POS ( #3187 )
...
* added comunication with channels
* added final mining
* removed trash
* bug fixing
* async calls
* one thread
* tests
* better comments
* no lock
* better placing of skipCycleHack
* removed long timer
* moved transitioned block processing
* better naming
* disabled updates on blocks
* sync.Cond
* 2 sync.Cond
* better locking
* Use single sync.Cond. Proposer shutdown
Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com>
2022-01-04 18:37:36 +01:00
Giulio Rebuffo
e76bc807bb
better api
2021-11-29 15:47:08 +01:00
Giulio Rebuffo
768617f412
added proper errors
2021-11-24 23:19:40 +01:00
Giulio Rebuffo
435d1d1519
channels implemented
2021-11-24 23:00:00 +01:00
Alex Sharov
6d24a30a01
Drop txpool v1 ( #3017 )
...
* drop_txpool_v1
* drop_txpool_v1
Co-authored-by: Alex Sharp <alexsharp@alexs-macbook-pro.home>
2021-11-22 18:38:51 +00:00
Giulio Rebuffo
af4caf4459
fixed compilation
2021-11-22 16:17:01 +01:00
Giulio Rebuffo
1267d540b1
added engine_executePayloadV1
2021-11-21 22:47:33 +01:00
Giulio Rebuffo
23883d9104
merge
2021-11-21 21:55:41 +01:00
Alex Sharov
e55256296b
snapshots: read block from snapshots, add sender to txs file ( #2996 )
2021-11-21 10:32:14 +07:00
Giulio Rebuffo
6dd2d67121
Added ExecutePayloadV1 method to engine_ namespace
2021-11-20 22:53:03 +01:00
Giulio Rebuffo
224441cb07
initial commit2
2021-11-20 17:27:11 +01:00
Alex Sharov
aad0d0c777
grpc GetBlock api ( #2955 )
2021-11-14 11:08:52 +07:00
Alex Sharov
fc010b77ee
Switch sentry mock to pool v2 ( #2885 )
...
* save
* save
* save
* save
* save
* save
* save
* pool v2 docs
* pool v2 docs
* pool v2 docs
* save
* save
* save
* save
* save
* save
* save
2021-10-28 21:18:34 +07:00
Eugene
90e608c771
Implement test for RPC newHeads
notification ( #2805 )
...
* implement test for `eth_subscribe`
* fix variable name collision
2021-10-09 16:04:54 +07:00
Nickolay Savchenko
d027d712eb
Json rpc eip1898 correctness ( #2736 )
2021-09-28 09:25:56 +07:00
Alex Sharov
6bd44eb26c
move kv to erigon-lib ( #2467 )
2021-07-29 18:53:13 +07:00
Alex Sharov
838e5f9ef2
Move bucket constants into kv package, move kv interface to kv package ( #2455 )
2021-07-28 09:47:38 +07:00
Alex Sharov
a68b5ba361
Replace ChainConfig.WithEIPsFlags by go-ethereum's ChainConfig.Rules ( #2304 )
...
* use chainRules
* use chainRules
* use chainRules
* use chainRules
* use chainRules
2021-07-05 19:52:50 +01:00
ledgerwatch
a05d1be531
Pull grpc bindings into erigon-lib ( #2265 )
...
* Pull grpc bindings into erigon-lib
* Remove mdbx dist
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-07-01 22:31:14 +01:00
Alex Sharov
8f6aa2f7ae
propagate new tx to p2p ( #2254 )
2021-06-29 17:00:22 +07:00
Alex Sharov
a6f4b08716
Revert "Propagate new txs to P2P ( #2249 )" ( #2253 )
...
This reverts commit e9ae6d688f
.
2021-06-29 15:46:00 +07:00
Alex Sharov
e9ae6d688f
Propagate new txs to P2P ( #2249 )
2021-06-29 14:40:23 +07:00