Skip to content
Open
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
12 changes: 0 additions & 12 deletions config/everything.mk
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,6 @@ $(OBJDIR)/unit-test/automatic.txt: $(LOCAL_MKS)
$(RM) $@
@$(foreach test,$(RUN_UNIT_TEST),echo $(test)>>$@;)

Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rule that generated $(OBJDIR)/integration-test/automatic.txt was removed, but make run-integration-test still passes --tests $(OBJDIR)/integration-test/automatic.txt (see this file earlier). This makes the integration-test runner dependent on a file that is no longer produced anywhere. Either restore generation of the integration test list, or update the run target/runner to not reference integration-test/automatic.txt.

Suggested change
# Generate list of automatic integration tests from $(call run-integration-test,...)
integration-test: $(OBJDIR)/integration-test/automatic.txt
define _run-integration-test
RUN_INTEGRATION_TEST+=$(OBJDIR)/integration-test/$(1)
endef
$(OBJDIR)/integration-test/automatic.txt: $(LOCAL_MKS)
$(MKDIR) "$(OBJDIR)/integration-test"
$(RM) $@
@$(foreach test,$(RUN_INTEGRATION_TEST),echo $(test)>>$@;)

Copilot uses AI. Check for mistakes.
# Generate list of automatic integration tests from $(call run-integration-test,...)
integration-test: $(OBJDIR)/integration-test/automatic.txt
define _run-integration-test
RUN_INTEGRATION_TEST+=$(OBJDIR)/integration-test/$(1)
endef
$(OBJDIR)/integration-test/automatic.txt: $(LOCAL_MKS)
$(MKDIR) "$(OBJDIR)/integration-test"
$(RM) $@
@$(foreach test,$(RUN_INTEGRATION_TEST),echo $(test)>>$@;)
$(TOUCH) "$@"

