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

Use PocketIC in snsdemo #429

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion bin/dfx-network-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if [[ "$DFX_NETWORK" == "local" ]]; then
tput setaf 0
)"
export NORMAL="$(tput sgr0)"
dfx start --clean --background 2>&1 | sed -e "s@.*@${DARK}&${NORMAL}@" &
dfx start --clean --pocketic --background 2>&1 | sed -e "s@.*@${DARK}&${NORMAL}@" &

dfx-nns-install --ic_commit "$DFX_IC_COMMIT"
dfx-nns-import --network "$DFX_NETWORK"
Expand Down
6 changes: 4 additions & 2 deletions bin/dfx-snapshot-restore
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ clap.define short=s long=snapshot desc="The file to save to" variable=DFX_SNAPSH
# Source the output file ----------------------------------------------------------
source "$(clap.build)"

set -x

DFX_SNAPSHOT_FILE="$(realpath "$DFX_SNAPSHOT_FILE")"

pushd "$HOME"
rm -fr .local/share/dfx/network/local
tar --extract --xz --file "$DFX_SNAPSHOT_FILE"
# Note: dfx start works here but not in the project dir.
dfx start --background
num_canisters="$(curl -s "http://localhost:$(dfx info replica-port)/_/dashboard" | grep -c '<h3>Execution state</h3>')"
dfx start --pocketic --background
num_canisters="$(curl -s "http://localhost:$(dfx info webserver-port)/_/dashboard" | grep -c '<h3>Execution state</h3>')"
echo "Approx num canisters: $num_canisters"
popd
rm -fr .dfx
Expand Down
3 changes: 0 additions & 3 deletions bin/dfx-snapshot-stock-make
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ dfx-stock-deploy --ic_commit "$DFX_IC_COMMIT" --ic_dir "$IC_REPO_DIR" --parallel
# 2 SNSes were created by dfx-sns-demo.
dfx-sns-aggregator-wait

: "Wait for a checkpoint"
dfx-network-wait-for-checkpoint --timeout 600

: "Stop the replica gently but forcefully. It must be stopped and should ideally have a clean state."
dfx-network-stop

Expand Down
2 changes: 1 addition & 1 deletion bin/dfx-state-install
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ rm -fr .local/share/dfx
unzip -q "$DFX_SNAPSHOT_FILE"
# Note: dfx start works here but not in the project dir.
dfx start --background
num_canisters="$(curl -s "http://localhost:$(dfx info replica-port)/_/dashboard" | grep -c '<h3>Execution state</h3>')"
num_canisters="$(curl -s "http://localhost:$(dfx info webserver-port)/_/dashboard" | grep -c '<h3>Execution state</h3>')"
echo "Approx num canisters: $num_canisters"
popd
rm -fr .dfx
Expand Down
4 changes: 2 additions & 2 deletions bin/versions.bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ QUILL_VERSION=0.4.0
IDL2JSON_VERSION=0.8.5
BINSTALL_VERSION=1.3.0
IC_WASM_VERSION=0.6.0
DFX_NNS_EXTENSION_VERSION=0.4.3
DFX_SNS_EXTENSION_VERSION=0.4.3
DFX_NNS_EXTENSION_VERSION=0.4.7
DFX_SNS_EXTENSION_VERSION=0.4.7
EXCHANGE_RATE_CANISTER_RELEASE=2024.09.05
2 changes: 1 addition & 1 deletion dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"packtool": ""
}
},
"dfx": "0.24.2",
"dfx": "0.24.3-beta.0",
"version": 1
}
2 changes: 1 addition & 1 deletion dfx.json.original
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"packtool": ""
}
},
"dfx": "0.24.2",
"dfx": "0.24.3-beta.0",
"version": 1
}