Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BucketEntryCounters to LedgerCloseMetaV1 #219

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading