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

DefaultTransactionQueue: Ensure at most 2^12 created notes per batch #65

Closed
plafer opened this issue Nov 16, 2023 · 3 comments · Fixed by #239
Closed

DefaultTransactionQueue: Ensure at most 2^12 created notes per batch #65

plafer opened this issue Nov 16, 2023 · 3 comments · Fixed by #239
Assignees
Milestone

Comments

@plafer
Copy link
Contributor

plafer commented Nov 16, 2023

Related: #64

@bobbinth bobbinth added this to the v0.2 milestone Jan 11, 2024
@hackaugusto hackaugusto self-assigned this Feb 14, 2024
@hackaugusto
Copy link
Contributor

hackaugusto commented Feb 14, 2024

@plafer @bobbinth what is suppose to be achieved by this issue? The linked PR seems to talk about how to define the note's leaves, and to define it "using a tree of depth 20" which is kinda unrelated to the issue title.

@bobbinth
Copy link
Contributor

I think this may be as simple as making sure that if batch builder gets a list of more than $n$ transactions (i.e. here, it would return an error. $n$ should probably be defined in miden-base (i.e., here). We could call it MAX_TRANSACTIONS_PER_BATCH and it would be computed based on NOTE_TREE_DEPTH.

@bobbinth
Copy link
Contributor

We could call it MAX_TRANSACTIONS_PER_BATCH and it would be computed based on NOTE_TREE_DEPTH.

Actually, we need one more constant to support this: MAX_BATCHES_PER_BLOCK. Then, MAX_TRANSACTIONS_PER_BATCH is defined as 2.pow(NOTE_TREE_DEPTH - MAX_BATCHES_PER_BLOCK.ilog2()).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants