Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solid EvmProvider , alloy dependency version bumped to v0.1.1 #96

Merged
merged 16 commits into from
Jun 26, 2024

Conversation

rkdud007
Copy link
Member

@rkdud007 rkdud007 commented Jun 24, 2024

compatibility with v1 checked with latest commit binary <> hdp-test new fixtures <> hdp-cairo local test

this PR first aimed to rework on EvmProvider from ground up, but for type constraint I decided to switch main account/storage provider logic using alloy::RootProvider. As rpc provider -> evm provider returns alloy type, I couldn't avoid changing relevant itermidiate type definitions that previously just did to_string() in hacky way, now we got almost all of the middle types(including processed types) are define as alloy type.

And bcs RootProvider works solid on latest alloy released version ( v0.1.1), I also couldn't avoid cleaning up dependency versions. Now every allow related dependencies are(except for unstable ones) synced with v0.1.1 defined as features. so this PR also resolving #95

  • New hdp_provider crate works with error handling using thisiserror target to resolve Use thiserror for have error structure #94 partially
  • New EvmProvider works with more than 1k range, as send request to sub provider components to handle up to 1k and loop it again.
  • related to change intermediate type using alloy_type, now aggregate_fn accpets and returns in both U256 type
  • related to change intermediate type Vec<u8> or Bytes, now all the encode, decode accept &[u8], output Vec<u8>
  • related to change intermediate type, decode_rlp_ returning U256 not String

note for review: Rework scope is on hdp_provider. So except for some necessary changes did on hdp_primitives and hdp_core (mentioned above), folder structures, tests are tried to be stay and especially cli did some hot fix same as we need to make sure compatibility & don't want to change too much on other scope rn

@rkdud007 rkdud007 self-assigned this Jun 24, 2024
@rkdud007 rkdud007 added C-provider Codebase to provider implementation debt Tech debt envolved labels Jun 25, 2024
@rkdud007 rkdud007 added this to the hdp v0.3.0 milestone Jun 25, 2024
@rkdud007 rkdud007 linked an issue Jun 25, 2024 that may be closed by this pull request
@rkdud007 rkdud007 added the P-high High priority, tackle now label Jun 25, 2024
@rkdud007
Copy link
Member Author

rkdud007 commented Jun 25, 2024

  • As this PR resolve all alloy-dependencies, now we are able to publish to crate.io. so we will gonna bump the version into v0.2.1 after this PR
  • hdp-primitives will be v0.3.1

@rkdud007 rkdud007 marked this pull request as ready for review June 26, 2024 07:19
@rkdud007 rkdud007 requested a review from Okm165 June 26, 2024 07:25
@rkdud007 rkdud007 changed the title solid EvmProvider Solid EvmProvider & all alloy dependency version bumped to v0.1.1 Jun 26, 2024
@rkdud007 rkdud007 changed the title Solid EvmProvider & all alloy dependency version bumped to v0.1.1 Solid EvmProvider , alloy dependency version bumped to v0.1.1 Jun 26, 2024
Copy link
Contributor

@Okm165 Okm165 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@rkdud007 rkdud007 merged commit 899403b into dev Jun 26, 2024
1 check passed
@rkdud007 rkdud007 deleted the evm-provider branch June 26, 2024 08:42
rkdud007 added a commit that referenced this pull request Jul 16, 2024
* Compile `TransactionsInBlock` (#60)

* feat!: `txsinblock`, deprecate `txs`

* chore: process result in common

* feat: transaction compiler

* chore: tx examples, readme

* chore: ci on dev branch

* feat: transaction receipt with example (#62)

* chore/refact : tx datalake implementation & evaluator (#63)

* chore: abstract on compiled datalake envelope

* chore: non needed public

* chore: rm dynamiclayoutdatalake

* chore!: tx datalake code is `1`

* chore: rpc provider, feat: tx interaction cli

* refact: add variants, interactive cli

* fix!: big endian for roots (#64)

* chore: update collection id (1,2)

* fix!: root should be big endian, update examples

* Add proper script with cairo (#67)

* git submodule

* update compile script

* update script, readme

* update submodule, have venv in root

* update script to hdp.json

* rm recursive update

* rm git module

* cargo-make

* readme

* chore: fixed cairo not using hint

* prepare decent command

* update readme, command

* ci update

* chore, ci update

* nexest action

* fix cairo revision confirmed with integration test CI (#68)

* save test hdp.cairo

* return compiled cairo file

* comments

* `compiled-cairo` syncing to expose in subcommand (#69)

* use rang for property testing for integration (#73)

* feat: `ToString`

* impl ToString, mmr id issue

* feat: rand trait implement

* rand for function context

* fix: rang index

* only integer rand

* fix: incremental

* storage test

* clippy: `ToString` to `Display`

* final sync with cairo `txDataLake` (#66)

* fix!: key encoding

* feat: tx range end

* fix!: tx_index to tx_key

* feat: have last tx/tx receipt marker in seperate

* add submodule hdp-cairo

* rm folder

* have sender

* fix: account, storage key to BE

* test: tx, tx receipt key to BE

* impl: start_index, end_index, included_types

* clippy delimiter

* fix!: tx index type sync with example update

* fixture update account, storage

* rm tx.receipt example

* rand implement for tx datalake field

* Display for TransactionsCollection

* rm integration test from hdp repo

* chore: unused_crate_dependencies

* fix: do not decode if it's not filtered

* migrate examples to `hdp-test`

* rm git submodule

* hot fix: increase fetcher limit

* hot fix: one batch 50 msec increase

* slr result dummy (#75)

* better fetcher (#76)

* account proof

* get storage proofs

* refact: return type of provider

* comment out print log

* chore: fetcher related env (#77)

* impl: add chunk size as env

* unify chunk size param into one

* add comment

* [SLR support] redesign flow to parse result over processing step (#79)

* chore: remove compiled cairo from cli

* `results_root` as optional

* feat: is_pre_processable, results root as optional

* feat: wip process with cairo runner

* feat: update ctx param to be utilze during SLR

* chore: make fn ctx not optional

* feat: make output option dependency

* constraint SLR input length

* preprocess

* add pie file path

* fix combination of u256

* clean up logs

* slr on interactive docs

* fix deploy script

* edit script

* chore: docs

* Ground work for supporting v2 (#92)

* refact: compiler as crate

* refactor: aggregate fn in `primitive`

* wip in new core

* wip preprocessor

* sketch structure

* todo for fetch points

* wip strucuture sketch init

* batch init

* impl: `FetchKey` trait on keys

* precessor have fetch keys

* wip: module registry

* feat: use module registry

* implement module registry working (#85)

* feat: conversion for `CasmContractClass`

* test: module_registry, conversion

* rm : not this file

* chore: class_hash

* test: preparing preprocessor test

* chore: key as envelope approach

* temp input.json

* chore: rename into `module_class`

* feat: save input.json file

* chore: add reference, lil name change

* feat: preprocess have config

* chore: license-file only

* chore: add tracing

* support `FetchKeyEnvelope` on provider and compiler (#86)

* cleanup processor connection, refactor primitives (#88)

* wip on value provider

* wip prcessor

* chore: cleanup

* chore: clean up

* update: processor input

* update: input

* chore: input type

* processor result sketch

* refact : primitive

* feat: processed_types with fixtures test

* Chore/cleanup primitive (#90)

* chore: structure

* chore: cairo format

* clean up ci

* undo compiler crate

* update diagram, move module registry to `core`

* chore: unify `DatalakeComputeCodec`

* migrate into `hdp-core` crate

* chore: small comments, add cairo fixture

* we ignore integration test for now cus of CI

* ignore this test generating PIE

* fix: url

* keep legacy output file format

* clean up for not needed legacy

* Solid `EvmProvider` , `alloy` dependency version bumped to v0.1.1 (#96)

* provider rework wip

* chore: unified alloy type, finalized reworked provider

* hotfix: with test

* hotfix to make it work

* clean up log

* chore

* bumped `eth-trie-proofs` to 0.1.0

* feat: tx provider error handling

* chore: provider docs, rough bench for provider

* feat: update storage test case

* chore: clean up

* wip

* chore: provider cleanup

* chore: cleaner

* fix: validation, bump `eth-trie-proof` 0.1.1

* chore: docs, readme

* release `v0.2.5` (#98)

* version bump to 0.2.5

* cargo.toml cleanup, readme update

* revert unexpected change

* hotfix: version bump `v0.2.5`

* hotfix: cargo publish error

* solidity codecs sync with trait (#104)

* codecs as trait init

* clean up some structures

* structure org

* smol chore

* dockerize `hdp-runner` & cli reworks (#102)

* dockerize init

* hdp.json from hdp-cairo image

* restart, cache

* fix docker, rework cli, proper logs

* clean up

* quick fix on tx

* rm warn

* print encoding

* chore: comments of cli

* cli chore

* quick provider

* docker fix

* bug fix

* chore: property more sound

---------

Co-authored-by: Bartosz Nowak <bartekn337@gmail.com>

* bump to `v0.2.6` (#107)

* chore: add docker image

* chore: readme

* `dry-run` make it work (1/2) (#108)

* chore: rename to dry run

* refactor: envelope in task

* impl: `hdp-preprocessor` with datalake compile

* refact: have `processor`, `preprocessor` crate

* clean up

* chore

* rm local version

* `dry-run` make it work (2/2) (#109)

* feat: match cairo output file

* dry run parse test

* init: evm provider, from keys

* rm conversion legacy

* update fixture to sync dry-run

* update

* update input

* 2 module in batch

* input fix

* update

* hdp-runner v0.0.4 compatible

* docker fix

* dry run working

* todo

* fixture revoke

* feat: improve provider to handle complex query

* optimize storage provider

* chore: clean up, err handling

* chore: error handling

* move method to module registry

* we need to fix chain id config

* clean up

* todo

---------

Co-authored-by: Bartosz Nowak <bartekn337@gmail.com>

---------

Co-authored-by: Bartosz Nowak <bartekn337@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-provider Codebase to provider implementation debt Tech debt envolved P-high High priority, tackle now
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use thiserror for have error structure Version and type sync with alloy
2 participants