Skip to content
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

[o1js-main] Add o1js-stub to Mina repo in place of SnarkyJS #14461

Merged
merged 55 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
5dfb734
run only fast checks in rosetta int tests
dkijania Sep 27, 2023
6118445
add fast script for rosetta
dkijania Sep 27, 2023
1d47673
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Sep 27, 2023
1d89857
correct path
dkijania Sep 28, 2023
287fdc4
Update rosetta-integration-tests-fast.sh
dkijania Sep 28, 2023
2109210
more validations
dkijania Sep 30, 2023
591b5bf
update counte
dkijania Sep 30, 2023
536d242
Revert "Auxiliary commit to revert individual files from 591b5bfb040d…
dkijania Oct 2, 2023
4066dc1
add quick test with minimal checks and no zkapps use for pull request…
dkijania Oct 2, 2023
32e266f
compilation fixes
dkijania Oct 2, 2023
356d7da
remove leftovers
dkijania Oct 2, 2023
e4ba43a
remove comment
dkijania Oct 2, 2023
6b55520
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 2, 2023
528e0bf
remove zkapps completely
dkijania Oct 3, 2023
439ec8f
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 3, 2023
daeaf73
Use zkapp_test_transaction for Rosetta integration tests (debug attem…
shimkiv Oct 5, 2023
43dec12
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
shimkiv Oct 5, 2023
d850951
Typo.
shimkiv Oct 5, 2023
16716c9
Typo.
shimkiv Oct 5, 2023
47e96fd
Sending zkapp txns agaisnt Daemon's GraphQL endpoint.
shimkiv Oct 5, 2023
f07fa96
Let's try with Python.
shimkiv Oct 5, 2023
e59e805
python3 -> python
shimkiv Oct 5, 2023
3403057
Install python.
shimkiv Oct 5, 2023
1ba5689
Install python.
shimkiv Oct 5, 2023
645a768
Install python and deps when needed (debugging attempt).
shimkiv Oct 5, 2023
b6a842a
Escaping quotes with jq.
shimkiv Oct 6, 2023
2d7a523
Tested network comms locally.
shimkiv Oct 6, 2023
b3f59d4
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
shimkiv Oct 6, 2023
e0286bd
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 9, 2023
d45ab3e
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 9, 2023
535358f
test full in PR
dkijania Oct 9, 2023
b829895
Merge remote-tracking branch 'origin/dkijania/tailor_rosetta_int_test…
dkijania Oct 9, 2023
0ebb8a6
log statements in rosetta
dkijania Oct 10, 2023
5b1cfc4
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 10, 2023
51347a5
feat(o1js-stubs): add new dune and o1js_stub.ml files for js_of_ocaml…
MartinMinkov Oct 29, 2023
ea04bcb
feat(kimchi): add kimchi lib from o1js-bindings
MartinMinkov Nov 13, 2023
7ae9412
refactor(nix): remove snarky_js and update paths for kimchi and plonk…
MartinMinkov Nov 13, 2023
587a888
feat(dune-project): add bindings_js package to support JavaScript bin…
MartinMinkov Nov 14, 2023
13b8d9f
chore(CODEOWNERS): remove snarkyjs directory from product-eng-reviewe…
MartinMinkov Nov 15, 2023
94bc10b
refactor(Makefile): remove snarkyjs and snarkyjs_no_types build targe…
MartinMinkov Nov 15, 2023
ad4d4d0
Merge branch 'o1js-main' into feat/add-o1js-stubs
mitschabaude Nov 29, 2023
e4249f5
remove(SnarkyJSTest.dhall): delete SnarkyJSTest.dhall file as it's no…
MartinMinkov Nov 30, 2023
7fa9a22
feat(buildkite/scripts): remove test-snarkyjs-bindings-minimal.sh and…
MartinMinkov Nov 30, 2023
2012e2d
chore: remove redundant SnarkyJS build scripts
MartinMinkov Nov 30, 2023
6287942
refactor(Makefile): remove snarkyjs and snarkyjs_no_types build targe…
MartinMinkov Nov 30, 2023
892a941
chore(CODEOWNERS): remove snarkyjs directory from product-eng-reviewe…
MartinMinkov Nov 30, 2023
ae94ff0
Merge branch 'feat/add-o1js-stubs' of github.com:MinaProtocol/mina in…
MartinMinkov Nov 30, 2023
c633177
Merge remote-tracking branch 'origin/dkijania/tailor_rosetta_int_test…
MartinMinkov Dec 11, 2023
8438840
Merge pull request #14683 from MinaProtocol/feat/port-rosetta-zkapp-c…
MartinMinkov Dec 11, 2023
07ba705
delete js_backend from crypto/kimchi
MartinMinkov Dec 11, 2023
3180007
[rosetta] Fix broken SQL quesry for zkapp account updates.
Sventimir Oct 18, 2023
d4314b0
Merge branch 'feat/add-o1js-stubs' of github.com:MinaProtocol/mina in…
MartinMinkov Dec 13, 2023
b6a14e0
move /kimchi/{wasm,js} to kimchi_bindings
mitschabaude Dec 18, 2023
f7a0abc
fix jsoo complaint about free variable tsBindings
mitschabaude Dec 18, 2023
cb151f6
add back newline
mitschabaude Dec 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,3 @@
[submodule "src/external/c-reference-signer"]
path = src/external/c-reference-signer
url = https://github.com/MinaProtocol/c-reference-signer.git
[submodule "src/lib/snarky_js_bindings/snarkyjs"]
path = src/lib/snarkyjs
url = https://github.com/o1-labs/snarkyjs.git
1 change: 0 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
/src/lib/snarky_curves/ @MinaProtocol/crypto-eng-reviewers
/src/lib/snarky_field_extensions/ @MinaProtocol/crypto-eng-reviewers
/src/lib/snarky_group_map/ @MinaProtocol/crypto-eng-reviewers
/src/lib/snarkyjs @MinaProtocol/product-eng-reviewers
/src/lib/snarky_log/ @MinaProtocol/crypto-eng-reviewers
/src/lib/unsigned_extended/ @MinaProtocol/crypto-eng-reviewers

Expand Down
12 changes: 0 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,6 @@ build_intgtest: ocaml_checks
dune build --profile=$(DUNE_PROFILE) src/app/test_executive/test_executive.exe src/app/logproc/logproc.exe
$(info Build complete)

snarkyjs: ocaml_checks
$(info Starting Build)
((ulimit -s 65532) || true) && (ulimit -n 10240 || true) \
&& bash ./src/lib/snarkyjs/src/bindings/scripts/build-snarkyjs-node.sh
$(info Build complete)

snarkyjs_no_types: ocaml_checks
$(info Starting Build)
((ulimit -s 65532) || true) && (ulimit -n 10240 || true) \
&& bash ./src/lib/snarkyjs/src/bindings/scripts/build-snarkyjs-node-artifacts.sh
$(info Build complete)

rosetta_lib_encodings: ocaml_checks
$(info Starting Build)
(ulimit -s 65532 || true) && (ulimit -n 10240 || true) && dune build src/lib/rosetta_lib/test/test_encodings.exe --profile=mainnet
Expand Down
17 changes: 0 additions & 17 deletions buildkite/scripts/build-js-tests.sh

This file was deleted.

12 changes: 0 additions & 12 deletions buildkite/scripts/build-snarkyjs-bindings.sh

This file was deleted.

1 change: 1 addition & 0 deletions buildkite/scripts/rosetta-integration-tests-fast.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
buildkite/scripts/rosetta-integration-tests.sh --mode=minimal
1 change: 1 addition & 0 deletions buildkite/scripts/rosetta-integration-tests-full.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
buildkite/scripts/rosetta-integration-tests.sh --mode=full
236 changes: 75 additions & 161 deletions buildkite/scripts/rosetta-integration-tests.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
#!/bin/bash

# Deploy a sandboxed Mina daemon with an archive and a Rosetta instance.
# Deploy 2 zkApps from https://github.com/MinaProtocol/rosetta-integration-test-zkapps
# to the network, interact with them and add some regular transactions.
# Then run full rosetta-cli tests against the Rosetta instance.

# NPM and NodeJS are installed through NVM, versions are stored in environment
# variables below. Zkapp-cli is installed globally through NPM, however, to
# ensure compatibility with the daemon, we use o1js pinned in the Mina repo.
# The repo is mounted into the container at /workdir, so we can build o1js from
# that source. It is important to make sure that the zkapp-cli version installed
# is compatible with o1js version used.
set -eox pipefail

# These tests use the mina-dev binary, as rosetta-cli assumes we use a testnet.
# See https://github.com/coinbase/rosetta-sdk-go/blob/master/keys/signer_pallas.go#L222

set -eo pipefail
# Defines scope of test. Currently supported are:
# - minimal -> only quick checks (~5 mins)
# - full -> all checks
MODE="minimal"

while [ $# -gt 0 ]; do
case "$1" in
--mode=*)
MODE="${1#*=}"
;;
esac
shift
done

export MINA_NETWORK=${MINA_NETWORK:=sandbox}
export LOG_LEVEL="${LOG_LEVEL:=Info}"
Expand Down Expand Up @@ -47,43 +48,6 @@ export MINA_CONFIG_FILE=$HOME/${MINA_NETWORK}.json
export MINA_CONFIG_DIR="${MINA_CONFIG_DIR:=$HOME/.mina-config}"
export MINA_GRAPHQL_PORT=${MINA_GRAPHQL_PORT:=3085}

# Test variables
export ROSETTA_INT_TEST_ZKAPPS_VERSION=${ROSETTA_INT_TEST_ZKAPPS_VERSION:=rosetta-ci-tests}

# We need a version which is compatible with o1js pinned to the Mina repo.
# Should be set to 'latest' most of the time, but occasionally we might need
# an older one.
export ZKAPP_CLI_VERSION=0.11.0

# Nodejs variables
export NVM_VERSION=0.39.3
export NODE_VERSION=20.6.1

# zkApps variables
export ZKAPP_PATH=$HOME/zkapps

echo "=========================== INSTALLING NPM ==========================="
curl -so- https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh | bash &>/dev/null
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

nvm install $NODE_VERSION
nvm use --delete-prefix $NODE_VERSION

mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH

# Install zkapp-cli and Typescript compiler.
npm install --no-progress --global "zkapp-cli@${ZKAPP_CLI_VERSION}" "typescript@latest"

# Build o1js so that we can use it later.
pushd /workdir/src/lib/snarkyjs
npm ci
npm run build
popd

# Rosetta CLI variables
# Files from ROSETTA_CLI_CONFIG_FILES will be read from
# ROSETTA_CONFIGURATION_INPUT_DIR and some placeholders will be
Expand All @@ -95,10 +59,6 @@ ROSETTA_CLI_MAIN_CONFIG_FILE=${ROSETTA_CLI_MAIN_CONFIG_FILE:="config.json"}
# Frequency (in seconds) at which payment operations will be sent
TRANSACTION_FREQUENCY=60

# Fetch zkApps
curl -Ls https://github.com/MinaProtocol/rosetta-integration-test-zkapps/tarball/$ROSETTA_INT_TEST_ZKAPPS_VERSION | tar xz -C /tmp
mv /tmp/MinaProtocol-rosetta-integration-test-zkapps-* $ZKAPP_PATH

# Libp2p Keypair
echo "=========================== GENERATING KEYPAIR IN ${MINA_LIBP2P_KEYPAIR_PATH} ==========================="
mina-dev libp2p generate-keypair -privkey-path $MINA_LIBP2P_KEYPAIR_PATH
Expand All @@ -108,9 +68,18 @@ echo "=========================== GENERATING GENESIS LEDGER FOR ${MINA_NETWORK}
mkdir -p $MINA_KEYS_PATH
mina-dev advanced generate-keypair --privkey-path $MINA_KEYS_PATH/block-producer.key
mina-dev advanced generate-keypair --privkey-path $MINA_KEYS_PATH/snark-producer.key
mina-dev advanced generate-keypair --privkey-path $MINA_KEYS_PATH/zkapp-fee-payer.key
mina-dev advanced generate-keypair --privkey-path $MINA_KEYS_PATH/zkapp-sender.key
mina-dev advanced generate-keypair --privkey-path $MINA_KEYS_PATH/zkapp-account.key
chmod -R 0700 $MINA_KEYS_PATH
BLOCK_PRODUCER_PK=$(cat $MINA_KEYS_PATH/block-producer.key.pub)
SNARK_PRODUCER_PK=$(cat $MINA_KEYS_PATH/snark-producer.key.pub)
ZKAPP_FEE_PAYER_KEY=$MINA_KEYS_PATH/zkapp-fee-payer.key
ZKAPP_FEE_PAYER_PUB_KEY=$(cat ${ZKAPP_FEE_PAYER_KEY}.pub)
ZKAPP_SENDER_KEY=$MINA_KEYS_PATH/zkapp-sender.key
ZKAPP_SENDER_PUB_KEY=$(cat ${ZKAPP_SENDER_KEY}.pub)
ZKAPP_ACCOUNT_KEY=$MINA_KEYS_PATH/zkapp-account.key
ZKAPP_ACCOUNT_PUB_KEY=$(cat ${ZKAPP_ACCOUNT_KEY}.pub)

mkdir -p $MINA_CONFIG_DIR/wallets/store
cp $MINA_KEYS_PATH/block-producer.key $MINA_CONFIG_DIR/wallets/store/$BLOCK_PRODUCER_PK
Expand All @@ -122,25 +91,15 @@ cat <<EOF >"$MINA_CONFIG_FILE"
"ledger": {
"name": "${MINA_NETWORK}",
"accounts": [
{ "pk": "${BLOCK_PRODUCER_PK}", "balance": "1000", "delegate": null, "sk": null },
{ "pk": "${SNARK_PRODUCER_PK}", "balance": "2000", "delegate": "${BLOCK_PRODUCER_PK}", "sk": null }
{ "pk": "${BLOCK_PRODUCER_PK}", "balance": "101550000.000000000", "delegate": null, "sk": null },
{ "pk": "${SNARK_PRODUCER_PK}", "balance": "605500.000000000", "delegate": "${BLOCK_PRODUCER_PK}", "sk": null },
{ "pk": "${ZKAPP_FEE_PAYER_PUB_KEY}", "balance": "10055.000000000", "delegate": null, "sk": null },
{ "pk": "${ZKAPP_SENDER_PUB_KEY}", "balance": "10055.000000000", "delegate": null, "sk": null },
{ "pk": "${ZKAPP_ACCOUNT_PUB_KEY}", "balance": "10055.000000000", "delegate": null, "sk": null }
]
}
}
EOF
for zkapp_path in ${ZKAPP_PATH}/*/; do
zkapp_path=${zkapp_path%/}
zkapp=$(basename $zkapp_path)
# Generate zkApp account keypair
mina-dev advanced generate-keypair --privkey-path ${MINA_KEYS_PATH}/zkapp-${zkapp}-account.key
# Generate zkApp fee payer keypair
mina-dev advanced generate-keypair --privkey-path ${MINA_KEYS_PATH}/zkapp-${zkapp}-fee-payer.key
zkapp_fee_payer_pk=$(cat $MINA_KEYS_PATH/zkapp-${zkapp}-fee-payer.key.pub)
line="[{ \"pk\": \"${zkapp_fee_payer_pk}\", \"balance\": \"10000\", \"delegate\": null, \"sk\": null }]"
jq ".ledger.accounts |= . + ${line}" $MINA_CONFIG_FILE >${MINA_CONFIG_FILE}.tmp
mv ${MINA_CONFIG_FILE}.tmp $MINA_CONFIG_FILE
done
cat $MINA_CONFIG_FILE | jq .

# Substitute placeholders in rosetta-cli configuration
ROSETTA_CONFIGURATION_OUTPUT_DIR=/tmp/rosetta-cli-config
Expand All @@ -160,11 +119,6 @@ done
echo "==================== IMPORTING GENESIS ACCOUNTS ======================"
mina-dev accounts import --privkey-path $MINA_KEYS_PATH/block-producer.key --config-directory $MINA_CONFIG_DIR
mina-dev accounts import --privkey-path $MINA_KEYS_PATH/snark-producer.key --config-directory $MINA_CONFIG_DIR
for zkapp_path in ${ZKAPP_PATH}/*/; do
zkapp_path=${zkapp_path%/}
zkapp=$(basename $zkapp_path)
mina-dev accounts import --privkey-path $MINA_KEYS_PATH/zkapp-${zkapp}-fee-payer.key --config-directory $MINA_CONFIG_DIR
done

