Skip to content

Commit af1b0c9

Browse files
committed
Revert "solfuzz: belt sanding"
This reverts commit a147928.
1 parent a8044c1 commit af1b0c9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1564
-1797
lines changed

contrib/test/run_test_vectors.sh

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#!/bin/bash
22

3-
# FIXME This whole file should just really be a firedancer-dev
4-
# invocation with parallelism natively implemented in C.
5-
63
set -ex
74

85
DIR="$( dirname -- "${BASH_SOURCE[0]}"; )"; # Get the directory name
@@ -11,8 +8,6 @@ cd $DIR/../..
118

129
OBJDIR=${OBJDIR:-build/native/gcc}
1310
NUM_PROCESSES=${NUM_PROCESSES:-12}
14-
PAGE_SZ=gigantic
15-
PAGE_CNT=$(( 6 * $NUM_PROCESSES ))
1611

1712
if [ "$LOG_PATH" == "" ]; then
1813
LOG_PATH="`mktemp -d`"
@@ -35,39 +30,27 @@ else
3530
cd dump/test-vectors
3631
fi
3732

38-
if ! git checkout -q $GIT_REF; then
39-
git fetch -q --depth=1 origin $GIT_REF
40-
git checkout -q FETCH_HEAD
41-
fi
33+
git fetch -q --depth=1 origin $GIT_REF
34+
git checkout -q $GIT_REF
4235
cd ../..
4336

