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

Unify ValidityCondition and BlobTransaction generics under DaSpec. Remove SlotData from STF API. #838

Merged
merged 15 commits into from
Sep 12, 2023

Conversation

preston-evans98
Copy link
Member

@preston-evans98 preston-evans98 commented Sep 11, 2023

Description

This PR makes several improvements to the STF interface and related generics.

  • Remove all references to the SlotData trait inside the state machine. Replace such references with BlockHeader and ValidityCondition as necessary.
  • Make the StateTransitionFunction trait generic over DaSpec instead of a Blob type
  • Remove the Blob generic from apply_slot
  • Remove all generic references to ValidityCondition and BlobTransaction and replace them with associated types on the DaSpec
  • Remove several wrapper types which implemented Borsh for values to be stored in state, and replace them with Bcs codecs.

Fixes #621

@codecov
Copy link

codecov bot commented Sep 11, 2023

Copy link
Member

@bkolad bkolad left a comment

Choose a reason for hiding this comment

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

LGTM.
Question: Do we need to update rollup-interface/spec/interfaces/stf.md doc as well?

@preston-evans98 preston-evans98 added this pull request to the merge queue Sep 12, 2023
@preston-evans98
Copy link
Member Author

Oh wow, yeah that's very out-of-date; it still uses begin/end slot and apply_block.

Merged via the queue into nightly with commit 5269d2b Sep 12, 2023
@preston-evans98 preston-evans98 deleted the preston/generics branch September 12, 2023 12:55
preston-evans98 added a commit that referenced this pull request Sep 14, 2023
…c`. Remove `SlotData` from STF API. (#838)

* Switch ordering of witness

* Feature gate native in stf runner

* WIP: Fix chain-state signature. Done except for borsh

* Fix all interfaces

* lint; clippy

* Move curr_hash to MockBlockHeader

* lint

* fix benches

* add missing borrow

* remove commented code

* fix feature gating. Fix demo-prover

* fmt demo prover

* lint
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.

Implement verify_and_extract_output for the risc0 adapter.
2 participants