Commit Graph

75 Commits

Author SHA1 Message Date
Ikechukwu Ahiara Marvellous
7795bf5392 Add a --bootnodes flag for reth node (#867) 2023-01-16 11:04:07 -08:00
TurboFish
9482c551c5 feat: add a reverse db walker (#841) 2023-01-16 10:27:22 -08:00
Martin Paulucci
3cd8fb5748 refactor: remove db file on db drop command. (#885)
Co-authored-by: lambdaclass-user <github@lambdaclass.com>
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
2023-01-16 17:40:49 +01:00
Bjerg
02632cd888 feat: show possible values for reth stage (#872) 2023-01-13 06:01:59 -08:00
Bjerg
707e488d2c feat: improve eth test runner (#868) 2023-01-13 14:24:18 +01:00
Kim, JinSan
c4bafe809b fix: clippy warnings, or_fun_call and unnecessary_lazy_evaluations (#846) 2023-01-13 11:10:02 +01:00
Matthias Seitz
ba3048ceb0 refactor: add network-api crate (#838) 2023-01-12 19:39:44 -08:00
Bjerg
20ee1bb1c9 refactor: move cli trace helpers to reth-tracing (#820) 2023-01-11 10:20:37 -08:00
Bjerg
531dbdbd29 fix: allow partial configs (#814) 2023-01-11 13:49:56 +01:00
Bjerg
2e95ed4b6e fix: make config serialize as toml (#811) 2023-01-11 13:36:41 +01:00
Bjerg
2e87017686 feat(cli): more reasonable log output (#784) 2023-01-11 11:53:33 +01:00
LambdaClass
593a94e426 feat: add drop subcommand for db command (#801) 2023-01-10 22:55:05 +01:00
LambdaClass
3bd1458df6 Rename cursor functions (#787) 2023-01-10 20:08:30 +01:00
David Kulman
515590faa8 refactor: move cli utils to new reth-cli-utils crate (#790)
* Move bin/src/util to reth-cli-utils

* Add reth-cli-utils to workspace members

* Fix imports in bin/src

* Create reth-cli-utils crate

* Add utils import
2023-01-10 01:13:41 +01:00
Bjerg
40f30ec951 refactor: clean up SocketAddr value parser (#777)
- Rename the function
- Add more docs explaining the supported formats
- Remove support for empty string (just use an `Option`),
  and remove support for `:` (should be considered a typo)
- Reduce allocations of strings
2023-01-09 17:31:53 +01:00
joshieDo
2b5ee2b18d chore(primitives): use reth::Bytes and implements arbitrary (#776)
* clippy

* add arbitrary to reth Bytes

* clean

* add missing dependency
2023-01-09 12:09:18 +01:00
Sanket Shanbhag
d296946bf1 add unknown fork spec (#774) 2023-01-09 09:07:47 +01:00
Dimitris Apostolou
31cb66902e fix: Fix typos (#773) 2023-01-09 01:43:51 +01:00
LambdaClass
ca3372909a feat(cli): add more convenient SocketAddr argument parsing (#757) 2023-01-07 02:28:07 +02:00
Georgios Konstantopoulos
fe5e3bd0c8 feat(node): allow config'ing trusted nodes from cli (#728) 2023-01-05 11:54:25 +02:00
Georgios Konstantopoulos
e069248e78 feat: Stage Tool Execution Stage (#723)
* feat(stage-tool): exec stage

* fix(stage-tool): commit for the full range

* feat: skip unwinding
2023-01-04 23:40:24 +02:00
Georgios Konstantopoulos
759ba39311 feat: Stage tool (#716)
* feat: `reth stage` command

* refactor(bin): move init utils to separate file

* feat(bin): scaffold stage command for one stage

* fix: correctly set from/to for stage range

* fix(stage-tool): add unwind before execute to re-exec

otherwise we're double executing stuff

* fix(stage-tool): use max commit threshold avail

* chore: rm unused vars

* fix(genesis-init): take a write tx only if needed

this avoids blocking by accident if we took a write tx expecting
that init_genesis would immediately return the hash

* feat(stage-tool): add bodies stage

Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
2023-01-04 21:53:27 +02:00
Roman Krasiuk
973ea48e03 feat(cli): p2p header & body download (#698)
* p2p cli scaffolding

* refactor to fetch client

* body & header download

* p2p trusted opts

* add retries

* notify on retry

* clippy

* display err
2023-01-04 21:33:08 +02:00
Roman Krasiuk
ec88f1deef feat(sync): standardize stage control flow checks (#681)
* feat(sync): standardize stage control flow checks

* fix input parameter for test_eth_chain

* clean up & put behind macro

* Update crates/stages/src/stage.rs

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>

* address comments

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
2023-01-04 11:03:36 -08:00
Roman Krasiuk
8c413ad0a9 trace(download): failed requests (#715) 2023-01-04 19:55:59 +01:00
Roman Krasiuk
c60495df7e feat(sync): update sync state within pipeline (#697)
* feat(sync): update sync state within pipeline

* address pr comments

* fix comment
2023-01-04 11:25:40 +02:00
joshieDo
6407b5087e chore: use B160, B256 and U256 coming from revm and ruint (#676)
* use B256, B160 and U256 from revm

* fix U256 from_str

* use U256::ZERO

* use temporary commit for revm and interpreter

* more U256::ZERO

* more changes for revm/ruint types

* clippy

* change revm and revm-interpreter repo

* remove H160 wrap

* minor cleanup

* remove unused

* fix MIN_PROTOCOL_BASE_FEE
2023-01-04 11:11:48 +02:00
Roman Krasiuk
93b6ce597a test(chain): add shanghai forkspecs (#700) 2023-01-03 17:33:55 +01:00
Matthias Seitz
13441ff299 style: rm redundant Pipeline::new (#682) 2023-01-02 14:58:31 +01:00
Roman Krasiuk
cb6ddfcc43 feat(sync): total difficulty stage (#665)
* feat(sync): total difficulty stage

* linter

* rm commented log

* patch current td in headers tests
2023-01-01 19:03:25 +02:00
LambdaClass
efac887e30 chore: add serde feature to network crate (#653)
* Add serde feature and support for PeersConfig

* Add Duration fields and Weights

* Add serde for ConnectionInfo field
2023-01-01 18:27:55 +02:00
Sanket Shanbhag
20847845e2 feat: raise fd limit of the binary (#668)
* raise fd limit of the binary

* Remove tracing and return error

* Ignore errors
2023-01-01 12:49:00 +01:00
GeemoCandama
f5ae970e63 feat(cli): add --disable-discovery (#597)
* redo add disable_discovery cli flag

* incorporate option into discovery test

* smol touch up

* rustmft

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2022-12-30 10:56:59 +01:00
mempirate
b5d8b6d4dd feat(node): print peer ID and addr on startup (#655)
* feat(node): print peer ID and addr on startup

* fix(node): print full PeerId on startup
2022-12-29 22:31:39 +01:00
Tomás
76e76bb651 feat: add trusted nodes configuration (#569)
* Add preferred nodes to config

* Add preferred nodes on boot

* Add flag in config for trusted only mode

* Add preferred nodes configuration to config

* Fix comment

* Add preferred nodes to config file

* Rename preferred_nodes to trusted_nodes

* Change preferred to trusted

I renamed preferred_nodes to trusted_nodes in various places.
Seems I missed quite a bit of them.

* Pull trusted_only from config

* Rename DiscoveryConfig to PeersConfig

* Fix last commit

Now actually renamed DiscoveryConfig

* Rename trusted_only to connect_trusted_nodes_only

* Add helper function

* Use HashSet for boot_nodes and trusted_nodes

* Change trusted nodes functions in ConfigBuilder

* Move trusted peers from discv4 to network config

* Add trusted nodes to peers on Manager creation

* Use NodeRecord in trusted_nodes config

* Fix comment

* Move trusted_nodes config to PeersConfig

* Add trusted nodes directly to peers

* Move network_config to Config impl

* Move start_network to NetworkConfig impl
2022-12-28 21:48:11 +01:00
Andrew Kirillov
d4d8a8c882 Moves code walkthrough book chapters to docs (#629)
* replaced template blocks with code blocks in stages chapter

* replaced template blocks with code blocks in network chapter

* moved book sections to docs

* fix indentation in recover_signer codeblock

* remove unnecessary TODO comment in network.md
2022-12-28 10:24:39 +01:00
Andrew Kirillov
a51fa4fd63 docs(book): start book chapter for network crate (#445)
* WIP FOR DRAFT PR

* WIP draft, walking through usage in pipeline

* diving deeper into instantiation of NetworkHandle & FetchClient

* WIP network management task & eth requests task done (ish)

* address pr comments: networkmanager as standalone task, networkconfig as main entrypoint for setup

* complete draft of the  crate docs

* restructured, starts w/ expl of

* added more snippets/anchors

* using ignore flag on code blocks, brief explanation of  struct

* typos addressed
2022-12-27 14:53:15 -08:00
Roman Krasiuk
663efa8d2a feat(metrics): Metrics derive macro (#592)
* feat(metrics): `Metrics` derive macro

* rename metrics to metrics-derive

* use fully qualified fmt path

* metric vec with capacity

* favor metrics over simple scope attr, simplify code

* pull metric description from doc comment

* rm debug log

* add more docs and sample usage

* link to metrics macros

* add tests for metrics derive macro

* clippy

* simplify path comparison

* cleanup

* remove unused dep

* rename stage metrics
2022-12-26 14:27:24 -08:00
rakita
d2b4081849 feat: Enable ExecutionStage (#622) 2022-12-27 00:09:04 +02:00
rakita
bfe2fd6221 ci: add eth chain test. Set prevrandao after merge (#621)
* Small changes

* feat: Add eth chain test to ci. Set prevrandao after merge

* Update .github/workflows/ci.yml

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>

* move env

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
2022-12-26 22:55:46 +01:00
Bjerg
ba585cf7d9 fix: do not lowercase table arg in db list (#606) 2022-12-25 22:52:39 +02:00
rakita
19a618e3a4 fix(db): Dont compress DupSort SubKey (#594)
* bug(db): Dont compress DupSort SubKey

* unwrap or default config, Added notes

* fmt empty lines
2022-12-25 01:13:03 +01:00
rakita
284391c181 test(execution): chain test state check, execution bug fixes/upgrades (#472)
* temp: header stage backoff stand-in

* feat(execution): Check chain post state, fix StateProviderLatest and evm return

* Disable receipt merkle tree check

* update and merge

* Fix storage double values in dup table

* fmt

* Update bin/reth/src/test_eth_chain/runner.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* Enable receipt root check after byzantium

* Receipt inner rlp without header for proof root

* some cleanup nits

* nit

Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-12-23 18:42:19 +01:00
Bjerg
562e895f21 ci: unused dependencies sanity check (#590)
* ci: add unused deps sanity check

* ci: fix unused deps issue template title

* ci: rename udeps job

* chore: formatting

* chore: make `cargo-udeps` ignore `aquamarine`

* deps: resolve unused deps

* ci: check every feature and target in udeps job
2022-12-23 13:19:50 +01:00
Mariano A. Nicolini
b12939db47 feat: add stagedsync headers metrics (#498)
* add dockerfile for reth

* Add docker compose for prometheus

* Add some metrics

* Add p2p connection errors metric

* Add dependency caching for dockerfile

This reduces image build times by ~50% after the first one.

Uses cargo-chef inside the image.
More info in: https://morioh.com/p/987a2bda4526

* Add --metrics flag to docker-compose config file

* add Cargo.lock

* Move docker-compose.yml to docker directory

* Apply formatting

* Remove docker folder

* Remove .dockerignore file

* Add 'reth' prefix to metric names

* Add headers errors and request time metrics

* Modularize metrics exporter functionality and describe metrics

* Format files

* Add metrics documentation in metrics.md

* Fix metrics doc title

* Commit changes after rebase

* Solve conflict

* Modularize metrics describers

* Add stages_metrics_describer

* Rearrange header error metrics

* Add update_headers_metrics function

* Add one-line docs to describers

* Remove commented line

* Refactor metrics describer

* Update metrics doc

* Fix import

* Add header metrics struct

* add new metrics format in the headers execute method

* Add default implementation for HeaderMetrics

* Fix typo

* Fix another typo

* Fix more typos

* Move new HeaderMetrics meathod to default

* Solve conflicts

* Fix test

Co-authored-by: Tomás <tomas.gruner@lambdaclass.com>
2022-12-22 15:45:57 +01:00
Genysys
0b1b5368e6 chore: Rename BlockLocked to SealedBlock (#573)
* chore: Rename BlockLocked to SealedBlock

* chore: fmt

Co-authored-by: Genysys <112424909+samtvlabs@users.noreply.github.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-12-22 14:45:36 +02:00
Bjerg
6f6c4f61e0 refactor: rename EthConsensus (#572)
Closes #566
2022-12-22 12:05:49 +01:00
Roman Krasiuk
276be27310 chore(sync): rename senders stage (#554) 2022-12-21 05:34:18 -08:00
Tomás
2dc5b80ef0 feat: verbose flag (#541) 2022-12-20 18:41:04 +01:00
Bjerg
82cd84eca7 test: fix emits_bodies_in_order test (#534)
* feat(test-utils): make body tx count configurable

* test: fix `emits_bodies_in_order` test
2022-12-20 01:29:04 +01:00