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

Limit zkApp Commands Hardcap #14813

Merged
merged 23 commits into from
Jan 24, 2024
Merged

Limit zkApp Commands Hardcap #14813

merged 23 commits into from
Jan 24, 2024

Conversation

ejMina226
Copy link
Member

@ejMina226 ejMina226 commented Jan 9, 2024

Limit zkApp Commands to n >=0 in case of emergency
(See #14783)

@ejMina226 ejMina226 self-assigned this Jan 9, 2024
@ejMina226 ejMina226 changed the base branch from develop to rampup January 9, 2024 09:54
@ejMina226 ejMina226 changed the base branch from rampup to develop January 9, 2024 16:16
@ejMina226 ejMina226 changed the base branch from develop to rampup January 9, 2024 16:16
@ejMina226 ejMina226 changed the title Limit zkApp Commands to n >=1 Limit zkApp Commands Hardcap Jan 11, 2024
@ejMina226
Copy link
Member Author

!ci-build-me

@ejMina226 ejMina226 marked this pull request as ready for review January 11, 2024 16:39
@ejMina226 ejMina226 requested a review from a team as a code owner January 11, 2024 16:39
src/lib/consensus/constants.ml Outdated Show resolved Hide resolved
src/lib/runtime_config/runtime_config.ml Outdated Show resolved Hide resolved
src/lib/staged_ledger/staged_ledger.ml Outdated Show resolved Hide resolved
src/lib/staged_ledger/staged_ledger.ml Outdated Show resolved Hide resolved
src/lib/staged_ledger/staged_ledger.ml Outdated Show resolved Hide resolved
src/lib/genesis_constants/genesis_constants.ml Outdated Show resolved Hide resolved
@ejMina226
Copy link
Member Author

!ci-build-me

@ejMina226
Copy link
Member Author

!ci-build-me

@ejMina226
Copy link
Member Author

!ci-build-me

@ejMina226
Copy link
Member Author

I did one simple test on this locally. I just ran a single bp node and set the limit to 0. I was told the apply_diff method is applied by a bp to itself after the block candidate is produced so when I fired a zkapp transaction at it the block height didn't change.

I will try a more sophisticated set up next.

@ejMina226
Copy link
Member Author

!ci-build-me

@ejMina226
Copy link
Member Author

I conducted the test as outlined in the RFC (i.e. a network with a seed bp node without this fix and a non-seed/non-bp node with this fix, and checked that the block height never increased for the latter when zkapp transactions started). The test performed as expected.

src/lib/staged_ledger/staged_ledger.ml Outdated Show resolved Hide resolved
src/lib/staged_ledger/staged_ledger.ml Outdated Show resolved Hide resolved
src/lib/staged_ledger/staged_ledger.ml Outdated Show resolved Hide resolved
src/lib/staged_ledger/staged_ledger.ml Outdated Show resolved Hide resolved
src/lib/block_producer/block_producer.ml Outdated Show resolved Hide resolved
@ejMina226
Copy link
Member Author

!ci-build-me

@ejMina226
Copy link
Member Author

@georgeee Thanks for the review. Could you approve when you're happy?

@ejMina226
Copy link
Member Author

!ci-build-me

@ejMina226
Copy link
Member Author

@georgeee Do you know if there is an issue with Nix? The pipeline seems to be failing there. Thanks.

@georgeee
Copy link
Member

!ci-build-me

@georgeee georgeee changed the base branch from rampup to berkeley January 24, 2024 12:35
@georgeee
Copy link
Member

!ci-build-me

@ejMina226
Copy link
Member Author

!ci-build-me

@georgeee
Copy link
Member

@ejMina226 some errors appear on Ci after merge of berkeley, could you take a look?

@ejMina226
Copy link
Member Author

ejMina226 commented Jan 24, 2024

Hi @georgeee . It's a strange error. It's saying that there's an argument missing to the following function (Zkapp_command.Valid.to_valid) However, I didn't touch this function.

@ejMina226
Copy link
Member Author

Actually, I've fixed one issue.

@ejMina226
Copy link
Member Author

!ci-build-me

@mrmr1993
Copy link
Member

!approved-for-mainnet

@ejMina226
Copy link
Member Author

@georgeee @mrmr1993 @deepthiskumar Can this be merged?

@ejMina226 ejMina226 merged commit d367c38 into berkeley Jan 24, 2024
39 checks passed
@ejMina226 ejMina226 deleted the limit-zkapp-commands-to-one branch January 24, 2024 20:26
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.

4 participants