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

Vr/data root #11

Merged
merged 88 commits into from
Sep 6, 2023
Merged

Vr/data root #11

merged 88 commits into from
Sep 6, 2023

Conversation

vibhurajeev
Copy link

Description

Linked Issues

  • Fixes # (issue, if applicable)
  • Related to # (issue)

Testing

Describe how these changes were tested. If you've added new features, have you added unit tests?

Docs

Describe where this code is documented. If it changes a documented interface, have the docs been updated?

theochap and others added 30 commits August 10, 2023 16:27
* WIP: Add optimsitic sync

* WIP: implement chain state module

* WIP: Add attester incentives

* Can compile

* Does compile

* Start working on attester incentives

* Implement attestation processing

* Finish unbonding

* Improve events

* Rename sov-attester-incentives to optimistic-workflow

* Refactor

* Start working on apply_sync_data_blob

* Refactoring apply_tx_blob

* Refactoring files

* Rewriting unbonding

* Refactor attestation processing

* Refactor process challenge

* Refactoring

* Fixing compile issues

* Does compile

* Everything compiles

* Add 2 phase unbonding back

* Updating tests

* Changing bonding proof

* Changing bonding proof

* Fixing get_with_proof

* Fixing chain updates

* Change STF interface to work on slot level

* Removing Misbehavour hint from parameters
* Fixing prover
* Update docs

* Adding chain state

* Starting chain state

* Fix lint

* Fixing warnings

* Integrating slot hooks

* Populating todos

* Adding data generation for different modules

* Implementing automatic bank data generation

* Fixing stf

* Compiles

* Fixing chain-state test, adding EncodeCall trait

* Fixing lints

* Chain state testing

* Simple chain state module tests

* All tests pass

* Fixing lints

* Fixing comments PR

* Fixing comments PR

* nit fix

* Fixing PR comments

* Deleting borsh compat

* Adding back github and config files

* Specifying commit for jmt

* Update module-system/sov-state/src/storage.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Fixing comments PR

* Update adapters/risc0/src/host.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/host.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Fixing error handling

* Fixing lints

* Fixing lints

* Fix lints

* Update rollup-interface/src/state_machine/mocks.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Addressing PR comments

* Including PR comments

* Update Cargo.toml

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/guest.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/host.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/host.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Adding back genesis and call

* Fix lints

* Lint

* Restoring default context

* Fixing imports

* Fixing prover compiles

* Fix prover compiles

* Fixing end slot hook

* Reorganizing integration tests

* Reorganizing integration tests

* Adding unit tests for chain-state

* Update chain state tests

* Update apply slot signature

* Fix demo-prover

* Update adapters/risc0/src/guest.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/host.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Fix lints

* Format demo-prover

* Fix feature data generators

* Update examples/demo-stf/Cargo.toml

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/guest.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Fixing pr comments

* Fix lint

* Removing call from chain-state because provided by blanket

---------

Co-authored-by: Preston Evans <preston.b.evans@gmail.com>
Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>
* WIP: Add optimsitic sync

* WIP: implement chain state module

* WIP: Add attester incentives

* Can compile

* Does compile

* Start working on attester incentives

* Implement attestation processing

* Finish unbonding

* Improve events

* Rename sov-attester-incentives to optimistic-workflow

* Refactor

* Start working on apply_sync_data_blob

* Refactoring apply_tx_blob

* Refactoring files

* Rewriting unbonding

* Refactor attestation processing

* Refactor process challenge

* Refactoring

* Fixing compile issues

* Does compile

* Everything compiles

* Add 2 phase unbonding back

* Updating tests

* Changing bonding proof

* Changing bonding proof

* Fixing get_with_proof

* Fixing chain updates

* Refactoring buf reader

* Change STF interface to work on slot level

* Removing Misbehavour hint from parameters
* Fixing prover
* Update docs

* Adding chain state

* Starting chain state

* Fix lint

* Fixing warnings

* Integrating slot hooks

* Populating todos

* Adding data generation for different modules

* Implementing automatic bank data generation

* Fixing stf

* Compiles

* Fixing chain-state test, adding EncodeCall trait

* Fixing lints

* Chain state testing

* Simple chain state module tests

* All tests pass

* Fixing lints

* Fixing comments PR

* Fixing comments PR

* nit fix

* Fixing PR comments

* Deleting borsh compat

* Adding back github and config files

* Specifying commit for jmt

* Update module-system/sov-state/src/storage.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Fixing comments PR

* Applying PR comments

* Update adapters/risc0/src/host.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/host.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Fixing error handling

* Fixing lints

* Fixing lints

* Fix lints

* Refactor buf reader

* Update rollup-interface/src/state_machine/mocks.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Addressing PR comments

* Including PR comments

* Update Cargo.toml

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/guest.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/host.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/host.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Adding back genesis and call

* Fix lints

* Lint

* Restoring default context

* Fixing imports

* Fixing prover compiles

* Fix prover compiles

* Fixing end slot hook

* Reorganizing integration tests

* Reorganizing integration tests

* Adding unit tests for chain-state

* Update chain state tests

* Update apply slot signature

* Fix demo-prover

* Update adapters/risc0/src/guest.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/host.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Fix lints

* Format demo-prover

* Fix feature data generators

* Merge with chain-state and fix lints

* Update examples/demo-stf/Cargo.toml

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/guest.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Fixing pr comments

* Fix lint

* Fix lints

---------

Co-authored-by: Preston Evans <preston.b.evans@gmail.com>
Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>
…ollup-config (Sovereign-Labs#592)

* WIP: Add optimsitic sync

* WIP: implement chain state module

* WIP: Add attester incentives

* Can compile

* Does compile

* Start working on attester incentives

* Implement attestation processing

* Finish unbonding

* Improve events

* Rename sov-attester-incentives to optimistic-workflow

* Refactor

* Start working on apply_sync_data_blob

* Refactoring apply_tx_blob

* Refactoring files

* Rewriting unbonding

* Refactor attestation processing

* Refactor process challenge

* Refactoring

* Fixing compile issues

* Does compile

* Everything compiles

* Add 2 phase unbonding back

* Updating tests

* Changing bonding proof

* Changing bonding proof

* Fixing get_with_proof

* Fixing chain updates

* Missing docs bank

* Missing docs prover-incentives

* Missing docs const-rollup-config

* demo-rollup missing docs, finish missing docs

* Refactoring buf reader

* Fixing lint error

* Change STF interface to work on slot level

* Removing Misbehavour hint from parameters
* Fixing prover
* Update docs

* Adding chain state

* Starting chain state

* Fix lint

* Fixing warnings

* Integrating slot hooks

* Populating todos

* Adding data generation for different modules

* Implementing automatic bank data generation

* Fixing stf

* Compiles

* Fixing chain-state test, adding EncodeCall trait

* Fixing lints

* Chain state testing

* Simple chain state module tests

* All tests pass

* Fixing lints

* Fixing comments PR

* Fixing comments PR

* nit fix

* Fixing PR comments

* Deleting borsh compat

* Adding missing_docs

* Adding back github and config files

* Specifying commit for jmt

* Update module-system/sov-state/src/storage.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Fixing comments PR

* Fix rpc macro

* Fixing missing docs

* Applying PR comments

* Update adapters/risc0/src/host.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/host.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Fixing error handling

* Fixing lints

* Fixing lints

* Fix lints

* Refactor buf reader

* Fixing tests

* Update rollup-interface/src/state_machine/mocks.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Addressing PR comments

* Including PR comments

* Update Cargo.toml

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/guest.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/host.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/host.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Adding back genesis and call

* Fix lints

* Lint

* Restoring default context

* Fixing imports

* Fixing prover compiles

* Fix prover compiles

* Fixing end slot hook

* Reorganizing integration tests

* Reorganizing integration tests

* Adding unit tests for chain-state

* Update chain state tests

* Update apply slot signature

* Fix demo-prover

* Update adapters/risc0/src/guest.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/host.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Fix lints

* Format demo-prover

* Fix feature data generators

* Merge with chain-state and fix lints

* Update examples/demo-stf/Cargo.toml

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Update adapters/risc0/src/guest.rs

Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>

* Fixing pr comments

* Fix lint

* Fix doctests demo rollup

* Add folder generated by README test to gitignore

---------

Co-authored-by: Preston Evans <preston.b.evans@gmail.com>
Co-authored-by: Nikolai Golub <nikolai@sovlabs.io>
* Refactor CelestiaAddress and its internal representation
Sovereign-Labs#596)

* Introducing blob deferring
* Exposing is_allowed_sequencer method. Filter non registered sequencers
* Add next-test as default runner for `make test`
* Allow custom state encodings

* Use Default::default to build codecs

* Improve tests for sov-modules-macros

* Stricter type bounds for better error messages

* Don't reexport sov_state::codec

* t.pass test
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.29.1 to 1.31.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](tokio-rs/tokio@tokio-1.29.1...tokio-1.31.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Filippo Neysofu Costa <filippo@sovlabs.io>
…bs#577)

* extract data_gen into its own function

* temp push

* add prover cycles

* include multiple transactions

* reduce txns

* temp switch

* cycle tracker macro

* another temp commit

* merge main and nightly

* use run_without_prover for bench/profile

* working metrics

* add zk-cycle-utils. missed it

* temporary commit

* pass features to risc0 vm

* feature gate all the bench things

* cleanup and testing

* check in readme

* checking some cargo locks in prep for merge

* some fixes

* revert rollup config toml

* working merge

* cleanup and documentation

* simplify the macro for generating the wrapped function

* format fixes

* README changes

* simplify code as per lint

* lint fix

* add profiler to analyze trace

* fix cargo lock

* really fix Cargo.lock

* trace options

* cargo fmt

* fix log error

* fix prover bench

* add docs and address comments

* prover bench readme

* add a skip proving option to demo-prover

* add tests for macros

* demo prover format

* remove commented code

* formatting

---------

Co-authored-by: dubbelosix <dub@006.com>
* Fix sov-sequencer-registry docs

* Fix docs about callmessage
* fixed typo in ledger_rpc.rs

* Fix RPC method name in sov-stf-runner docs

---------

Co-authored-by: Filippo Costa <filippo@sovlabs.io>
* Optimistic

* Attester incentives module

* Reverting typo

* Tests attester-incentives

* Adding test helper and lint

* Lint

* Adding tests

* Finishing positive test

* Refactor tests

* Refactor tests

* Adding negative test

* Valid challenge

* Invalid challenge

* Adding unbonding tests

* Lint fix

* Lint

* Make lint

* Make lint

* PR comments + fix tests

* Lint

* Fixing comments

* Refactoring + finishing adding tests

* Fix lint

* Fix lint

* Fixing PR comments

* Fixing important comment

* Fix nits

* Fixing multi-attestation

* Fixing nits

* Fixing nits

* Fixing lints

* Fixing all comments PR
Bumps [parking_lot](https://github.com/Amanieu/parking_lot) from 0.11.2 to 0.12.1.
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](Amanieu/parking_lot@0.11.2...0.12.1)

---
updated-dependencies:
- dependency-name: parking_lot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.183 to 1.0.185.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.183...v1.0.185)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.32 to 1.0.33.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](dtolnay/quote@1.0.32...1.0.33)

---
updated-dependencies:
- dependency-name: quote
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.31.0 to 1.32.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](tokio-rs/tokio@tokio-1.31.0...tokio-1.32.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Filippo Neysofu Costa <filippo@sovlabs.io>
bkolad and others added 28 commits August 29, 2023 09:31
* Remove generic from MockBlob

* update tests

* fix lint

* fix lint
* macro docs improvements

* wip

* fuzz experiments

* macro errors

* wip

* add fuzz makefile & docs

* add generative fuzz for account module implementation

This commit introduces a generative model for the accounts module
implementation that will generate valid messages to update the account
address.

It also fixes a bug where a prefix with an unaligned vector could be
created by declaring an API module, combining its prefixes, and
generating a vec would result in potentially unaligned vectors.

* fix statemap arbitrary generation

* fix lint nits

* rollback aligned vec assertion for tests

* fix native requirement for arbitrary implementation

* fix arbitrary workset to use genesis

* fix merge generated errors

* remove cargo.lock from fuzz directory

---------

Co-authored-by: Filippo Costa <filippo@sovlabs.io>
…ge::calculate_root_hash...` and `Storage::commit` (Sovereign-Labs#752)

* Extend storage interface

* fix

* add calculate_state_root_and_node_batch

* Add comment

* code review feedback

* Add StateUpdate to Storage
* Start adding test

* Add simple test for expose_rpc

* Generic test passes without expose_rpc

* It still passes.

* Just adding some notes

* Add test boilerplate

* [no ci]: Update tests

* Broken, but progress

* [no ci] It passes!

* And add failing test!

* Adding module for debugging macro things

* It compiles and runs!

* Adding generic!

* Add phantom module to satisfy compiler

* Fixing phantom

* WIP

* It compiles without expose_rpc

* We don't need phantom module

* Update things

* It works with renaming!

* Linter is happy

* tests are passing

* Add failing test

* Clean ups

* Add link to bug

* Update message
* docs: add Bitcoin DA link to README

* docs: add "open-source" to BitcoinDA link

Co-authored-by: Cem Özer <cemozer2018@u.northwestern.edu>

---------

Co-authored-by: Cem Özer <cemozer2018@u.northwestern.edu>
* Add RPC endpoint for chain state module, so it can be plugged into runtime

* Move tests to integration tests

* Fix native feature gating

* Fixed check features
* Specify version of `jmt` which contains fix

* Fix jsonrpsee new method name

* Bump prover's cargo lock
* Remove separate "serde" feature

As it is used only inside native feature and not separately

* Fix native test for sov-attester-incentives
* Bump dalek-ed25519 to 2.0.0

* Fix serde serialization

* Fixing lint and comments

* Adding key converters and helpers

* Remove temporary HexKey

* Update key files structure

* Fixing test!

* Addressing nits
…overeign-Labs#764)

* Start working on it

* Use different approach with phantom data, but...

Lifetime strikes back so far

* Start cleaning up and adding tests

* Adding more tests and cleaning up

* Adding some tests instead of removed ones

* Fix lint error

* Actually fix lint
* ETH batch builder

* EVM: allow building blocks with multiple transactions

* undo changes in full-node/sov-sequencer/src/utils.rs

* Add comments in tests

* fix lint

* fix cargo hack

* Update to HexPrivateAndAddress
* Add doc generation to genesis macro

* make fields public

* fix lint
* add test case to demo-simple-stf

* renaming
* Introduce Da generic in demo-stf

* Move sov-cli to demo-rollup

* Clean up sov-cli usage
* s/DA/Da/g

* Progress

* Progressing

* Continue grouping generics

* Adjust BlobSelector

* Update module-system/module-implementations/sov-attester-incentives/src/call.rs
@vibhurajeev vibhurajeev merged commit f94554f into main Sep 6, 2023
@vibhurajeev vibhurajeev deleted the vr/data-root branch September 6, 2023 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.