Commit Graph

9362 Commits

Author SHA1 Message Date
c13898e199 ci: make codecov less noisy (#193) 2022-11-11 07:45:43 +01:00
1db9a5aed4 ci: NEXTEST_EXPERIMENTAL_FILTER_EXPR env var no longer required (#188) 2022-11-10 22:30:19 +01:00
c43d752929 feat(net): more request handling (#186)
* feat(net): more request handling

* rm uneccessary checks

* rm box
2022-11-10 21:24:47 +01:00
dd4878c0e3 fix: remove broken client feature for pubsub (#189) 2022-11-10 20:12:32 +01:00
a77018fe03 chore: bump git deps in Cargo.lock (#187) 2022-11-10 19:57:11 +01:00
fd6a7cb628 WIP: feat: ipc support (#144)
* feat: ipc support

* copy futures

* feat: port ipc implementation

* cleanup

* add test

* fix clippy

* add request test
2022-11-10 19:47:00 +01:00
fc9b6f35e7 feat(test): add TestApi type (#183) 2022-11-10 13:17:36 -05:00
d4aabe4751 fix(eth-wire): fix usage of sink API in P2PStream (#184)
* fix(eth-wire): fix usage of sink API in P2PStream

* add error checks for sink buffer inserts
2022-11-09 19:06:27 -05:00
9e35d58b05 feat(primitive): Signer recovery (#179)
* feat(consensus): Signer recovery and tx validation

* Signature hash and use seckp256k1 over k256

* use deref_more for transactions

* cleanup and fix for eip1559 hash

* fix hash calculation on decoding
2022-11-09 18:11:32 +01:00
836ad6aaee feat(net): add request/response message types (#176)
* feat(net): add request/response message types

* chore: rustfmt
2022-11-08 17:52:17 +01:00
b9700791c8 feat(db): transaction value type (#175) 2022-11-08 16:56:13 +01:00
7ecbe01741 feat(provider): Add StorageProvider impl, table changes (#172)
* feat(provider): Add StorageProvider impl, table changes

* unwind header numbers by walker (#174)

* readme, fmt

* fix tests

* Update crates/interfaces/src/provider/db_provider/storage.rs

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>

* Update crates/interfaces/src/provider/db_provider/storage.rs

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
2022-11-08 15:55:45 +01:00
1408309b74 feat(net): add active session type (#169)
* refactor(net): unify capability types

* refactor(net): unify capability types

* feat(net): add active session type
2022-11-07 23:15:38 +01:00
86ffb4756d feat(bin): simple reth node command (#158)
* feat(bin): simple reth node command

* use silent flag

* small chore
2022-11-07 12:10:09 -08:00
caad026c70 refactor: rename HeaderLocked to SealedHeader (#173) 2022-11-07 21:06:53 +01:00
099d3cee9a meta(dep): ignore c files (#171) 2022-11-07 19:59:46 +01:00
5721262740 refactor(net): unify capability types (#168)
* refactor(net): unify capability types

* refactor(net): unify capability types
2022-11-07 18:04:17 +01:00
e870a4ce13 refactor(txpool): use tx hash for on new block update (#170)
* refactor(txpool): use tx hash for updates

* chore: rustfmt
2022-11-07 14:50:36 +01:00
b7cdfbf4f9 feat(net): network scaffolding (#110)
* feat(net): network scaffolding
2022-11-07 09:27:08 +01:00
9c40f8265b test(sync): headers stage test runner (#163)
* refactor headers stage tests

* inline unwind util functions
2022-11-04 08:15:34 -07:00
ca2b5ef7c7 style(p2p): simplify pinger (#165)
* style(p2p): simplify pinger

* update docs
2022-11-04 15:01:50 +01:00
5cb2c6e615 style(p2p): get rid of expects (#164)
* style(p2p): get rid of expects

* test: add test
2022-11-04 14:51:13 +01:00
f6d3a49d28 feat(sync): stage tx index (#149)
* init

* feat(sync): tx index stage

* create test runner

* finish tests

* clippy

* cleanup & docs

* add more comments

* revert headers test refactor

* rm unused function
2022-11-04 03:28:18 -07:00
9b74d7d39d feat(eth-wire): use UnauthedEthStream to create EthStream (#162)
* Create UnauthedEthStream

* remove authed flag from EthStream

* encode and decode in status handshake

 * update test to assert the proper status is communicated

* cargo fmt

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2022-11-04 08:36:40 +01:00
43a0a2b160 feat(eth-wire): return Hello on handshake (#161)
* feat(eth-wire): return Hello on handshake

* update P2PStream docs based on new auth design

* cargo fmt

* make clippy happy
2022-11-04 08:14:41 +01:00
ccdf2ffa92 hotfix(eth-wire): loosen lints temporarily 2022-11-03 12:43:19 -07:00
699db03187 feat(db): db error handling and Provider scaffolding (#154)
* feat(db): db error handling and Provider scaffolding
* remove one map_err
* fix after merge
2022-11-03 17:00:58 +01:00
bff27a4154 fix(rpc): type encoding (#155)
* fix(rpc): type encoding

* copy bytes from ethers
2022-11-03 03:04:09 -07:00
becceb2802 fix(db): add traits Encode/Decode for keys and Compress/Uncompress for values (#151)
* add UncompressedUint

* add more UncompressedUint keys

* add docs

* split key/value to encode/decode and compress/uncompress traits

* reveert into

* clippy

* rm whitespaces

* remove TODO

* Remove scale encode/decode traits

* decompress

* clippy

Co-authored-by: rakita <dragan0rakita@gmail.com>
2022-11-03 00:02:19 -07:00
3c72a12aff feat(eth-wire): Implement p2p stream (#114)
* wip: p2pstream

* add comment for handshake timeout

* temp allow some lint violations

* ignore unused_variables

* start of ping task

 * TODO: make it compile
 * TODO: test ping/pong/disconnect state machine
 * TODO: send subprotocol messages to stream
 * TODO: encode non-hello p2p messages as snappy encoding without using
   an encoder
 * TODO: create test comparing encoder to hand-written snappy encoding
   for ping, pong, disconnect messages

* implement message handling in stream poll method

 * restricts S to be Stream+Sink for P2PStream to implement Stream
 * start of a poll-based refactor

* impl Stream and Sink for P2PStream

 * add tests
 * TODO: make stream/sink types compatible
 * TODO: handshake message ids
 * TODO: inner poll fn
 * TODO: pinger interval
 * TODO: ethstream test
 * TODO: passthrough test

* create pingers and test

* impl working timeout interval pinger

 * it should be much easier to poll for pings and detect timeouts now

* use pinger in p2p stream

 * change item produced by stream so it's compatible with EthStream
   * add note on pros/cons
 * shorten message sends in stream

* improve errors and remove redundant methods

* fix handshake

* debugging printlns

* fix encoding and decoding

 * switch to snappy formatting for non-hello p2p messages

* cargo fmt

* perform handshake in ethstream over p2pstream test

 * remove check for `Hello` messages outside of the handshake because
   `P2PStream`s should assume messages sent in the sink are subprotocol
   messages, not `p2p` messages.

* impl From<EthVersion> for CapabilityMessage

* remove printlns

* add total_message method to EthVersion

* decode Hello in handshake

 * disallow protocol versions other than v5

* Integrate snappy and implement message size limits

* document constants, move stream definition

* fix missing hello message id

* implement shared capabilities

 * todo: test shared capabilities
 * todo: determine how / when / why to support multiple capabilities
 * removes obsolete authed and offset fields

* add sink api TODOs

* remove les

 * should add protocols when necessary rather than name unsupported
   protocols

* fix snappy compression length

 * add test for p2pstream over a passthrough codec which tests that
   peers agree on a single shared capability

* fix some clippy lints
2022-11-03 00:01:54 -07:00
c232a72338 test(stage): headers linear downloader (#143)
* headers stage linear test

* cleanup unwind
2022-11-02 17:28:44 -07:00
ac2f3fcd8a feat: Consensus crate and verification functions. (#152)
* wip executor

* wip

* Cleanup added some checks and structure to executor

* adding additional block/header checks

* add basefee calculation and check

* some cleanup

* Sanity check test

* Test for sanity check

* move verification to consensus crate

* cleanup

* Better Error handling
2022-11-02 12:59:51 +01:00
1ea98d40cf chore: remove mdbx c files from github lang stat (#153) 2022-11-01 14:24:03 +01:00
ee61be9d07 chore(db): add docs and doctest to tables (#150)
* add table docs

* add doctest to AccountHistory table

* add docs to placeholder types

* change from outer to docs

* no camelcase type
2022-10-28 08:53:57 -07:00
4a22936898 feat(rlp): add encode for &str (#147)
* feat(rlp): add encode for &str

* add test
2022-10-28 11:54:19 +02:00
30ef6bff21 feat(rlp): add smol-str feature (#146) 2022-10-28 11:54:01 +02:00
580c8eb1e4 chore(sync): db integrity error (#148)
* db integrity error

* rm unused import
2022-10-28 01:29:57 -07:00
ee99c29c8f feat(interfaces): add ShardedKey (#142)
* add ShardedKey

* Update crates/interfaces/src/db/models/sharded_key.rs

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

Co-authored-by: rakita <rakita@users.noreply.github.com>
2022-10-27 20:46:22 -07:00
6c0e2753dd test: add mock discovery testing (#139) 2022-10-26 14:33:13 +02:00
61b8829bdf feat(sync): headers stage (#126)
* port headers stage

* clean up, utils & tests

* more tests

* unwind cleanup & tests

* remove unused rand crate
2022-10-25 16:50:01 -07:00
ce64fefd78 feat(net): add discv4 crate (#113)
* port kad

* feat: port kad bucket

* feat: add discv4

* chore: rustfmt

* cargo update

* just reuse discv5 table

* test: add rlp tests

* message encoding

* feat: impl codec roundtrip testing

* more work in message handling

* implement ping

* feat: impl commands

* cleanup

* more cleanup

* trim config

* more docs

* feat: implement recursive lookup

* docs

* cleanup config

* feat: implement update stream

* chore: config cleanup

* docs: add crate docs

* feat: more testing

* fix deny

* clarify ring

* docs: more docs

* use discv5 master

* docs: address review and add comments

* update readme

* rustmft

* chore(clippy): make clippy happy
2022-10-25 14:23:24 +02:00
2b67e75c05 fix: use correct hash function (#138) 2022-10-25 05:12:45 -07:00
ee41dfac35 feat(db): set-upChangeSet tables (#135)
* add AccountChangeSet

* add StorageChangeSet

* add tests to TxNumberAddress

* minor fixes
2022-10-25 03:47:45 -07:00
8ac5214fc6 chore(libmbx): fmt, clippy and deny list updated (#134)
* feat(db): Add mdbx-rs apache licenced code 55e234

* feat(db): replace mdbx with reth-mdbx, metadata changes

* chore(db): bump mdbx-sys to 0.12.1

* remove libmdbx from cargo deny

* cargo fmt

* cargo clippy

* one more clippy error
2022-10-25 03:18:51 -07:00
5c55c57c5e feat(db): switch to reth-libmdbx-rs, bump reth-mdbx-sys to 0.12.1 (#133)
* feat(db): Add mdbx-rs apache licenced code 55e234

* feat(db): replace mdbx with reth-mdbx, metadata changes

* chore(db): bump mdbx-sys to 0.12.1
2022-10-25 02:50:02 -07:00
4d2e67e9f5 feat(db): Add mdbx-rs apache licenced code 55e234 (#132) 2022-10-25 11:41:04 +02:00
1fe0affa4b chore(db): comment for cursor, cleanup unneeded fn (#131) 2022-10-25 10:34:30 +02:00
2a8189d7c9 chore(db): Add tests and fuzz target to BlockNumHash (#130)
* add tests and fuzz target for BlockNumHash

* use block 1 for test_block_num_hash

* new clippy stds

* fmt
2022-10-25 01:23:10 -07:00
0998fc3eb7 chore: bump tiny-keccak (#127) 2022-10-24 17:06:25 -07:00
77ea53bb6e chore: reexport hex (#128) 2022-10-24 17:06:12 -07:00