Commit Graph

1131 Commits

Author SHA1 Message Date
115e623ae6 Ability to (de)serialize NetworkConfigBuilder (#897) 2023-01-18 11:17:43 +01:00
e9792c1b46 fix: compilation errors due to api breakages
follow up from https://github.com/paradigmxyz/reth/pull/888 merge conflict fix failure
2023-01-17 18:19:00 -08:00
37ca7e0b33 feat: add --nat flag to reth node (#888)
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2023-01-17 17:53:15 -08:00
74fb28932f fix(node): insert genesis on node startup (#909) 2023-01-17 22:34:24 +01:00
f9de425ad8 refactor: unify all chains confs (#747)
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
2023-01-17 07:47:34 -08:00
06be083335 Fix build (#899) 2023-01-16 13:48:25 -08:00
7795bf5392 Add a --bootnodes flag for reth node (#867) 2023-01-16 11:04:07 -08:00
9482c551c5 feat: add a reverse db walker (#841) 2023-01-16 10:27:22 -08:00
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
02632cd888 feat: show possible values for reth stage (#872) 2023-01-13 06:01:59 -08:00
707e488d2c feat: improve eth test runner (#868) 2023-01-13 14:24:18 +01:00
c4bafe809b fix: clippy warnings, or_fun_call and unnecessary_lazy_evaluations (#846) 2023-01-13 11:10:02 +01:00
ba3048ceb0 refactor: add network-api crate (#838) 2023-01-12 19:39:44 -08:00
20ee1bb1c9 refactor: move cli trace helpers to reth-tracing (#820) 2023-01-11 10:20:37 -08:00
531dbdbd29 fix: allow partial configs (#814) 2023-01-11 13:49:56 +01:00
2e95ed4b6e fix: make config serialize as toml (#811) 2023-01-11 13:36:41 +01:00
2e87017686 feat(cli): more reasonable log output (#784) 2023-01-11 11:53:33 +01:00
593a94e426 feat: add drop subcommand for db command (#801) 2023-01-10 22:55:05 +01:00
3bd1458df6 Rename cursor functions (#787) 2023-01-10 20:08:30 +01:00
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
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
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
d296946bf1 add unknown fork spec (#774) 2023-01-09 09:07:47 +01:00
31cb66902e fix: Fix typos (#773) 2023-01-09 01:43:51 +01:00
ca3372909a feat(cli): add more convenient SocketAddr argument parsing (#757) 2023-01-07 02:28:07 +02:00
fe5e3bd0c8 feat(node): allow config'ing trusted nodes from cli (#728) 2023-01-05 11:54:25 +02:00
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
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
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
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
8c413ad0a9 trace(download): failed requests (#715) 2023-01-04 19:55:59 +01:00
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
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
93b6ce597a test(chain): add shanghai forkspecs (#700) 2023-01-03 17:33:55 +01:00
13441ff299 style: rm redundant Pipeline::new (#682) 2023-01-02 14:58:31 +01:00
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
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
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
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
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
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
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
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
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
d2b4081849 feat: Enable ExecutionStage (#622) 2022-12-27 00:09:04 +02:00
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
ba585cf7d9 fix: do not lowercase table arg in db list (#606) 2022-12-25 22:52:39 +02:00
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
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
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