From 4aa8aafb3455df118654bbb52b3199885d1848fb Mon Sep 17 00:00:00 2001 From: valiksinev Date: Fri, 12 Jun 2026 16:05:45 +0400 Subject: [PATCH] chore(interface): drop IEd25519 surface (paired with rome-evm-private remove_lazer) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rome-evm-private's remove_lazer branch deletes the ed25519 precompile at 0xff..0a (program/src/non_evm/ed25519.rs + ed25519_ix.rs) along with the Pyth Lazer wrapper, so the IEd25519 interface here has no on-chain target. Removes: - IEd25519 interface declaration + ed25519_program_address constant + the pre-bound Ed25519 alias from contracts/interface.sol - contracts/examples/ed25519_example.sol (the worked example) Compile clean (86 Solidity files); 22 oracle parser tests still pass. No in-repo tests referenced IEd25519 — Lazer-specific tests were already removed in #196. --- contracts/examples/ed25519_example.sol | 35 -------------------------- contracts/interface.sol | 34 ------------------------- 2 files changed, 69 deletions(-) delete mode 100644 contracts/examples/ed25519_example.sol diff --git a/contracts/examples/ed25519_example.sol b/contracts/examples/ed25519_example.sol deleted file mode 100644 index dceba88..0000000 --- a/contracts/examples/ed25519_example.sol +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; - -import "../interface.sol"; - -/// Worked example: verifying a single ed25519 signature via the IEd25519 precompile. -/// -/// The caller provides: -/// - `allowed_signers`: bytes32[] of trusted ed25519 public keys -/// - `expected_message`: bytes the caller asserts the runtime verified -/// - `ed25519_ix_idx`: top-level Solana ix index of the Ed25519SigVerify ix -/// - `sig_idx`: which signature within that ix (multi-sig batching support) -/// -/// On success, returns the verified signer pubkey (∈ allowed_signers). -/// Reverts otherwise. See rome-evm-private's `non_evm/ed25519_ix.rs` for the -/// 15 error variants and what triggers each. -/// -/// Real consumers inline this pattern but pin `allowed_signers` to a -/// hardcoded allowlist (e.g. just one well-known signer pubkey) and supply -/// the on-wire envelope as `expected_message`. -contract ed25519_example { - function verify_one( - bytes32[] calldata allowed_signers, - bytes calldata expected_message, - uint8 ed25519_ix_idx, - uint8 sig_idx - ) external view returns (bytes32 verified_signer) { - return Ed25519.verify_from_allowlist( - allowed_signers, - expected_message, - ed25519_ix_idx, - sig_idx - ); - } -} diff --git a/contracts/interface.sol b/contracts/interface.sol index ec196ea..94bc1c3 100644 --- a/contracts/interface.sol +++ b/contracts/interface.sol @@ -285,45 +285,12 @@ interface IHelperProgram { function deposit_from_ata(uint256 wei_) external; } -// IEd25519 — generic ed25519 signature verification primitive at `0xff..0a`. -// Confirms the Solana runtime cryptographically verified a signature in the -// current transaction against `allowed_signers` and `expected_message`. -// Pure-read CrossStateEthCall; single-state Rome chains only. -// -// Spec: rome-specs/main/active/technical/2026-05-19-rome-ed25519-precompile.md -// Source of truth: rome-evm-private/program/src/non_evm/ed25519.rs + -// rome-evm-private/program/src/non_evm/ed25519_ix.rs. -// -// Generic primitive — usable by any consumer that needs to confirm a Solana -// runtime Ed25519 signature verification. Examples: signed-payload bridges, -// signed-message oracle providers, capability tokens. -interface IEd25519 { - /// @param allowed_signers MUST be non-empty (max 16 — DoS guard). - /// @param expected_message MUST be non-empty. The byte sequence the caller - /// asserts was verified. Must byte-equal what the precompile - /// actually verified, or this function reverts. - /// @param ed25519_ix_idx Index of the Ed25519SigVerify ix in the current - /// Solana tx. - /// @param sig_idx Which signature within that ix to check (the ix - /// supports multi-sig batching). - /// @return verified_signer The pubkey from the precompile ix data that the - /// runtime confirmed signed `expected_message`. Guaranteed - /// member of `allowed_signers`. - function verify_from_allowlist( - bytes32[] calldata allowed_signers, - bytes calldata expected_message, - uint8 ed25519_ix_idx, - uint8 sig_idx - ) external view returns (bytes32 verified_signer); -} - address constant system_cached_address = address(0xFf00000000000000000000000000000000000004); address constant spl_cached_address = address(0xff00000000000000000000000000000000000005); address constant associated_spl_cached_address = address(0xFF00000000000000000000000000000000000006); address constant system_program_address = address(0xfF00000000000000000000000000000000000007); address constant cpi_program_address = address(0xFF00000000000000000000000000000000000008); address constant helper_program_address = address(0xff00000000000000000000000000000000000009); -address constant ed25519_program_address = address(0xfF0000000000000000000000000000000000000a); address constant withdraw_cached_address = address(0xFF0000000000000000000000000000000000000B); address constant withdraw_address = address(0x4200000000000000000000000000000000000016); @@ -331,7 +298,6 @@ ISystemProgram constant SystemProgram = ISystemProgram(system_program_address); ICrossProgramInvocation constant CpiProgram = ICrossProgramInvocation(cpi_program_address); IWithdraw constant Withdraw = IWithdraw(withdraw_address); IHelperProgram constant HelperProgram = IHelperProgram(helper_program_address); -IEd25519 constant Ed25519 = IEd25519(ed25519_program_address); ISystemCached constant SystemCached = ISystemCached(system_cached_address); ISplCached constant SplCached = ISplCached(spl_cached_address); IAssociatedSplCached constant AssociatedSplCached = IAssociatedSplCached(associated_spl_cached_address);