serviceability: deprecate access-pass Expired status#3831
Merged
Conversation
Epoch expiry no longer demotes users to OutOfCredits. update_status stops producing the status, and try_activate and CheckUserAccessPass keep users Activated. Epoch validity is still enforced at user creation for unicast users only; multicast publishers/subscribers are gated by mgroup_*_allowlist. Rename Expired -> ExpiredDeprecated (discriminant 3 retained) and mirror across Go/Python/TypeScript SDKs.
e0670f2 to
02dbcf6
Compare
bgm-malbeclabs
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
AccessPassStatus::Expiredstatus: epoch expiry no longer demotes users toOutOfCredits.update_statusstops producing the status, and bothtry_activate(user creation) andCheckUserAccessPass(periodic re-check) keep usersActivated.UserType::is_epoch_gated()/epoch_allows_connection()helpers. Multicast publishers and subscribers are governed bymgroup_*_allowlist, not by epoch.Expired→ExpiredDeprecated(discriminant3retained for wire compatibility) and render it as"expired (deprecated)", mirrored across the Go, Python, and TypeScript SDKs and the sharedenum_strings.jsonfixture.User not activeprecheck from the Rust SDK multicast subscribe/publish command so non-Activatedusers are no longer blocked before submission; authorization is enforced onchain.Diff Breakdown
Mostly a focused onchain behavior change; the large
user.rscount is dominated by new inline unit tests, and the SDK/fixture edits are mechanical enum-mirror updates.Key files (click to expand)
smartcontract/programs/doublezero-serviceability/src/state/user.rs— addUserType::is_epoch_gated()andepoch_allows_connection(); simplifytry_activateto always activate; add unit-test matrixsmartcontract/programs/doublezero-serviceability/src/state/accesspass.rs— renameExpired→ExpiredDeprecated;update_statusno longer derives status fromlast_access_epoch(dropsClock)smartcontract/programs/doublezero-serviceability/src/processors/user/check_access_pass.rs— drop theExpired → OutOfCreditsbranch; alwaysActivatedsmartcontract/sdk/rs/src/commands/multicastgroup/subscribe.rs— remove theUser not activeprechecksmartcontract/programs/doublezero-serviceability/src/processors/user/create_core.rs— creation gate now uses the shared epoch helpers (unicast-only, multicast exempt)smartcontract/sdk/go/serviceability/state.go— mirror the status rename (AccessPassStatusExpiredDeprecated)sdk/serviceability/python/serviceability/state.py— mirror the rename (EXPIRED_DEPRECATED)sdk/serviceability/typescript/serviceability/state.ts— mirror the"expired (deprecated)"stringTesting Verification
state/user.rs:test_epoch_allows_connection_matrix(IBRL withlast_access_epoch = 0blocked; multicast publisher/subscriber allowed without an epoch check;IBRLWithAllocatedIP/EdgeFilteringblocked; valid-epoch unicast allowed),test_user_type_is_epoch_gated, andtest_try_activate_always_activates.last_access_epoch = 0now assertsActivated; repurposed the prior delete-from-OutOfCredits test to confirmCheckUserAccessPasskeeps an epoch-expired unicast userActivatedand that delete still closes the account.doublezero-serviceabilitysuite passes (41 test binaries); Go, Python (97 passed), and TypeScript (116 passed) SDK enum-string tests pass against the updated fixture.