Skip to content

Commit

Permalink
add BucketEntryCounters to LedgerCloseMetaV1
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBrady committed Sep 12, 2024
1 parent 8c88608 commit 35f7fb2
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Stellar-ledger.x
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,34 @@ struct InvokeHostFunctionSuccessPreImage
ContractEvent events<>;
};

struct BucketEntryCounters
{
// The count of each type of entry in the bucketlist.
uint64_t accountEntryCount;
uint64_t trustLineEntryCount;
uint64_t offerEntryCount;
uint64_t dataEntryCount;
uint64_t claimableBalanceEntryCount;
uint64_t liquidityPoolEntryCount;
uint64_t temporaryContractDataEntryCount;
uint64_t persistentContractDataEntryCount;
uint64_t contractCodeEntryCount;
uint64_t configSettingEntryCount;
uint64_t ttlEntryCount;
// The size in bytes of each type of entry in the bucketlist.
uint64_t accountEntrySizeBytes;
uint64_t trustLineEntrySizeBytes;
uint64_t offerEntrySizeBytes;
uint64_t dataEntrySizeBytes;
uint64_t claimableBalanceEntrySizeBytes;
uint64_t liquidityPoolEntrySizeBytes;
uint64_t temporaryContractDataEntrySizeBytes;
uint64_t persistentContractDataEntrySizeBytes;
uint64_t contractCodeEntrySizeBytes;
uint64_t configSettingEntrySizeBytes;
uint64_t ttlEntrySizeBytes;
};

// this is the meta produced when applying transactions
// it does not include pre-apply updates such as fees
union TransactionMeta switch (int v)
Expand Down Expand Up @@ -543,6 +571,9 @@ struct LedgerCloseMetaV1
// Archived restorable ledger entries that are being
// evicted at this ledger.
LedgerEntry evictedPersistentLedgerEntries<>;

// The count and size of all types of entries in the bucketlist.
BucketEntryCounters bucketEntryCounters;
};

union LedgerCloseMeta switch (int v)
Expand Down

0 comments on commit 35f7fb2

Please sign in to comment.