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
1bbf9d2d82
chore: clarify ring ( #129 )
2022-10-24 17:05:56 -07:00
3c5b235455
feat(db): Add DupSort PlainStorageState table ( #121 )
...
* add dupsort table and test
* use env.update instead
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
2022-10-24 11:23:28 -07:00
4eca851429
feat(interface): implicit trait bound for DB cursors ( #122 )
...
* feat(interface): implicit trait bound for DB cursors
* test cursor
* walking fixed for RO
* impl for Walker for DupCursor
2022-10-24 11:20:14 -07:00
a3185f9997
docs: add workflow links in readme
2022-10-24 16:37:23 +02:00
e50eb65078
ci: add cargo deny action ( #125 )
...
* ci: add `cargo-deny` workflow
* ci: allow advisory failures in deny workflow
* ci: only run deny workflow if `Cargo.lock` changed
* chore: driveby formatting of readme
2022-10-24 16:34:37 +02:00
eb40bd9eaf
feat: add cargo deny ( #112 )
...
* feat: add cargo deny
* cleanup deny
2022-10-24 06:52:22 -07:00
65247ef203
feat: metrics ( #92 )
...
* feat(stages): `stage.progress` metric
* docs: metrics
2022-10-24 15:16:45 +02:00
8bc8bd6820
feat: add IntegerList type Elias-Fano ( #111 )
...
* add elias
* docs: should not be empty
* change models doc
* add arbitrary feature
* add simple test
* add test-utils to primitives
* cfg arbitrary
2022-10-24 06:14:59 -07:00
6d3ebe5096
ci: run coverage in parallel ( #124 )
2022-10-24 06:14:38 -07:00
2ace922ef8
chore: make codecov informational for now ( #123 )
2022-10-24 06:12:20 -07:00
15bd88e637
headers(part2) - feat: add Downloader trait and test utils ( #118 )
...
* feat(interfaces): implement header client traits
* feat: add downloader trait implementer
* feat: use explicit error type instead of ok(false)
* feat: add constructor to HeaderLocked
* test: scaffold mock consensus, downloader and headersclient helpers
* test: implement test consensus
* test: implement test headers client
* refactor: cleanup download headers
* chore: fix lint
* s/test_utils/test_helpers
* headers(part 3) feat: implement Linear downloader (#119 )
* feat: add headers downloaders crate
* feat: more scaffolding
* interfaces: generalize retryable erros
* feat: implement linear downloader
* fix linear downloader tests & add builder
* extend & reverse
* feat: linear downloader generics behind arc and reversed return order (#120 )
* put client & consensus behind arc and return headers in rev
* cleanup
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com >
* extract test_utils
* cargo fmt
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com >
2022-10-24 04:56:43 -07:00
a4e505132c
headers(part1) feat(interfaces): introduce implicit trait bounds ( #117 )
...
* feat(ifaces): modify DB GAT to have implicit bounds
https://sabrinajewson.org/blog/the-better-alternative-to-lifetime-gats\#the-better-gats
* test(ifaces): impl new trait for mock
* feat(ifaces): impl db container
we use that downstream to avoid consuming the db transactions
when committing a stage
* fix(test): explicitly define lifetime
* test: ensure can spawn
* test: pls review
* chore: lints/warnings
* feat(db): impl the new gats
* test(db): try to make real db work with gats like in stages
* test(db): make Stage trait take DBContainer
otherwise we cannot call db.commit()
gst
* feat(stages): impl new traits
* chore(db): cleanup tests
* chore: remove unused imports
2022-10-23 23:10:59 -07:00
a123a2b6fd
chore: add link to codecov on badge ( #116 )
2022-10-21 20:11:05 +02:00
8af8c89018
feat: support finalized and safe variants ( #115 )
2022-10-21 20:02:06 +02:00
5cbbf2b4a3
chore: add coverage badge
2022-10-21 19:59:09 +02:00
2e6b18a154
wip: feat(txpool): add on block update ( #69 )
...
* feat(txpool): add on new block handler
* feat(txpool): work on update routine
* feat(txpool): start update process
* feat: implement update loop
2022-10-20 08:34:04 -07:00
483bcdf9ab
feat(db): Database Abstraction ( #101 )
...
* database tx traits
* wip build passes
* Db and tx results
* nightly and db GAT
* Impl tx, wip cursor
* Move Decode to Table Key, working cursor trait
* wip dupsort
* build all Cursor abstraction
* cleanup
* wip cleanup
* old stages
* codecs moved o interface,stages wip
* resolve db ref, it builds
* Add tx commit after execution
* fmt
* Remove sync send restriction
* Add missing rw cursor functions
* Cleanup, added missing cursor fn. rust toolchain
* fmt
* add nightly to ci
* deny dead_code, remove unwrap
* rm printfn, stages fix, bench fix
2022-10-20 08:32:13 -07:00
e9945b565a
chore: reexport sha3 from primitives ( #109 )
...
* chore: reexport sha3 from primitives
* feat: add keccak256
* replace sha3 with tinykeccak
2022-10-20 16:43:29 +02:00
4536e09c99
feat(primitives): use with_capacity for sighash ( #108 )
2022-10-20 10:26:08 +02:00
c277015f5c
feat(eth): add remaining eth protocol message types ( #82 )
...
* chore: port over remaining types from ethp2p
https://github.com/Rjected/ethp2p/
* replace fastrlp with reth_rlp
* use correct type for tx messages
* encoding / decoding still todo
* derive Default for AccessList
* export receipts
* also add Hash to more types
* fix receipts tests
* remove unused receipts test imports
* add convenience methods on transaction
* add block body
* move blockbody to eth-wire, uncomment wire type
* uncomment rest of messages
* TODO: refactor tests and make tests pass
* use U128 instead of Uint for td
* expose wire types
* use reth_eth_wire instead of ethp2p
* expose Signature
* refactor pooled transaction tests
* fix hash calculation
* do not hash the entire buffer
* uncomment block test and make clippy happy
* module-level documentation for message types
* apply a clippy fix
* cargo fmt
* actually make clippy happy
* use H256 instead of [u8; 32]
* use partition in split_transaction_by_hashes instead of peekable
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com >
2022-10-19 23:24:50 -04:00
e7851492b1
feat(txpool): enforce size limits ( #98 )
...
* feat(txpool): enforce size limits
* chore: rustfmt
2022-10-19 17:01:49 -07:00
0ff0ffa7d5
feat(primitives): transaction encoding tests ( #103 )
...
* feat(primitives): transaction encoding tests
* fix encoding and decoding
* remove printlns
* remove obsolete comment
* rename y_parity local variable
* add explicit non-legacy case for signature length
2022-10-19 19:52:26 -04:00
fe84bfb68c
ci: coverage ( #106 )
...
* ci: update action versions
* ci: add coverage job
* ci: require `CODECOV_TOKEN` secret
* ci: collect coverage for entire workspace
* ci: typo
* ci: dedup
* ci: add concurrency control
2022-10-19 14:46:47 -07:00
4298e3aa87
feat(rpc): more rpc scaffolding ( #99 )
...
* feat(rpc): more rpc scaffolding
* use Into<String>
* rm unused error
2022-10-19 22:12:53 +02:00
630baf5d70
feat(db): fuzzing & benchmark ( #86 )
...
* fuzz with test-fuzz
* move fuzzing to db/codecs
* add criterion & iai
* print encoded size sum on criterion benchmark
* fix BlockNumHash encode
* add gh action for benchmarks
* don't sum results
* test ci values
* Revert "test ci values"
This reverts commit cc47fd80538b2c0073592f824c2693c927021f8f.
* specify criterion version
* add docs
* remove benchmark job
2022-10-19 13:08:07 -07:00
7e26ba5090
feat(primitives): transaction encoding and decoding ( #102 )
...
* feat(core): transaction encoding and decoding
* cargo fmt
* remove printlns
* fix tx conversion
2022-10-19 13:31:41 -04:00
f672781bfc
feat(api): add StorageProvider trait ( #97 )
2022-10-19 10:56:54 +02:00
1e7d3ae57e
feat(txpool): keep track of pool size ( #95 )
...
* feat(txpool): add PoolStatus Api
* feat(txpool): track sizes
* feat(txpool): add size tracking
* cleanup
2022-10-18 23:47:20 +02:00
0fc446c5a2
feat(primitives): signature length and encoding ( #93 )
...
* feat(primitives): signature length and encoding
* add signature encoding and length methods for non-eip155 and eip-155
* remove TODO
2022-10-18 13:07:59 -07:00
bd18188be9
feat: add block provider trait ( #90 )
...
* feat: add block provider trait
* rustmft
* rename BlockInfo to ChainInfo
2022-10-18 13:04:04 -07:00
2009b764c0
feat(txpool): add PoolStatus Api ( #91 )
2022-10-18 12:56:53 -07:00
522a4e689e
refactor(txpool): simplify is local ( #87 )
2022-10-17 11:43:27 -07:00
6bc09809f3
feat(txpool): enforce account tx capacity ( #88 )
2022-10-17 11:42:51 -07:00
9056b8cbf2
feat(primitives): header encoding & hash ( #89 )
...
* header encoding & hash
* remove newline
* consistent extra_data conversion
* clean up decoding test
2022-10-17 10:37:15 -07:00
edd0e852f2
feat(txpool): introduce transaction origin ( #85 )
2022-10-17 07:14:18 -07:00
83a9b31911
feat(txpool): add no parked ancestors condition ( #84 )
...
* feat(txpool): add no parked ancestors condition
* chore: rustfmt
2022-10-17 07:13:40 -07:00
2e19f94048
feat: impl rlp for receipt ( #83 )
...
* feat: impl rlp for receipt
* fix: change to bloom
* chore: rustfmt
2022-10-17 07:13:02 -07:00
063b444792
feat(db): codec encoding/decoding ( #51 )
...
* wip
* add table macro
* add simple put get test with Address
* add Env.view and Env.update
* docs
* slightly change the test
* add initial table initialization and placeholders
* lint & some
* replace String with str
* add error.rs
* add docs to encode
* add docs
* clamp
* add source on libmdbx_max_page_size
* add BlockNumer_BlockHash
* add scale
* set header filed to bytes Bytes
* remove unwrap
* restrict scale to chosen types
* into bytes
* add postcard
* changed to BlockNumHash
* add proc_macro_attribute codecs
* fix feature flagging
* set a version for postcard
* cleanup
* seal ScaleOnly
* remove unnecessary dependencies
* properly encode/decode blocknumhash
* change Account codec to scale
* add missing feature to scale
* add codec to a couple more types
* silence clippy
* add docs about table encoding
* move and add reth-codecs
* clippy
* make proc-macro visible
* add README.md
2022-10-17 01:04:57 -07:00
8009d997c0
Implement ETH P2P ( #81 )
...
* refactor: move things to types
* feat(ethwire): bring in message type from ethp2p
30c11138d5/src/message.rs
* feat(ethwire): add eth-stream with Stream/Sink impls
* feat(ethwire): make Sink error an EthStreamError
* feat(ecies): expose util module
* add more deps
* feat: add broadcast newblockhashes
* fix: rlp serialize with message-id first
* chore: cleanup doc
* wip: test eth connection
* bump cargo lock
* feat: add rlp codec and get stream tests working
* fix: convert RlpCodec to PassthroughCodec
we were rlp encoding twice
* Revert "fix: convert RlpCodec to PassthroughCodec"
This reverts commit 6e6e0a58112c14d7ffba62dc83f9747ddc280641.
This does not handle framing, which would fail decoding if a partial
write happened to the socket.
* add tracing
* refactor: add handshake error
* feat(ethwire): add status handshake
* test(ethwire): handshake works
* refactor: expose EthStream::new
* chore: clippy lints
* fix: get rid of rlp codec
we can instead use LengthLimitedCodec from Tokio IO, which we re-export
as PassthroughCodec
* fix(eth): add handshake + msg error checks
1. 10MB message lengths
2. Same Genesis, Version, Chain on Status Handshake
* chore: ignore result_large_err
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de >
2022-10-16 20:10:25 -07:00