refactor!: rename nssa crate to lee

BREAKING CHANGE:
- Crate `nssa` renamed to `lee`; update `Cargo.toml` dependencies from `nssa = { workspace = true }` to `lee = { workspace = true }`.
- Crate `nssa_core` renamed to `lee_core`; update similarly.
- Crate `key_protocol` moved under `lee`; update `Cargo.toml` dependencies from `key_protocol = { workspace = true }` to `lee_key_protocol = { workspace = true }`.
- Type `NSSATransaction` (in `common`) renamed to `LeeTransaction`.
- Error type `nssa::error::NssaError` renamed to `lee::error::LeeError`.
- Error type `nssa_core::error::NssaCoreError` renamed to `lee_core::error::LeeCoreError`.
- All `use nssa::` and `use nssa_core::` import paths must be updated to `use lee::` and `use lee_core::` respectively.
- Guest programs must replace `write_nssa_outputs` with `write_lee_outputs`.
- The sequencer RocksDB column family for the chain state was renamed. Existing databases are incompatible and must be wiped before running the new version.
- Domain separators updated: `"NSSA_seed"` → `"LEE_seed"` (key derivation), `"NSSA/v0.2/KDF-SHA256/"` → `"LEE/v0.2/KDF-SHA256/"` (encryption KDF), `"/NSSA/v0.2/AccountId/PDA/"` →
  `"/LEE/v0.2/AccountId/PDA/"` (public PDA address derivation). All previously derived keys, encrypted outputs, and public PDA addresses are invalidated.