44-
WKSP=run-test-vectors
45-
# If workspace already exists, reset it (and hope that it has the correct size)
46-
if ./$OBJDIR/bin/fd_wksp_ctl query $WKSP --log-path '' >/dev/null 2>/dev/null; then
47-
./$OBJDIR/bin/fd_wksp_ctl reset $WKSP --log-path ''
48-
else
49-
./$OBJDIR/bin/fd_wksp_ctl new run-test-vectors $PAGE_CNT $PAGE_SZ 0 0644 --log-path ''
50-
fi
51-
52-
SOL_COMPAT=( "$OBJDIR/unit-test/test_sol_compat" "--wksp" "$WKSP" )
53-
54-
export FD_LOG_PATH=$LOG_PATH/test_exec_block
55-
find dump/test-vectors/block/fixtures -type f -name '*.fix' | xargs -P $NUM_PROCESSES -n 1000 ${SOL_COMPAT[@]}
37+
LOG=$LOG_PATH/test_exec_block
38+
find dump/test-vectors/block/fixtures/* -type f -name '*.fix' | xargs -P $NUM_PROCESSES -n 1000 ./$OBJDIR/unit-test/test_exec_sol_compat --log-path $LOG --wksp-page-sz 1073741824
5639

57-
export FD_LOG_PATH=$LOG_PATH/test_exec_syscall
58-
find dump/test-vectors/syscall/fixtures -type f -name '*.fix' | xargs -P $NUM_PROCESSES -n 1000 ${SOL_COMPAT[@]}
40+
LOG=$LOG_PATH/test_exec_syscall
41+
find dump/test-vectors/syscall/fixtures/* -type f -name '*.fix' | xargs -P $NUM_PROCESSES -n 1000 ./$OBJDIR/unit-test/test_exec_sol_compat --log-path $LOG --wksp-page-sz 1073741824
5942

60-
export FD_LOG_PATH=$LOG_PATH/test_exec_interp
61-
find dump/test-vectors/vm_interp/fixtures -type f -name '*.fix' | xargs -P $NUM_PROCESSES -n 1000 ${SOL_COMPAT[@]}
43+
LOG=$LOG_PATH/test_exec_interp
44+
find dump/test-vectors/vm_interp/fixtures/* -type f -name '*.fix' | xargs -P $NUM_PROCESSES -n 1000 ./$OBJDIR/unit-test/test_exec_sol_compat --log-path $LOG --wksp-page-sz 1073741824
6245

63-
export FD_LOG_PATH=$LOG_PATH/test_exec_txn
64-
find dump/test-vectors/txn/fixtures -type f -name '*.fix' | xargs -P $NUM_PROCESSES ${SOL_COMPAT[@]}
46+
LOG=$LOG_PATH/test_exec_txn
47+
find dump/test-vectors/txn/fixtures/* -type f -name '*.fix' | xargs -P $NUM_PROCESSES ./$OBJDIR/unit-test/test_exec_sol_compat --log-path $LOG --wksp-page-sz 1073741824
6548

6649
zstd -df dump/test-vectors/elf_loader/fixtures/*.zst
67-
export FD_LOG_PATH=$LOG_PATH/test_elf_loader
68-
find dump/test-vectors/elf_loader/fixtures -type f -name '*.fix' | xargs -P $NUM_PROCESSES -n 1000 ${SOL_COMPAT[@]}
50+
LOG=$LOG_PATH/test_elf_loader
51+
find dump/test-vectors/elf_loader/fixtures/* -type f -name '*.fix' | xargs -P $NUM_PROCESSES -n 1000 ./$OBJDIR/unit-test/test_exec_sol_compat --log-path $LOG --wksp-page-sz 1073741824
6952

70-
export FD_LOG_PATH=$LOG_PATH/test_exec_instr
71-
find dump/test-vectors/instr/fixtures -type f -name '*.fix' | xargs -P $NUM_PROCESSES -n 1000 ${SOL_COMPAT[@]}
53+
LOG=$LOG_PATH/test_exec_instr
54+
find dump/test-vectors/instr/fixtures/* -type f -name '*.fix' | xargs -P $NUM_PROCESSES -n 1000 ./$OBJDIR/unit-test/test_exec_sol_compat --log-path $LOG --wksp-page-sz 1073741824
7255

7356
echo Test vectors success

src/flamenco/capture/fd_solcap_writer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "fd_solcap_proto.h"
55
#include "fd_solcap.pb.h"
66
#include "../types/fd_types.h"
7+
#include "../runtime/fd_runtime_public.h"
78

89
/* fd_solcap_writer_t is an opaque handle to a capture writer object.
910
Currently, it implements writing SOLCAP_V1_BANK files. See below

src/flamenco/fd_flamenco_base.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ fd_base58_enc_64_fmt( char * out,
7575
struct fd_bank;
7676
typedef struct fd_bank fd_bank_t;
7777

78-
struct fd_banks;
79-
typedef struct fd_banks fd_banks_t;
80-
8178
struct fd_exec_slot_ctx;
8279
typedef struct fd_exec_slot_ctx fd_exec_slot_ctx_t;
8380

src/flamenco/runtime/context/fd_capture_ctx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#define HEADER_fd_src_flamenco_runtime_context_fd_capture_ctx_h
33

44
#include "../../capture/fd_solcap_writer.h"
5-
#include "../fd_runtime_public.h" /* FD_RUNTIME_PUBLIC_ACCOUNT_UPDATE_MSG_FOOTPRINT */
65

76
/* Maximum number of accounts that can be updated in a single transaction */
87
#define FD_CAPTURE_CTX_MAX_ACCOUNT_UPDATES (128UL)

src/flamenco/runtime/fd_executor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#include "../../ballet/poh/fd_poh.h"
1111
#include "../types/fd_types_yaml.h"
1212
#include "../log_collector/fd_log_collector.h"
13+
#include "tests/harness/generated/invoke.pb.h"
14+
#include "tests/harness/generated/txn.pb.h"
1315
#include "../features/fd_features.h"
1416
#include "fd_runtime.h"
1517

src/flamenco/runtime/test_txn_rw_conflicts.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "../../util/fd_util_base.h"
2+
#include "../fd_flamenco_base.h"
13
#include "fd_acc_mgr.h"
24
#include "fd_runtime.h"
35
#include "fd_runtime_err.h"

src/flamenco/runtime/tests/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/flamenco/runtime/tests/Local.mk

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
1+
$(call add-hdrs,harness/generated/context.pb.h,harness/generated/elf.pb.h,harness/generated/invoke.pb.h,harness/generated/txn.pb.h,harness/generated/block.pb.h,harness/generated/vm.pb.h,harness/generated/type.pb.h,harness/generated/shred.pb.h harness/generated/metadata.pb.h)
2+
$(call add-objs,harness/generated/context.pb harness/generated/elf.pb harness/generated/invoke.pb harness/generated/txn.pb harness/generated/block.pb harness/generated/vm.pb harness/generated/type.pb harness/generated/shred.pb harness/generated/metadata.pb,fd_flamenco)
3+
14
ifdef FD_HAS_INT128
25
ifdef FD_HAS_SECP256K1
3-
4-
$(call add-hdrs,fd_solfuzz.h)
5-
$(call add-objs,fd_solfuzz fd_solfuzz_exec,fd_flamenco_test)
6-
7-
$(call add-hdrs,fd_instr_harness.h fd_txn_harness.h)
8-
$(call add-objs,fd_elf_harness fd_instr_harness fd_txn_harness fd_block_harness fd_harness_common fd_vm_harness fd_types_harness,fd_flamenco_test)
9-
$(call add-objs,fd_sol_compat,fd_flamenco_test)
10-
11-
$(call add-hdrs,generated/context.pb.h,generated/elf.pb.h,generated/invoke.pb.h,generated/txn.pb.h,generated/block.pb.h,generated/vm.pb.h,generated/type.pb.h,generated/shred.pb.h generated/metadata.pb.h)
12-
$(call add-objs,generated/context.pb generated/elf.pb generated/invoke.pb generated/txn.pb generated/block.pb generated/vm.pb generated/type.pb generated/shred.pb generated/metadata.pb,fd_flamenco)
6+
$(call add-hdrs,harness/fd_elf_harness.h harness/fd_instr_harness.h harness/fd_txn_harness.h harness/fd_block_harness.h harness/fd_harness_common.h harness/fd_vm_harness.h harness/fd_types_harness.h)
7+
$(call add-objs,harness/fd_elf_harness harness/fd_instr_harness harness/fd_txn_harness harness/fd_block_harness harness/fd_harness_common harness/fd_vm_harness harness/fd_types_harness,fd_flamenco_test)
8+
$(call add-objs,harness/fd_exec_sol_compat,fd_flamenco_test)
139

1410
SOL_COMPAT_FLAGS:=-Wl,--undefined=fd_types_vt_by_name
15-
$(call make-unit-test,test_sol_compat,test_sol_compat,fd_flamenco_test fd_flamenco fd_funk fd_ballet fd_util fd_disco,$(SECP256K1_LIBS))
16-
$(call make-shared,libfd_exec_sol_compat.so,fd_sol_compat,fd_flamenco_test fd_flamenco fd_funk fd_ballet fd_util fd_disco,$(SECP256K1_LIBS) $(SOL_COMPAT_FLAGS))
17-
18-
run-runtime-backtest: $(OBJDIR)/bin/fd_ledger
19-
OBJDIR=$(OBJDIR) src/flamenco/runtime/tests/run_backtest_ci.sh
11+
$(call make-unit-test,test_exec_sol_compat,test_exec_sol_compat,fd_flamenco_test fd_flamenco fd_funk fd_ballet fd_util fd_disco,$(SECP256K1_LIBS))
12+
$(call make-shared,libfd_exec_sol_compat.so,harness/fd_exec_sol_compat,fd_flamenco_test fd_flamenco fd_funk fd_ballet fd_util fd_disco,$(SECP256K1_LIBS) $(SOL_COMPAT_FLAGS))
2013

2114
endif
2215
endif
2316

17+
run-runtime-backtest: $(OBJDIR)/bin/fd_ledger
18+
OBJDIR=$(OBJDIR) src/flamenco/runtime/tests/run_backtest_ci.sh

src/flamenco/runtime/tests/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
all: fetch_and_generate
2+
3+
fetch_and_generate:
4+
./fetch_and_generate.sh

src/flamenco/runtime/tests/README.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)