Commit Graph

3805 Commits

Author SHA1 Message Date
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
Alex Sharov
bd721b9fd7
Erigon22: reduce amount of variables. progress object and use of db.update (#4967)
* save

* save

* save

* save

* save
2022-08-09 11:46:57 +07:00
Alex Sharov
b717ff5df5
erigon22: move worker to package (#4966)
* save

* save

* save

* save

* save
2022-08-09 10:39:34 +07:00
fenghaojiang
5540db0529
add erigon_getLogs api and add field timestamp (#4964)
* 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`
2022-08-09 10:00:36 +07:00
Alex Sharov
1b20322b60
snap: no tmp subfolder (#4940)
* save

* save

* save

* save

* save
2022-08-08 09:24:39 +07:00
fenghaojiang
bc7921a8ab
add field timestamp to eth_getLogs response (#4950)
* add_abigen_error_handle

* add abigen error type test code

* add field timestamp in `eth_getLogs` api

add field timestamp in `eth_getLogs` api
2022-08-08 09:17:32 +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
Alex Sharov
7a2e7e8c06
enable_remote_rpcdaemon (#4938) 2022-08-05 10:15:40 +07:00
Leonard Chinonso
43f5ab09f8
Fixed lint errors for gosec linter (#4933)
* Fixed lint errors for gosec linter

* Changed uint64 to int64 in common/GetRandInt

* Changed naming of function
2022-08-04 14:59:40 +01: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
ledgerwatch
e56491c601
Erigon22 prototype without parallel execution, fix for BSC upgrade contract (#4884)
* No parallelisation in erigon22 prototype

* Remove paralell

* tx/s

* commit

* Fix overlap

* workers argument

* Print

* Print

* Stable sort

* Print

* Init

* Remove print

* Remove print

* Remove print

* No sorting

* Cleanup

* Fix hangs

* Fix reconstitution for contract upgrades

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-08-04 13:00:46 +01: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
Andrew Ashikhmin
5ea692f2de
Remove authrpc.* flags from rpcdaemon (#4931)
* README: Move port 8551 from RPC to erigon ports

* Some renaming for consistency

* Remove authrpc.* flags from rpcdaemon

* docker-compose: move --authrpc.jwtsecret to erigon

* minor typo
2022-08-04 12:51:01 +02:00
hexoscott
c61fbff74c
fix eth gas estimate when no pending block is available (#4898) 2022-08-04 11:47:11 +01:00
Andrew Ashikhmin
ea6305339b
Revert "Log data if cannot decode BlockBodiesPacket66 (#4850)" (#4929)
This reverts commit 7ae99884af.
2022-08-04 12:01:36 +02:00
Enrique Jose Avila Asapche
0908536e0a
check if eip-1559 (#4927) 2022-08-04 12:30:20 +03:00
Alex Sharov
35878b29c4
erigon22: auto-create dir (#4912) 2022-08-03 15:10:28 +07:00
Alex Sharov
0d21da4a01
erigon22: auto create dir (#4911) 2022-08-03 14:43:47 +07:00
Alex Sharov
db0c4e9d41
torrent: reduce network packet size, to increase network responsiveness (#4910) 2022-08-03 09:39:08 +07:00
Enrique Jose Avila Asapche
0640e946dd
updated eth_subscribe info (#4905) 2022-08-02 20:45:37 +03:00
Leonard Chinonso
ec67e80a8a
Fixed lint errors for gocritic linter (#4904) 2022-08-03 00:35:22 +07:00
Leonard Chinonso
6061690f61
Fixed lint errors for unused linter (#4902) 2022-08-02 22:01:53 +07:00
Leonard Chinonso
8774e1d8a2
Fixed lint errors from gosimple linter (#4900) 2022-08-02 21:09:00 +07:00
Leonard Chinonso
808df67683
Fixed lint errors for staticcheck (#4901) 2022-08-02 21:07:39 +07:00
Andrew Ashikhmin
29d2f16bf0
Fix auth RPC logging (#4899) 2022-08-02 13:24:25 +02:00
Alex Sharov
9dc15ac5bb
integration mdbx_to_mdbx (#4897) 2022-08-02 13:37:57 +07:00
Andrew Ashikhmin
7199dcf7a2
Rename engine.* flags to authrpc.* for consistency with geth (#4890)
* Update README re. Engine API

* Remove obsolete code

* Don't apply --rpc.accessList to Engine API listener

* Simplify startAuthenticatedRpcServer

* Rename engine.* cmd flags to authrpc.* for consistency with geth

* More renamings

* Introduce --authrpc.vhosts flag
2022-08-02 13:15:01 +07:00
Alex Sharov
5cf933d0b0
torrent logs better (#4896) 2022-08-02 11:43:26 +07:00
Andrew Ashikhmin
41f27be140
Don't start engine API in standalone rpcdaemon (#4887) 2022-08-01 17:12:35 +02:00
nanevardanyan
cdcc031f41
cmd: make sure regular rpc server start is reachable (#4885) 2022-08-01 16:54:04 +02:00
Henry
9ed2f8d98b
cmd:use for_range read channel (#4880) 2022-08-01 12:58:09 +07:00
ledgerwatch
2b517b7630
Erigon22 prototype to support BSC (#4867)
* Reduce workers and queue size

* Add traces and event logs

* Add chain flag

* Print

* Open consensus db as read only

* Use only one engine instance

* chainDb

* Display palia error

* Not to panic

* Not to exit

* Add syscall

* Print

* Pointer to TxTask

* Not register senders

* Print

* Relax check

* Skip system transactions

* increase workerCount again

* Remove print

* Change recon

* Fix types

* Skip system txs

* Print

* No rules for genesis commit

* Print genesis

* Print|

* Print

* Print

* Update

* Fix

* Remove print

* No print

* Support contract upgrades

* Use the same dif

* Print create2

* Fix

* Fix

* Print

* Hack iterate

* Print empty vals

* Fix hack

* Code hashes

* Code hashes

* Print

* No panic

* No panic

* Fix?

* another incarnation fix

* Remove print

* Remove print

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-07-31 21:54:23 +01: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
Enrique Jose Avila Asapche
66c033a241
Adding config-file flag (#4868)
* added flag

* working flag ovewrite for http

* setting up all flags with yaml file

* comment

* ops

* set flags in the cli trump yaml config file

* changed to config.yaml.file

* ops

* better naming

* accepting toml or yaml files

* fixed flag

* fixed messages
2022-07-31 10:46:00 +07:00
Alex Sharov
a862bd9913
Revert "fix streaming in error case (#4861)" (#4862)
This reverts commit deccbf973a.
2022-07-29 16:59:31 +07:00
Delweng
4c6c3d6d30
cmd/utils/flags: fix a typo (#4853)
Signed-off-by: Delweng <delweng@gmail.com>
2022-07-29 09:59:12 +02:00
Alex Sharov
deccbf973a
fix streaming in error case (#4861)
* save

* save
2022-07-29 11:08:04 +07:00
Alex Sharov
2681ee392a
rpc: fix error stream (#4860) 2022-07-29 10:01:13 +07:00
Alex Sharov
454cea4811
docs cli antipattern (#4859)
* save

* save
2022-07-29 09:48:24 +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
Andrew Ashikhmin
59bcbb4f33
No TTD mismatch if there's no TTD in chainConfig yet (#4852) 2022-07-28 18:25:01 +02:00
Andrew Ashikhmin
7ae99884af
Log data if cannot decode BlockBodiesPacket66 (#4850) 2022-07-28 17:26:34 +02:00
ledgerwatch
167de529a8
Fixes for erigon22 prototypes (#4851)
* Fixes for erigon22 prototypes

* Add waiting/applying stats

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-07-28 13:26:48 +01:00
hexoscott
75151e0700
fix memory leak in HandleInboundMessage (#4848) 2022-07-28 12:19:34 +01:00
ledgerwatch
09c104803a
Split erigon2.2 and erigon2.3 prototypes (#4811)
* Split erigon2.2 and erigon2.3 prototypes

* Renaming

* Interruptible and resumable erigon22

* Always regenerate trie

* Introduce aggregator

* Fixes

* cleanup

* Fix lint

* Update to erigon-lib main

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-07-28 12:16:37 +01:00
Alex Sharov
aee4b53788
save list of snapshots in db (#4777)
* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save
2022-07-28 16:57:38 +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
Alex Sharov
b6ea28ea80
kv.Del() remove second parameter (#4832)
* save

* save

* save

* save

* save

* save

* save
2022-07-26 12:47:05 +07:00
Alex Sharov
60f1adddcd
implement server kv.Snapsthos() method (#4831)
* save

* save
2022-07-26 10:44:47 +07:00