Skip to content

Commit

Permalink
Merge branch 'develop' into steven-ci-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenplatt authored Oct 24, 2023
2 parents 2e68482 + 56a2ea8 commit 8a52589
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 49 deletions.
21 changes: 12 additions & 9 deletions buildkite/scripts/check-compatibility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,20 @@ function boot_and_sync {
REST_SERVER="http://127.0.0.1:$REST_PORT/graphql"

while [ $SYNCED -eq 0 ]; do
SYNC_STATUS=$(docker container exec -it $DAEMON_CONTAINER \
curl -g -X POST -H "Content-Type: application/json" -d '{"query":"query { syncStatus }"}' ${REST_SERVER})
SYNC_STATUS=$(docker container exec -it $DAEMON_CONTAINER \
curl -g -X POST -H "Content-Type: application/json" -d '{"query":"query { syncStatus }"}' ${REST_SERVER})

# "connection refused" until GraphQL server up
GOT_SYNC_STATUS=$(echo ${SYNC_STATUS} | grep "syncStatus")
if [ ! -z $GOT_SYNC_STATUS ]; then
echo "Sync status:" $GOT_SYNC_STATUS
fi
# print logs
docker container logs $DAEMON_CONTAINER --tail 10

# "connection refused" until GraphQL server up
GOT_SYNC_STATUS=$(echo ${SYNC_STATUS} | grep "syncStatus")
if [ ! -z $GOT_SYNC_STATUS ]; then
echo $(date +'%Y-%m-%d %H:%M:%S') ". Sync status:" $GOT_SYNC_STATUS
fi

SYNCED=$(echo ${SYNC_STATUS} | grep -c "SYNCED")
sleep 5
SYNCED=$(echo ${SYNC_STATUS} | grep -c "SYNCED")
sleep 5
done
}

Expand Down
5 changes: 3 additions & 2 deletions buildkite/src/Command/Base.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ let Config =
, soft_fail : Optional B/SoftFail
, skip: Optional B/Skip
, `if` : Optional B/If
, timeout_in_minutes : Optional Natural
, timeout_in_minutes : Optional Integer
}
, default =
{ depends_on = [] : List TaggedKey.Type
Expand All @@ -119,7 +119,7 @@ let Config =
, soft_fail = None B/SoftFail
, skip = None B/Skip
, `if` = None B/If
, timeout_in_minutes = None Natural
, timeout_in_minutes = None Integer
}
}

Expand Down Expand Up @@ -156,6 +156,7 @@ let build : Config.Type -> B/Command.Type = \(c : Config.Type) ->
else Some (B/ArtifactPaths.String (SelectFiles.compile c.artifact_paths)),
key = Some c.key,
label = Some c.label,
timeout_in_minutes = c.timeout_in_minutes,
retry =
Some {
-- we only consider automatic retries
Expand Down
1 change: 1 addition & 0 deletions buildkite/src/Constants/DebianVersions.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ let minimalDirtyWhen = [
S.exactly "scripts/rebuild-deb" "sh",
S.exactly "scripts/release-docker" "sh",
S.exactly "buildkite/scripts/build-artifact" "sh",
S.exactly "buildkite/scripts/check-compatibility" "sh",
-- Snark profiler dirtyWhen
S.exactly "buildkite/src/Jobs/Test/RunSnarkProfiler" "dhall",
S.exactly "buildkite/scripts/run-snark-transaction-profiler" "sh",
Expand Down
3 changes: 2 additions & 1 deletion buildkite/src/Jobs/Test/BerkeleyCompatibility.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ in Pipeline.build Pipeline.Config::{
key = "berkeley-compatibilty-test",
target = Size.XLarge,
docker = None Docker.Type,
depends_on = dependsOn
depends_on = dependsOn,
timeout_in_minutes = Some +60
}
]
}
Expand Down
3 changes: 2 additions & 1 deletion buildkite/src/Jobs/Test/DevelopCompatibility.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ in Pipeline.build Pipeline.Config::{
key = "develop-compatibilty-test",
target = Size.XLarge,
docker = None Docker.Type,
depends_on = dependsOn
depends_on = dependsOn,
timeout_in_minutes = Some +60
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion buildkite/src/Jobs/Test/Libp2pUnitTest.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Pipeline.build
key = "libp2p-bs-qc",
target = Size.Large,
docker = None Docker.Type,
timeout_in_minutes = Some 45
timeout_in_minutes = Some +45

}
]
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

