Commit Graph

135 Commits

Author SHA1 Message Date
Andrew Ashikhmin
15ddd32e75
Engine API: remove unauth port (#4111)
* Engine API: remove unauth port

* Remove reduntant auth from variable names
2022-05-10 13:04:52 +02:00
Alex Sharov
763563ec77
RPCDaemon: open snapshots on startup (because now snapshots dir is atomic), even if no Erigon available (#4110)
* save

* save

* save

* save

* save

* save
2022-05-10 09:54:44 +01:00
Alex Sharov
f590bf682f
RPCDaemon - open snapshots only when they are ready (and indices ready). 2022-05-04 12:55:58 +07:00
Enrique Jose Avila Asapche
e2fec2a081
got rid of the automatic usage of net api (#3952)
* got rid of the automatic usage of net api

* less confusing comment

* ops

* ops2

* important

* ops
2022-04-25 19:57:54 +07:00
Alex Sharov
6aa4999729
Parallel indexing (#3921) 2022-04-21 10:34:10 +07:00
Alex Sharov
9b47daee44
Default syncmode=snap for Mainnet, Bsc, Goerli (#3861)
* change syncmode default to snap sync

* save
2022-04-10 07:20:20 +01:00
Giulio rebuffo
396bd03021
Fixed JWT path when running the rpcdaemon (#3840) 2022-04-07 08:53:34 +07:00
Alex Sharov
d1218181b0
Snapshots: geth compatibility, use --syncmode=snap flag (#3808) 2022-04-01 15:00:50 +07:00
Alex Sharov
89d4477df3
Snapshots: nil indices on p2p fix (#3772) 2022-03-27 10:07:58 +07:00
Giulio rebuffo
904674e1a1
added Websocket support and authentication to Engine API (#3752)
* added ws support and auth

* fixed lint
2022-03-23 17:12:19 +01:00
Enrique Jose Avila Asapche
726557fe72
Expose jwt-secret flag in erigon (#3741) 2022-03-21 08:33:10 +07:00
ledgerwatch
d5fb8f7d24
[erigon2] Separate handover timing (#3736)
* Separate handover timing

* Update

* Corrected handover time calculation

* Not use compression when aggregate

* Update to latest erigon-lib

* Update to erigon-lib main

* Update

* Disable reproducible builds

* Restore github actions

* Restore github actions

* Revert "linter to support go 1.18 (#3739)"

This reverts commit 1fd434d3d1.

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-03-19 16:15:12 +00:00
Alex Sharov
7bf87e9597
Snapshots: grpc event (#3732) 2022-03-18 15:06:23 +07:00
Enrique Jose Avila Asapche
bb711676a4
enabling apis for merge if chainConfig has TTD (#3721) 2022-03-17 08:28:17 +07:00
Alex Sharov
469b75c3d3
Snapshots: retire blocks by default (#3707) 2022-03-16 09:57:48 +07:00
Giulio rebuffo
e20506e932
fixed JWT authentication port (#3689)
* fixed JWT

* jwt.hex

* ops
2022-03-14 14:47:26 +01:00
Alex Sharov
0b2ce6f845
rpcdaemon: limit amount of read transactions (#3637)
* 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

* 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

* a

* a

* a

* a

* a

* a

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* fefefe

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save
2022-03-08 10:43:14 +07:00
Andrew Ashikhmin
f58e80bd56
Expose eth API on the same ports as engine API (#3633)
* Expose port 8551 (authenticated Engine API)

* Expose eth API on the same ports as engine API
2022-03-02 14:58:46 +01:00
Giulio rebuffo
cb8aacae87
Added Engine Authentication [JWT] (#3531)
* jwt

* fuuuuture

* added auth

* merge

* merge

* Update jwt to the latest version

* ops

* comments

* cleanup

* bad

* gut

* maybe

* mod sum

Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com>
2022-02-28 12:07:09 +01:00
battlmonstr
e6c056e666
Rename Datadir/dataDir to follow conventions. (#3576)
* rename from Datadir to DataDir (functions and public vars)
* rename dataDir to datadir (local variables)
2022-02-22 17:39:48 +00:00
Alex Sharov
bed56c6363
Embed rpcdaemon - more cli flags (#3556)
* more rpc emed flags

* more rpc emed flags

* more rpc emed flags
2022-02-21 09:32:42 +07:00
Alex Sharov
b60faba5d9
more stable grpc err chec (#3541) 2022-02-18 09:54:38 +07:00
Alex Sharov
226982d293
Use class dir.Rw - to separate Ro and Rw access to snapshotDir (#3534)
* save

* save

* save

* save

* save

* save

* save
2022-02-18 09:24:17 +07:00
Andrew Ashikhmin
0701c83222
Fix stall on unwind in handleForkChoice (#3536)
* ReadHeader instead of ReadHeaderByHash

* Add Engine API to rpcdaemon README

* Fix nil pointer dereference in HandlePendingBlock

* Fix latestValidHash JSON

* Delete GetPayloadBodiesV1

* Break infinte unwind loop in handleForkChoice

* More logging
2022-02-17 18:30:57 +01:00
Alex Sharov
18989d73e6
RPCDaemon: --txpool.api.addr by default to use value of --private.api.addr #3532 2022-02-17 09:06:22 +07:00
alex.sharov
89f3164653 Revert "save"
This reverts commit 3ac9112df1.
2022-02-17 09:04:23 +07:00
alex.sharov
3ac9112df1 save 2022-02-17 09:02:32 +07:00
Alex Sharov
237a7d24d0
Embed RPCDaemon (#3522)
* save

* save

* save

* save

* save
2022-02-16 17:38:54 +00:00
Alex Sharov
6d9ea162ab
rpc daemon embed (step 3) (#3519) 2022-02-16 11:24:51 +07:00
alex.sharov
d488482c89 save 2022-02-13 08:53:10 +07:00
Alex Sharov
c9cee7a884
path -> filepath (path package is for urls) (#3493) 2022-02-12 20:33:09 +07:00
Alex Sharov
479c7f3d9d
Embed rpcdaemon: prepared direct clients (#3492) 2022-02-12 19:47:19 +07:00
leonardchinonso
aca755ab43
Fix/rpcdaemon ws upgrade (#3490)
* Added a method to `cmd/rpcdaemon/cli/config.go` to check header of incoming http request for a ws upgrade request

* Added the testing of the 'GET /' request for ws to the devnet tool

* Fixed lint errors
2022-02-12 12:40:19 +01:00
Alex Sharov
a1318f869a
make services net-independent (#3481) 2022-02-11 17:11:59 +07:00
alex.sharov
863db147cf bor: ensure db exists 2022-02-09 09:31:12 +07:00
Alex Sharov
e5081c78b9
bor: ensure db exists (#3449) 2022-02-09 09:28:06 +07:00
Enrique Jose Avila Asapche
35fcd3a829
Merging Turbo bor into devel (#3372)
* implemented bor consensus

* add bor flags to default

* change bucket into snapshot to clique

* enable stateSync

* bypass reciept checks

* fix receipt calculation and bor logs

* fix: contract call wrt bor

* Update mumbai config

* Add: bor-mainnet flag and config

* Add bor consensus to integration

* use header coinbase in block context

* london fork mumbai changes

* fix genesis error

* Jaipur fork for mumbai

* add sysCall to verifyHeader

* added bor related rpc method implementation

* added bor specific rpc extensions

* fixes in snapshot implementation, major refactor for bor rpc

* modify consensus specific db path for bor

* fix: remove parallel compute for get root hash rpc method

* Added bor-receipt flow

* Use turbo-bor-lib and bor tables

* Use bor table in RPC snapshot

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* update rpc readme

* link rpc docs in readme

* Update Readme

* Update Readme

* move erigon namespace rpc methods to eth

* rm: erigon namespace

* rm: erigon namespace, update list of available rpc methods, add example

* fix: binary name in rpc readme

* fix: max db size

* Add london to bor-mainnet

* updated node.go

* add system req to readme

* golang version fix readme

* added networknames in correct place

* nil

* ran gofmt

* erigon

* fixed fake.go

* dont need turbor-lib

* old readme

* fixing readme

* half

* other half

* changed return

* fixing return

* fixed return

* fixed flags

* gofmt

* merge with devel

* latest erigon-lib

* fixed context.coinbase

* took out syscall

* fixed params in hash

* bor type now is consensus.Engine

* parlia is consensus.Engine

* missing arg and repeated importation

* repeated importation

* fixed eth_receipts.go

* deleted duplicate issuance

* part of consensus.Engine type

* added eth_api issuance

* networkname

* added erigon_system file

* fork struct taken out

* added erigon block

* getLogByHash for erigonImpl

* gofmt

* fixed lint

* ops

* gofmt

* gofmt

* added APIImple functions

* fixed clique test

* took out print

* fixed state added balance

* fixed README

* fixed rpcDaemon README

* fixed integration README

* updated blockchain.go

* lint

* added bor back into blockchain.go

* took out comment

* lint

* updated daemon

* updated wtb

* removed duplicate

* removed VerifyHeaders

* prevent use of wrong Transfer

* fixed state_processor.go

* fixed state_transition.go

* fixed headers

* returning err

* error handling in bor read tx look up

* put for txLookUp

* dealing with error

* lint

* traces

* more traces

* fixed receipt in execution

* getTrasanction receipt for bor or others

* nil

* lint

* ops

* deleted syscall

* took out else

* Merge branch 'devel

* tests syscalls

* changed borReceipt to receipt

* reset header algos

* arguments fix

* took out prefixes

* lint

* erigon-named

* borReceiptKey = blocknumber

* reverts e3b60c2e159d03efcb855f7ab3da5a098dd60c33.

* correct hashing tx

* dont need it here

* lint

* added txlookup for bor

* change to uint256

* outputs for isBor

* wrapper

* added isBor and isParlia

* isBor

* fixed BorTransfer

* not readBody

* correct prefix

* added blockNum

* added readStorageBody

* readStorageBody

* lint

* got rid of unnecessary bor_receipt func

* onlny if bor

* use clone

* append

* writeToSlice

* added isBor flag

* fixed writeToSlice

* normal sorting

* lint

* Reset erigon-snapshots

* Move bor prefix into if

Co-authored-by: Krishna Upadhyaya <krishnau1604@gmail.com>
Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Co-authored-by: Uttam Singh <uttamkhanduja@yahoo.in>
Co-authored-by: Giulio Rebuffo <giulio.rebuffo@gmail.com>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-07 21:30:46 +00:00
Alex Sharov
bb1d19060f
Add downloader to docker-compose (#3348) 2022-01-26 22:26:33 +07:00
Enrique Jose Avila Asapche
2aa1ebf9f6
Separate Server For Engine API (#3332) 2022-01-25 19:44:35 +03:00
Alex Sharov
304b40dd0a
Snapshot: prohibit to change cli flags (#3311) 2022-01-22 11:18:24 +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
Alex Sharov
6fd002eb5a
Snapshot: move old blocks to snapshots (non-async version) (#3309)
* save

* save
2022-01-20 12:01:02 +07:00
Alex Sharov
4ef541f5dc
Snapshots: tx lookup in RPC from snapshots (#3214) 2022-01-07 20:52:38 +07:00
Alex Sharov
65188ce440
Snapshot: add hash first byte to headers.seg, serve p2p blocks from snapshots (#3198) 2022-01-05 17:14:37 +07:00
Alex Sharov
ecb10e8548
Snapshots download and seed (#3117)
* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* Squashed 'interfaces/' content from commit e5b1945d0

git-subtree-dir: interfaces
git-subtree-split: e5b1945d02da7a7f00e2289034ee90a6edd60184

* 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
2021-12-14 10:13:17 +00:00
primal_concrete_sledge
d89e5d2603
Issue/2710 add grpc health check (#3091)
* ISSUE-2710: Add standard grpc health check to services with grpc server

* Go import changed files

* Add flags for healthcheck

* Add grpc healthcheck option to rpcdaemon

* Remove grpc port info if grpc is not enabled

* Resolve merge issues
2021-12-06 12:03:46 +00:00
Alex Sharov
178fd1931d
Genesis sync from existing snapshots (#3087) 2021-12-05 09:03:08 +07: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
Alex Sharov
e55256296b
snapshots: read block from snapshots, add sender to txs file (#2996) 2021-11-21 10:32:14 +07:00
Alex Sharov
aad0d0c777
grpc GetBlock api (#2955) 2021-11-14 11:08:52 +07:00