pub fn initialize_handler(
ctx: Context<'_, '_, '_, '_, Initialize<'_>>,
pubkey_g2: [u8; 128],
genesis_time: u64,
period: u64,
chain_hash: [u8; 32],
) -> Result<()>Expand description
initialize handler — sets up the Config PDA with evmnet parameters.
Guards (ADR 0031 + ADR 0027 fallback + Wave X+1 FENDER-002 hardening):
authority == program_data.upgrade_authority_address(6012) — closes the deploy-to-init front-run window. Only the entity that controls the program’s upgrade authority (the deployer pre-transition, the Squads 2-of-3 multisig post-transition per ADR 0009) can initialize. Without this check, anyone watching the mempool betweensolana program deployconfirmation and the initialize tx could submit their own initialize with the correct (public) evmnet constants and capture permanent authority (ADR 0009 forbids rotation inupdate_config).chain_hash == EXPECTED_EVMNET_CHAIN_HASH(6007) — prevents wrong-chain deployment.pubkey_g2 == EXPECTED_EVMNET_PUBKEY(6008) — OPEN-ITEMS #4 RESOLVED 2026-04-16: fallback path chosen because the primaryis_in_correct_subgroup_assuming_on_curveexceeds 1.4M CU on BPF. Key rotation requires a program upgrade.