Skip to content

sdk: rename permission flag bit 6 from reservation to feed authority#3985

Open
juan-malbeclabs wants to merge 2 commits into
mainfrom
sdk-permission-feed-authority
Open

sdk: rename permission flag bit 6 from reservation to feed authority#3985
juan-malbeclabs wants to merge 2 commits into
mainfrom
sdk-permission-feed-authority

Conversation

@juan-malbeclabs

Copy link
Copy Markdown
Contributor

Summary

The TypeScript and Python serviceability SDKs named permission-flag bit 6 PERMISSION_FLAG_RESERVATION — the pre-rename placeholder name. This renames it to PERMISSION_FLAG_FEED_AUTHORITY (bit value unchanged, 1 << 6) so all SDKs match the on-chain program's flag names.

Motive

Bit 6 was originally a reserved slot (RESERVATION). PR #3289 ("smartcontract: rename reservation to feed authority and remove reservation instructions") renamed that bit to FEED_AUTHORITY in the Rust program and repurposed it as the active feed-authority role — authorize()'s check_legacy_any maps FEED_AUTHORITY -> feed_authority_pk, and feed_authority_pk is used across several processors (multicast subscriber allowlist, access-pass set/close) and folded into ACCESS_PASS_ADMIN. The Go SDK follows the current name (PermissionFlagFeedAuthority = 1 << 6), but the TypeScript and Python SDKs were never updated and drifted to the stale RESERVATION name.

Feed authority is not deprecated — RESERVATION is simply the old name that lingered in these two SDKs. This catches them up so a consumer can find the FEED_AUTHORITY role by its canonical name rather than a misleading "reservation" that maps to no real role.

Testing Verification

  • Python SDK suite passes (uv run pytest: 122 passed, 24 skipped). The constant has no internal references, so the rename is isolated; TypeScript type-checking / tests run in CI (bun unavailable locally).

The TypeScript and Python serviceability SDKs still named permission-flag bit 6
`PERMISSION_FLAG_RESERVATION`, the pre-rename placeholder. PR #3289 renamed that
bit from `RESERVATION` to `FEED_AUTHORITY` in the on-chain program (and the Go
SDK followed), repurposing it as the active feed-authority role
(`check_legacy_any` maps FEED_AUTHORITY -> feed_authority_pk). The TS/Python SDKs
were never updated and drifted. Rename the constant to
`PERMISSION_FLAG_FEED_AUTHORITY` (bit value unchanged) so all SDKs match the
program's flag names. The constant had no internal references.
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