Skip to content

App state32 #17462

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
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open

App state32 #17462

wants to merge 21 commits into from

Conversation

Geometer1729
Copy link
Member

@Geometer1729 Geometer1729 commented Jul 2, 2025

Explain your changes:

  • Increase the app state size to 32

Explain how you tested your changes:
No additional tests

@Geometer1729
Copy link
Member Author

!ci-build-me

@Geometer1729
Copy link
Member Author

!ci-build-me

@@ -70,7 +70,7 @@ module Account_update_under_construction = struct
type t = { app_state : Field.t option Zkapp_state.V.t }

let create () =
{ app_state = [ None; None; None; None; None; None; None; None ] }
{ app_state = Mina_base.Zkapp_state.V.init ~f:(fun _ -> None) }
Copy link
Member

Choose a reason for hiding this comment

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

Nit: ~f:(const None)

Copy link
Member Author

Choose a reason for hiding this comment

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

❯rg -t ml 'fun _ ->' | wc -l
330

rg -t ml 'const ' | wc -l
224

It looks like we use a mix of the two 😢
I don't feel strongly, I'm happy to use const here.

Copy link
Member

Choose a reason for hiding this comment

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

Well, they are slightly different in that const a always evaluate eagerly, while fun _ -> a does not.

But for sure compiler may optimize them into the samething

{ app_state = [ Keep; Keep; Keep; Keep; Keep; Keep; Keep; Keep ]
{ app_state =
Mina_base.Zkapp_state.V.init ~f:(fun _ ->
Zkapp_basic.Set_or_keep.Keep )
Copy link
Member

Choose a reason for hiding this comment

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

Nit: use const

@Geometer1729
Copy link
Member Author

!ci-build-me

@Geometer1729
Copy link
Member Author

!ci-build-me

@Geometer1729
Copy link
Member Author

!ci-build-me

@Geometer1729
Copy link
Member Author

!ci-build-me

@Geometer1729
Copy link
Member Author

!ci-build-me

@Geometer1729
Copy link
Member Author

!ci-build-me

Base automatically changed from brian/increment-versions to develop July 28, 2025 17:53
@Geometer1729
Copy link
Member Author

!ci-build-me

@Geometer1729 Geometer1729 marked this pull request as ready for review July 28, 2025 17:59
@Geometer1729 Geometer1729 requested a review from a team as a code owner July 28, 2025 17:59
@dkijania
Copy link
Member

@Geometer1729 can you rebase onto/merge newest develop ?

@dkijania
Copy link
Member

!ci-docker-me

@Geometer1729
Copy link
Member Author

!ci-build-me

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

Successfully merging this pull request may close these issues.

3 participants