Skip to content

ADI: State updateLeaf support + full deployment + tests#430

Open
anandsemtech wants to merge 1 commit intoiden3:masterfrom
anandsemtech:adi-statev2-clean
Open

ADI: State updateLeaf support + full deployment + tests#430
anandsemtech wants to merge 1 commit intoiden3:masterfrom
anandsemtech:adi-statev2-clean

Conversation

@anandsemtech
Copy link
Copy Markdown

Overview

This PR introduces support for updating identity state in GIST using updateLeaf, enabling proper multi-state transitions for ADI-based deployments.

Key Changes

State Transition Fix

  • Added updateLeaf(...) in SmtLib.sol
  • Updated _transitState(...):
    • Genesis → addLeaf
    • Non-genesis → updateLeaf
  • Preserves Poseidon key: PoseidonUnit1L.poseidon([id])

ADI Deployment Layer

  • Added deployment scripts for:
    • State
    • IdentityTreeStore
    • Validators
    • UniversalVerifier
  • ADI-specific chain configs

Testing

  • Added regression tests:
    • Two-step transition
    • Poseidon sanity

Outcome

  • Multiple state transitions per identity now supported
  • Fixes failure in second publish
  • Enables full credential lifecycle
  • Required for ADI trust layer architecture

Scope

  • Fork-specific enhancement
  • Not intended as upstream PR to iden3

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.

1 participant