Skip to content
Merged
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 .cargo/release-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v4.7.3
v4.8.0
34 changes: 34 additions & 0 deletions .ci/test_devnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ function main:
add r0 r1 into r2;
output r2 as u32.private;

view compute_sum:
add 1u32 2u32 into r0;
output r0 as u32.public;

constructor:
assert.eq true true;
" > program/main.aleo
Expand Down Expand Up @@ -187,6 +191,36 @@ else
exit 1
fi

# Query the view function at the latest height.
log "● Testing view function evaluation at latest height..."
view_response=$(curl -s -X POST \
-H "Content-Type: application/json" \
-d '[]' \
"http://localhost:3030/v2/$network_name/program/${program_name}/view/compute_sum")
view_output=$(jq -r '.[0]' <<< "$view_response")
if [ "$view_output" = "3u32" ]; then
log "✅ View function returned expected output at latest height: $view_output"
else
log "❌ Test failed! View function returned unexpected output at latest height: $view_response"
exit 1
fi

# Query the view function at a specific block height.
# Requires history feature.
# log "● Testing view function evaluation at specific block height..."
# current_height=$(curl -s "http://localhost:3030/v2/$network_name/block/height/latest")
# view_response=$(curl -s -X POST \
# -H "Content-Type: application/json" \
# -d '[]' \
# "http://localhost:3030/v2/$network_name/program/${program_name}/view/compute_sum/${current_height}")
# view_output=$(jq -r '.[0]' <<< "$view_response")
# if [ "$view_output" = "3u32" ]; then
# log "✅ View function returned expected output at height ${current_height}: $view_output"
# else
# log "❌ Test failed! View function returned unexpected output at height ${current_height}: $view_response"
# exit 1
# fi

# Execute a function in the deployed program and wait for the execution to be processed.
log "● Testing program execution with V2 API..."
execute_result=$(cd program && snarkos developer execute --dev-key 0 --network "$network_id" --broadcast --endpoint=http://localhost:3030 \
Expand Down
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ workflows:
filters:
branches:
only:
- test_fixed_dev_committee
- copilot/feature-expose-new-api-endpoint
- canary
- testnet
- mainnet
Expand All @@ -826,7 +826,7 @@ workflows:
filters:
branches:
only:
- release-mainnet-4.7.3
- copilot/feature-expose-new-api-endpoint
- canary
- testnet
- mainnet
Expand All @@ -836,7 +836,7 @@ workflows:
filters:
branches:
only:
- release-mainnet-4.7.3
- copilot/feature-expose-new-api-endpoint
- canary
- testnet
- mainnet
Expand All @@ -845,7 +845,7 @@ workflows:
filters:
branches:
only:
- release-mainnet-4.7.3
- copilot/feature-expose-new-api-endpoint
- canary
- testnet
- mainnet
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- 'staging'
- 'release-mainnet-4.7.3'
- 'copilot/feature-expose-new-api-endpoint'
workflow_dispatch:

jobs:
Expand Down
Loading