Skip to content

Conversation

glyh
Copy link
Member

@glyh glyh commented Sep 4, 2025

From d8b55c4 is the real stuff in this PR

Need to

The reason this is very ugly is because there's a conflict on develop/compatible preventing a clean merge to compatible

If possible, I'd like to all change request on this PR go to follow-ups. Because it's a mess to work with compatible and develop

hattyhattington17 and others added 30 commits June 1, 2025 17:19
…y always casting field to its type when checking if null
The Root.Config module defines how a Root ledger can be created. There
are two independently varying options:

1. The directory_name to use for the database(s) backing the Root
2. The backing_type for the Root

Some methods have been defined on the abstract Config.t type, to
represent common operations on the locations of the databases backing
root ledgers. The intent is to support existing patterns in the ledger
handling code (deleting the backing of a root ledger, testing if a
backing already exists, creating a root ledger based on a particular
directory name) while abstracting the filesystem details of the root
ledger backing. This is necessary for the future converting merkle tree
backing for root ledgers; the migrated database will need to be created,
moved, and deleted properly.
 Fix merge of zkapp proof in work partitioner V3
dkijania and others added 17 commits September 2, 2025 11:40
Remove debug_assert library and replace all use with native assert
Push sig kind out of Network Pool > Txn Pool
…-root

Dummy tests for Converting Ledger backed mina ledger root
@glyh glyh changed the base branch from compatible to develop September 4, 2025 09:29
@glyh glyh marked this pull request as ready for review September 4, 2025 13:54
@glyh glyh requested review from a team as code owners September 4, 2025 13:54
@georgeee
Copy link
Member

georgeee commented Sep 4, 2025

@glyh please rebase your commits against compatible. We'll be delivering the snark worker optimization via compatible, via a regular release that precedes the hard-fork release.

Copy link
Member

@georgeee georgeee left a comment

Choose a reason for hiding this comment

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

Performed a preliminary review commit-by-commit. Will do a review of a PR as a whole after existing feedback is addressed

Mina_stdlib.Bounded_types.Wrapped_error.Stable.V1.t
* Selector.Spec.Stable.Latest.t
* Signature_lib.Public_key.Compressed.Stable.Latest.t
Error.t * (unit, unit, unit) Spec.Partitioned.Poly.Stable.Latest.t
Copy link
Member

Choose a reason for hiding this comment

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

Why Mina_stdlib.Bounded_types.Wrapped_error.Stable.V1.t was replaced with Error.t?

Copy link
Member

Choose a reason for hiding this comment

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

Use of Vx is not good, but let's use the Wrapped_error, even if it's Error.t underneath

@@ -11,12 +11,9 @@ module Master = struct
let name = "get_work"

module T = struct
type query = unit
type query = [ `V3 ]
Copy link
Member

Choose a reason for hiding this comment

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

Why not unit?

Copy link
Member Author

Choose a reason for hiding this comment

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

In case we want to support multiple RPC versions in the future.

Copy link
Member Author

@glyh glyh Sep 5, 2025

Choose a reason for hiding this comment

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

But I guess unnecessary even if we want multi version, fixed

@@ -288,7 +287,11 @@ module Impl = struct
({ proof_level_snark; proof_cache_db; logger; signature_kind } :
Worker_state.t )
~spec:(partitioned_spec : Work.Spec.Partitioned.Stable.Latest.t) :
Work.Result.Partitioned.Stable.Latest.t Deferred.Or_error.t =
( Work.Spec.Single.Stable.Latest.t
Copy link
Member

Choose a reason for hiding this comment

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

Do we have to specify the full type here? If yes, maybe an standalone type alias would help the code readibility?

; ("error", `String (Error.to_string_hum err))
] ;
let _spec = One_or_two.map ~f:Tuple2.get1 spec_with_proof in
failwith "TODO: bring back work to work selector here" ) ))
Copy link
Member

Choose a reason for hiding this comment

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

This TODO needs to be resolved, I guess.
What can be a cause of failure? Hard to judge about whether we need to put data back to selector w/o knowing that precisely.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe it's wiser just to log. This happens if the SNARK proof is invalid and get rejected by the pool. So it could indicate a bug in partitioner or snark worker.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed this todo.

Mina_metrics.(Counter.inc_one Snark_work.snark_work_assigned_rpc) ;
Deferred.return (Some spec)
| Some (Error e) ->
[%log error] "Mina_lib.request_work failed"
Copy link
Member

Choose a reason for hiding this comment

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

Worth adding a comment on what might be a cause of such failure

@glyh glyh added the snark-worker-optim Snark worker optimization: make workers operate on the level of individual proofs instead of whole t label Sep 5, 2025
@glyh
Copy link
Member Author

glyh commented Sep 5, 2025

I realized I can target compatible for a reviewable version. And then construct the PR for develop, merge develop first then compatible.

@glyh
Copy link
Member Author

glyh commented Sep 5, 2025

I'll open another PR targeting compatible addressing all review comments.

@glyh glyh marked this pull request as draft September 5, 2025 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
snark-worker-optim Snark worker optimization: make workers operate on the level of individual proofs instead of whole t
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants