Skip to content

fix(auth-eth): report the current root epoch in wrong-kind rejections - #1538

Merged
kvinwang merged 1 commit into
feat/kms-epochs-combinedfrom
fix/auth-rejection-root-epoch
Nov 9, 2026
Merged

kvinwang merged 1 commit into
feat/kms-epochs-combinedfrom
fix/auth-rejection-root-epoch

Conversation

@kvinwang

@kvinwang kvinwang commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #1533.

_checkAuthorization returned on a wrong-kind operation before filling in the current root epoch and chain hash, so authorizeKms/authorizeApp reported (0, 0x0). The KMS then failed with "Root epoch not registered" instead of the rejection reason. This fills both in first, as the KMS README states and as auth-simple, auth-mock and dstack-auth already do. Authorization decisions are unchanged.

Found by the Halmos symbolic tests in #1537.

Validation: Linux 6.8.0-1028-intel x86_64, Forge 1.8.4, solc 0.8.24, forge test --offline --ffi: 87 passed. The extended test_CheckAuthorization_RejectionIncludesActivatedEpoch fails without the fix (0 != 1).

_checkAuthorization returned on a wrong-kind operation before filling
in the current root epoch and chain hash, so the rejection reported
(0, 0x0). The KMS then failed with "Root epoch not registered" instead
of the rejection reason. Fill both in first, as the KMS README states
and as auth-simple, auth-mock and dstack-auth already do.

Found by a Halmos symbolic test.

Signed-off-by: Kevin Wang <wy721@qq.com>
@kvinwang
kvinwang force-pushed the fix/auth-rejection-root-epoch branch from 2a93793 to bace10c Compare November 9, 2026 06:12
@kvinwang
kvinwang changed the base branch from feat/kms-epochs-three-commits to feat/kms-epochs-combined November 9, 2026 06:12
@kvinwang
kvinwang merged commit 3e807ac into feat/kms-epochs-combined Nov 9, 2026
2 checks passed
@kvinwang
kvinwang deleted the fix/auth-rejection-root-epoch branch November 9, 2026 12:11
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