Skip to content

Build against rusty-kaspa v2.1.0 and silverscript 1.0.1 - #71

Merged
michaelsutton merged 1 commit into
argent-lang:masterfrom
Silentpartnercoding:fix/rusty-kaspa-v2.1.0
Oct 19, 2026
Merged

michaelsutton merged 1 commit into
argent-lang:masterfrom
Silentpartnercoding:fix/rusty-kaspa-v2.1.0

Conversation

@Silentpartnercoding

Copy link
Copy Markdown
Contributor

Fixes #64.

rusty-kaspa v2.1.0 removed the pre-Toccata mode, and that broke argent-runtime in two places. silverscript#256 was the blocker mentioned in #64. It was resolved by silverscript#259, and silverscript-abi/silverscript-lang 1.0.1 on crates.io now target rusty-kaspa 2.1.0, so argent can move too. This follows the fix outlined in #64 by @Drcryptodee.

Changes

  • Cargo.toml: rusty-kaspa crates (kaspa-consensus-core, kaspa-txscript, kaspa-txscript-errors) move from git rev a41a333b to crates.io 2.1.0. silverscript-abi/silverscript-lang move from git rev 3ed97333 to crates.io 1.0.1. Cargo.lock regenerated.
  • crates/argent-runtime/src/lib.rs:
    • MAINNET_PARAMS.block_mass_limits().after() becomes MAINNET_PARAMS.block_mass_limits. In 2.1.0 it's a plain field, and its mainnet value { compute: 500_000, storage: 500_000, transient: 1_000_000 } equals the old .after() value (prior_block_mass_limits = shared 500_000, new_transient_mass_limit = 1_000_000 at a41a333b).
    • EngineFlags { covenants_enabled: true, ..Default::default() } becomes EngineFlags::default(). In 2.1.0, EngineFlags only has sigop_script_units (default Gram(1000), unchanged), and the engine always takes the path that covenants_enabled: true used to select.
    • New test post_toccata_limits_and_flags_match_pre_v2_1_selection pins these values, so the migration provably doesn't change behavior.

Verification

  • ./check.sh --full (toolchain 1.94.0) passes: fmt, cargo check --workspace, example regeneration, 556 tests passed / 0 failed, clippy -D warnings, git diff --check.
  • The regenerated examples/build/** artifacts are byte-identical to main, so the CI step git diff --exit-code passes and compiled output doesn't change.

rusty-kaspa v2.1.0 removed the pre-Toccata mode, which broke
argent-runtime in two places (argent-lang#64):

- Params::block_mass_limits() (a ForkedParam) is now a plain field;
  use it directly. Mainnet values are unchanged from the old .after()
  selection: compute 500_000, storage 500_000, transient 1_000_000.
- EngineFlags lost covenants_enabled; the engine now always runs the
  path that covenants_enabled: true selected. Use EngineFlags::default()
  (sigop_script_units = Gram(1000), as before).

Move the rusty-kaspa crates from the git pin a41a333b to crates.io 2.1.0
and silverscript from git 3ed97333 to crates.io 1.0.1, which already
targets rusty-kaspa 2.1.0 (kaspanet/silverscript#256, #259).

Add a test pinning the limit and flag values so the migration is
behavior-preserving. ./check.sh --full passes; regenerated example
artifacts are byte-identical.

Fixes argent-lang#64
@michaelsutton
michaelsutton merged commit 5b54436 into argent-lang:master Oct 19, 2026
1 check passed
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.

argent-runtime does not build against rusty-kaspa v2.1.0

2 participants