Georgios Konstantopoulos
4d718bbf33
s/foundry-rs/paradigmxyz
2022-12-07 00:00:45 -08:00
Roman Krasiuk
449321ddc4
refactor(db): separate transaction indexes from block body ( #326 )
2022-12-06 18:02:04 -08:00
joshieDo
a0a40a9c3d
chore(db): change table macro tokens ( #343 )
2022-12-06 18:02:04 -08:00
Roman Krasiuk
9628d03871
feat(sync): headers commit threshold ( #296 )
...
* headers stream init
* fix tests
* return header if available regardless of control flow
* proper stream termination & docs
* upd headers stage to consume stream
* adjust response validation for stream
* use cursor.insert for headers
* wrap poll_next in a loop to bypass poking waker
* fix typo
* fix last td lookup
* Apply suggestions from code review
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
* misc
* remove waker ref
* dedup response handling logic
* clippy
* add docs to poll
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
2022-12-06 18:02:04 -08:00
rakita
a68cb3f357
feat(stage): Add execution stage ( #287 )
...
* Execution stage
* StorageProviderRef. cleanup, fmt/clippy
* block inclusion
* insert blocks for execution stage
* Sanity test for execution stage
* nits
* Update crates/stages/src/stages/execution.rs
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
* Update crates/stages/Cargo.toml
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
* Update crates/stages/src/stages/execution.rs
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
* Update crates/stages/src/stages/execution.rs
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
* feat(execution) Execution change diff. (#323 )
* Insert to execution changediffs
* progress on exec stage unwind
* wip
* Remove tables:BlockBody from execution stage
* unwind passing
* Nits cleanup and refactoring
* DatabaseIntegrity errors
* KECCAK_EMPTY acc to None
* Update crates/interfaces/src/db/tables.rs
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
* Update crates/interfaces/src/provider/block.rs
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
* Update crates/stages/src/stages/execution.rs
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
* nits
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
2022-12-06 18:02:04 -08:00
joshieDo
13df80c1d1
chore(codecs): contain [Struct]Flags in a mod and import what's necessary ( #329 )
...
* contain StructFlags in a mod with its imports
* update code generation test
2022-12-06 18:02:04 -08:00
Roman Krasiuk
c7ec4512c8
feat(db): cursor insert ( #310 )
2022-12-01 19:31:32 -08:00
Matthias Seitz
a0c35f1f48
refactor: replace reverse with HeadersDirection ( #305 )
2022-12-01 17:59:33 +01:00
Matthias Seitz
3355b0c605
test(net): add e2e request body test ( #304 )
...
* test(net): add e2e request body test
* test(net): add e2e request header test
2022-12-01 15:35:14 +01:00
Matthias Seitz
d0e9e6fe80
feat: add header by number provider fn ( #299 )
...
* feat: add header by number provider fn
* Update crates/interfaces/src/provider/block.rs
Co-authored-by: rakita <rakita@users.noreply.github.com >
Co-authored-by: rakita <rakita@users.noreply.github.com >
2022-11-30 14:05:46 +01:00
joshieDo
3efc6ee67e
feat(db): Make TransactionSigned compactable ( #252 )
2022-11-27 23:29:30 -08:00
Matthias Seitz
fd840e1c66
refactor: bodies client API ( #257 )
...
* refactor: bodies client API
* chore: fix errors
2022-11-26 10:04:42 +01:00
Roman Krasiuk
6e7928ab84
feat(sync): stage db helper ( #240 )
...
* feat(sync): stage db helper
* stagedb cont
* merge stage db & db container
* rename test stage db accessor methods
* clippy
* remove legacy test
2022-11-25 07:12:13 -08:00
Matthias Seitz
fb2861f112
feat(net): integrate HeadersClient ( #251 )
...
* refactor: headers client
* chore: rustfmt
* chore(clippy): make clippy happy
* feat(net): integrate HeadersClient
* fix: parse td as U256 with from_little_endian
* conflicts
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
2022-11-25 14:26:43 +01:00
Matthias Seitz
dda8df7341
refactor: headers client ( #249 )
...
* refactor: headers client
* chore: rustfmt
* chore(clippy): make clippy happy
* address comments
* use Error instead
* fix(sync): headers test client & stage tests (#255 )
* headers test client & stage tests
* fix timeout test
* fix import
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com >
2022-11-25 14:00:06 +01:00
Matthias Seitz
8966daad9d
feat(net): reputation system and peer reporting ( #239 )
...
* refactor: move to module
* feat(net): reputation system and peer reporting
* be specific in test
* use saturating sub
2022-11-24 10:14:50 +01:00
Roman Krasiuk
82b37b9bfb
feat(sync): sender recovery stage ( #181 )
...
* feat(sync): sender recovery stage
* execute tests
* more tests & cleanup
* senders cont
* clean up & comments
* clippy
* cleanup
* comments
* put back arbitrary dep
2022-11-23 00:22:17 -08:00
joshieDo
027fc2bbf2
feat(db): derive Compact codec ( #177 )
2022-11-22 20:46:45 -08:00
Bjerg
a523cb7024
feat: finish concurrent body downloader ( #220 )
...
* refactor: remove timeout config from downloader
The timeout should be controlled by the client
implementation.
* feat: downloader request retries
* test: add concurrent body downloader tests
* chore: fmt
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
2022-11-22 21:06:49 +01:00
Roman Krasiuk
4936d467c9
test(sync): stage test suite ( #204 )
...
* test(sync): stage test suite
* cleanup txindex tests
* nit
* start revamping bodies testing
* revamp body testing
* add comments to suite tests
* fmt
* cleanup dup code
* cleanup insert_headers helper fn
* fix tests
* linter
* switch mutex to atomic
* cleanup
* revert
* test: make unwind runner return value instead of channel
* test: make execute runner return value instead of channel
* Revert "test: make execute runner return value instead of channel"
This reverts commit f8608654f2 .
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com >
2022-11-18 17:57:29 -08:00
rakita
09c5c3449e
feat(executor): transaction and receipts verification ( #195 )
...
* transaction verification
* Add providers to interfaces
* add receipt check in executor verify
* Removed receipts, added bloom
* post merge header checks
* fmt clippy
* gas price type removal
* rm leftover
* move consts to contstant.rs
2022-11-16 11:10:36 -08:00
Matthias Seitz
f0388e4032
refactor: move BlockHashOrNumber to primitives ( #203 )
2022-11-15 09:44:07 -08:00
Matthias Seitz
b60ced1de1
feat: add missing message handling ( #200 )
...
* feat: add missing message handling
* refactor: new block message handling
* feat: add events and commands for transaction handling
* more work in transactions
* chore: silence warnings
2022-11-15 10:34:28 +01:00
Bjerg
92a7818512
feat: bodies stage ( #190 )
...
* chore: clean up `.gitignore`
* fix: make RO cursors `Send + Sync`
* feat(wip): bodies stage
* driveby: improve docs
* chore: don't panic if we're the first stage
* chore: use `Vec` for ommers
* feat: error handling in bodies downloader
* chore: remove stale comment
* chore: pascal-case stage id
* refactor: remove unused new fns
* refactor: distinguish downloaders with prefix
* refactor: move downloader errs to own module
* refactor: `stream_bodies` -> `bodies_stream`
* test: fix borked imports in header stage
* test: clean up header tests
* test: add basic body stage tests
* test: add 2 more body stage test skeletons
* test: move generator test utils to own module
* refactor: move proof functions to primitives crate
* feat: add block generator test utils
* test: more body stage tests
* chore: fix typo (`Cannonical*` -> `Canonical`)
* docs: document `bodies_to_download`
* test: more body stage tests
* test: more body stage tests
* refactor: clean up body stage tests a bit
* test: fix broken tests
* refactor: clean up body stage tests
* test: more body stage tests
2022-11-15 08:49:11 +01:00
Matthias Seitz
5ca2cab97f
refactor: move RequestError from network to interfaces p2p ( #197 )
2022-11-13 09:46:38 +01:00
Bjerg
2754315e68
chore: omner -> ommer ( #192 )
...
* chore: omner -> ommer
* chore: missmatch -> mismatch
* chore: other typos
2022-11-11 07:46:09 +01:00
Matthias Seitz
fc9b6f35e7
feat(test): add TestApi type ( #183 )
2022-11-10 13:17:36 -05:00
rakita
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
Roman Krasiuk
b9700791c8
feat(db): transaction value type ( #175 )
2022-11-08 16:56:13 +01:00
rakita
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
Matthias Seitz
caad026c70
refactor: rename HeaderLocked to SealedHeader ( #173 )
2022-11-07 21:06:53 +01:00
Roman Krasiuk
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
rakita
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
joshieDo
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
rakita
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
joshieDo
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
joshieDo
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
Roman Krasiuk
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
joshieDo
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
rakita
1fe0affa4b
chore(db): comment for cursor, cleanup unneeded fn ( #131 )
2022-10-25 10:34:30 +02:00
joshieDo
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
joshieDo
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
rakita
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
joshieDo
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
Georgios Konstantopoulos
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
Georgios Konstantopoulos
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
Matthias Seitz
8af8c89018
feat: support finalized and safe variants ( #115 )
2022-10-21 20:02:06 +02:00
rakita
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
Matthias Seitz
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
Matthias Seitz
f672781bfc
feat(api): add StorageProvider trait ( #97 )
2022-10-19 10:56:54 +02:00