# Postgres
echo "========================= INITIALIZING POSTGRESQL ==========================="
Expand Down Expand Up @@ -222,100 +176,56 @@ until [ $daemon_status == "Synced" ]; do
echo "Daemon Status: ${daemon_status}"
done

send_zkapp_txn() {
local GRAPHQL_REQUEST="$1"
local ESCAPED_GRAPHQL_REQUEST="${GRAPHQL_REQUEST//\"/\\\"}"
local ENDPOINT="http://127.0.0.1:${MINA_GRAPHQL_PORT}/graphql"

curl -X POST \
-H "Content-Type: application/json" \
--data "{\"query\":\"$ESCAPED_GRAPHQL_REQUEST\"}" \
"$ENDPOINT"
}

echo "========================= ZKAPP ACCOUNT SETTING UP ==========================="
ZKAPP_TXN_QUERY=$(zkapp_test_transaction create-zkapp-account --fee-payer-key ${ZKAPP_FEE_PAYER_KEY} --nonce 0 --sender-key ${ZKAPP_SENDER_KEY} --sender-nonce 0 --receiver-amount 1000 --zkapp-account-key ${ZKAPP_ACCOUNT_KEY} --fee 5 | sed 1,7d)
send_zkapp_txn "${ZKAPP_TXN_QUERY}"

