From 35f7fb23420b944ce44470c851a556a0c426cbfe Mon Sep 17 00:00:00 2001 From: Thomas Brady Date: Thu, 12 Sep 2024 16:15:19 -0700 Subject: [PATCH] add BucketEntryCounters to LedgerCloseMetaV1 --- Stellar-ledger.x | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Stellar-ledger.x b/Stellar-ledger.x index 9c0d036..a49e288 100644 --- a/Stellar-ledger.x +++ b/Stellar-ledger.x @@ -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) @@ -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)