Skip to content
35 changes: 35 additions & 0 deletions Stellar-ledger.x
Original file line number Diff line number Diff line change
Expand Up @@ -490,11 +490,46 @@ struct LedgerCloseMetaV1
SCPHistoryEntry scpInfo<>;
};

struct LedgerCloseMetaV2
{
LedgerHeaderHistoryEntry ledgerHeader;

GeneralizedTransactionSet txSet;

// NB: transactions are sorted in apply order here
// fees for all transactions are processed first
// followed by applying transactions
TransactionResultMeta txProcessing<>;

// upgrades are applied last
UpgradeEntryMeta upgradesProcessing<>;

// other misc information attached to the ledger close
SCPHistoryEntry scpInfo<>;

// Size in bytes of BucketList, to support downstream
// systems calculating storage fees correctly.
uint64 totalByteSizeOfBucketList;

// Expired temp keys that are being evicted at this ledger.
LedgerKey evictedTemporaryLedgerKeys<>;

// Expired restorable ledger entries that are being
// evicted at this ledger.
LedgerEntry evictedRestorableLedgerEntries<>;

// We forgot to add an ExtensionPoint in v1 but at least
// we can add one now in v2.
ExtensionPoint ext;
};

union LedgerCloseMeta switch (int v)
{
case 0:
LedgerCloseMetaV0 v0;
case 1:
LedgerCloseMetaV1 v1;
case 2:
LedgerCloseMetaV2 v2;
};
}