Skip to content

Commit

Permalink
Update ledger.ipldsch to move metadata to separate DAG
Browse files Browse the repository at this point in the history
Move metadata to a separate DAG.
  • Loading branch information
linuskendall authored Aug 8, 2024
1 parent bcfb24a commit 1b2012d
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions ledger.ipldsch
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ type Subset struct {
last Int
# The list of blocks in this subset.
blocks [ Link ] # [ &Block ]
# Block metadata
blocks_metadata [ Link ] # [& BlockMeta]
} representation tuple

type Block struct {
Expand All @@ -30,9 +32,15 @@ type Block struct {
entries [ Link ] # [ &Entry ]
# The metadata for this block.
meta SlotMeta
} representation tuple

type BlockMeta struct {
kind Int
# Link to the rewards for this block.
rewards Link # &Rewards
} representation tuple
# Transaction metadata, @TODO: does this risk being too big?
entries [ Link ] # [ &TransactionMeta ]
}

type Rewards struct {
kind Int
Expand Down Expand Up @@ -68,14 +76,19 @@ type Transaction struct {
kind Int
# Raw transaction data.
data DataFrame
# Raw tx metadata data.
metadata DataFrame
# The slot number where this transaction was created.
slot Int
# The index of the position of this transaction in the block (0-indexed).
index nullable optional Int
} representation tuple

type TransactionMeta struct {
kind Int

# Raw tx metadata data.
metadata DataFrame
}

type Hash bytes
type Buffer bytes

Expand Down

0 comments on commit 1b2012d

Please sign in to comment.