Skip to content

Conversation

@GTC6244
Copy link
Contributor

@GTC6244 GTC6244 commented Dec 15, 2025

WHAT

This PR adds support for multiple blockchain chains at the Anvil level, specifically enabling a secondary "Datil" chain to run alongside the primary test chain. This allows integration tests to interact with two independent blockchain networks simultaneously, with the primary use case being testing recovery of Datil backups into Naga networks.

Key changes include:

  • Addition of a KeySetIdentifier enum to specify which keyset to use in signing/encryption requests
  • Extension of Anvil configuration to support multiple chain instances with different ports and state files
  • New DatilTestnet component for managing the secondary chain infrastructure

@GTC6244 GTC6244 self-assigned this Dec 15, 2025
Copilot AI review requested due to automatic review settings December 15, 2025 14:06
@GTC6244 GTC6244 changed the base branch from master to keysets December 15, 2025 14:08
@github-actions
Copy link

github-actions bot commented Dec 15, 2025

PASS [ 43.151s] (3/3) lit_node::test toxiproxy::perf_tests::load_with_no_latency
PASS [ 43.234s] (2/3) lit_node::test toxiproxy::perf_tests::load_with_50ms_latency_single_link
PASS [ 80.230s] (1/3) lit_node::test toxiproxy::perf_tests::load_with_50ms_latency_all_links

Copy link
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

This PR adds support for multiple blockchain chains at the Anvil level, specifically enabling a secondary "Datil" chain to run alongside the primary test chain. This allows integration tests to interact with two independent blockchain networks simultaneously, with the primary use case being testing recovery of Datil backups into Naga networks.

Key changes include:

  • Addition of a KeySetIdentifier enum to specify which keyset to use in signing/encryption requests
  • Extension of Anvil configuration to support multiple chain instances with different ports and state files
  • New DatilTestnet component for managing the secondary chain infrastructure

Reviewed changes

Copilot reviewed 42 out of 46 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
rust/lit-node/rust-toolchain.toml Updated Rust toolchain version from 1.86 to 1.88
rust/lit-node/lit-node/tests/test_data/datil_cache/datil-node-accounts.json Added cached Datil node account data for testing
rust/lit-node/lit-node/tests/integration/*.rs Updated test functions to pass new key_set_identifier parameter
rust/lit-node/lit-node/tests/integration/backup_datil_long.rs Significantly refactored to support Datil-to-Naga recovery testing with encryption/decryption validation
rust/lit-node/lit-node/tests/integration/keysets.rs Refactored keyset addition test and extracted stress test into separate function
rust/lit-node/lit-node/src/endpoints/*.rs Added support for optional key_set_identifier in signing/encryption endpoints
rust/lit-node/lit-node/src/tss/common/tss_state.rs Added key_set_identifier parameter to threshold calculation
rust/lit-node/lit-node/src/tasks/fsm/epoch_change.rs Added logic to handle restore keysets during epoch changes
rust/lit-node/lit-node/src/models/mod.rs Added PartialEq and Eq derives to KeySetConfig
rust/lit-node/lit-node/rpc-config.example.yaml Added RPC endpoints for anvilDatil and localchainDatil chains
rust/lit-node/lit-node-testnet/src/testnet/datil/*.rs New module for managing Datil testnet infrastructure
rust/lit-node/lit-node-testnet/src/testnet/chain/anvil.rs Extended Anvil to support multiple instances with different ports and state loading
rust/lit-node/lit-node-testnet/src/testnet/contracts.rs Refactored contract loading to separate configuration application from instantiation
rust/lit-node/lit-node-testnet/src/testnet/actions.rs Added keyset management helpers and refactored timestamp increase logic
rust/lit-node/lit-node-testnet/src/lib.rs Added TestSetupBuilder option for including Datil testnet
rust/lit-node/lit-node-testnet/Cargo.toml Added lit-blockchain-lite dependency for Datil contract bindings
rust/lit-node/lit-node-core/src/models/request.rs Added KeySetIdentifier enum to signing and encryption request structures
rust/lit-core/lit-blockchain/src/resolver/rpc/config.rs Added anvilDatil and localchainDatil to HTTPS check exclusions
Comments suppressed due to low confidence (2)

rust/lit-node/lit-node-testnet/src/testnet/datil/mod.rs:1

pub mod actions;

rust/lit-node/lit-node/tests/integration/keysets.rs:1

  • Variable name keySetId uses inconsistent casing. Should be key_set_id to follow Rust naming conventions (snake_case).

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

GTC6244 and others added 3 commits December 15, 2025 11:09
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@GTC6244 GTC6244 changed the base branch from keysets to feature/node-4848-test-datil-keys-in-naga December 18, 2025 02:22
@GTC6244 GTC6244 changed the base branch from feature/node-4848-test-datil-keys-in-naga to keysets December 18, 2025 02:23
@GTC6244 GTC6244 changed the base branch from keysets to feature/node-4848-test-datil-keys-in-naga December 18, 2025 02:23
…/node-4874-support-multiple-chains-at-anvil-level
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants