-
Notifications
You must be signed in to change notification settings - Fork 129
feat: Refactor block types for signatures and deferred proving #2012
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
Merged
Merged
Changes from 39 commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
58708ca
Add SignedBlock type
sergerad 580b3a0
Add unit tests
sergerad b4735cd
DerefMut
sergerad ed4f26e
Get latest design compiling
sergerad a81ee26
RM std
sergerad 7466430
Move tests
sergerad 3e3a11d
Comment
sergerad 753ff2e
Move test to success file
sergerad 1850416
Replace prover error and add header error tests
sergerad 4cb2811
Merge branch 'next' of github.com:0xPolygonMiden/miden-base into serg…
sergerad eccbd06
Fix no std
sergerad ee8ee24
Revert header changes
sergerad 2d2de2e
Move header and signing logic to lib
sergerad 277ec4a
fix std
sergerad 9a86df3
Lint
sergerad b00fbf4
Remove ownership and clone
sergerad c8acb0f
Refactor exports
sergerad d89ef84
comment
sergerad 2a3f83c
Add missing file
sergerad a1ffe31
RM proof_commitment
sergerad ec5f61c
Remove signing and add block body
sergerad c940e2e
Split up logic in header.rs
sergerad 8d89e03
new unchecked body
sergerad 16ca754
Fix test comment
sergerad 86f4dc5
Fix new doc comment
sergerad 0d875b3
fill out doc comments
sergerad 31294ff
Move fns to proposed block
sergerad fb7e40f
rm construct block body and add from impl
sergerad 14618af
Doc comment
sergerad 57c70b9
push fns to body our of proven block
sergerad fa35e48
Rm old error
sergerad 2ff002e
pub crate OrderedBatches::new
sergerad 355219f
RM stale comment
sergerad 8647679
rm unnecessary collect
sergerad 8d43a92
Fix proven block comment
sergerad b17ef3f
Rename fn
sergerad 5f1d0cc
SignedBlock new_unchecked
sergerad a3db00c
Move compute_chain_commitment()
sergerad 19c3fe9
Merge branch 'next' of github.com:0xPolygonMiden/miden-base into serg…
sergerad 0f315d9
Fix partial null tree
sergerad 9eca37c
RM #[from]
sergerad ae9f0d6
Machete
sergerad d6b7822
chore: minor code reorg
bobbinth d41f953
chore: move testing feature gate to impl
bobbinth cca75a3
chore: minor code reorg
bobbinth fcd75ba
Move module
sergerad 70e9fd5
Proven block doctstring
sergerad 67d4e1d
Signed block docstring
sergerad 35a3471
Add BlockProof
sergerad e148ec4
toml
sergerad 5794333
Rename to render fn and update doctstring
sergerad 3546832
Merge branch 'next' of github.com:0xPolygonMiden/miden-base into serg…
sergerad 8d1289e
Update changelog
sergerad 685478b
Rename to build_block(), fix comment, update proven block fields
sergerad a699b6e
RM unused fns
sergerad f00fe9c
Update changelog
sergerad a46c985
compute_chain_commitment member fn
sergerad a72cf9b
Rename test fns
sergerad 930dc1e
RM signed block and update flows
sergerad bc73e14
Merge branch 'next' into sergerad-signed-block
bobbinth f5bf318
Comments
sergerad 1598277
Add mockchain::prove_block()
sergerad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,2 @@ | ||
| mod errors; | ||
| pub use errors::ProvenBlockError; | ||
|
|
||
| mod local_block_prover; | ||
| pub use local_block_prover::LocalBlockProver; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method no longer returns a
Resultso, theErrorssection is obsolete.But also, when we eventually get to proof generation, sending just the
SignedBlockwill not be sufficient as the prover would need at least:Basically, the prover will need either the
ProposedBlockorVec<ProvenBatch>+BlockInputs. So, maybe the signature of this method should be:Basically, the idea is that this method will, in the future, run the block kernel, the kernel will output the info that we'd be able to check against the
block_header- and if all matches, it would return the proof.Then, the caller of this method (i.e., the store) would construct the
ProvenBlockfromSignedBlock+BlockProof.Since we don't have this process working yet, we have the following options:
a. We could also run the process of re-building
ProposedBlockand then using it to check that theblock_headermatches the result.I have a slight preference towards the second approach.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BlockInputsis used to createProposedBlockI don't think it makes sense to then use that to create a proof but maybeProposedBlockinstead.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have this so far
We may not want to pass signed block into prove fn. Its hard to reason about these types and APIs without starting to integrate them into the node stack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't pass
signed_blockto the block prover because it won't have enough info to construct a block proof. The block prover will essentially run the same code as the constructor of proposed block + building the block body - so, it needs the same inputs as the proposed block construct. It also needs the block header because block header will contain the signature.Since we don't have the MASM code for the above yet, I think the block prover can do the following:
ProposedBlockfrom the provided parameters.BlockHeaderinfo matches theProposedBlock(this may require buildingBlockBody).