Skip to content

Add support for non-root authorization in simulation#432

Merged
Shaptic merged 18 commits intoprotocol-23from
nonroot-auth
May 22, 2025
Merged

Add support for non-root authorization in simulation#432
Shaptic merged 18 commits intoprotocol-23from
nonroot-auth

Conversation

@Shaptic
Copy link
Contributor

@Shaptic Shaptic commented May 13, 2025

What

  • Bumps soroban-env-host-prev to P22 and -curr to P23
  • Splits the GoLedgerStorage trait implementations for Protocol 22 (which uses SnapshotSourceWithArchive) and Protocol 23 (which just uses SnapshotSource)
  • Introduces a new, optional parameter to simulateTransaction:
interface SimulateTransactionRequest {
  authMode?: "" | "enforce" | "record" | "record_allow_nonroot"
}

which explicitly allows users to opt-in to non-root authorization in recording mode.

The behavior rules are:

  • default (omitted): enforce if auth entries are present, record otherwise (the behavior today)
  • enforce: always enforcement mode, even with an empty list
  • record: always recording mode, failing if any auth exists
  • record_allow_nonroot: like record but allowing non-root authorization

Why

Handle the breaking changes across the Protocol 22 and 23 simulation libraries cleanly.
Add non-root simulation support for both protocols per #344.

Known limitations

Integration testing isn't possible without an accompanying Core build.

@graydon graydon mentioned this pull request May 14, 2025
@Shaptic Shaptic force-pushed the nonroot-auth branch 2 times, most recently from 6af7d74 to 07dcd13 Compare May 14, 2025 17:06
@Shaptic Shaptic linked an issue May 14, 2025 that may be closed by this pull request
@Shaptic Shaptic force-pushed the nonroot-auth branch 4 times, most recently from 14f9d9a to c49211f Compare May 14, 2025 20:18
@Shaptic Shaptic marked this pull request as ready for review May 14, 2025 20:34
@Shaptic Shaptic requested review from a team, 2opremio and urvisavla May 14, 2025 20:34
@Shaptic Shaptic changed the title [Draft] Add support for non-root authorization in simulation [Add support for non-root authorization in simulation May 14, 2025
@Shaptic Shaptic changed the title [Add support for non-root authorization in simulation Add support for non-root authorization in simulation May 14, 2025
@Shaptic Shaptic force-pushed the nonroot-auth branch 2 times, most recently from a662cfa to f54fbcd Compare May 14, 2025 21:19
@Shaptic Shaptic force-pushed the nonroot-auth branch 3 times, most recently from 555d997 to 934fd51 Compare May 21, 2025 18:58
@Shaptic Shaptic merged commit 41bbf52 into protocol-23 May 22, 2025
10 of 13 checks passed
@Shaptic Shaptic deleted the nonroot-auth branch May 22, 2025 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow users to enable non-root auth in simulation

5 participants