The docs for the Mina Protocol website are published on [docs.minaprotocol.com](https://docs.minaprotocol.com/).

The docs repository is [https://github.com/o1-labs/docs2/)https://github.com/o1-labs/docs2/](https://github.com/o1-labs/docs2/)https://github.com/o1-labs/docs2/).
The docs repository is [https://github.com/o1-labs/docs2/](https://github.com/o1-labs/docs2/](https://github.com/o1-labs/docs2/).
24 changes: 5 additions & 19 deletions src/lib/pickles/compile.ml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ open Poly_types
open Hlist
open Backend

exception Return_digest of Md5.t

let profile_constraints = false

let verify_promise = Verify.verify
Expand Down Expand Up @@ -347,7 +345,6 @@ struct
-> ?disk_keys:
(Cache.Step.Key.Verification.t, branches) Vector.t
* Cache.Wrap.Key.Verification.t
-> ?return_early_digest_exception:bool
-> ?override_wrap_domain:Pickles_base.Proofs_verified.t
-> ?override_wrap_main:
(max_proofs_verified, branches, prev_varss) wrap_main_generic
Expand Down Expand Up @@ -382,8 +379,7 @@ struct
* _
* _
* _ =
fun ~self ~cache ~proof_cache ?disk_keys
?(return_early_digest_exception = false) ?override_wrap_domain
fun ~self ~cache ~proof_cache ?disk_keys ?override_wrap_domain
?override_wrap_main ?(num_chunks = 1) ~branches:(module Branches)
~max_proofs_verified ~name ~constraint_constants ~public_input
~auxiliary_typ ~choices () ->
Expand Down Expand Up @@ -555,13 +551,6 @@ struct
in
let () = if true then log_step main typ name b.index in
let open Impls.Step in
(* HACK: TODO docs *)
if return_early_digest_exception then
raise
(Return_digest
( constraint_system ~input_typ:Typ.unit ~return_typ:typ main
|> R1CS_constraint_system.digest ) ) ;

let k_p =
lazy
(let cs =
Expand Down Expand Up @@ -957,7 +946,6 @@ let compile_with_wrap_main_override_promise :
-> ?disk_keys:
(Cache.Step.Key.Verification.t, branches) Vector.t
* Cache.Wrap.Key.Verification.t
-> ?return_early_digest_exception:bool
-> ?override_wrap_domain:Pickles_base.Proofs_verified.t
-> ?override_wrap_main:
(max_proofs_verified, branches, prev_varss) wrap_main_generic
Expand Down Expand Up @@ -1007,8 +995,7 @@ let compile_with_wrap_main_override_promise :
(* This function is an adapter between the user-facing Pickles.compile API
and the underlying Make(_).compile function which builds the circuits.
*)
fun ?self ?(cache = []) ?proof_cache ?disk_keys
?(return_early_digest_exception = false) ?override_wrap_domain
fun ?self ?(cache = []) ?proof_cache ?disk_keys ?override_wrap_domain
?override_wrap_main ?num_chunks ~public_input ~auxiliary_typ ~branches
~max_proofs_verified ~name ~constraint_constants ~choices () ->
let self =
Expand Down Expand Up @@ -1076,10 +1063,9 @@ let compile_with_wrap_main_override_promise :
r :: conv_irs rs
in
let provers, wrap_vk, wrap_disk_key, cache_handle =
M.compile ~return_early_digest_exception ~self ~proof_cache ~cache
?disk_keys ?override_wrap_domain ?override_wrap_main ?num_chunks ~branches
~max_proofs_verified ~name ~public_input ~auxiliary_typ
~constraint_constants
M.compile ~self ~proof_cache ~cache ?disk_keys ?override_wrap_domain
?override_wrap_main ?num_chunks ~branches ~max_proofs_verified ~name
~public_input ~auxiliary_typ ~constraint_constants
~choices:(fun ~self -> conv_irs (choices ~self))
()
in
Expand Down
3 changes: 0 additions & 3 deletions src/lib/pickles/compile.mli
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ open Async_kernel
open Pickles_types
open Hlist

exception Return_digest of Md5.t

val pad_messages_for_next_wrap_proof :
(module Pickles_types.Hlist.Maxes.S
with type length = 'max_proofs_verified
Expand Down Expand Up @@ -278,7 +276,6 @@ val compile_with_wrap_main_override_promise :
-> ?disk_keys:
(Cache.Step.Key.Verification.t, 'branches) Vector.t
* Cache.Wrap.Key.Verification.t
-> ?return_early_digest_exception:bool
-> ?override_wrap_domain:Pickles_base.Proofs_verified.t
-> ?override_wrap_main:
('max_proofs_verified, 'branches, 'prev_varss) wrap_main_generic
Expand Down
14 changes: 5 additions & 9 deletions src/lib/pickles/pickles.ml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ module Make_str (_ : Wire_types.Concrete) = struct
module Step_verifier = Step_verifier
module Proof_cache = Proof_cache

exception Return_digest = Compile.Return_digest

type chunking_data = Verify.Instance.chunking_data =
{ num_chunks : int; domain_size : int; zk_rows : int }

Expand Down Expand Up @@ -311,14 +309,12 @@ module Make_str (_ : Wire_types.Concrete) = struct
let compile_with_wrap_main_override_promise =
Compile.compile_with_wrap_main_override_promise

let compile_promise ?self ?cache ?proof_cache ?disk_keys
?return_early_digest_exception ?override_wrap_domain ?num_chunks
~public_input ~auxiliary_typ ~branches ~max_proofs_verified ~name
~constraint_constants ~choices () =
let compile_promise ?self ?cache ?proof_cache ?disk_keys ?override_wrap_domain
?num_chunks ~public_input ~auxiliary_typ ~branches ~max_proofs_verified
~name ~constraint_constants ~choices () =
compile_with_wrap_main_override_promise ?self ?cache ?proof_cache ?disk_keys
?return_early_digest_exception ?override_wrap_domain ?num_chunks
~public_input ~auxiliary_typ ~branches ~max_proofs_verified ~name
~constraint_constants ~choices ()
?override_wrap_domain ?num_chunks ~public_input ~auxiliary_typ ~branches
~max_proofs_verified ~name ~constraint_constants ~choices ()

let compile ?self ?cache ?proof_cache ?disk_keys ?override_wrap_domain
?num_chunks ~public_input ~auxiliary_typ ~branches ~max_proofs_verified
Expand Down
3 changes: 0 additions & 3 deletions src/lib/pickles/pickles_intf.mli
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ module type S = sig
module Common = Common
module Proof_cache = Proof_cache

exception Return_digest of Md5.t

module type Statement_intf = sig
type field

Expand Down Expand Up @@ -374,7 +372,6 @@ module type S = sig
-> ?disk_keys:
(Cache.Step.Key.Verification.t, 'branches) Vector.t
* Cache.Wrap.Key.Verification.t
-> ?return_early_digest_exception:bool
-> ?override_wrap_domain:Pickles_base.Proofs_verified.t
-> ?num_chunks:int
-> public_input:
Expand Down

0 comments on commit 8a52589

Please sign in to comment.