Skip to content

Commit

Permalink
wip: schema for RBAC valid registrations
Browse files Browse the repository at this point in the history
  • Loading branch information
saibatizoku committed Sep 24, 2024
1 parent 3258ac9 commit b708dd7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 23 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- Index of RBAC 509 registrations. Valid.
CREATE TABLE IF NOT EXISTS rbac509_registration (
-- Primary Key Data
chain_root blob, -- 32 Bytes of Chain Root.
transaction_id blob, -- 32 Bytes of Transaction Hash.
purpose blob, -- 16 Bytes of UUIDv4 Purpose.
slot_no varint, -- slot number when the key_was_registered/re-registered.
txn smallint, -- Index of the TX which holds the registration data.

-- Non-Key Data
prv_txn_id blob, -- 32 Bytes from Previous Transaction Hash.

PRIMARY KEY (chain_root, transaction_id, purpose, slot_no, txn)
)
WITH CLUSTERING ORDER BY (slot_no DESC, txn DESC);
6 changes: 3 additions & 3 deletions catalyst-gateway/bin/src/db/index/schema/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ const SCHEMAS: &[(&str, &str)] = &[
"Create Table CIP-36 Registration For a stake address",
),
(
// CIP-509 Registration Table Schema
include_str!("./cql/cip509_registration.cql"),
"Create Table CIP-509 Registration",
// RBAC 509 Registration Table Schema
include_str!("./cql/rbac509_registration.cql"),
"Create Table RBAC 509 Registration",
),
];

Expand Down

0 comments on commit b708dd7

Please sign in to comment.