Commit Graph

525 Commits

Author SHA1 Message Date
Alex Sharov
d1ddb5ee82
erigon22: fix txn overlap (#5327)
* save

* save
2022-09-10 11:26:58 +07:00
Igor Mandrigin
a0c80ccbee
Fix compatibility of eth_getBlockTransactionCountByHash (#5297)
* fix compatibility of eth_getBlockTransactionCountByHash

* fixup
2022-09-07 12:11:48 +07:00
Alex Sharov
25e615a878
erigon22: historyReader22 and more tests (#5281)
* save

* save
2022-09-05 21:31:00 +07:00
Alex Sharov
6bfd2c3472
erigon22: rpc getLogs and traceFilter (#5277) 2022-09-05 11:33:55 +07:00
Enrique Jose Avila Asapche
8fc7c78620
Bor txlookup (#5260)
* printing

* logging

* spam off

* ops

* clean up

* deleted all bor related stuff in snapshots

* adding bor tx to BorTxLookUp

* added readBorTxLookUp

* getting bor tx from bor lookup

* comments

* deleted bor related stuff

* deleting bor tx

* writing borTxLookUp in stage_txlookup

* using bytes

* little fixes

* updated erigon-lib

* using biEndian

* clean up

* setting bytes for big int

* log

* logging

* more logs

* delete logs
2022-09-02 17:41:58 +03:00
ledgerwatch
693017c554
Cleanup Tevm experimental code (#5259)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-09-01 19:49:29 +01:00
ledgerwatch
73e2d1146e
Cleanup interfaces (#5254)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-09-01 16:44:37 +01:00
Enrique Jose Avila Asapche
12331e018a
Fix bor txlookup (#5170) 2022-08-30 17:23:16 +03:00
Enrique Jose Avila Asapche
01dbad0979
Separating ErigonLogs from Logs (#5219) 2022-08-30 09:49:05 +07:00
Håvard Anda Estensen
7c15ed59e4
Enable prealloc linter (#5177)
* Enable prealloc linter

* Set inital slice len to 0
2022-08-26 10:04:36 +07:00
Alex Sharov
fb2294d124
Erigon22: basic txNum forward/unwind (#5176) 2022-08-25 12:24:01 +07:00
Alex Sharov
46ef7e5305
erigon22: incremental hash state stage (#5102) 2022-08-19 09:35:43 +07:00
Håvard Anda Estensen
13322893cb
Enable gosimple linter (#5071)
* Run gofmt

* Simplify slice making

* Use simple channel to receive instead of select with single case

* Enable gosimple linter
2022-08-16 13:02:13 +07:00
Leonard Chinonso
039efc38f8
Fix for custom tracer method crashing (#5066)
* checked for nil blocks

* Showed block number and hash in error message

* cleaned up code

* more cleanup

* Fixed format type for bytes
2022-08-16 08:32:22 +07:00
dmitriyselivanov
4499e04a05
rpcdaemon: wire the most recent of EthBackend.builders.block as a pending block into eth_getBlockByNumber (#5061) 2022-08-15 15:19:45 +07:00
Alex Sharov
a8cbf6e476
Open erigon_watchTheBurn: could not find block header (#5050) 2022-08-14 17:52:42 +07:00
Alex Sharov
52fd0d0e8b
Aggregator22.Unwind() (#5039)
* save

* save
2022-08-13 18:51:25 +07:00
Alex Sharov
25d85d88c5
state erigon22: use right db (#5028) 2022-08-12 21:45:09 +07:00
Alex Sharov
4594ce5ef7
erigon22: history.v2 flag, align rpcdaemon22 (#5016)
* save

* save

* save

* save

* save
2022-08-12 16:13:14 +07:00
nanevardanyan
8749fb4a70
cmd: make sure chain config is initialized before accessing it (#5006)
* cmd: make sure chain config is initialied before accessing it

* cmd: avoid using lazy field directly
2022-08-11 23:44:11 +07:00
Enrique Jose Avila Asapche
30df8a9765
Solving log index out of bound error (#5009) 2022-08-11 19:08:20 +03:00
fenghaojiang
12cf311b7c
feat: add erigon_getLogs with timestamp field to erigon rpcdaemon and fix the issue 4982 (#4968)
* add_abigen_error_handle

* add abigen error type test code

* add field timestamp in `eth_getLogs` api

add field timestamp in `eth_getLogs` api

* undo add field timestamp in `eth_getLogs`

* add `erigon_getLogs` api and add field `timestamp`

add `erigon_getLogs` api and add field `timestamp`

* feat: add `erigon_getLogs` with timestamp field to erigon rpcdaemon

feat: add `erigon_getLogs` with timestamp field to erigon rpcdaemon

* fix: issue `4982` roaring out of range

fix: issue 4982 roaring out of range

* convert rangeEnd to latest

convert rangeEnd to latest when range end is a big value that go out of range of MaxUint32

* add begin condition

add begin condition in case of bigger than latest block

* add annotation to unreachable code
2022-08-11 09:16:40 +07:00
Enrique Jose Avila Asapche
816ecc56db
Get logs fix (#4992)
* getting header number from snapshots

* Revert "getting header number from snapshots"

This reverts commit b2a899ae6b1a18d5eb769522c30caa3aebd060e7.

* using latest executed block number && snapshots

* printing bimaps

* log info

* more logs

* more logs

* logs

* ops

* nil ptr

* log topic

* more print

* ops

* storing bor logs

* got rid of the logs

* clearing buf
2022-08-10 19:03:22 +03:00
DenrianWeiss
93a9e00e3a
fix eth_gasPrice RPC issue. (#4943)
* [fix] eth_gasPrice RPC issue.
big.Int's Add method will save the result to self, since oracle.SuggestTipCap might come from gpo.lastPrice, this will change all following rpc result

* [fix] add big library

* [fix] set default result for gasResult
2022-08-10 20:18:14 +07:00
Alex Sharov
351cd49c21
go1.19 gofmt (#4988) 2022-08-10 19:04:13 +07:00
hexoscott
a573f8356f
rpc: concurrent map issue with log subscription fix (#4971)
* rpc: concurrent map issue with log subscription fix

* rpc: subscription changes around locking
2022-08-10 16:01:53 +07:00
Dan Kelly
cce64f6a33
Fix rpc json #4838 (#4894)
* Fixing RPC JSON errors

* Use local rpc mod

* Revert "Use local rpc mod"

This reverts commit 61d06a72d218f5ecb84e9e4ddddf8762a04f714c.

* Make handle error accessible

* Port fixes to rpcdaemon22

* Remove unused...

* ... and use correct function name

* Handle errors outside iterator loop. Fix missing rpcdaemon22 error handling

* Bubble up higher level errors to the top-level object

* Fix linter error - semi-colon..
2022-08-08 09:15:58 +07:00
Leonard Chinonso
592fe32217
Refactoring To Increase Code Quality (#4842)
* General cleanup and fixes

* Cleaning part 2

* cleanup part 3

* Refactored staterunner to have a handler function

* Fixed linting

* Cleanup part 4

* Changed the initialization of the require package and updated .golangci.yml

* Fixed lint errors from golangci-lint

* deleted state_recon_1.go

* fixed build error

* Added ReadHeaderTimeouts for httpServer

* made changes to golangci

* Reset golangci.yml
2022-08-04 20:23:00 +07:00
Enrique Jose Avila Asapche
a0da31bb1d
Transaction count fix (#4888)
* getBlockTransactionCountByHash using snapshots

* got body from block reader

* requesting block body with transactions

* tests

* added tx amount into blocreader body

* using txAmount from body
2022-08-04 18:49:53 +07:00
hexoscott
c61fbff74c
fix eth gas estimate when no pending block is available (#4898) 2022-08-04 11:47:11 +01:00
Enrique Jose Avila Asapche
0908536e0a
check if eip-1559 (#4927) 2022-08-04 12:30:20 +03:00
Leonard Chinonso
ec67e80a8a
Fixed lint errors for gocritic linter (#4904) 2022-08-03 00:35:22 +07:00
Leonard Chinonso
808df67683
Fixed lint errors for staticcheck (#4901) 2022-08-02 21:07:39 +07:00
Henry
9ed2f8d98b
cmd:use for_range read channel (#4880) 2022-08-01 12:58:09 +07:00
nanevardanyan
de0471aace
cmd: separate auth rpc server from regular (#4822)
* WIP: cmd: separate auth rpc server from regular

* WIP: cmd: updates after code review

* WIP: cmd: eth and engine should be predefined values for authAPI

* cmd: http enabled flag should not affect admin

* cmd: eliminate engine checks in case of non-auth

* cmd: remove engine from http.api options
2022-07-31 12:16:19 +02:00
Alex Sharov
a862bd9913
Revert "fix streaming in error case (#4861)" (#4862)
This reverts commit deccbf973a.
2022-07-29 16:59:31 +07:00
Alex Sharov
deccbf973a
fix streaming in error case (#4861)
* save

* save
2022-07-29 11:08:04 +07:00
Enrique Jose Avila Asapche
8b1574127a
checking txn chain id before adding it to the tx pool (#4855) 2022-07-29 08:26:15 +07:00
Giulio rebuffo
039b661803
fixed timeout on CL (#4836)
* fixed timeout

* send response immediately wen dealing with SYNCING

* send response immediately wen dealing with SYNCING

* correct lvh for ACCEPTED

Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-07-27 09:16:26 +02: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
ledgerwatch
6f53d1ef4d
Fix test compilation error (#4809)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-07-24 10:44:52 +01:00
bgelb
6481757175
fix regressions in trace_call and eth_createAccessList introduced by PR #3517 (#4807) 2022-07-24 09:50:43 +01:00
dmitriyselivanov
e85796a38c
rpcdaemon: added test for eth_call in case of a pruned block (#4776) 2022-07-24 09:50:00 +01:00
banteg
1533bea3f6
fix(vmtrace): missing pushes (#4808)
* fix(vmtrace): add chainid stack value

* fix(vmtrace): add coinbase stack value
2022-07-24 08:56:37 +01:00
banteg
4c0ab19bc6
fix(vmtrace): return value pushed by smod (#4806) 2022-07-24 12:21:31 +07: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
Levi Aul
b6440eea1e
Add erigon_getBalanceChangesInBlock RPC endpoint (#4609)
* Add eth_getBalanceChangesInBlock RPC endpoint

* Fix lints

* added assertion for one test

* moved balance change api from eth to erigon

Co-authored-by: fatemebagherii <fa.bagheri.a@gmail.com>
2022-07-15 16:04:23 +02:00
Max Revitt
e8f83db208
Gas api unit tests (#4715)
* gas price initial unit tests

* tweak(makefile): gas price test timeout increase

increase test timeout in Makefile to 50s from 30s
to cater for increased test time unit testing
gas price logic.

Co-authored-by: Scott Fairclough <scott@hexosoft.co.uk>
2022-07-15 14:56:35 +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