Skip to content

Commit

Permalink
Merge pull request #10906 from MinaProtocol/upgrade-dune-ocamlformat_…
Browse files Browse the repository at this point in the history
…DEVELOP

Upgrade dune and ocamlformat + reformat files DEVELOP
  • Loading branch information
Virgile Robles committed May 12, 2022
2 parents ea6c7ee + 1779cc2 commit 66da4ad
Show file tree
Hide file tree
Showing 525 changed files with 6,483 additions and 6,512 deletions.
8 changes: 4 additions & 4 deletions buildkite/src/Constants/ContainerImages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
-- NOTE: minaToolchainStretch is also used for building Ubuntu Bionic packages in CI
{
toolchainBase = "codaprotocol/ci-toolchain-base:v3",
minaToolchainBullseye = "gcr.io/o1labs-192920/mina-toolchain@sha256:88bc6b7fdae563998c88849f8c5133f3dec51dd800f5ea7c6002bc92f7081510",
minaToolchainBuster = "gcr.io/o1labs-192920/mina-toolchain@sha256:c40016dc90b2293b5ec12e24aeea38e19806844bbf5c25661dcdb4049ccb71f7",
minaToolchainStretch = "gcr.io/o1labs-192920/mina-toolchain@sha256:8ce948d43b35ec5559cd0a389ed7e602b8bfc88c598b97b68fca16d586bc93c2",
minaToolchainFocal = "gcr.io/o1labs-192920/mina-toolchain@sha256:0ab44a74ff4331aeb84a352b5d5f4ab7fcc10ebfeb1eba9259201435b1cc7860",
minaToolchainBullseye = "gcr.io/o1labs-192920/mina-toolchain@sha256:1b901f35d726af1e30fba4a1492b11f8bab87c8627f8f56e264fd119d7840425",
minaToolchainBuster = "gcr.io/o1labs-192920/mina-toolchain@sha256:d4a56f985616507ff85ce93779c7b24c4927ae963ac1133e5248065c5d742870",
minaToolchainStretch = "gcr.io/o1labs-192920/mina-toolchain@sha256:c10913d9a48ad9b3c729fb4a53874e5583bf9c17b0d9a34510cbd2526b81f12c",
minaToolchainFocal = "gcr.io/o1labs-192920/mina-toolchain@sha256:e3bf51b67b00b0e4d700ae95492437790e4f8651b7077dd244115bf9312f9561",
delegationBackendToolchain = "gcr.io/o1labs-192920/delegation-backend-production@sha256:8ca5880845514ef56a36bf766a0f9de96e6200d61b51f80d9f684a0ec9c031f4",
elixirToolchain = "elixir:1.10-alpine",
nodeToolchain = "node:14.13.1-stretch-slim",
Expand Down
44 changes: 44 additions & 0 deletions docs/access-testnet-nodes-graphql.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Local access to testnet nodes via GraphQL

# Prerequisites
* Install [`gcloud` SDK](https://cloud.google.com/sdk/docs/install-sdk).
* Install `kubectl` by running `gcloud components install kubectl`.
* Log-in using the [`gcloud auth
login`](https://cloud.google.com/sdk/gcloud/reference/auth/login) command
with your O(1) Labs email.

# Get the credentials for the region running the nodes

Retrieve the credentials for the region that the nodes are running in, using
[`gcloud container
clusters`](https://cloud.google.com/sdk/gcloud/reference/container/clusters/get-credentials).
For example:
```
gcloud container clusters get-credentials coda-infra-central1 --region us-central1 --project o1labs-192920
```

# Discover nodes in the testnet's namespace

If you do not have a particular node in mind, you can list all of the available
nodes in a namespace using `kubectl get pods`. For example, to list the nodes
on the berkeley QA net:
```
kubectl -n berkeley get pods
```

# Forward a local port to a node

Use the `kubectl port-forward` command to forward a local port. For example,
```
kubectl port-forward -n berkeley seed-1-XXXXXXXXX-XXXXX 4040:3085
```
will forward http://localhost:4040 to port 3085 on `seed-1-XXXXXXXXX-XXXXX` in
the berkeley namespace.

# Running a bash command on the node

Use the `kubectl exec` command to run a command on the testnet node. For example,
```
kubectl exec seed-1-XXXXXXXXX-XXXXX --namespace berkeley -c mina -- ls
```
will run `ls` on `seed-1-XXXXXXXXX-XXXXX` in the berkeley namespace.
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(lang dune 2.7)
(lang dune 3.1)
20 changes: 0 additions & 20 deletions src/.ocamlformat
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ max-iters=10
comment-check=true
wrap-fun-args=true
wrap-comments=false
type-decl-indent=2
type-decl=compact
stritem-extension-indent=0
space-around-variants=true
space-around-records=true
space-around-lists=true
Expand All @@ -15,52 +13,34 @@ single-case=compact
sequence-style=separator
sequence-blank-line=preserve-one
parse-docstrings=false
parens-tuple-patterns=multi-line-only
parens-tuple=always
parens-ite=false
ocp-indent-compat=false
nested-match=wrap
module-item-spacing=sparse
max-indent=68
match-indent-nested=never
match-indent=0
margin=80
let-open=preserve
let-module=compact
let-binding-spacing=compact
let-binding-indent=2
let-and=compact
leading-nested-match-parens=false
infix-precedence=indent
indicate-nested-or-patterns=space
indicate-multiline-delimiters=space
indent-after-in=0
if-then-else=compact
function-indent-nested=never
function-indent=2
field-space=loose
extension-indent=2
exp-grouping=parens
dock-collection-brackets=false
doc-comments-tag-only=default
doc-comments-padding=2
doc-comments=before
disambiguate-non-breaking-match=false
disable=false
cases-matching-exp-indent=normal
cases-exp-indent=4
break-struct=force
break-string-literals=auto
break-sequences=false
break-separators=before
break-infix-before-func=true
break-infix=wrap
break-fun-sig=wrap
break-fun-decl=wrap
break-collection-expressions=fit-or-vertical
break-cases=nested
break-before-in=fit-or-vertical
assignment-operator=end-line
align-variants-decl=false
align-constructors-decl=false
align-cases=false
12 changes: 6 additions & 6 deletions src/app/archive/archive_lib/diff.ml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module Builder = struct
let senders =
commands
|> List.map ~f:(fun { data; _ } ->
User_command.(fee_payer (forget_check data)))
User_command.(fee_payer (forget_check data)) )
|> Account_id.Set.of_list
in
Set.to_list senders
Expand All @@ -67,7 +67,7 @@ module Builder = struct
let%map { receipt_chain_hash; _ } =
Mina_ledger.Ledger.get ledger ledger_location
in
(sender, receipt_chain_hash)))
(sender, receipt_chain_hash)) )
in
let block_with_hash = Mina_block.Validated.forget validated_block in
let block = With_hash.data block_with_hash in
Expand All @@ -77,10 +77,10 @@ module Builder = struct
(* an accessed account may not be the ledger *)
let%bind.Option index =
Option.try_with (fun () ->
Mina_ledger.Ledger.index_of_account_exn ledger acct_id)
Mina_ledger.Ledger.index_of_account_exn ledger acct_id )
in
let account = Mina_ledger.Ledger.get_at_index_exn ledger index in
Some (index, account))
Some (index, account) )
in
let accounts_created =
let account_creation_fee =
Expand All @@ -92,8 +92,8 @@ module Builder = struct
in
List.map
(Staged_ledger.latest_block_accounts_created staged_ledger
~previous_block_state_hash) ~f:(fun acct_id ->
(acct_id, account_creation_fee))
~previous_block_state_hash ) ~f:(fun acct_id ->
(acct_id, account_creation_fee) )
in
Transition_frontier.Breadcrumb_added
{ block = With_hash.map ~f:External_transition.compose block_with_hash
Expand Down
Loading

0 comments on commit 66da4ad

Please sign in to comment.