SilverScript PR #123 substantially changed how covenant declarations are lowered into generated contract entrypoints. The 31-file patch separated authentication, leader, and delegate entrypoint naming; centralized the reserved State type; revised declaration handling; and expanded fixtures for singleton, array, stateless, termination, and cardinality cases. Existing experimental contracts should be recompiled and retested.
Key takeaways
- The change is a compiler migration, not a new end-user token standard.
- Generated covenant entrypoints became more explicit by role.
Stateremains a reserved type, now referenced through a shared compiler constant.- The test suite covers more declaration forms and failure boundaries.
- Developers should treat old compiled artifacts as version-sensitive and avoid hand-calling generated names.
What changed in SilverScript covenant declarations?
SilverScript PR #123 merged 523 additions and 592 deletions across 31 files. Its short title—“Cov decl changes”—understates the scope. Most of the work sits in covenant-declaration lowering and the test fixtures that show how source-level declarations become executable entrypoints.
One visible change is role-specific generated names. The patch exposes separate helpers for authentication, leader, and delegate entrypoints instead of routing multiple cases through one generic covenant entrypoint name. That makes the compiler’s internal ABI easier to distinguish and reduces the chance that debugger or tooling code resolves the wrong generated target.
The change also moves the reserved State name into a shared STATE_TYPE_NAME constant. A developer still cannot declare an unrelated structure named State, but parser and compiler components now reference the same definition rather than duplicating a string rule.
Why are generated entrypoints important?
SilverScript is a high-level language that compiles contract intent into Kaspa script. A covenant declaration can require multiple generated paths because the transaction may need to prove different roles or transition conditions. The compiler therefore creates internal functions that ordinary source code does not spell out line by line.
Explicit role names make those paths more inspectable. A debugger can determine whether it is resolving the authentication path, a leader transition, or a delegate path. An ABI consumer can show a more accurate call target. Tests can assert that each generated name appears only where expected.
Developers should still avoid treating those generated names as a stable hand-written API. They are compiler output. Calling them directly from custom tooling couples that tooling to an implementation detail that can change as SilverScript evolves.
What do the new fixtures tell us?
The PR adds or revises fixtures for a broad set of covenant behaviors. File names in the public diff cover:
- singleton transition and verification sugar;
- authentication and covenant verification paths;
- one-field and multi-field state;
- array state and output-count checks;
- allowed termination in transition and verification modes;
- stateless authentication and stateless covenant verification;
- several covenant declarations inside one contract.
Fixtures are not just examples. They define expected compiler output for edge cases that are easy to misunderstand. For instance, array state can create a relationship between returned state values and the exact number of outputs. Termination rules can change whether a transition is allowed to produce no successor state. A migration should run these upstream tests as well as application-specific tests.
How should a developer migrate an experimental contract?
First, update SilverScript from the trusted repository and build the exact revision you intend to test. Then recompile the source; do not assume a previously generated script or ABI is interchangeable with the new compiler output.
Second, compare the compiled ABI and generated script before submitting any transaction. If custom debugger, wallet, or deployment code searches for generated entrypoint names, update it to use the compiler’s exported helpers rather than reconstructing names locally.
Third, run positive and negative tests. A valid transition should still pass, but an invalid state count, unauthorized branch, or disallowed termination should fail for the expected reason. Negative tests are particularly important for covenants because an unexpectedly permissive path can be more dangerous than a visible compile error.
Finally, record the compiler version with the artifact. The companion update covered in SilverScript compiler versions makes that provenance easier to preserve.
What does this change not prove?
A merged compiler PR does not mean every contract compiled with it is safe. It does not replace an audit, application threat model, or mainnet-readiness review. The patch improves compiler behavior and tests; contract authors remain responsible for their own state machine and transaction assumptions.
It also does not turn SilverScript into an account-based virtual machine. The language continues to target Kaspa’s script and UTXO model. Generated entrypoints are ways to express spending and transition rules within that architecture.
Protocol proving work such as the KIP-21 inactivity shortcut belongs to a different layer. A SilverScript compiler merge can help tooling evolve around new script capabilities, but it does not activate a rusty-kaspa consensus rule or prove that a protocol feature is live on mainnet.
Frequently asked questions
Do developers need to rename their own functions?
Not necessarily. The most visible renaming affects compiler-generated covenant entrypoints. However, custom tooling that depended on the old generated names must be updated.
Can a contract define its own struct named State?
No. The compiler continues to reserve State; the patch centralizes that rule in a shared constant.
Is recompilation enough for migration?
No. Recompile, compare artifacts, update ABI consumers, and rerun both success and failure tests. Any contract protecting value also needs independent security review appropriate to its risk.
Source and verification note
The primary source is kaspanet/silverscript PR #123, merged into the SilverScript master branch on May 19, 2026. The public diff reports 31 changed files and includes compiler code, debugger changes, fixtures, and validation and lowering tests. SilverScript was experimental during this development period; this compiler merge was not a Kaspa mainnet activation, and interfaces should be checked against the current repository before use.






