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
@@ -8,7 +8,7 @@ license = { workspace = true }
workspace = true
[dependencies]
nssa_core.workspace = true
lee_core.workspace = true
hex.workspace = true
bytemuck.workspace = true
@@ -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};
// Hello-world example program.
//
@@ -25,7 +25,7 @@ fn main() {
instruction: greeting,
},
instruction_data,
) = read_nssa_inputs::<Instruction>();
) = read_lee_inputs::<Instruction>();
// Unpack the input account pre state
let [pre_state] = pre_states
@@ -49,7 +49,7 @@ fn main() {
// The output is a proposed state difference. It will only succeed if the pre states coincide
// with the previous values of the accounts, and the transition to the post states conforms
// with the NSSA program rules.
// with the LEE program rules.
// WARNING: constructing a `ProgramOutput` has no effect on its own. `.write()` must be
// called to commit the output.
ProgramOutput::new(
@@ -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};
// Hello-world with authorization example program.
//
@@ -25,7 +25,7 @@ fn main() {
instruction: greeting,
},
instruction_data,
) = read_nssa_inputs::<Instruction>();
) = read_lee_inputs::<Instruction>();
// Unpack the input account pre state
let [pre_state] = pre_states
@@ -56,7 +56,7 @@ fn main() {
// The output is a proposed state difference. It will only succeed if the pre states coincide
// with the previous values of the accounts, and the transition to the post states conforms
// with the NSSA program rules.
// with the LEE program rules.
// WARNING: constructing a `ProgramOutput` has no effect on its own. `.write()` must be
// called to commit the output.
ProgramOutput::new(
@@ -1,6 +1,6 @@
use nssa_core::{
use lee_core::{
account::{AccountWithMetadata, Data},
program::{AccountPostState, Claim, ProgramInput, ProgramOutput, read_nssa_inputs},
program::{AccountPostState, Claim, ProgramInput, ProgramOutput, read_lee_inputs},
};
// Hello-world with write + move_data example program.
@@ -72,7 +72,7 @@ fn main() {
instruction: (function_id, data),
},
instruction_words,
) = read_nssa_inputs::<Instruction>();
) = read_lee_inputs::<Instruction>();
let post_states = match (pre_states.as_slice(), function_id, data.len()) {
([account_pre], WRITE_FUNCTION_ID, _) => {
@@ -1,5 +1,5 @@
use nssa_core::program::{
AccountPostState, ChainedCall, ProgramId, ProgramInput, ProgramOutput, read_nssa_inputs,
use lee_core::program::{
AccountPostState, ChainedCall, ProgramId, ProgramInput, ProgramOutput, read_lee_inputs,
};
// Tail Call example program.
@@ -33,7 +33,7 @@ fn main() {
instruction: (),
},
instruction_data,
) = read_nssa_inputs::<()>();
) = read_lee_inputs::<()>();
// Unpack the input account pre state
let [pre_state] = pre_states
@@ -1,6 +1,5 @@
use nssa_core::program::{
AccountPostState, ChainedCall, PdaSeed, ProgramId, ProgramInput, ProgramOutput,
read_nssa_inputs,
use lee_core::program::{
AccountPostState, ChainedCall, PdaSeed, ProgramId, ProgramInput, ProgramOutput, read_lee_inputs,
};
// Tail Call with PDA example program.
@@ -39,7 +38,7 @@ fn main() {
instruction: (),
},
instruction_data,
) = read_nssa_inputs::<()>();
) = read_lee_inputs::<()>();
// Unpack the input account pre state
let [pre_state] = pre_states