Skip to content

feat: enforce accept header genesis parameter for write RPC methods#1298

Merged
Mirko-von-Leipzig merged 12 commits into0xMiden:nextfrom
radik878:feature/require-genesis-for-write-rpc
Nov 20, 2025
Merged

feat: enforce accept header genesis parameter for write RPC methods#1298
Mirko-von-Leipzig merged 12 commits into0xMiden:nextfrom
radik878:feature/require-genesis-for-write-rpc

Conversation

@radik878
Copy link
Contributor

  • Implemented path-based enforcement in the Accept header middleware to require a matching genesis commitment for write methods SubmitProvenTransaction and SubmitProvenBatch. If missing, empty, or mismatched, requests are rejected. Read-only methods retain optional genesis but still validate if provided.
  • Added unit tests to cover missing/empty/mismatch rejection and successful pass with matching genesis.

fix #1123

radik878 and others added 3 commits November 10, 2025 16:21
Co-authored-by: Mirko <48352201+Mirko-von-Leipzig@users.noreply.github.com>
Co-authored-by: Mirko <48352201+Mirko-von-Leipzig@users.noreply.github.com>
Co-authored-by: Mirko <48352201+Mirko-von-Leipzig@users.noreply.github.com>
@Mirko-von-Leipzig Mirko-von-Leipzig added the blocked Something prevents working on this label Nov 17, 2025
@Mirko-von-Leipzig Mirko-von-Leipzig self-assigned this Nov 17, 2025
@Mirko-von-Leipzig Mirko-von-Leipzig removed the blocked Something prevents working on this label Nov 20, 2025
@Mirko-von-Leipzig Mirko-von-Leipzig merged commit 9dcf580 into 0xMiden:next Nov 20, 2025
5 checks passed
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.

Force genesis commitment for write RPC methods

4 participants