Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
eebca8e
Initial plan
Copilot Jun 4, 2026
44cfe91
Add CI logfile size regression checks
Copilot Jun 4, 2026
13f7146
logs: fix a spelling error
ljedrz Jun 11, 2026
41b3fbd
feat: record last known Aleo address for candidate peers
ljedrz Jun 11, 2026
891d963
fmt: move a block of tests below non-test code
ljedrz Jun 11, 2026
5211161
fix: prune outdated validator candidates
ljedrz Jun 11, 2026
f80ddac
Bump time libraries warned for by cargo audit
vicsn Jun 15, 2026
16a4863
Merge pull request #4310 from ProvableHQ/copilot/feature-expose-new-a…
vicsn Jun 15, 2026
130e94c
feat: move the Message version compat check to compilation
ljedrz Jun 15, 2026
6c7108a
logs: reduce the log level for block re-request failure
ljedrz Jun 15, 2026
56881ba
Merge pull request #4324 from ProvableHQ/logs/reduce_sync_re_req_seve…
vicsn Jun 16, 2026
4ec5201
Merge pull request #4321 from ProvableHQ/feat/compile_time_msg_versio…
vicsn Jun 16, 2026
5aab7c7
ci: wipe cache if corrupted
ljedrz Jun 16, 2026
a6e8072
ci: restrict log file sizes
ljedrz Jun 16, 2026
4654b0f
Potential fix for pull request finding
vicsn Jun 16, 2026
303dd83
Merge pull request #4325 from ProvableHQ/ci/proactive_cache_reset
vicsn Jun 16, 2026
152df29
tests: relax the cert count check under test_network
ljedrz Jun 11, 2026
0468c35
ci: tolerate more WARN logs in test_devnet
ljedrz Jun 16, 2026
78f3f6b
ci: tolerate more WARN logs in test_db_backup
ljedrz Jun 16, 2026
1238b53
Merge pull request #4316 from ProvableHQ/tests/relax_cert_count_errors
vicsn Jun 16, 2026
48d4025
Merge pull request #4317 from ProvableHQ/fix/prune_old_validator_cand…
vicsn Jun 24, 2026
b5df7fe
Merge remote-tracking branch 'origin/staging' into postrelease-merge-…
vicsn Jun 30, 2026
b8b42ae
Update snarkVM rev
vicsn Jun 30, 2026
0176a8c
Make vicsn latest editor
vicsn Jun 30, 2026
f15b833
Merge pull request #4305 from ProvableHQ/copilot/add-tests-log-size-r…
vicsn Jul 1, 2026
e5584c1
Merge pull request #4333 from ProvableHQ/postrelease-merge-mainnet
vicsn Jul 1, 2026
073cb57
Initial plan
Copilot Jul 4, 2026
4f2f003
Implement REST 404 mapping
Copilot Jul 4, 2026
be013ff
Tighten REST missing-block tests
Copilot Jul 4, 2026
9db4c98
Merge pull request #4338 from ProvableHQ/copilot/fix-rest-api-500-error
vicsn Jul 6, 2026
04348c5
Turn missing transition ID error to a warn to fix CI
vicsn Jul 6, 2026
be96717
Merge pull request #4339 from ProvableHQ/fix_errors_in_ci
vicsn Jul 6, 2026
cddbd36
Bump snarkVM rev and snarkOS version
vicsn Jul 7, 2026
84be239
Run more CI
vicsn Jul 7, 2026
f1f206d
Set appropriate log_level for ConsensusVersion mismatch, upgrades are…
vicsn Jul 7, 2026
15e87e0
Only ip ban when the peer is behind
vicsn Jul 7, 2026
6f1d276
Merge pull request #4340 from ProvableHQ/test_history_read_fix
vicsn Jul 7, 2026
9570c83
Merge pull request #4341 from ProvableHQ/appropriate_log_level_consen…
vicsn Jul 7, 2026
e3ac4b6
ci: run only chaotic reset tests with lower verbosity
vicsn Jul 7, 2026
c6269f2
Revert CI changes
vicsn Jul 8, 2026
8878c18
Make it easier to see which defaults the .ci tests are actually using
vicsn Jul 8, 2026
f6579c9
Only check for ERROR logs after quorum majority restarts are complete
vicsn Jul 8, 2026
626d228
Enable more CI
vicsn Jul 8, 2026
94121e2
Ensure nodes are restarted and connected before checking ERRORs in logs
vicsn Jul 8, 2026
6294f24
Merge pull request #4343 from ProvableHQ/test_chaotic_networks
vicsn Jul 8, 2026
707e1b3
Allow more warns in CI
vicsn Jul 8, 2026
8952f64
fix: abort the FD monitor task on shutdown
ljedrz Jul 8, 2026
b322ecd
fix: account for other platforms in the shutdown task check
ljedrz Jul 8, 2026
50ed27b
deps: update snarkVM
ljedrz Jul 8, 2026
8d01ca6
chore: update the lockfile
ljedrz Jul 8, 2026
d09d475
Merge pull request #4345 from ProvableHQ/relax_warns
vicsn Jul 8, 2026
d8125c9
Merge pull request #4346 from ProvableHQ/fix/abort_fd_monitor_on_shut…
vicsn Jul 8, 2026
dd61569
Merge staging
raychu86 Jul 24, 2026
adaf63b
Merge pull request #4350 from ProvableHQ/postrelease-merge-mainnet
raychu86 Jul 24, 2026
5e58e93
Merge testnet
raychu86 Jul 24, 2026
b26b1dd
chore(snarkos): update snarkVM version
raychu86 Jul 25, 2026
853737a
chore(snarkos): bump version for new release
raychu86 Jul 25, 2026
d4c484c
Merge pull request #4351 from ProvableHQ/release-testnet-4.9.0
raychu86 Jul 25, 2026
6b6d995
Update snarkVM rev
vicsn Jul 28, 2026
8c2fbda
Enable extended CI
vicsn Jul 28, 2026
195fe60
Patch quick-xml vuln
vicsn Jul 28, 2026
6ebb18f
chore(snarkos): update snarkVM version
raychu86 Jul 29, 2026
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.8.1
v4.9.0
8 changes: 4 additions & 4 deletions .ci/test_db_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
. ./.ci/utils.sh

# Change this to increase/decrease log verbosity
log_verbosity=2
log_verbosity=4
max_validator_log_size_bytes=$((2 * 1024 * 1024))

# Network parameters
total_validators=4
Expand All @@ -16,7 +17,7 @@ checkpoint_height=3
rollback_height=10
num_checkpoints=0
remaining_checkpoints=2
max_warnings=40
max_warnings=300

# Create log directory
init_log_dir
Expand Down Expand Up @@ -134,7 +135,7 @@ while (( total_wait < 600 )); do # 10 minutes max
done

if (( remaining_checkpoints == 0 )); then
if check_logs "$log_dir" "$total_validators" 0 "$max_warnings"; then
if check_logs "$log_dir" "$total_validators" 0 "$max_warnings" "$max_validator_log_size_bytes"; then
exit 0
else
exit 1
Expand All @@ -154,4 +155,3 @@ done
# The main loop has expired by now
log "❌ Test failed!"
exit 1

11 changes: 7 additions & 4 deletions .ci/test_devnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ network_id=$3
min_height=$4
max_warnings=$5

# The verobsity of snarkos nodes.
NODE_VERBOSITY=3
# The verbosity of snarkos nodes.
NODE_VERBOSITY=4
# Max logfile sizes (bytes) for regression checks.
MAX_VALIDATOR_LOG_SIZE_BYTES=$((2 * 1024 * 1024))
MAX_CLIENT_LOG_SIZE_BYTES=$((1 * 1024 * 1024))

# Default values if not provided
: "${total_validators:=4}"
: "${total_clients:=4}" # need at least 4 clients, so each validator has at least one client connected to it.
: "${network_id:=0}"
: "${min_height:=60}" # To likely go past the 100 round garbage collection limit.
: "${max_warnings:=40}"
: "${max_warnings:=300}"

# shellcheck source=SCRIPTDIR/utils.sh
. ./.ci/utils.sh
Expand Down Expand Up @@ -437,7 +440,7 @@ fi

# Ensure no errors are generated during the devnet run, as all nodes are
# expected to operate without failures or interruptions.
if check_logs "$log_dir" "$total_validators" "$total_clients" "$max_warnings"; then
if check_logs "$log_dir" "$total_validators" "$total_clients" "$max_warnings" "$MAX_VALIDATOR_LOG_SIZE_BYTES" "$MAX_CLIENT_LOG_SIZE_BYTES"; then
exit 0
else
exit 1
Expand Down
9 changes: 6 additions & 3 deletions .ci/test_full_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ max_warnings=$4
: "${total_validators:=4}"
: "${total_clients:=2}"
: "${network_id:=0}"
: "${max_warnings:=40}"
: "${max_warnings:=45}"

# Node verbosity
NODE_VERBOSITY=1
NODE_VERBOSITY=4
# Max logfile sizes (bytes) for regression checks.
MAX_VALIDATOR_LOG_SIZE_BYTES=$((8 * 1024 * 1024))
MAX_CLIENT_LOG_SIZE_BYTES=$((1 * 1024 * 1024))


# How long to wait between upgrades (seconds); used for block-height window
Expand Down Expand Up @@ -381,7 +384,7 @@ done

log "Upgrade test passed: network reached highest consensus version with release, all nodes upgraded to PR snarkos, and consensus version remained correct."

if check_logs "$log_dir" "$total_validators" "$total_clients" "$max_warnings"; then
if check_logs "$log_dir" "$total_validators" "$total_clients" "$max_warnings" "$MAX_VALIDATOR_LOG_SIZE_BYTES" "$MAX_CLIENT_LOG_SIZE_BYTES"; then
exit 0
else
exit 1
Expand Down
8 changes: 5 additions & 3 deletions .ci/test_partial_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ max_warnings=$3
# Default values if not provided
: "${total_validators:=4}"
: "${network_id:=0}"
: "${max_warnings:=40}"
: "${max_warnings:=45}"

# Node verbosity
NODE_VERBOSITY=1
NODE_VERBOSITY=4
# Max logfile size (bytes) for regression checks.
MAX_VALIDATOR_LOG_SIZE_BYTES=$((4 * 1024 * 1024))

# How long to wait between upgrades (seconds); used for block-height window
WAIT_BETWEEN_UPGRADES="${WAIT_BETWEEN_UPGRADES:-60}"
Expand Down Expand Up @@ -294,7 +296,7 @@ fi

log "🎉 Test passed! Node synced to new consensus height ($new_consensus_height) after another node was upgraded."

if check_logs "$log_dir" "$total_validators" 0 "$max_warnings"; then
if check_logs "$log_dir" "$total_validators" 0 "$max_warnings" "$MAX_VALIDATOR_LOG_SIZE_BYTES"; then
exit 0
else
exit 1
Expand Down
11 changes: 6 additions & 5 deletions .ci/test_reset_minority.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ max_warnings=$6
# Default values if not provided
: "${total_validators:=7}"
: "${network_id:=0}"
: "${reset_interval:=20}"
: "${final_height:=100}"
: "${reset_interval:=50}"
: "${final_height:=250}"
: "${num_resets:=3}"
: "${max_warnings:=40}"
: "${max_warnings:=4000}" # Allow lots of warnings as we're doing funky stuff in this test.

minority=$(( (total_validators - 1) / 3 ))
network_name=$(get_network_name "$network_id")
verbosity=0
verbosity=1
max_validator_log_size_bytes=$((6 * 1024 * 1024))

# The time that is used to determine the total timeout for the test
max_wait_per_block=10
Expand Down Expand Up @@ -101,7 +102,7 @@ else
exit 1
fi

if check_logs "$log_dir" "$total_validators" 0 "$max_warnings"; then
if check_logs "$log_dir" "$total_validators" 0 "$max_warnings" "$max_validator_log_size_bytes"; then
exit 0
else
exit 1
Expand Down
34 changes: 21 additions & 13 deletions .ci/test_restart_majority.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,26 @@ init_log_dir
total_validators=$1
network_id=$2
reset_interval=$3
final_height=$4
num_resets=$5
max_warnings=$6
num_resets=$4
max_warnings=$5

# Default values if not provided
: "${total_validators:=7}"
: "${network_id:=0}"
: "${reset_interval:=10}"
: "${final_height:=20}"
: "${reset_interval:=20}"
: "${num_resets:=3}"
: "${max_warnings:=40}"
: "${max_warnings:=4000}" # Allow lots of warnings as we're doing funky stuff in this test.

# Blocks to advance after all restarts complete.
final_height_advance=20

max_faulty=$(( (total_validators - 1) / 3 ))
# AleoBFT needs at least N-f for a quorum, not 2*f+1.
majority=$((total_validators - max_faulty))
network_name=$(get_network_name "$network_id")

# Keep verbosity low as we are running many nodes.
verbosity=0
verbosity=1
max_validator_log_size_bytes=$((3 * 1024 * 1024))

# The time that is used to determine the total timeout for the test.
# Set this higher than the interval for the minority test, as more nodes need to sync.
Expand Down Expand Up @@ -67,9 +68,6 @@ done

wait_for_nodes "$total_validators" 0 "$network_name" 180

# Wait longer if there are more blocks to reach.
max_wait=$((final_height * max_wait_per_block))

for iter in $(seq 1 "$num_resets"); do
reset_height=$(( iter * reset_interval ));

Expand Down Expand Up @@ -97,14 +95,24 @@ for iter in $(seq 1 "$num_resets"); do
done
done

if ! wait_for_heights 0 "$total_validators" "$final_height" "$network_name" $(( max_wait - $(elapsed_since "$start") )); then
# Sleep for a few seconds to make sure the nodes are fully restarted and connected.
sleep 5

log_check_since=$(epoch_now)
latest_height=$(get_block_height 0 "$network_name")
final_height=$((latest_height + final_height_advance))
max_wait=$((final_height_advance * max_wait_per_block))

log "All restarts complete at height ${latest_height}. Waiting for final height ${final_height}..."

if ! wait_for_heights 0 "$total_validators" "$final_height" "$network_name" "$max_wait"; then
log "❌ Test failed! Not all nodes reached final height of $final_height within $max_wait seconds."
exit 1
fi

log "SUCCESS! Network took $(elapsed_since "$start") seconds to reach final height of $final_height after $num_resets resets."

if check_logs "$log_dir" "$total_validators" 0 "$max_warnings"; then
if check_logs "$log_dir" "$total_validators" 0 "$max_warnings" "$max_validator_log_size_bytes" "" "$log_check_since"; then
exit 0
else
exit 1
Expand Down
94 changes: 83 additions & 11 deletions .ci/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,48 @@ function elapsed_since() {
echo $((SECONDS - start))
}

# Get the current Unix epoch timestamp in seconds.
function epoch_now() {
date +%s
}

# Convert a Unix epoch timestamp to an ISO-8601 prefix used by snarkOS log lines.
function epoch_to_iso() {
local epoch=$1
if date -u -d "@${epoch}" +%Y-%m-%dT%H:%M:%S >/dev/null 2>&1; then
date -u -d "@${epoch}" +%Y-%m-%dT%H:%M:%S
else
date -u -r "${epoch}" +%Y-%m-%dT%H:%M:%S
fi
}

# Return log lines at or after the given Unix epoch timestamp.
# When since_epoch is empty, returns the full log file.
function log_lines_since() {
local log_file=$1
local since_epoch=$2

if [ -z "$since_epoch" ]; then
cat "$log_file"
return 0
fi

local since_prefix
since_prefix=$(epoch_to_iso "$since_epoch")

awk -v since="$since_prefix" '
BEGIN { from = 0 }
/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}/ {
if (substr($1, 1, 19) >= since) {
from = 1
} else {
from = 0
}
}
from { print }
' "$log_file"
}

# Determine network name based on network_id
function get_network_name() {
local network_id=$1
Expand Down Expand Up @@ -344,26 +386,46 @@ function check_logs() {
# The maximum number of warnings allow in each node's log file.
# Nodes may create some warnings at startup because they cannot connect to each other yet.
local max_warnings=$4

# Optional max logfile size in bytes.
local max_validator_log_size_bytes=${5:-}
local max_client_log_size_bytes=${6:-}
# Optional Unix epoch timestamp; only log lines at or after this time are checked.
local since_epoch=${7:-}

if [ -n "$since_epoch" ]; then
log "Only checking log lines at or after $(epoch_to_iso "$since_epoch")"
fi

local all_reached=true
local highest_height=0

# Don't use `seq` here as `total_validators` can be 0.
for ((validator_index = 0; validator_index < validator_index; validator_index++)); do
if [ ! -s "$log_dir/validator-${validator_index}.log" ]; then
for ((validator_index = 0; validator_index < total_validators; validator_index++)); do
validator_log="$log_dir/validator-${validator_index}.log"
if [ ! -s "$validator_log" ]; then
log "❌ Test failed! Validator #${validator_index} did not create any logs in \"$log_dir\"."
return 1
fi

if [ -n "$max_validator_log_size_bytes" ]; then
validator_log_size_bytes=$(wc -c < "$validator_log")
if (( validator_log_size_bytes > max_validator_log_size_bytes )); then
log "❌ Test failed! Validator #${validator_index} logfile is too large (${validator_log_size_bytes}B > ${max_validator_log_size_bytes}B)."
return 1
fi
fi

validator_log_content=$(log_lines_since "$validator_log" "$since_epoch")

#TODO(kaimast): remove the grep -v "already exists in the ledger" once spurious sync errors are gone.
if grep "ERROR" "$log_dir/validator-${validator_index}.log" | grep -qv "already exists in the ledger"; then
if echo "$validator_log_content" | grep "ERROR" | grep -qv "already exists in the ledger"; then
log "❌ Test failed! Validator #${validator_index} logs contain errors."
# Print the errors to the console.
grep "ERROR" "$log_dir/validator-${validator_index}.log" | grep -v "already exists in the ledger"
echo "$validator_log_content" | grep "ERROR" | grep -v "already exists in the ledger"
return 1
fi

num_warnings=$(grep -c "WARN" "$log_dir/validator-${validator_index}.log")
num_warnings=$(echo "$validator_log_content" | grep -c "WARN" || true)
if (( num_warnings > max_warnings )); then
echo "❌ Test failed! Validator #${validator_index} logs contain more than ${max_warnings} warnings."
return 1
Expand All @@ -372,19 +434,30 @@ function check_logs() {

# Don't use `seq` here as `total_clients` can be 0.
for ((client_index = 0; client_index < total_clients; client_index++)); do
if [ ! -s "$log_dir/client-${client_index}.log" ]; then
client_log="$log_dir/client-${client_index}.log"
if [ ! -s "$client_log" ]; then
log "❌ Test failed! Client #${client_index} did not create any logs in \"$log_dir\"."
return 1
fi

if grep "ERROR" "$log_dir/client-${client_index}.log" | grep -qv "already exists in the ledger"; then
if [ -n "$max_client_log_size_bytes" ]; then
client_log_size_bytes=$(wc -c < "$client_log")
if (( client_log_size_bytes > max_client_log_size_bytes )); then
log "❌ Test failed! Client #${client_index} logfile is too large (${client_log_size_bytes}B > ${max_client_log_size_bytes}B)."
return 1
fi
fi

client_log_content=$(log_lines_since "$client_log" "$since_epoch")

if echo "$client_log_content" | grep "ERROR" | grep -qv "already exists in the ledger"; then
log "❌ Test failed! Client #${client_index} logs contain errors."
# Print the errors to the console.
grep "ERROR" "$log_dir/client-${client_index}.log" | grep -v "already exists in the ledger"
echo "$client_log_content" | grep "ERROR" | grep -v "already exists in the ledger"
return 1
fi

num_warnings=$(grep -c "WARN" "$log_dir/client-${client_index}.log")
num_warnings=$(echo "$client_log_content" | grep -c "WARN" || true)
if (( num_warnings > max_warnings )); then
echo "❌ Test failed! Client #${client_index} logs contain more than ${max_warnings} warnings."
return 1
Expand Down Expand Up @@ -957,4 +1030,3 @@ function get_block_height {
echo "$result"
return 0
}

Loading
Loading