# Unlock Genesis Accounts
echo "==================== UNLOCKING GENESIS ACCOUNTS ======================"
mina-dev accounts unlock --public-key $BLOCK_PRODUCER_PK
mina-dev accounts unlock --public-key $SNARK_PRODUCER_PK

# Start sending payments
send_payments() {
# Start sending value transfer transactions
send_value_transfer_txns() {
mina-dev client send-payment -rest-server http://127.0.0.1:${MINA_GRAPHQL_PORT}/graphql -amount 1 -nonce 0 -receiver $BLOCK_PRODUCER_PK -sender $BLOCK_PRODUCER_PK
while true; do
sleep $TRANSACTION_FREQUENCY
mina-dev client send-payment -rest-server http://127.0.0.1:${MINA_GRAPHQL_PORT}/graphql -amount 1 -receiver $BLOCK_PRODUCER_PK -sender $BLOCK_PRODUCER_PK
done
}
send_payments &

# Fee payer cache creation
echo "==================== PREPARE FEE PAYER CACHE ======================"
zkapp_fee_payer_pk=$(cat ${MINA_KEYS_PATH}/zkapp-${zkapp}-fee-payer.key.pub)
zkapp_fee_payer_privkey=$(mina-dev advanced dump-keypair --privkey-path "${MINA_KEYS_PATH}/zkapp-${zkapp}-fee-payer.key" | sed -ne "s/Private key: //p")

mkdir -p /root/.cache/zkapp-cli/keys
echo -e "{\n \"privateKey\": \"${zkapp_fee_payer_privkey}\",\n \"publicKey\": \"${zkapp_fee_payer_pk}\"\n}" >/root/.cache/zkapp-cli/keys/sandbox.json

# Deploy zkApps
echo "==================== DEPLOYING ZKAPPS ======================"
echo "If this fails, it's likely due to incompatibility between the
o1js and zkapp-cli versions in use."
echo "NOTE: At the moment the daemon still has an old version of
snarkyjs pinned to it, so we cannot use the latest version of
zkapp-cli, which requires o1js. Once the pinned snarkyjs version
gets updated, this build will most likely fail and we will then
need to update the zkapp-cli version used here. This is
unfortunate, but necessary. Please delete this warning once it's
done." > /dev/stderr

deploy_txs=()
for zkapp_path in ${ZKAPP_PATH}/*/; do
zkapp_path=${zkapp_path%/}
zkapp=$(basename $zkapp_path)
echo "Deploying ${zkapp}..."

zkapp_account_pk=$(cat ${MINA_KEYS_PATH}/zkapp-${zkapp}-account.key.pub)
zkapp_account_privkey=$(mina-dev advanced dump-keypair --privkey-path "${MINA_KEYS_PATH}/zkapp-${zkapp}-account.key" | sed -ne "s/Private key: //p")

mkdir -p ${zkapp_path}/keys
echo -e "{\n \"privateKey\": \"${zkapp_account_privkey}\",\n \"publicKey\": \"${zkapp_account_pk}\"\n}" >"${zkapp_path}/keys/sandbox.json"

cat <<EOF >"${zkapp_path}/config.json"
{
"version": 1,
"networks": {
"sandbox": {
"url": "http://127.0.0.1:${MINA_GRAPHQL_PORT}/graphql",
"keyPath": "keys/sandbox.json",
"feepayerKeyPath": "/root/.cache/zkapp-cli/keys/sandbox.json",
"feepayerAlias": "sandbox",
"fee": "1"
}
}
}
EOF
cd "$zkapp_path"
npm ci
npm run build
txn=$(zk deploy sandbox -y | sed -ne "s/https:\/\/berkeley.minaexplorer.com\/transaction\///p")
deploy_txs+=txn
cd -
echo "Done."
done

# TODO: wait until all zkApps deploy txns are included in a block
send_value_transfer_txns &

next_block_time=$(mina-dev client status --json | jq '.next_block_production.timing[1].time' | tr -d '"')
curr_time=$(date +%s%N | cut -b1-13)
sleep_time=$((($next_block_time - $curr_time) / 1000))
echo "Sleeping for ${sleep_time}s until next block is created..."
sleep ${sleep_time}

# Start calling zkApp methods
echo "==================== INTERACTING WITH ZKAPPS ======================"
RECEIVER_PK=$BLOCK_PRODUCER_PK
for zkapp_path in ${ZKAPP_PATH}/*/; do
zkapp_path=${zkapp_path%/}
zkapp=$(basename $zkapp_path)
echo "Interacting with ${zkapp}..."

cd "$zkapp_path"
./interact.sh sandbox
cd -
echo "Done."
done
# Start sending zkapp transactions
ZKAPP_FEE_PAYER_NONCE=1
ZKAPP_SENDER_NONCE=1
ZKAPP_STATE=0
send_zkapp_transactions() {
while true; do
ZKAPP_TXN_QUERY=$(zkapp_test_transaction transfer-funds-one-receiver --fee-payer-key ${ZKAPP_FEE_PAYER_KEY} --nonce ${ZKAPP_FEE_PAYER_NONCE} --sender-key ${ZKAPP_SENDER_KEY} --sender-nonce ${ZKAPP_SENDER_NONCE} --receiver-amount 1 --fee 5 --receiver ${ZKAPP_ACCOUNT_PUB_KEY} | sed 1,5d)
send_zkapp_txn "${ZKAPP_TXN_QUERY}"
let ZKAPP_FEE_PAYER_NONCE++
let ZKAPP_SENDER_NONCE++

ZKAPP_TXN_QUERY=$(zkapp_test_transaction update-state --fee-payer-key ${ZKAPP_FEE_PAYER_KEY} --nonce ${ZKAPP_FEE_PAYER_NONCE} --zkapp-account-key ${ZKAPP_SENDER_KEY} --zkapp-state ${ZKAPP_STATE} --fee 5 | sed 1,5d)
send_zkapp_txn "${ZKAPP_TXN_QUERY}"
let ZKAPP_FEE_PAYER_NONCE++
let ZKAPP_STATE++
done
}
send_zkapp_transactions &

next_block_time=$(mina-dev client status --json | jq '.next_block_production.timing[1].time' | tr -d '"')
curr_time=$(date +%s%N | cut -b1-13)
next_block_time=$(mina-dev client status --json | jq '.next_block_production.timing[1].time' | tr -d '"') curr_time=$(date +%s%N | cut -b1-13)
sleep_time=$((($next_block_time - $curr_time) / 1000))
echo "Sleeping for ${sleep_time}s until next block is created..."
sleep ${sleep_time}
Expand All @@ -327,11 +237,15 @@ rosetta-cli configuration:validate ${ROSETTA_CONFIGURATION_FILE}
echo "========================= ROSETTA CLI: CHECK:SPEC ==========================="
rosetta-cli check:spec --all --configuration-file ${ROSETTA_CONFIGURATION_FILE}

echo "========================= ROSETTA CLI: CHECK:CONSTRUCTION ==========================="
rosetta-cli check:construction --configuration-file ${ROSETTA_CONFIGURATION_FILE}
if [[ $MODE == "full" ]]; then

echo "========================= ROSETTA CLI: CHECK:CONSTRUCTION ==========================="
rosetta-cli check:construction --configuration-file ${ROSETTA_CONFIGURATION_FILE}

echo "========================= ROSETTA CLI: CHECK:DATA ==========================="
rosetta-cli check:data --configuration-file ${ROSETTA_CONFIGURATION_FILE}

echo "========================= ROSETTA CLI: CHECK:DATA ==========================="
rosetta-cli check:data --configuration-file ${ROSETTA_CONFIGURATION_FILE}
echo "========================= ROSETTA CLI: CHECK:PERF ==========================="
echo "rosetta-cli check:perf" # Will run this command when tests are fully implemented

echo "========================= ROSETTA CLI: CHECK:PERF ==========================="
echo "rosetta-cli check:perf" # Will run this command when tests are fully implemented
fi
16 changes: 0 additions & 16 deletions buildkite/scripts/test-snarkyjs-bindings-minimal.sh

This file was deleted.

Loading
Loading