Commit Graph

16085 Commits

Author SHA1 Message Date
Giulio rebuffo
6b6b74e034
removed code duplication (#4697) 2022-07-12 15:25:32 +02:00
Giulio rebuffo
b161c27ac3
optimized one db read (#4694) 2022-07-12 10:39:57 +02:00
Andrew Ashikhmin
e0845f229b
Don't feed invalid headers into DB (#4693)
* Reduce code duplication in verifyAndSaveNewPoSHeader

* Don't feed invalid headers into DB

* remove superfluous comment
2022-07-12 10:33:43 +02:00
Artem Tsebrovskiy
9637b25a42
[erigon2] print trie variant derived from trie instead switch log (#4672)
* [erigon2] print trie variant derived from trie instead switch log

* updated erigon-lib version

* bumped erigon-lib version
2022-07-11 15:58:08 +01:00
Giulio rebuffo
51245d294f
Add PoS validator struct [Refactoring] (#4690)
* added fork_validor struct

* replaced occurences of hd with forkValidator

* added engineapi.validatorFork

* 32 blocks maxForkDepth

* removed useless if
2022-07-11 15:12:21 +02:00
nanevardanyan
d8b2077aef
eth: divide test cases and verify with exact values (#4691) 2022-07-11 13:56:00 +02:00
Leonard Chinonso
8a75033b98
returned error if error object is not nil (#4685)
* returned error if error object is not nil

* undefined block: changed it to blockNumber
2022-07-10 08:13:24 +06:00
Leonard Chinonso
cfc051892e
Fix for issue 4205 (optimize eth_getLogs) (#4662)
* optimize eth_getLogs

* used the implementation from api._blockReader

* used the implementation from api._blockReader
2022-07-09 19:42:57 +06:00
Cory
0ca3ff3858
Fix regex (#4678) 2022-07-09 11:56:23 +06:00
Levi Aul
8de866028a
Additional bor RPC fixes (#4675)
* Add borTx to GetBlockByHash; ensure borTxs have hashes; don't try to derive sender for borTxs

* Surface borReceipt logs in eth_getLogs

* Check for existence of borReceipt before synthesizing a borTx
2022-07-09 09:15:22 +06:00
Giulio rebuffo
63f6eab6c7
removed envelope on txpool for PoS (#4683) 2022-07-08 16:48:24 +02:00
Andrew Ashikhmin
225935b376
Bump log level of some PoS messages from Trace to Debug (#4682) 2022-07-08 15:18:36 +02:00
Andrew Ashikhmin
d54a007289
Enable in-memory overlay by default (#4680) 2022-07-08 12:05:57 +02:00
Andrew Ashikhmin
eec5fa4d41
Add support for eth/67 (#4564)
* Add eth/67

* Listen to eth/66 on a separate port

* Fix compilation error

* Fix cfg66.ListenAddr

* Update erigon ports in README

* Expose port 30304 in docker

* P2pProtocolVersionFlag instead of second sentry

* Remove "66 by default" from usage

* Small comment
2022-07-08 11:14:16 +02:00
Cory
9f5b401547
Fix grafana startup in docker-compose (#4677)
* grafana user 472:0

* Fix typo extra ~ in Makefile

* Create grafana dir correctly

* chown -R
2022-07-08 12:11:07 +06:00
sudeep
e13a318e0b
evm t8n to use ExecuteBlockEphemerally api (#4642)
* evm t8n tool to use ExecuteBlockEphemerally api (#4512)

* fix to set V, R, S in legacy transaction

* fix to dump post-execution alloc for evm t8n

* close tx in evm t8n

* populate current difficulty and gas used in output result

- update the ExecutionResult to include corresponding info (like
  Difficulty/GasUsed)

* initial attempt at migrating 'evm t8n' to use ExecuteBlockEphemerally

* using ExecutionResult in ExecuteBlockEphemerally

* bypass validations and integrate with EphemeralExecResult

* fixing output of 'evm t8n'

- remaining bits are "stateRoot" in results.txt and "balance" field for one account in
  alloc.txt (for testdata=1)

* get ExecuteBlockEphemerally to accept getTracer lambda

* fix build failure

* test cases for evm t8n

* more test cases for evm t8n

* fix stateRoot computation in evm t8n

* remove reward argument, as EBE itself takes care of it

* final cleanups for migration to using ExecuteBlockEphemerally

* change EBEforBSC to match EBE

* fix linter issues

* manually revert an unwanted diff

* avoid calculating ReceiptHash twice

* linter check

* minor correction

* remove unnecessary logic in EBEforBsc

* fix integration tests

* fix build
2022-07-07 12:47:00 +01:00
Levi Aul
7b80744768
Ensure (fake) Bor txs + receipts are returned from all relevant RPC methods (#4663)
* Ensure fake Bor txs + receipts are returned from all relevant RPC methods

* Add rest of bor implementation for eth_getBlockByNumber

* Use TxLookup index to find Bor txs

* Fix txHash on emitted borTxs and borReceipts

* Fix checks given that borTxs get registered in TxLookup; remove useless ref indirections
2022-07-07 14:40:50 +06:00
Igor Mandrigin
024061018e
Fix a deadlock under RPC load (#4667)
* debugs

* rename logs

* updated erigon lib with the attempt to fix deadlock

* Update erigon-lib that fixes the deadlock

* Revert "rename logs"

This reverts commit 13b6ac555314ce4317de2438d5f1a5e883343865.

* Revert "debugs"

This reverts commit 356de6c8ef3df2a440f8ad6c18ccb63496d8256d.

* revert unnecessary change

* go mod tidy

Co-authored-by: Igor Mandrigin <i@mandrigin.ru>
2022-07-07 08:34:51 +01:00
Alex Sharov
01bca8f1e2
TxPool: generics btree (#4665)
* save

* save

* save

* save
2022-07-07 11:07:48 +06:00
ledgerwatch
329d586464
Try to reproduce and fix eth_getBlockByNumber returning nil (#4608)
* Small optimisation for eth_getBlockByNumber

* Option to not retrieve transactions

* fixes

* Check hash

* Fixes

* Avoid shadowing of err in BlockWithSenders

* Fix test

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-07-06 14:10:12 +01:00
Andrew Ashikhmin
71525fa85e
safeAndFinalizedBlocksAreCanonical -> writeForkChoiceHashes (#4655)
* safeAndFinalizedBlocksAreCanonical -> writeForkChoiceHashes

* fix
2022-07-06 14:42:33 +02:00
hexoscott
b84867f13b
adding health endpoint documentation for headers (#4656) 2022-07-06 14:22:32 +02:00
Giulio rebuffo
99208ff4dc
Fixed hive test (#4653) 2022-07-06 13:52:49 +02:00
Andrew Ashikhmin
f05401b78e
Don't write headBlockHash & co when FCU points to an old canonical block (#4650) 2022-07-06 13:14:13 +02:00
Alex Sharov
d9cb87a149
RPC: Enable back json streaming for non-batch and non-websocket cases (#4647)
* enable rpc streaming

* enable rpc streaming
2022-07-06 11:44:06 +01:00
Alex Sharov
f19101d33b
macos retry reopen torrent client (#4645)
* save

* save

* save

* save

* save

* save

* save

* save

* save
2022-07-06 16:27:01 +06:00
Enrique Jose Avila Asapche
70bf7dbc11
getting amount from non canonical bucket (#4648) 2022-07-06 16:25:29 +06:00
Andrew Ashikhmin
45ac977b9f
Revert "Small simplification of startHandlingForkChoice (#4636)" (#4649)
This reverts commit cc75387d10.
2022-07-06 12:04:25 +02:00
hexoscott
423b4f68ac
use headers in rpc health check (#4639)
adding in unit tests for healthchecks
2022-07-06 09:43:22 +02:00
ledgerwatch
73b0659bb7
[erigon2.2] Optimisation of state reconstitution (#4621)
* Init

* Optimise ReconState flushes

* Updates

* Update

* Updates

* Updates

* More on parallel execution

* More on parallel exec

* Fix lint

* Improvements to parallel exec

* comment

* Fix history access, include incarnation

* Close work channel

* TxTask

* more fixes to parallel exec

* Update to latest erigon-lib

* Fix compilation

* Cleanup and timing

* Fixes to recon1

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-07-06 07:49:00 +01:00
Giulio rebuffo
5e1cc9ae51
fixed Invalid Number reorg (#4643) 2022-07-05 23:40:10 +02:00
Andrew Ashikhmin
cc75387d10
Small simplification of startHandlingForkChoice (#4636) 2022-07-05 20:16:52 +02:00
Giulio rebuffo
d4a0aff53f
fixed hive test: Transaction Reorg - Check Blockhash with NP on revert (erigon) (#4640) 2022-07-05 20:03:05 +02:00
ledgerwatch
a6a5b1db90
Update skip_analysis.go (#4632) 2022-07-05 13:41:48 +01:00
Alex Sharov
7e2d46cbe4
Support "latests block number" in Oracle Backend (#4635)
* save

* save

* save

* save

* save

* save

* save

* save
2022-07-05 14:49:39 +06:00
Giulio rebuffo
a76e6a1d05
fixed deadlock (#4633) 2022-07-05 09:53:28 +02:00
Giulio rebuffo
d83b7a4ae0
Proper PoS Error reporting (#4631)
* better reporting

* removed debug log

* proper error reporting
2022-07-05 01:31:16 +02:00
Alex Sharov
ff847cd459
Snapshots: save initial list to db, to avoid future snapshots downloading #4625 2022-07-04 18:44:15 +06:00
Alex Sharov
99d9535fd8
new node to not print warning #4629 Open 2022-07-04 18:43:46 +06:00
Andrew Ashikhmin
9562b38c64
Small refactoring: extract applyOverrides func (#4628) 2022-07-04 13:19:08 +02:00
Temirlan
782b8b6557
rpcdaemon, erigon: add new flags (#4623)
Co-authored-by: Темирлан Ермагамбет <etmr@technodom.kz>
2022-07-04 13:07:45 +02:00
Andrew Ashikhmin
00ee68e4a1
FeedHeaderPoS already writes header number (#4626)
* FeedHeaderPoS already calls WriteHeaderNumber

* Moreover, WriteHeader already writes to HeaderNumber
2022-07-04 11:28:10 +02:00
Alex Sharov
2a0fda33dd
snapshots table (#4624) 2022-07-04 11:17:39 +06:00
Giulio rebuffo
8ae9381f0f
extra logging (#4622) 2022-07-04 01:40:12 +02:00
Giulio rebuffo
8e3c099490
fix panic (#4620) 2022-07-03 18:45:27 +02:00
Giulio rebuffo
b980280785
Fixed hive test on invalid transition payload (#4618)
* experiment #1

* experiment #2

* experiment #3

* experiment 4
2022-07-03 17:36:39 +02:00
Giulio rebuffo
c422b8c4da
better ancestor check (#4617) 2022-07-03 13:34:35 +02:00
Giulio rebuffo
3fc51f5ef7
Revert "Proper Pos block checker when INVALID/ACCEPTED status is sent (#4604)" (#4616)
This reverts commit e90e03ae31.
2022-07-03 13:11:16 +02:00
Giulio rebuffo
fd2886b927
Revert "fixed compilation (#4614)" (#4615)
This reverts commit 1c5ec22d09.
2022-07-03 12:54:27 +02:00
Giulio rebuffo
1c5ec22d09
fixed compilation (#4614) 2022-07-03 12:37:31 +02:00