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

ci: testing fd localnet (DO NOT REVIEW) #2319

Closed
wants to merge 10 commits into from
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/on_pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: On Pull Request
on:
merge_group:
pull_request:
types: [synchronize, opened, reopened, ready_for_review]
# pull_request:
# types: [synchronize, opened, reopened, ready_for_review]
concurrency:
group: on-pull-request_${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: Firedancer
name: Firedancer Localnet
on:
workflow_call:
workflow_dispatch:
pull_request:
types: [synchronize, opened, reopened, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
firedancer-tests:
integration-test:
runs-on: [self-hosted, 512G]
if: github.event.pull_request.draft == false
env:
Expand All @@ -19,7 +21,26 @@ jobs:

- uses: ./.github/actions/deps

- name: build
- name: install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: clone agave
run: |
git clone --depth 1 --branch v1.18.15 https://github.com/anza-xyz/agave.git

- name: build agave
run: |
cd agave
./cargo build --release \
--package solana-genesis \
--package agave-validator \
--package solana-cli \
--package solana-keygen
cd ..

- name: build firedancer
run: |
./contrib/make-j fddev

Expand All @@ -31,10 +52,10 @@ jobs:
- uses: ./.github/actions/hugepages
with:
count_gigantic: 128
count_huge: 500 # TODO: this is required until we can handle anonymouse workspaces and loose huge pages in fddev
count_huge: 100 # TODO: this is required until we can handle anonymouse workspaces and loose huge pages in fddev

- name: test firedancer - local cluster
run: |
sudo prlimit --pid=$$ --nofile=1048576
sudo prlimit --pid=$$ --memlock=unlimited
./contrib/test/test_firedancer.sh
# ./contrib/test/test_firedancer.sh
37 changes: 19 additions & 18 deletions src/app/fdctl/run/tiles/fd_replay.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ after_frag( void * _ctx,

fd_fork_t * fork = fd_fork_frontier_ele_query(
ctx->forks->frontier, &ctx->curr_slot, NULL, ctx->forks->pool );

if( fork == NULL ) {
long prepare_time_ns = -fd_log_wallclock();

Expand All @@ -515,6 +516,24 @@ after_frag( void * _ctx,
// fork is advancing
FD_LOG_DEBUG(( "new block execution - slot: %lu, parent_slot: %lu", ctx->curr_slot, ctx->parent_slot ));

/* if it is an epoch boundary, push out stake weights */
int is_new_epoch = 0;
if( fork->slot_ctx.slot_bank.slot != 0 ) {
ulong slot_idx;
fd_epoch_bank_t * epoch_bank = fd_exec_epoch_ctx_epoch_bank( fork->slot_ctx.epoch_ctx );
ulong prev_epoch = fd_slot_to_epoch( &epoch_bank->epoch_schedule, fork->slot_ctx.slot_bank.prev_slot, &slot_idx );
ulong new_epoch = fd_slot_to_epoch( &epoch_bank->epoch_schedule, fork->slot_ctx.slot_bank.slot, &slot_idx );

if( prev_epoch < new_epoch || slot_idx == 0 ) {
FD_LOG_DEBUG(("Epoch boundary"));
is_new_epoch = 1;
}
}

if( is_new_epoch ) {
publish_stake_weights( ctx, mux, &fork->slot_ctx );
}

fork->slot_ctx.slot_bank.prev_slot = fork->slot_ctx.slot_bank.slot;
fork->slot_ctx.slot_bank.slot = ctx->curr_slot;

Expand All @@ -533,26 +552,8 @@ after_frag( void * _ctx,
FD_LOG_ERR(( "txn publishing failed" ));
}

/* if it is an epoch boundary, push out stake weights */
int is_new_epoch = 0;
if( fork->slot_ctx.slot_bank.slot != 0 ) {
ulong slot_idx;
fd_epoch_bank_t * epoch_bank = fd_exec_epoch_ctx_epoch_bank( fork->slot_ctx.epoch_ctx );
ulong prev_epoch = fd_slot_to_epoch( &epoch_bank->epoch_schedule, fork->slot_ctx.slot_bank.prev_slot, &slot_idx );
ulong new_epoch = fd_slot_to_epoch( &epoch_bank->epoch_schedule, fork->slot_ctx.slot_bank.slot, &slot_idx );

if( prev_epoch < new_epoch || slot_idx == 0 ) {
FD_LOG_DEBUG(("Epoch boundary"));
is_new_epoch = 1;
}
}

res = fd_runtime_block_execute_prepare( &fork->slot_ctx );

if( is_new_epoch ) {
publish_stake_weights( ctx, mux, &fork->slot_ctx );
}

if( res != FD_RUNTIME_EXECUTE_SUCCESS ) {
FD_LOG_ERR(( "block prep execute failed" ));
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/fdctl/run/topos/fd_firedancer.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,14 +331,14 @@ fd_topo_firedancer( config_t * _config ) {
/**/ fd_topob_tile_in( topo, "sender", 0UL, "metric_in", "sign_voter", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_UNPOLLED );

/**/ fd_topob_tile_in( topo, "pack", 0UL, "metric_in", "voter_pack", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED );
/**/ fd_topob_tile_in( topo, "pack", 0UL, "metric_in", "dedup_pack", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); /* No reliable consumers of networking fragments, may be dropped or overrun */
/**/ fd_topob_tile_in( topo, "pack", 0UL, "metric_in", "poh_pack", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED );
/**/ fd_topob_tile_in( topo, "pack", 0UL, "metric_in", "gossip_pack", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); /* No reliable consumers of networking fragments, may be dropped or overrun */
/**/ fd_topob_tile_in( topo, "bhole", 0UL, "metric_in", "replay_notif", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); /* No reliable consumers of networking fragments, may be dropped or overrun */
/**/ fd_topob_tile_in( topo, "pohi", 0UL, "metric_in", "replay_poh", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); /* No reliable consumers of networking fragments, may be dropped or overrun */
/**/ fd_topob_tile_in( topo, "pohi", 0UL, "metric_in", "stake_out", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); /* No reliable consumers of networking fragments, may be dropped or overrun */

/**/ fd_topob_tile_in( topo, "pack", 0UL, "metric_in", "dedup_pack", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED ); /* No reliable consumers of networking fragments, may be dropped or overrun */
/**/ fd_topob_tile_in( topo, "pohi", 0UL, "metric_in", "pack_replay", 0UL, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
/**/ fd_topob_tile_in( topo, "pack", 0UL, "metric_in", "poh_pack", 0UL, FD_TOPOB_UNRELIABLE, FD_TOPOB_POLLED );
fd_topob_tile_out( topo, "pohi", 0UL, "poh_pack", 0UL );

/* Hacky: Reserve a ulong to allow net0 to pass its PID to its neighbors */
Expand Down
Loading