Skip to content

[WIP] offline-replay: resolve OBJDIR from the built binary - #11291

Open
kbhargava-jump wants to merge 2 commits into
mainfrom
kbhargava/offline-replay-objdir-fix
Open

[WIP] offline-replay: resolve OBJDIR from the built binary#11291
kbhargava-jump wants to merge 2 commits into
mainfrom
kbhargava/offline-replay-objdir-fix

Conversation

@kbhargava-jump

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI balanced review requested due to automatic review settings September 4, 2026 17:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Generic backtests can silently select an arbitrary build flavor when multiple binaries exist.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates offline replay scripts to infer OBJDIR from an existing firedancer-dev binary.

Changes:

  • Searches build/ for firedancer-dev.
  • Adds executable validation and clearer failure messages.
File summaries
File Description
src/flamenco/runtime/tests/run_ledger_backtest.sh Infers and validates OBJDIR.
contrib/offline-replay/run_offline_replay_backtest.sh Resolves the post-build binary location.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/flamenco/runtime/tests/run_ledger_backtest.sh Outdated
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-424669000-perf per slot 0.052167 s 0.052186 s 0.036%
backtest mainnet-424669000-perf snapshot load 2.692 s 2.664 s -1.040%
backtest mainnet-424669000-perf total elapsed 67.607863 s 67.633568 s 0.038%
firedancer mem usage with mainnet.toml 173.41 GiB 173.41 GiB 0.000%

@ripatel-fd ripatel-fd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is nondeterministic, should resolve it from the build config, not grab a random firedancer-dev bin

@kbhargava-jump kbhargava-jump changed the title offline-replay: resolve OBJDIR from the built binary [WIP] offline-replay: resolve OBJDIR from the built binary Sep 4, 2026
Copilot AI review requested due to automatic review settings September 4, 2026 17:41
@kbhargava-jump
kbhargava-jump force-pushed the kbhargava/offline-replay-objdir-fix branch from dbc2c90 to d51a031 Compare September 4, 2026 17:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The checks break download-only mode and can overlook a failed parallel build.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread contrib/offline-replay/run_offline_replay_backtest.sh
Comment thread src/flamenco/runtime/tests/run_ledger_backtest.sh Outdated
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-424669000-perf per slot 0.048561 s 0.048614 s 0.109%
backtest mainnet-424669000-perf snapshot load 1.797 s 1.791 s -0.334%
backtest mainnet-424669000-perf total elapsed 62.935199 s 63.004321 s 0.110%
firedancer mem usage with mainnet.toml 173.4 GiB 173.4 GiB 0.000%

Copilot AI review requested due to automatic review settings September 4, 2026 17:52
@kbhargava-jump
kbhargava-jump force-pushed the kbhargava/offline-replay-objdir-fix branch from d51a031 to aa7b678 Compare September 4, 2026 17:52
@kbhargava-jump
kbhargava-jump force-pushed the kbhargava/offline-replay-objdir-fix branch from aa7b678 to 450ae83 Compare September 4, 2026 17:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new local failure cleanup can either silently fail or remove unrelated host configuration and cached genesis data.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment on lines +330 to +332
if [ -z "$CI" ]; then
$OBJDIR/bin/firedancer-dev configure fini all --config ${DUMP_DIR}/${LEDGER}_backtest.toml &> /dev/null || true
fi
Copilot AI review requested due to automatic review settings September 4, 2026 17:55
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-424669000-perf per slot 0.052079 s 0.052082 s 0.006%
backtest mainnet-424669000-perf snapshot load 2.632 s 2.673 s 1.558%
backtest mainnet-424669000-perf total elapsed 67.493961 s 67.497988 s 0.006%
firedancer mem usage with mainnet.toml 173.41 GiB 173.41 GiB 0.000%

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The new general backtest teardown deletes the cached ledger genesis file, breaking subsequent runs.

Review details

Suppressed comments (1)

src/flamenco/runtime/tests/run_ledger_backtest.sh:331

  • backtest only initializes hugetlbfs, snapshots, and keys, but fini all also runs the genesis stage, whose fini unlinks the configured $DUMP/$LEDGER/genesis.bin. After a failed local run, the cached ledger directory remains, so the next invocation skips the download and then fails with its genesis missing. Restrict teardown to the stages initialized by backtest; the privileged hugetlbfs teardown also needs sudo.
  $OBJDIR/bin/firedancer-dev configure fini all --config ${DUMP_DIR}/${LEDGER}_backtest.toml &> /dev/null || true
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Copilot AI review requested due to automatic review settings September 4, 2026 19:06
@kbhargava-jump
kbhargava-jump force-pushed the kbhargava/offline-replay-objdir-fix branch from 450ae83 to 04a4e35 Compare September 4, 2026 19:06
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-424669000-perf per slot 0.046192 s 0.046098 s -0.203%
backtest mainnet-424669000-perf snapshot load 1.726 s 1.707 s -1.101%
backtest mainnet-424669000-perf total elapsed 59.864647 s 59.743564 s -0.202%
firedancer mem usage with mainnet.toml 173.41 GiB 173.41 GiB 0.000%

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The local cleanup silently fails without the privileges required by configure fini all.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

fi

if [ -z "$CI" ] && grep -q "Unable to set the thread affinity" "$LOG"; then
$OBJDIR/bin/firedancer-dev configure fini all --config ${DUMP_DIR}/${LEDGER}_backtest.toml &> /dev/null || true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants