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

Draft
wants to merge 19 commits into
base: brian/increment-versions
Choose a base branch
from
Draft

App state32 #17462

wants to merge 19 commits into from

Conversation

Geometer1729
Copy link
Member

Explain your changes:

  • Increase the app state size to 32

Explain how you tested your changes:
*no additional tests

Checklist:

  • Dependency versions are unchanged
    • Notify Velocity team if dependencies must change in CI
  • Modified the current draft of release notes with details on what is completed or incomplete within this project
  • Document code purpose, how to use it
    • Mention expected invariants, implicit constraints
  • Tests were added for the new behavior
    • Document test purpose, significance of failures
    • Test names should reflect their purpose
  • All tests pass (CI will check this if you didn't)
  • Serialized types are in stable-versioned modules
  • Does this close issues? List them
  • Closes #0000

@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

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.

2 participants