Skip to content

qa-tests: add the RPC tests to the Sync-from-scratch test#20484

Merged
mriccobene merged 1 commit intomainfrom
qa-tests/sync-from-scratch-with-rpc-tests
Apr 10, 2026
Merged

qa-tests: add the RPC tests to the Sync-from-scratch test#20484
mriccobene merged 1 commit intomainfrom
qa-tests/sync-from-scratch-with-rpc-tests

Conversation

@mriccobene
Copy link
Copy Markdown
Member

Since the 'sync from scratch' test creates an archive node, we can run the RPC test suite afterwards.

This approach has two benefits:

  1. Firstly, we will not be reliant on a pre-built database, thus avoiding the fragilities inherent in this scenario.

  2. Secondly, we will be testing a database that is entirely the product of the code under test. Please note that when a pre-built database is used for RPC testing, only the code that responds to requests is tested, not the code that builds the database.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Extends the “sync from scratch” QA workflow to run the RPC integration test suite on the freshly-synced archive datadir, reducing reliance on pre-built databases and improving end-to-end coverage of DB-building code paths.

Changes:

  • Add a --skip-backup option to the local RPC test runner script to allow running against disposable/ephemeral datadirs without chaindata backup/restore.
  • Update the sync-from-scratch workflow to build rpcdaemon + integration binaries and run RPC integration tests post-sync for supported chains (mainnet, gnosis).
  • Add caching and artifact upload for RPC test results in the sync-from-scratch workflow.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/scripts/run_rpc_tests_local.sh Adds --skip-backup flag to optionally skip chaindata backup/restore during RPC test runs.
.github/workflows/qa-sync-from-scratch.yml Runs RPC integration tests after a successful sync-from-scratch (mainnet/gnosis only), including cache restore and artifact upload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +123 to +127
if ! $SKIP_BACKUP; then
echo "Backing up chaindata..."
cp -r "$DATADIR/chaindata" "$BACKUP_DIR/chaindata"
BACKUP_NEEDED=true
fi
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

When --skip-backup is enabled, the script still initializes BACKUP_DIR and (if --backup-dir is provided) unconditionally rm -rf’s that directory before later skipping the actual backup. This makes --skip-backup --backup-dir <path> unexpectedly destructive. Consider short-circuiting backup-dir creation/cleanup when --skip-backup is set (and ignoring --backup-dir in that mode), or at minimum skipping the rm -rf path when backups are disabled.

Copilot uses AI. Check for mistakes.
@mriccobene mriccobene added this pull request to the merge queue Apr 10, 2026
Merged via the queue into main with commit 9e39d78 Apr 10, 2026
39 checks passed
@mriccobene mriccobene deleted the qa-tests/sync-from-scratch-with-rpc-tests branch April 10, 2026 17:16
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