ifndef FD_HAS_FUZZ
FUZZ_EXTRA:=$(OBJDIR)/lib/libfd_fuzz_stub.a
endif
Expand Down Expand Up @@ -279,7 +268,6 @@ make-shared = $(eval $(call _make-exe,$(1),$(2),$(3),lib,lib,$(4) $(LDFLAGS_S
make-unit-test = $(eval $(call _make-exe,$(1),$(2),$(3),unit-test,unit-test,$(4) $(LDFLAGS_EXE)))
run-unit-test = $(eval $(call _run-unit-test,$(1)))
make-integration-test = $(eval $(call _make-exe,$(1),$(2),$(3),integration-test,integration-test,$(4) $(LDFLAGS_EXE)))
run-integration-test = $(eval $(call _run-integration-test,$(1)))
make-fuzz-test = $(eval $(call _fuzz-test,$(1),$(2),$(3),$(4) $(LDFLAGS_EXE)))
Comment on lines 268 to 271
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run-integration-test macro was removed here, but the earlier usage/documentation block in this file still advertises $(call run-integration-test,name,args). To avoid confusion and broken expectations when adding tests, update the documentation to remove/replace that usage or reintroduce a supported macro.

Copilot uses AI. Check for mistakes.

##############################
Expand Down
1 change: 1 addition & 0 deletions contrib/offline-replay/offline_replay.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
[accounts]
file_size_gib = {funk_pages}
max_accounts = {index_max}
in_memory_only = true
[runtime]
max_live_slots = 128
max_fork_width = 4
Expand Down
1 change: 1 addition & 0 deletions contrib/test/run_fd_shred_cap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ echo "
[layout]
execrp_tile_count = 8
[accounts]
in_memory_only = true
max_accounts = 150000000
file_size_gib = 100
[tiles]
Expand Down
135 changes: 7 additions & 128 deletions contrib/test/run_integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,6 @@ set -eou pipefail
TESTS=
VERBOSE=0

# Read command-line args

while [[ $# -gt 0 ]]; do

FLAG="$1"
shift 1

case "$FLAG" in
"--tests")
TESTS="$1"
shift 1
;;
"-v")
VERBOSE=1
;;
*)
echo "Unknown flag: $FLAG" >&2
exit 1
;;
esac

done

if [[ -z "$TESTS" && -z "${RECURSE_GUARD:-}" ]]; then
# No tests given, so indirect test execution through Make and retry.
# This ensures that we select the correct build dir for the current
Expand All @@ -51,31 +28,6 @@ AVAILABLE_JOBS=1
# Clean up process tree on exit
trap 'exit' INT QUIT TERM

# Track list of PIDs of child processes
declare -A PIDS=()
# Remember unit name of each PID
declare -A PID2UNIT=()
# Remember logfile name of each PID
declare -A PID2LOG=()

# Read in list of automatic integration tests to schedule as jobs
declare -a TEST_LIST=()

if [[ -s "$TESTS" ]]; then
while read -r line; do
if [[ "$line" =~ ^[[:space:]]*# ]]; then
continue
fi
TEST_LIST+=( "$line" )
done < <(grep -v '^#' "$TESTS")
fi

echo "test.sh: Scheduling ${#TEST_LIST[@]} tests in sequence" >&2

rc_path () {
echo "/tmp/.pid-$1.rc"
}

runner () {
local pid="$BASHPID"
local prog="$1"
Expand Down Expand Up @@ -116,14 +68,15 @@ runner () {
} > "$rcpath"
}

# dispatch numa_idx cpu_idx cmdline...
# Fork task
dispatch () {
# Craft command line args
local prog="$1"
local progname="${prog##*/}"
shift 1

if [[ ! -f "$prog" ]]; then
return 0
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dispatch() returns success when the target binary does not exist. This can mask misconfigurations (or path bugs) and produce false-positive test runs. Consider failing with a clear error message when an expected test binary is missing, or at least emitting a warning and returning non-zero in CI.

Suggested change
return 0
echo "test.sh: expected test binary not found: $prog" >&2
return 1

Copilot uses AI. Check for mistakes.
fi

# Create log dir
local logdir
logdir="$(dirname "$(dirname "$prog")")/log/$progname"
Expand All @@ -135,82 +88,8 @@ dispatch () {
fi

# Dispatch
runner "$prog" "$log" "$@" &
local pid="$!"

# Remember PID
PIDS["$pid"]=$pid
PID2UNIT["$pid"]="$progname"
PID2LOG["$pid"]="$log"
}

# sow
# schedule tasks until max concurrency reached
sow () {
if [[ "${#TEST_LIST[@]}" -eq 0 ]]; then return; fi
if [[ "${AVAILABLE_JOBS}" -eq 0 ]]; then return; fi

# Found a free CPU!
local test="${TEST_LIST[0]}"
TEST_LIST=( "${TEST_LIST[@]:1}" )
AVAILABLE_JOBS="$(( AVAILABLE_JOBS - 1 ))"
dispatch "$test"
runner "$prog" "$log" "$@"
}

FAIL_CNT=0

# reap
# wait for a job to finish
reap () {
wait -n "${PIDS[@]}"
# Clean up finished jobs
for pid in "${PIDS[@]}"; do
if [[ ! -d "/proc/$pid" ]]; then
# Job finished
local rcfile; rcfile="$(rc_path "$pid")"
local rc
local elapsed
{
IFS= read -r rc
IFS= read -r elapsed
} < "$rcfile"
local unit="${PID2UNIT["$pid"]}"
local log="${PID2LOG["$pid"]}"
local logfull="${log%.log}-full.log"
unset PIDS["$pid"]
unset PID2UNIT["$pid"]
unset PID2LOG["$pid"]
AVAILABLE_JOBS="$(( AVAILABLE_JOBS + 1 ))"
if [[ "$rc" -ne 0 ]]; then
FAIL_CNT="$(( FAIL_CNT + 1 ))"
printf "\033[0;31mFAIL\033[0m%12s %s (exit %d): %s\n" "$elapsed" "$unit" "$rc" "$logfull" >&2
grep -sv "Log at" "$logfull" | sed -e "$(printf "s/^/%19s%-20s /" '' "$unit")" || true >&2
else
printf "\033[0;32mOK \033[0m%12s %s\n" "$elapsed" "$unit" >&2
fi
fi
done
}

while [[ "${#TEST_LIST[@]}" -gt 0 ]]; do
sow
reap
done
while [[ "${#PIDS[@]}" -gt 0 ]]; do
reap
done

if [[ "$FAIL_CNT" -gt 0 ]]; then
echo -e "\033[0;31mFAIL\033[0m ($FAIL_CNT failure)" >&2
exit 1
else
echo -e "\033[0;32mPASS\033[0m" >&2
exit 0
fi

# TODO add firedancer-dev integration tests here

# Broken because genesis creation is unreliable
#src/app/firedancer-dev/tests/test_single_transfer.sh
# Broken because 'firedancer-dev txn' is unreliable
#src/app/firedancer-dev/tests/test_single_txn.sh
dispatch "$OBJDIR"/unit-test/test_fddev
dispatch "$OBJDIR"/unit-test/test_firedancer_dev --testnet
Comment on lines +94 to +95
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dispatch() is invoking binaries under $OBJDIR/unit-test/..., but test_fddev and test_firedancer_dev are built via make-integration-test, which places them under $OBJDIR/integration-test/.... As written, dispatch will skip running the tests entirely (due to the -f check). Update the paths to the integration-test directory (or change the build rules to emit these under unit-test).

Suggested change
dispatch "$OBJDIR"/unit-test/test_fddev
dispatch "$OBJDIR"/unit-test/test_firedancer_dev --testnet
dispatch "$OBJDIR"/integration-test/test_fddev
dispatch "$OBJDIR"/integration-test/test_firedancer_dev --testnet

Copilot uses AI. Check for mistakes.
1 change: 1 addition & 0 deletions contrib/test/run_solcap_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ cat > "$DUMP/$LEDGER/mainnet-376969880_current.toml" << EOF
[tiles.rpc]
enabled = false
[accounts]
in_memory_only = true
file_size_gib = 1
max_accounts = 2000000
[runtime]
Expand Down
82 changes: 0 additions & 82 deletions contrib/test/test_firedancer_leader.sh

This file was deleted.

1 change: 0 additions & 1 deletion src/app/fddev/Local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ monitor: bin
$(OBJDIR)/bin/fddev monitor $(MONITOR_ARGS)

$(call make-integration-test,test_fddev,tests/test_fddev,fd_fddev fd_fdctl fddev_shared fdctl_shared fdctl_platform fd_discoh fd_disco agave_validator fd_flamenco fd_funk fd_quic fd_tls fd_reedsol fd_waltz fd_tango fd_ballet fd_util fdctl_version)
$(call run-integration-test,test_fddev)

endif
endif
Expand Down
1 change: 0 additions & 1 deletion src/app/firedancer-dev/Local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ endif
endif

$(call make-integration-test,test_firedancer_dev,tests/test_firedancer_dev,fd_firedancer_dev fd_firedancer fddev_shared fdctl_shared fdctl_platform fd_discof fd_disco fd_choreo fd_flamenco fd_vinyl fd_funk fd_quic fd_tls fd_reedsol fd_waltz fd_tango fd_ballet fd_util firedancer_version, $(SECP256K1_LIBS) $(ROCKSDB_LIBS) $(OPENSSL_LIBS))
$(call run-integration-test,test_firedancer_dev)
else
$(warning firedancer-dev build disabled due to lack of zstd)
endif
Expand Down
6 changes: 3 additions & 3 deletions src/app/firedancer/config/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -532,11 +532,11 @@ telemetry = true
#
# The account index is stored in memory and preallocated. A limit
# of 1 billion accounts requires approx 100 GB index space.
max_accounts = 30_000_000
max_accounts = 1_300_000_000

# File size of the account database file (see [paths.accounts]).
# The entire account database is physically preallocated.
file_size_gib = 16
file_size_gib = 800
Comment on lines +535 to +539
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These new defaults (max_accounts = 1_300_000_000, file_size_gib = 800) drastically increase baseline resource requirements (index RAM + preallocated accounts DB). Because src/app/firedancer/config/devnet.toml does not override [accounts], running against devnet will now inherit these mainnet-scale defaults and likely fail on typical dev machines. Consider keeping smaller defaults and overriding only in mainnet configs, or add a devnet-specific [accounts] override with devnet-appropriate sizing.

Copilot uses AI. Check for mistakes.

# The validator keeps account changes that have not yet been
# finalized (rooted) by consensus in memory. This setting controls
Expand All @@ -560,7 +560,7 @@ telemetry = true
#
# If enabled, allocates [accounts.file_size_gib] memory and ignores
# [accounts.{cache_size_gib,max_unrooted_account_size_gib}].
in_memory_only = true
in_memory_only = false
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching accounts.in_memory_only to false changes the default storage mode to on-disk accounts and also makes [accounts.cache_size_gib,max_unrooted_account_size_gib] mandatory. Given the new very large file_size_gib default above, this can cause unexpected disk preallocation for configs that rely on defaults (e.g. devnet). If the intent is only to flip the default for mainnet, consider overriding in_memory_only=false in mainnet configs instead of changing the global default.

Suggested change
in_memory_only = false
in_memory_only = true

Copilot uses AI. Check for mistakes.

# The provider determines which Linux I/O API is used.
# Possible values for the option are:
Expand Down
3 changes: 0 additions & 3 deletions src/app/firedancer/config/mainnet-jito.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
]
[consensus]
expected_genesis_hash = "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d"
[accounts]
file_size_gib = 600
max_accounts = 1_100_000_000
[snapshots]
[snapshots.sources]
servers = [ "http://solana-mainnet-rpc.jumpisolated.com:8899" ]
Expand Down
3 changes: 0 additions & 3 deletions src/app/firedancer/config/mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
]
[consensus]
expected_genesis_hash = "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d"
[accounts]
file_size_gib = 600
max_accounts = 1_100_000_000
[snapshots]
[snapshots.sources]
servers = [ "http://solana-mainnet-rpc.jumpisolated.com:8899" ]
5 changes: 2 additions & 3 deletions src/flamenco/runtime/tests/run_ledger_backtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -284,19 +284,18 @@ EOF
if [[ "$DB" == "funk" ]]; then
cat <<EOF >> ${CONFIG_FILE}
[accounts]
in_memory_only = true
file_size_gib = $FUNK_PAGES
max_accounts = $INDEX_MAX
EOF
elif [[ "$DB" == "vinyl" ]]; then
if [[ "$INDEX_MAX" -lt "1000000" ]]; then
INDEX_MAX=1000000
fi
INDEX_MAX=$(( INDEX_MAX * 2 ))
cat <<EOF >> ${CONFIG_FILE}
[accounts]
in_memory_only = false
max_accounts = $INDEX_MAX
file_size_gib = $((FUNK_PAGES * 4))
file_size_gib = $((FUNK_PAGES * 2))
max_unrooted_account_size_gib = 2
cache_size_gib = 10
io_provider = "io_uring"
Expand Down
Loading