This commit is contained in:
Sergio Chouhy
2026-06-01 17:11:42 -03:00
parent d3390efc6d
commit 4bcffafe27
305 changed files with 1985 additions and 1915 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ license = { workspace = true }
workspace = true
[dependencies]
nssa_core.workspace = true
lee_core.workspace = true
authenticated_transfer_core.workspace = true
clock_core.workspace = true
token_core.workspace = true
+2 -2
View File
@@ -9,7 +9,7 @@
use std::num::NonZero;
use amm_core::Instruction;
use nssa_core::program::{ProgramInput, ProgramOutput, read_nssa_inputs};
use lee_core::program::{ProgramInput, ProgramOutput, read_lee_inputs};
fn main() {
let (
@@ -20,7 +20,7 @@ fn main() {
instruction,
},
instruction_words,
) = read_nssa_inputs::<Instruction>();
) = read_lee_inputs::<Instruction>();
let pre_states_clone = pre_states.clone();
@@ -1,5 +1,5 @@
use ata_core::Instruction;
use nssa_core::program::{ProgramInput, ProgramOutput, read_nssa_inputs};
use lee_core::program::{ProgramInput, ProgramOutput, read_lee_inputs};
fn main() {
let (
@@ -10,7 +10,7 @@ fn main() {
instruction,
},
instruction_words,
) = read_nssa_inputs::<Instruction>();
) = read_lee_inputs::<Instruction>();
let pre_states_clone = pre_states.clone();
@@ -1,8 +1,8 @@
use authenticated_transfer_core::Instruction;
use nssa_core::{
use lee_core::{
account::{Account, AccountWithMetadata},
program::{
AccountPostState, Claim, DEFAULT_PROGRAM_ID, ProgramInput, ProgramOutput, read_nssa_inputs,
AccountPostState, Claim, DEFAULT_PROGRAM_ID, ProgramInput, ProgramOutput, read_lee_inputs,
},
};
@@ -70,7 +70,7 @@ fn main() {
instruction,
},
instruction_words,
) = read_nssa_inputs::<Instruction>();
) = read_lee_inputs::<Instruction>();
let post_states = match instruction {
Instruction::Initialize => {
+4 -4
View File
@@ -1,10 +1,10 @@
use bridge_core::Instruction;
use nssa_core::program::{
AccountPostState, ChainedCall, ProgramInput, ProgramOutput, read_nssa_inputs,
use lee_core::program::{
AccountPostState, ChainedCall, ProgramInput, ProgramOutput, read_lee_inputs,
};
fn unchanged_post_states(
pre_states: &[nssa_core::account::AccountWithMetadata],
pre_states: &[lee_core::account::AccountWithMetadata],
) -> Vec<AccountPostState> {
pre_states
.iter()
@@ -21,7 +21,7 @@ fn main() {
instruction,
},
instruction_words,
) = read_nssa_inputs::<Instruction>();
) = read_lee_inputs::<Instruction>();
assert!(
caller_program_id.is_none(),
+3 -3
View File
@@ -12,9 +12,9 @@ use clock_core::{
CLOCK_01_PROGRAM_ACCOUNT_ID, CLOCK_10_PROGRAM_ACCOUNT_ID, CLOCK_50_PROGRAM_ACCOUNT_ID,
ClockAccountData, Instruction,
};
use nssa_core::{
use lee_core::{
account::AccountWithMetadata,
program::{AccountPostState, ProgramInput, ProgramOutput, read_nssa_inputs},
program::{AccountPostState, ProgramInput, ProgramOutput, read_lee_inputs},
};
fn update_if_multiple(
@@ -45,7 +45,7 @@ fn main() {
instruction: timestamp,
},
instruction_words,
) = read_nssa_inputs::<Instruction>();
) = read_lee_inputs::<Instruction>();
let Ok([pre_01, pre_10, pre_50]) = <[_; 3]>::try_from(pre_states) else {
panic!("Invalid number of input accounts");
+4 -4
View File
@@ -1,10 +1,10 @@
use faucet_core::Instruction;
use nssa_core::program::{
AccountPostState, ChainedCall, ProgramInput, ProgramOutput, read_nssa_inputs,
use lee_core::program::{
AccountPostState, ChainedCall, ProgramInput, ProgramOutput, read_lee_inputs,
};
fn unchanged_post_states(
pre_states: &[nssa_core::account::AccountWithMetadata],
pre_states: &[lee_core::account::AccountWithMetadata],
) -> Vec<AccountPostState> {
pre_states
.iter()
@@ -21,7 +21,7 @@ fn main() {
instruction,
},
instruction_words,
) = read_nssa_inputs::<Instruction>();
) = read_lee_inputs::<Instruction>();
assert!(
caller_program_id.is_none(),
+2 -2
View File
@@ -1,4 +1,4 @@
use nssa_core::program::{AccountPostState, Claim, ProgramInput, ProgramOutput, read_nssa_inputs};
use lee_core::program::{AccountPostState, Claim, ProgramInput, ProgramOutput, read_lee_inputs};
use risc0_zkvm::sha::{Impl, Sha256 as _};
const PRIZE: u128 = 150;
@@ -52,7 +52,7 @@ fn main() {
instruction: solution,
},
instruction_words,
) = read_nssa_inputs::<Instruction>();
) = read_lee_inputs::<Instruction>();
let Ok([pinata, winner]) = <[_; 2]>::try_from(pre_states) else {
return;
@@ -1,7 +1,7 @@
use nssa_core::{
use lee_core::{
account::Data,
program::{
AccountPostState, ChainedCall, PdaSeed, ProgramInput, ProgramOutput, read_nssa_inputs,
AccountPostState, ChainedCall, PdaSeed, ProgramInput, ProgramOutput, read_lee_inputs,
},
};
use risc0_zkvm::sha::{Impl, Sha256 as _};
@@ -58,7 +58,7 @@ fn main() {
instruction: solution,
},
instruction_words,
) = read_nssa_inputs::<Instruction>();
) = read_lee_inputs::<Instruction>();
let Ok(
[
@@ -3,7 +3,7 @@ use std::{
convert::Infallible,
};
use nssa_core::{
use lee_core::{
Identifier, InputAccountIdentity, NullifierPublicKey,
account::{Account, AccountId, AccountWithMetadata},
program::{
@@ -1,4 +1,4 @@
use nssa_core::PrivacyPreservingCircuitInput;
use lee_core::PrivacyPreservingCircuitInput;
use risc0_zkvm::guest::env;
mod execution_state;
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
Commitment, CommitmentSetDigest, DUMMY_COMMITMENT_HASH, EncryptionScheme, InputAccountIdentity,
MembershipProof, Nullifier, NullifierPublicKey, NullifierSecretKey,
PrivacyPreservingCircuitOutput, PrivateAccountKind, SharedSecretKey,
+2 -2
View File
@@ -6,7 +6,7 @@
//! Token program accepts [`Instruction`] as input, refer to the corresponding documentation
//! for more details.
use nssa_core::program::{ProgramInput, ProgramOutput, read_nssa_inputs};
use lee_core::program::{ProgramInput, ProgramOutput, read_lee_inputs};
use token_program::core::Instruction;
fn main() {
@@ -18,7 +18,7 @@ fn main() {
instruction,
},
instruction_words,
) = read_nssa_inputs::<Instruction>();
) = read_lee_inputs::<Instruction>();
let pre_states_clone = pre_states.clone();
+4 -4
View File
@@ -5,13 +5,13 @@
//! performs the actual transfer of funds from the vault accounts.
use authenticated_transfer_core::Instruction as AuthTransferInstruction;
use nssa_core::program::{
AccountPostState, ChainedCall, ProgramInput, ProgramOutput, read_nssa_inputs,
use lee_core::program::{
AccountPostState, ChainedCall, ProgramInput, ProgramOutput, read_lee_inputs,
};
use vault_core::Instruction;
fn unchanged_post_states(
pre_states: &[nssa_core::account::AccountWithMetadata],
pre_states: &[lee_core::account::AccountWithMetadata],
) -> Vec<AccountPostState> {
pre_states
.iter()
@@ -28,7 +28,7 @@ fn main() {
instruction,
},
instruction_words,
) = read_nssa_inputs::<Instruction>();
) = read_lee_inputs::<Instruction>();
let pre_states_clone = pre_states.clone();
let post_states = unchanged_post_states(&pre_states_clone);