-
Notifications
You must be signed in to change notification settings - Fork 103
feat: Deferred block proving #1725
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
Open
sergerad
wants to merge
82
commits into
next
Choose a base branch
from
sergerad-deferred-block-proving
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
f50435e
add block_proof column and DB queries for storing block proofs
sergerad 9101df8
decouple proving from apply_block and persist proving inputs
sergerad 0ef989a
add concurrent proof scheduler with FuturesOrdered for FIFO completion
sergerad 34f0cdc
Simplify prove fns
sergerad 7a5022a
Simplify retry fn
sergerad 5062cd0
Fix data dir issue
sergerad ecc067e
add finality parameter to SyncChainMmr endpoint
sergerad f116fa3
RM flake
sergerad 866b324
Fix lint
sergerad 1f2919b
Undo fmt
sergerad 14e16f4
Wrap up signed block todo
sergerad 1b21962
Pass blockproofrequest down
sergerad 671630a
Lint
sergerad b6f3d3c
Fix stress tests
sergerad 6856585
Changelog
sergerad 3b0ba10
Fix proving inputs
sergerad 98c0aa6
Handle docstring
sergerad 1189d46
Update genesis comment
sergerad a2b5952
RM arc clone
sergerad 8a65851
load_proving_inputs comments
sergerad d355dc5
Comments
sergerad 769d2bf
refactor errors and retries
sergerad 633f761
Merge branch 'next' of github.com:0xMiden/miden-node into sergerad-de…
sergerad 549d808
Tidy up future results
sergerad dab79e4
Comments
sergerad 98d56fa
Merge branch 'next' of github.com:0xMiden/miden-node into sergerad-de…
sergerad c08b657
Fix compile
sergerad 258bafc
Rm dead code fields
sergerad bd8dad7
impl conv::SqlTypeConv for BlockProof
sergerad 2b44192
Add index update query
sergerad 92878d8
Bump timeout
sergerad 7d5ed4c
Update notify
sergerad 2c5a7d7
Specify proving block batch size
sergerad 8b803f7
static lifetime
sergerad 2ca641f
backticks
sergerad 6e52650
replace match
sergerad 295f9d8
Store proofs to file
sergerad 5bfba05
update select proving inputs return value
sergerad 37cb516
RM pub crate
sergerad ec89137
Fix changelog
sergerad bc0bd54
Changelog
sergerad c8a76d4
finality unspecified
sergerad 506ea80
unspecified comment
sergerad 97b320b
More comments
sergerad 820261d
source not from
sergerad b3f0238
arc clone
sergerad 228d38b
rename proof scheduler handle
sergerad d272347
refactor proof concurrency
sergerad 4c216c2
Merge branch 'next' of github.com:0xMiden/miden-node into sergerad-de…
sergerad 9b2f3c8
lint
sergerad 03b0415
Merge branch 'next' of github.com:0xMiden/miden-node into sergerad-de…
sergerad da22438
RM unused query and index
sergerad 359a056
Merge branch 'next' of github.com:0xMiden/miden-node into sergerad-de…
sergerad 0e3145f
Move retry logic to prove_and_save
sergerad 75cca6e
PendingJoinSet
sergerad 20c1720
Simplify scheduling logic
sergerad 3bbb943
Rename var
sergerad 433085b
instrument field name
sergerad aa4f32a
parameterize max concurrent proofs
sergerad ee6b74a
Merge branch 'next' of github.com:0xMiden/miden-node into sergerad-de…
sergerad 8a70c04
joinset type specific
sergerad 4238cf1
flatten error
sergerad 2720950
unwrap or
sergerad e0d9b55
retry loop
sergerad 4e71764
instrument refactor
sergerad 1cb0546
Fix info block num fields
sergerad 3bfce8c
Merge branch 'next' of github.com:0xMiden/miden-node into sergerad-de…
sergerad 3e1e3a9
rm is_proven and wipe proving_inputs on proven
sergerad 28f359f
Merge branch 'next' of github.com:0xMiden/miden-node into sergerad-de…
sergerad 1b0712d
nonzerousize
sergerad 8292df7
Update select block num comment
sergerad d8bb994
anyhow context
sergerad 3044cea
another anyhow context
sergerad b8aa91c
Fix fields
sergerad 905a298
log loop errs
sergerad ca54ff2
assert_matches
sergerad a605383
std io err
sergerad 7c8fba7
Simplify schedule logic
sergerad 1dd667a
mark proven in prove_and_save
sergerad e539861
saturating sub
sergerad 3acd808
Merge branch 'next' of github.com:0xMiden/miden-node into sergerad-de…
sergerad 346bf15
rm too many lines
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 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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
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
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
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
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
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
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,13 +1,16 @@ | ||
| CREATE TABLE block_headers ( | ||
| block_num INTEGER NOT NULL, | ||
| block_header BLOB NOT NULL, | ||
| signature BLOB NOT NULL, | ||
| commitment BLOB NOT NULL, | ||
| block_num INTEGER NOT NULL, | ||
| block_header BLOB NOT NULL, | ||
| signature BLOB NOT NULL, | ||
| commitment BLOB NOT NULL, | ||
| proving_inputs BLOB, -- Serialized BlockProofRequest needed for deferred proving. NULL if it has been proven or never proven (genesis block). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: leave a TODO that the size might become a problem in the future |
||
|
|
||
| PRIMARY KEY (block_num), | ||
| CONSTRAINT block_header_block_num_is_u32 CHECK (block_num BETWEEN 0 AND 0xFFFFFFFF) | ||
| ); | ||
|
|
||
| CREATE INDEX block_headers_proven_desc ON block_headers(block_num DESC) WHERE proving_inputs IS NULL; | ||
|
|
||
| CREATE TABLE account_codes ( | ||
| code_commitment BLOB NOT NULL, | ||
| code BLOB NOT NULL, | ||
|
|
||
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.
is this always an
Ecdsakey type?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.
Yes. As opposed to what?