diff --git a/Stellar-ledger.x b/Stellar-ledger.x index d19462a..7f72aff 100644 --- a/Stellar-ledger.x +++ b/Stellar-ledger.x @@ -157,6 +157,13 @@ struct ConfigUpgradeSet { ConfigSettingEntry updatedEntry<>; }; +enum BucketListType +{ + LIVE = 0, + HOT_ARCHIVE = 1, + COLD_ARCHIVE = 2 +}; + /* Entries used to define the bucket list */ enum BucketEntryType { @@ -168,6 +175,16 @@ enum BucketEntryType INITENTRY = 2 // At-and-after protocol 11: only created. }; +enum HotArchiveBucketEntryType +{ + HOT_ARCHIVE_METAENTRY = -1, // Bucket metadata, should come first. + HOT_ARCHIVE_ARCHIVED = 0, // Entry is Archived + HOT_ARCHIVE_LIVE = 1, // Entry was previously HOT_ARCHIVE_ARCHIVED, or HOT_ARCHIVE_DELETED, but + // has been added back to the live BucketList. + // Does not need to be persisted. + HOT_ARCHIVE_DELETED = 2 // Entry deleted (Note: must be persisted in archive) +}; + struct BucketMetadata { // Indicates the protocol version used to create / merge this bucket. @@ -178,6 +195,8 @@ struct BucketMetadata { case 0: void; + case 1: + BucketListType bucketListType; } ext; }; @@ -194,6 +213,18 @@ case METAENTRY: BucketMetadata metaEntry; }; +union HotArchiveBucketEntry switch (HotArchiveBucketEntryType type) +{ +case HOT_ARCHIVE_ARCHIVED: + LedgerEntry archivedEntry; + +case HOT_ARCHIVE_LIVE: +case HOT_ARCHIVE_DELETED: + LedgerKey key; +case HOT_ARCHIVE_METAENTRY: + BucketMetadata metaEntry; +}; + enum TxSetComponentType { // txs with effective fee <= bid derived from a base fee (if any).