diff --git a/Makefile b/Makefile index 63632e56..62657782 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -XDR_BASE_URL_CURR=https://github.com/stellar/stellar-xdr/raw/1a04392432dacc0092caaeae22a600ea1af3c6a5 +XDR_BASE_URL_CURR=https://github.com/stellar/stellar-xdr/raw/4ec28d95dd84b109253e22b151314478d6f00522 XDR_BASE_LOCAL_CURR=xdr/curr XDR_FILES_CURR= \ Stellar-SCP.x \ @@ -14,7 +14,7 @@ XDR_FILES_CURR= \ Stellar-contract-config-setting.x XDR_FILES_LOCAL_CURR=$(addprefix xdr/curr/,$(XDR_FILES_CURR)) -XDR_BASE_URL_NEXT=https://github.com/stellar/stellar-xdr/raw/4bd4827b3361f266d295cbc83c5d7f7396d782d9 +XDR_BASE_URL_NEXT=https://github.com/stellar/stellar-xdr/raw/86b4ff573c3e9a475f9280b97645cc75e2c75b6e XDR_BASE_LOCAL_NEXT=xdr/next XDR_FILES_NEXT= \ Stellar-SCP.x \ diff --git a/src/generated/curr_generated.js b/src/generated/curr_generated.js index 90e88f57..9a55b0a3 100644 --- a/src/generated/curr_generated.js +++ b/src/generated/curr_generated.js @@ -1,4 +1,4 @@ -// Automatically generated by xdrgen +// Automatically generated by xdrgen on 2024-08-23T12:09:00-08:00 // DO NOT EDIT or your changes may be overwritten /* jshint maxstatements:2147483647 */ @@ -2054,6 +2054,285 @@ xdr.enum("EnvelopeType", { envelopeTypeSorobanAuthorization: 9, }); +// === xdr source ============================================================ +// +// enum BucketListType +// { +// LIVE = 0, +// HOT_ARCHIVE = 1, +// COLD_ARCHIVE = 2 +// }; +// +// =========================================================================== +xdr.enum("BucketListType", { + live: 0, + hotArchive: 1, + coldArchive: 2, +}); + +// === xdr source ============================================================ +// +// enum BucketEntryType +// { +// METAENTRY = +// -1, // At-and-after protocol 11: bucket metadata, should come first. +// LIVEENTRY = 0, // Before protocol 11: created-or-updated; +// // At-and-after protocol 11: only updated. +// DEADENTRY = 1, +// INITENTRY = 2 // At-and-after protocol 11: only created. +// }; +// +// =========================================================================== +xdr.enum("BucketEntryType", { + metaentry: -1, + liveentry: 0, + deadentry: 1, + initentry: 2, +}); + +// === xdr source ============================================================ +// +// 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) +// }; +// +// =========================================================================== +xdr.enum("HotArchiveBucketEntryType", { + hotArchiveMetaentry: -1, + hotArchiveArchived: 0, + hotArchiveLive: 1, + hotArchiveDeleted: 2, +}); + +// === xdr source ============================================================ +// +// enum ColdArchiveBucketEntryType +// { +// COLD_ARCHIVE_METAENTRY = -1, // Bucket metadata, should come first. +// COLD_ARCHIVE_ARCHIVED_LEAF = 0, // Full LedgerEntry that was archived during the epoch +// COLD_ARCHIVE_DELETED_LEAF = 1, // LedgerKey that was deleted during the epoch +// COLD_ARCHIVE_BOUNDARY_LEAF = 2, // Dummy leaf representing low/high bound +// COLD_ARCHIVE_HASH = 3 // Intermediary Merkle hash entry +// }; +// +// =========================================================================== +xdr.enum("ColdArchiveBucketEntryType", { + coldArchiveMetaentry: -1, + coldArchiveArchivedLeaf: 0, + coldArchiveDeletedLeaf: 1, + coldArchiveBoundaryLeaf: 2, + coldArchiveHash: 3, +}); + +// === xdr source ============================================================ +// +// union switch (int v) +// { +// case 0: +// void; +// case 1: +// BucketListType bucketListType; +// } +// +// =========================================================================== +xdr.union("BucketMetadataExt", { + switchOn: xdr.int(), + switchName: "v", + switches: [ + [0, xdr.void()], + [1, "bucketListType"], + ], + arms: { + bucketListType: xdr.lookup("BucketListType"), + }, +}); + +// === xdr source ============================================================ +// +// struct BucketMetadata +// { +// // Indicates the protocol version used to create / merge this bucket. +// uint32 ledgerVersion; +// +// // reserved for future use +// union switch (int v) +// { +// case 0: +// void; +// case 1: +// BucketListType bucketListType; +// } +// ext; +// }; +// +// =========================================================================== +xdr.struct("BucketMetadata", [ + ["ledgerVersion", xdr.lookup("Uint32")], + ["ext", xdr.lookup("BucketMetadataExt")], +]); + +// === xdr source ============================================================ +// +// union BucketEntry switch (BucketEntryType type) +// { +// case LIVEENTRY: +// case INITENTRY: +// LedgerEntry liveEntry; +// +// case DEADENTRY: +// LedgerKey deadEntry; +// case METAENTRY: +// BucketMetadata metaEntry; +// }; +// +// =========================================================================== +xdr.union("BucketEntry", { + switchOn: xdr.lookup("BucketEntryType"), + switchName: "type", + switches: [ + ["liveentry", "liveEntry"], + ["initentry", "liveEntry"], + ["deadentry", "deadEntry"], + ["metaentry", "metaEntry"], + ], + arms: { + liveEntry: xdr.lookup("LedgerEntry"), + deadEntry: xdr.lookup("LedgerKey"), + metaEntry: xdr.lookup("BucketMetadata"), + }, +}); + +// === xdr source ============================================================ +// +// 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; +// }; +// +// =========================================================================== +xdr.union("HotArchiveBucketEntry", { + switchOn: xdr.lookup("HotArchiveBucketEntryType"), + switchName: "type", + switches: [ + ["hotArchiveArchived", "archivedEntry"], + ["hotArchiveLive", "key"], + ["hotArchiveDeleted", "key"], + ["hotArchiveMetaentry", "metaEntry"], + ], + arms: { + archivedEntry: xdr.lookup("LedgerEntry"), + key: xdr.lookup("LedgerKey"), + metaEntry: xdr.lookup("BucketMetadata"), + }, +}); + +// === xdr source ============================================================ +// +// struct ColdArchiveArchivedLeaf +// { +// uint32 index; +// LedgerEntry archivedEntry; +// }; +// +// =========================================================================== +xdr.struct("ColdArchiveArchivedLeaf", [ + ["index", xdr.lookup("Uint32")], + ["archivedEntry", xdr.lookup("LedgerEntry")], +]); + +// === xdr source ============================================================ +// +// struct ColdArchiveDeletedLeaf +// { +// uint32 index; +// LedgerKey deletedKey; +// }; +// +// =========================================================================== +xdr.struct("ColdArchiveDeletedLeaf", [ + ["index", xdr.lookup("Uint32")], + ["deletedKey", xdr.lookup("LedgerKey")], +]); + +// === xdr source ============================================================ +// +// struct ColdArchiveBoundaryLeaf +// { +// uint32 index; +// bool isLowerBound; +// }; +// +// =========================================================================== +xdr.struct("ColdArchiveBoundaryLeaf", [ + ["index", xdr.lookup("Uint32")], + ["isLowerBound", xdr.bool()], +]); + +// === xdr source ============================================================ +// +// struct ColdArchiveHashEntry +// { +// uint32 index; +// uint32 level; +// Hash hash; +// }; +// +// =========================================================================== +xdr.struct("ColdArchiveHashEntry", [ + ["index", xdr.lookup("Uint32")], + ["level", xdr.lookup("Uint32")], + ["hash", xdr.lookup("Hash")], +]); + +// === xdr source ============================================================ +// +// union ColdArchiveBucketEntry switch (ColdArchiveBucketEntryType type) +// { +// case COLD_ARCHIVE_METAENTRY: +// BucketMetadata metaEntry; +// case COLD_ARCHIVE_ARCHIVED_LEAF: +// ColdArchiveArchivedLeaf archivedLeaf; +// case COLD_ARCHIVE_DELETED_LEAF: +// ColdArchiveDeletedLeaf deletedLeaf; +// case COLD_ARCHIVE_BOUNDARY_LEAF: +// ColdArchiveBoundaryLeaf boundaryLeaf; +// case COLD_ARCHIVE_HASH: +// ColdArchiveHashEntry hashEntry; +// }; +// +// =========================================================================== +xdr.union("ColdArchiveBucketEntry", { + switchOn: xdr.lookup("ColdArchiveBucketEntryType"), + switchName: "type", + switches: [ + ["coldArchiveMetaentry", "metaEntry"], + ["coldArchiveArchivedLeaf", "archivedLeaf"], + ["coldArchiveDeletedLeaf", "deletedLeaf"], + ["coldArchiveBoundaryLeaf", "boundaryLeaf"], + ["coldArchiveHash", "hashEntry"], + ], + arms: { + metaEntry: xdr.lookup("BucketMetadata"), + archivedLeaf: xdr.lookup("ColdArchiveArchivedLeaf"), + deletedLeaf: xdr.lookup("ColdArchiveDeletedLeaf"), + boundaryLeaf: xdr.lookup("ColdArchiveBoundaryLeaf"), + hashEntry: xdr.lookup("ColdArchiveHashEntry"), + }, +}); + // === xdr source ============================================================ // // typedef opaque UpgradeType<128>; @@ -2386,98 +2665,6 @@ xdr.struct("ConfigUpgradeSet", [ ["updatedEntry", xdr.varArray(xdr.lookup("ConfigSettingEntry"), 2147483647)], ]); -// === xdr source ============================================================ -// -// enum BucketEntryType -// { -// METAENTRY = -// -1, // At-and-after protocol 11: bucket metadata, should come first. -// LIVEENTRY = 0, // Before protocol 11: created-or-updated; -// // At-and-after protocol 11: only updated. -// DEADENTRY = 1, -// INITENTRY = 2 // At-and-after protocol 11: only created. -// }; -// -// =========================================================================== -xdr.enum("BucketEntryType", { - metaentry: -1, - liveentry: 0, - deadentry: 1, - initentry: 2, -}); - -// === xdr source ============================================================ -// -// union switch (int v) -// { -// case 0: -// void; -// } -// -// =========================================================================== -xdr.union("BucketMetadataExt", { - switchOn: xdr.int(), - switchName: "v", - switches: [ - [0, xdr.void()], - ], - arms: { - }, -}); - -// === xdr source ============================================================ -// -// struct BucketMetadata -// { -// // Indicates the protocol version used to create / merge this bucket. -// uint32 ledgerVersion; -// -// // reserved for future use -// union switch (int v) -// { -// case 0: -// void; -// } -// ext; -// }; -// -// =========================================================================== -xdr.struct("BucketMetadata", [ - ["ledgerVersion", xdr.lookup("Uint32")], - ["ext", xdr.lookup("BucketMetadataExt")], -]); - -// === xdr source ============================================================ -// -// union BucketEntry switch (BucketEntryType type) -// { -// case LIVEENTRY: -// case INITENTRY: -// LedgerEntry liveEntry; -// -// case DEADENTRY: -// LedgerKey deadEntry; -// case METAENTRY: -// BucketMetadata metaEntry; -// }; -// -// =========================================================================== -xdr.union("BucketEntry", { - switchOn: xdr.lookup("BucketEntryType"), - switchName: "type", - switches: [ - ["liveentry", "liveEntry"], - ["initentry", "liveEntry"], - ["deadentry", "deadEntry"], - ["metaentry", "metaEntry"], - ], - arms: { - liveEntry: xdr.lookup("LedgerEntry"), - deadEntry: xdr.lookup("LedgerKey"), - metaEntry: xdr.lookup("BucketMetadata"), - }, -}); - // === xdr source ============================================================ // // enum TxSetComponentType @@ -3005,6 +3192,13 @@ xdr.struct("DiagnosticEvent", [ ["event", xdr.lookup("ContractEvent")], ]); +// === xdr source ============================================================ +// +// typedef DiagnosticEvent DiagnosticEvents<>; +// +// =========================================================================== +xdr.typedef("DiagnosticEvents", xdr.varArray(xdr.lookup("DiagnosticEvent"), 2147483647)); + // === xdr source ============================================================ // // struct SorobanTransactionMetaExtV1 @@ -3549,7 +3743,12 @@ xdr.struct("PeerAddress", [ // SEND_MORE_EXTENDED = 20, // // FLOOD_ADVERT = 18, -// FLOOD_DEMAND = 19 +// FLOOD_DEMAND = 19, +// +// TIME_SLICED_SURVEY_REQUEST = 21, +// TIME_SLICED_SURVEY_RESPONSE = 22, +// TIME_SLICED_SURVEY_START_COLLECTING = 23, +// TIME_SLICED_SURVEY_STOP_COLLECTING = 24 // }; // // =========================================================================== @@ -3574,6 +3773,10 @@ xdr.enum("MessageType", { sendMoreExtended: 20, floodAdvert: 18, floodDemand: 19, + timeSlicedSurveyRequest: 21, + timeSlicedSurveyResponse: 22, + timeSlicedSurveyStartCollecting: 23, + timeSlicedSurveyStopCollecting: 24, }); // === xdr source ============================================================ @@ -3594,12 +3797,14 @@ xdr.struct("DontHave", [ // // enum SurveyMessageCommandType // { -// SURVEY_TOPOLOGY = 0 +// SURVEY_TOPOLOGY = 0, +// TIME_SLICED_SURVEY_TOPOLOGY = 1 // }; // // =========================================================================== xdr.enum("SurveyMessageCommandType", { surveyTopology: 0, + timeSlicedSurveyTopology: 1, }); // === xdr source ============================================================ @@ -3607,15 +3812,77 @@ xdr.enum("SurveyMessageCommandType", { // enum SurveyMessageResponseType // { // SURVEY_TOPOLOGY_RESPONSE_V0 = 0, -// SURVEY_TOPOLOGY_RESPONSE_V1 = 1 +// SURVEY_TOPOLOGY_RESPONSE_V1 = 1, +// SURVEY_TOPOLOGY_RESPONSE_V2 = 2 // }; // // =========================================================================== xdr.enum("SurveyMessageResponseType", { surveyTopologyResponseV0: 0, surveyTopologyResponseV1: 1, + surveyTopologyResponseV2: 2, }); +// === xdr source ============================================================ +// +// struct TimeSlicedSurveyStartCollectingMessage +// { +// NodeID surveyorID; +// uint32 nonce; +// uint32 ledgerNum; +// }; +// +// =========================================================================== +xdr.struct("TimeSlicedSurveyStartCollectingMessage", [ + ["surveyorId", xdr.lookup("NodeId")], + ["nonce", xdr.lookup("Uint32")], + ["ledgerNum", xdr.lookup("Uint32")], +]); + +// === xdr source ============================================================ +// +// struct SignedTimeSlicedSurveyStartCollectingMessage +// { +// Signature signature; +// TimeSlicedSurveyStartCollectingMessage startCollecting; +// }; +// +// =========================================================================== +xdr.struct("SignedTimeSlicedSurveyStartCollectingMessage", [ + ["signature", xdr.lookup("Signature")], + ["startCollecting", xdr.lookup("TimeSlicedSurveyStartCollectingMessage")], +]); + +// === xdr source ============================================================ +// +// struct TimeSlicedSurveyStopCollectingMessage +// { +// NodeID surveyorID; +// uint32 nonce; +// uint32 ledgerNum; +// }; +// +// =========================================================================== +xdr.struct("TimeSlicedSurveyStopCollectingMessage", [ + ["surveyorId", xdr.lookup("NodeId")], + ["nonce", xdr.lookup("Uint32")], + ["ledgerNum", xdr.lookup("Uint32")], +]); + +// === xdr source ============================================================ +// +// struct SignedTimeSlicedSurveyStopCollectingMessage +// { +// Signature signature; +// TimeSlicedSurveyStopCollectingMessage stopCollecting; +// }; +// +// =========================================================================== +xdr.struct("SignedTimeSlicedSurveyStopCollectingMessage", [ + ["signature", xdr.lookup("Signature")], + ["stopCollecting", xdr.lookup("TimeSlicedSurveyStopCollectingMessage")], +]); + // === xdr source ============================================================ // // struct SurveyRequestMessage @@ -3636,6 +3903,24 @@ xdr.struct("SurveyRequestMessage", [ ["commandType", xdr.lookup("SurveyMessageCommandType")], ]); +// === xdr source ============================================================ +// +// struct TimeSlicedSurveyRequestMessage +// { +// SurveyRequestMessage request; +// uint32 nonce; +// uint32 inboundPeersIndex; +// uint32 outboundPeersIndex; +// }; +// +// =========================================================================== +xdr.struct("TimeSlicedSurveyRequestMessage", [ + ["request", xdr.lookup("SurveyRequestMessage")], + ["nonce", xdr.lookup("Uint32")], + ["inboundPeersIndex", xdr.lookup("Uint32")], + ["outboundPeersIndex", xdr.lookup("Uint32")], +]); + // === xdr source ============================================================ // // struct SignedSurveyRequestMessage @@ -3650,6 +3935,20 @@ xdr.struct("SignedSurveyRequestMessage", [ ["request", xdr.lookup("SurveyRequestMessage")], ]); +// === xdr source ============================================================ +// +// struct SignedTimeSlicedSurveyRequestMessage +// { +// Signature requestSignature; +// TimeSlicedSurveyRequestMessage request; +// }; +// +// =========================================================================== +xdr.struct("SignedTimeSlicedSurveyRequestMessage", [ + ["requestSignature", xdr.lookup("Signature")], + ["request", xdr.lookup("TimeSlicedSurveyRequestMessage")], +]); + // === xdr source ============================================================ // // typedef opaque EncryptedBody<64000>; @@ -3677,6 +3976,20 @@ xdr.struct("SurveyResponseMessage", [ ["encryptedBody", xdr.lookup("EncryptedBody")], ]); +// === xdr source ============================================================ +// +// struct TimeSlicedSurveyResponseMessage +// { +// SurveyResponseMessage response; +// uint32 nonce; +// }; +// +// =========================================================================== +xdr.struct("TimeSlicedSurveyResponseMessage", [ + ["response", xdr.lookup("SurveyResponseMessage")], + ["nonce", xdr.lookup("Uint32")], +]); + // === xdr source ============================================================ // // struct SignedSurveyResponseMessage @@ -3691,6 +4004,20 @@ xdr.struct("SignedSurveyResponseMessage", [ ["response", xdr.lookup("SurveyResponseMessage")], ]); +// === xdr source ============================================================ +// +// struct SignedTimeSlicedSurveyResponseMessage +// { +// Signature responseSignature; +// TimeSlicedSurveyResponseMessage response; +// }; +// +// =========================================================================== +xdr.struct("SignedTimeSlicedSurveyResponseMessage", [ + ["responseSignature", xdr.lookup("Signature")], + ["response", xdr.lookup("TimeSlicedSurveyResponseMessage")], +]); + // === xdr source ============================================================ // // struct PeerStats @@ -3740,6 +4067,63 @@ xdr.struct("PeerStats", [ // =========================================================================== xdr.typedef("PeerStatList", xdr.varArray(xdr.lookup("PeerStats"), 25)); +// === xdr source ============================================================ +// +// struct TimeSlicedNodeData +// { +// uint32 addedAuthenticatedPeers; +// uint32 droppedAuthenticatedPeers; +// uint32 totalInboundPeerCount; +// uint32 totalOutboundPeerCount; +// +// // SCP stats +// uint32 p75SCPFirstToSelfLatencyMs; +// uint32 p75SCPSelfToOtherLatencyMs; +// +// // How many times the node lost sync in the time slice +// uint32 lostSyncCount; +// +// // Config data +// bool isValidator; +// uint32 maxInboundPeerCount; +// uint32 maxOutboundPeerCount; +// }; +// +// =========================================================================== +xdr.struct("TimeSlicedNodeData", [ + ["addedAuthenticatedPeers", xdr.lookup("Uint32")], + ["droppedAuthenticatedPeers", xdr.lookup("Uint32")], + ["totalInboundPeerCount", xdr.lookup("Uint32")], + ["totalOutboundPeerCount", xdr.lookup("Uint32")], + ["p75ScpFirstToSelfLatencyMs", xdr.lookup("Uint32")], + ["p75ScpSelfToOtherLatencyMs", xdr.lookup("Uint32")], + ["lostSyncCount", xdr.lookup("Uint32")], + ["isValidator", xdr.bool()], + ["maxInboundPeerCount", xdr.lookup("Uint32")], + ["maxOutboundPeerCount", xdr.lookup("Uint32")], +]); + +// === xdr source ============================================================ +// +// struct TimeSlicedPeerData +// { +// PeerStats peerStats; +// uint32 averageLatencyMs; +// }; +// +// =========================================================================== +xdr.struct("TimeSlicedPeerData", [ + ["peerStats", xdr.lookup("PeerStats")], + ["averageLatencyMs", xdr.lookup("Uint32")], +]); + +// === xdr source ============================================================ +// +// typedef TimeSlicedPeerData TimeSlicedPeerDataList<25>; +// +// =========================================================================== +xdr.typedef("TimeSlicedPeerDataList", xdr.varArray(xdr.lookup("TimeSlicedPeerData"), 25)); + // === xdr source ============================================================ // // struct TopologyResponseBodyV0 @@ -3783,6 +4167,22 @@ xdr.struct("TopologyResponseBodyV1", [ ["maxOutboundPeerCount", xdr.lookup("Uint32")], ]); +// === xdr source ============================================================ +// +// struct TopologyResponseBodyV2 +// { +// TimeSlicedPeerDataList inboundPeers; +// TimeSlicedPeerDataList outboundPeers; +// TimeSlicedNodeData nodeData; +// }; +// +// =========================================================================== +xdr.struct("TopologyResponseBodyV2", [ + ["inboundPeers", xdr.lookup("TimeSlicedPeerDataList")], + ["outboundPeers", xdr.lookup("TimeSlicedPeerDataList")], + ["nodeData", xdr.lookup("TimeSlicedNodeData")], +]); + // === xdr source ============================================================ // // union SurveyResponseBody switch (SurveyMessageResponseType type) @@ -3791,6 +4191,8 @@ xdr.struct("TopologyResponseBodyV1", [ // TopologyResponseBodyV0 topologyResponseBodyV0; // case SURVEY_TOPOLOGY_RESPONSE_V1: // TopologyResponseBodyV1 topologyResponseBodyV1; +// case SURVEY_TOPOLOGY_RESPONSE_V2: +// TopologyResponseBodyV2 topologyResponseBodyV2; // }; // // =========================================================================== @@ -3800,10 +4202,12 @@ xdr.union("SurveyResponseBody", { switches: [ ["surveyTopologyResponseV0", "topologyResponseBodyV0"], ["surveyTopologyResponseV1", "topologyResponseBodyV1"], + ["surveyTopologyResponseV2", "topologyResponseBodyV2"], ], arms: { topologyResponseBodyV0: xdr.lookup("TopologyResponseBodyV0"), topologyResponseBodyV1: xdr.lookup("TopologyResponseBodyV1"), + topologyResponseBodyV2: xdr.lookup("TopologyResponseBodyV2"), }, }); @@ -3892,6 +4296,20 @@ xdr.struct("FloodDemand", [ // case SURVEY_RESPONSE: // SignedSurveyResponseMessage signedSurveyResponseMessage; // +// case TIME_SLICED_SURVEY_REQUEST: +// SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage; +// +// case TIME_SLICED_SURVEY_RESPONSE: +// SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage; +// +// case TIME_SLICED_SURVEY_START_COLLECTING: +// SignedTimeSlicedSurveyStartCollectingMessage +// signedTimeSlicedSurveyStartCollectingMessage; +// +// case TIME_SLICED_SURVEY_STOP_COLLECTING: +// SignedTimeSlicedSurveyStopCollectingMessage +// signedTimeSlicedSurveyStopCollectingMessage; +// // // SCP // case GET_SCP_QUORUMSET: // uint256 qSetHash; @@ -3929,6 +4347,10 @@ xdr.union("StellarMessage", { ["transaction", "transaction"], ["surveyRequest", "signedSurveyRequestMessage"], ["surveyResponse", "signedSurveyResponseMessage"], + ["timeSlicedSurveyRequest", "signedTimeSlicedSurveyRequestMessage"], + ["timeSlicedSurveyResponse", "signedTimeSlicedSurveyResponseMessage"], + ["timeSlicedSurveyStartCollecting", "signedTimeSlicedSurveyStartCollectingMessage"], + ["timeSlicedSurveyStopCollecting", "signedTimeSlicedSurveyStopCollectingMessage"], ["getScpQuorumset", "qSetHash"], ["scpQuorumset", "qSet"], ["scpMessage", "envelope"], @@ -3950,6 +4372,10 @@ xdr.union("StellarMessage", { transaction: xdr.lookup("TransactionEnvelope"), signedSurveyRequestMessage: xdr.lookup("SignedSurveyRequestMessage"), signedSurveyResponseMessage: xdr.lookup("SignedSurveyResponseMessage"), + signedTimeSlicedSurveyRequestMessage: xdr.lookup("SignedTimeSlicedSurveyRequestMessage"), + signedTimeSlicedSurveyResponseMessage: xdr.lookup("SignedTimeSlicedSurveyResponseMessage"), + signedTimeSlicedSurveyStartCollectingMessage: xdr.lookup("SignedTimeSlicedSurveyStartCollectingMessage"), + signedTimeSlicedSurveyStopCollectingMessage: xdr.lookup("SignedTimeSlicedSurveyStopCollectingMessage"), qSetHash: xdr.lookup("Uint256"), qSet: xdr.lookup("ScpQuorumSet"), envelope: xdr.lookup("ScpEnvelope"), @@ -4619,7 +5045,8 @@ xdr.struct("LiquidityPoolWithdrawOp", [ // { // HOST_FUNCTION_TYPE_INVOKE_CONTRACT = 0, // HOST_FUNCTION_TYPE_CREATE_CONTRACT = 1, -// HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM = 2 +// HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM = 2, +// HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2 = 3 // }; // // =========================================================================== @@ -4627,6 +5054,7 @@ xdr.enum("HostFunctionType", { hostFunctionTypeInvokeContract: 0, hostFunctionTypeCreateContract: 1, hostFunctionTypeUploadContractWasm: 2, + hostFunctionTypeCreateContractV2: 3, }); // === xdr source ============================================================ @@ -4699,6 +5127,23 @@ xdr.struct("CreateContractArgs", [ ["executable", xdr.lookup("ContractExecutable")], ]); +// === xdr source ============================================================ +// +// struct CreateContractArgsV2 +// { +// ContractIDPreimage contractIDPreimage; +// ContractExecutable executable; +// // Arguments of the contract's constructor. +// SCVal constructorArgs<>; +// }; +// +// =========================================================================== +xdr.struct("CreateContractArgsV2", [ + ["contractIdPreimage", xdr.lookup("ContractIdPreimage")], + ["executable", xdr.lookup("ContractExecutable")], + ["constructorArgs", xdr.varArray(xdr.lookup("ScVal"), 2147483647)], +]); + // === xdr source ============================================================ // // struct InvokeContractArgs { @@ -4724,6 +5169,8 @@ xdr.struct("InvokeContractArgs", [ // CreateContractArgs createContract; // case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: // opaque wasm<>; +// case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: +// CreateContractArgsV2 createContractV2; // }; // // =========================================================================== @@ -4734,11 +5181,13 @@ xdr.union("HostFunction", { ["hostFunctionTypeInvokeContract", "invokeContract"], ["hostFunctionTypeCreateContract", "createContract"], ["hostFunctionTypeUploadContractWasm", "wasm"], + ["hostFunctionTypeCreateContractV2", "createContractV2"], ], arms: { invokeContract: xdr.lookup("InvokeContractArgs"), createContract: xdr.lookup("CreateContractArgs"), wasm: xdr.varOpaque(), + createContractV2: xdr.lookup("CreateContractArgsV2"), }, }); @@ -4747,13 +5196,15 @@ xdr.union("HostFunction", { // enum SorobanAuthorizedFunctionType // { // SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN = 0, -// SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN = 1 +// SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN = 1, +// SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN = 2 // }; // // =========================================================================== xdr.enum("SorobanAuthorizedFunctionType", { sorobanAuthorizedFunctionTypeContractFn: 0, sorobanAuthorizedFunctionTypeCreateContractHostFn: 1, + sorobanAuthorizedFunctionTypeCreateContractV2HostFn: 2, }); // === xdr source ============================================================ @@ -4762,8 +5213,14 @@ xdr.enum("SorobanAuthorizedFunctionType", { // { // case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: // InvokeContractArgs contractFn; +// // This variant of auth payload for creating new contract instances is no +// // longer accepted after protocol 22. // case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: // CreateContractArgs createContractHostFn; +// // This variant of auth payload for creating new contract instances +// // is only accepted in and after protocol 22. +// case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: +// CreateContractArgsV2 createContractV2HostFn; // }; // // =========================================================================== @@ -4773,10 +5230,12 @@ xdr.union("SorobanAuthorizedFunction", { switches: [ ["sorobanAuthorizedFunctionTypeContractFn", "contractFn"], ["sorobanAuthorizedFunctionTypeCreateContractHostFn", "createContractHostFn"], + ["sorobanAuthorizedFunctionTypeCreateContractV2HostFn", "createContractV2HostFn"], ], arms: { contractFn: xdr.lookup("InvokeContractArgs"), createContractHostFn: xdr.lookup("CreateContractArgs"), + createContractV2HostFn: xdr.lookup("CreateContractArgsV2"), }, }); @@ -5409,6 +5868,127 @@ xdr.struct("LedgerFootprint", [ ["readWrite", xdr.varArray(xdr.lookup("LedgerKey"), 2147483647)], ]); +// === xdr source ============================================================ +// +// enum ArchivalProofType +// { +// EXISTENCE = 0, +// NONEXISTENCE = 1 +// }; +// +// =========================================================================== +xdr.enum("ArchivalProofType", { + existence: 0, + nonexistence: 1, +}); + +// === xdr source ============================================================ +// +// struct ArchivalProofNode +// { +// uint32 index; +// Hash hash; +// }; +// +// =========================================================================== +xdr.struct("ArchivalProofNode", [ + ["index", xdr.lookup("Uint32")], + ["hash", xdr.lookup("Hash")], +]); + +// === xdr source ============================================================ +// +// typedef ArchivalProofNode ProofLevel<>; +// +// =========================================================================== +xdr.typedef("ProofLevel", xdr.varArray(xdr.lookup("ArchivalProofNode"), 2147483647)); + +// === xdr source ============================================================ +// +// struct NonexistenceProofBody +// { +// ColdArchiveBucketEntry entriesToProve<>; +// +// // Vector of vectors, where proofLevels[level] +// // contains all HashNodes that correspond with that level +// ProofLevel proofLevels<>; +// }; +// +// =========================================================================== +xdr.struct("NonexistenceProofBody", [ + ["entriesToProve", xdr.varArray(xdr.lookup("ColdArchiveBucketEntry"), 2147483647)], + ["proofLevels", xdr.varArray(xdr.lookup("ProofLevel"), 2147483647)], +]); + +// === xdr source ============================================================ +// +// struct ExistenceProofBody +// { +// LedgerKey keysToProve<>; +// +// // Bounds for each key being proved, where bound[n] +// // corresponds to keysToProve[n] +// ColdArchiveBucketEntry lowBoundEntries<>; +// ColdArchiveBucketEntry highBoundEntries<>; +// +// // Vector of vectors, where proofLevels[level] +// // contains all HashNodes that correspond with that level +// ProofLevel proofLevels<>; +// }; +// +// =========================================================================== +xdr.struct("ExistenceProofBody", [ + ["keysToProve", xdr.varArray(xdr.lookup("LedgerKey"), 2147483647)], + ["lowBoundEntries", xdr.varArray(xdr.lookup("ColdArchiveBucketEntry"), 2147483647)], + ["highBoundEntries", xdr.varArray(xdr.lookup("ColdArchiveBucketEntry"), 2147483647)], + ["proofLevels", xdr.varArray(xdr.lookup("ProofLevel"), 2147483647)], +]); + +// === xdr source ============================================================ +// +// union switch (ArchivalProofType t) +// { +// case EXISTENCE: +// NonexistenceProofBody nonexistenceProof; +// case NONEXISTENCE: +// ExistenceProofBody existenceProof; +// } +// +// =========================================================================== +xdr.union("ArchivalProofBody", { + switchOn: xdr.lookup("ArchivalProofType"), + switchName: "t", + switches: [ + ["existence", "nonexistenceProof"], + ["nonexistence", "existenceProof"], + ], + arms: { + nonexistenceProof: xdr.lookup("NonexistenceProofBody"), + existenceProof: xdr.lookup("ExistenceProofBody"), + }, +}); + +// === xdr source ============================================================ +// +// struct ArchivalProof +// { +// uint32 epoch; // AST Subtree for this proof +// +// union switch (ArchivalProofType t) +// { +// case EXISTENCE: +// NonexistenceProofBody nonexistenceProof; +// case NONEXISTENCE: +// ExistenceProofBody existenceProof; +// } body; +// }; +// +// =========================================================================== +xdr.struct("ArchivalProof", [ + ["epoch", xdr.lookup("Uint32")], + ["body", xdr.lookup("ArchivalProofBody")], +]); + // === xdr source ============================================================ // // struct SorobanResources @@ -8420,6 +9000,68 @@ xdr.struct("HmacSha256Mac", [ ["mac", xdr.opaque(32)], ]); +// === xdr source ============================================================ +// +// struct ShortHashSeed +// { +// opaque seed[16]; +// }; +// +// =========================================================================== +xdr.struct("ShortHashSeed", [ + ["seed", xdr.opaque(16)], +]); + +// === xdr source ============================================================ +// +// enum BinaryFuseFilterType +// { +// BINARY_FUSE_FILTER_8_BIT = 0, +// BINARY_FUSE_FILTER_16_BIT = 1, +// BINARY_FUSE_FILTER_32_BIT = 2 +// }; +// +// =========================================================================== +xdr.enum("BinaryFuseFilterType", { + binaryFuseFilter8Bit: 0, + binaryFuseFilter16Bit: 1, + binaryFuseFilter32Bit: 2, +}); + +// === xdr source ============================================================ +// +// struct SerializedBinaryFuseFilter +// { +// BinaryFuseFilterType type; +// +// // Seed used to hash input to filter +// ShortHashSeed inputHashSeed; +// +// // Seed used for internal filter hash operations +// ShortHashSeed filterSeed; +// uint32 segmentLength; +// uint32 segementLengthMask; +// uint32 segmentCount; +// uint32 segmentCountLength; +// uint32 fingerprintLength; // Length in terms of element count, not bytes +// +// // Array of uint8_t, uint16_t, or uint32_t depending on filter type +// opaque fingerprints<>; +// }; +// +// =========================================================================== +xdr.struct("SerializedBinaryFuseFilter", [ + ["type", xdr.lookup("BinaryFuseFilterType")], + ["inputHashSeed", xdr.lookup("ShortHashSeed")], + ["filterSeed", xdr.lookup("ShortHashSeed")], + ["segmentLength", xdr.lookup("Uint32")], + ["segementLengthMask", xdr.lookup("Uint32")], + ["segmentCount", xdr.lookup("Uint32")], + ["segmentCountLength", xdr.lookup("Uint32")], + ["fingerprintLength", xdr.lookup("Uint32")], + ["fingerprints", xdr.varOpaque()], +]); + // === xdr source ============================================================ // // enum SCValType diff --git a/src/generated/next_generated.js b/src/generated/next_generated.js index 90e88f57..10570406 100644 --- a/src/generated/next_generated.js +++ b/src/generated/next_generated.js @@ -1,4 +1,4 @@ -// Automatically generated by xdrgen +// Automatically generated by xdrgen on 2024-08-23T12:09:00-08:00 // DO NOT EDIT or your changes may be overwritten /* jshint maxstatements:2147483647 */ @@ -2054,6 +2054,285 @@ xdr.enum("EnvelopeType", { envelopeTypeSorobanAuthorization: 9, }); +// === xdr source ============================================================ +// +// enum BucketListType +// { +// LIVE = 0, +// HOT_ARCHIVE = 1, +// COLD_ARCHIVE = 2 +// }; +// +// =========================================================================== +xdr.enum("BucketListType", { + live: 0, + hotArchive: 1, + coldArchive: 2, +}); + +// === xdr source ============================================================ +// +// enum BucketEntryType +// { +// METAENTRY = +// -1, // At-and-after protocol 11: bucket metadata, should come first. +// LIVEENTRY = 0, // Before protocol 11: created-or-updated; +// // At-and-after protocol 11: only updated. +// DEADENTRY = 1, +// INITENTRY = 2 // At-and-after protocol 11: only created. +// }; +// +// =========================================================================== +xdr.enum("BucketEntryType", { + metaentry: -1, + liveentry: 0, + deadentry: 1, + initentry: 2, +}); + +// === xdr source ============================================================ +// +// 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) +// }; +// +// =========================================================================== +xdr.enum("HotArchiveBucketEntryType", { + hotArchiveMetaentry: -1, + hotArchiveArchived: 0, + hotArchiveLive: 1, + hotArchiveDeleted: 2, +}); + +// === xdr source ============================================================ +// +// enum ColdArchiveBucketEntryType +// { +// COLD_ARCHIVE_METAENTRY = -1, // Bucket metadata, should come first. +// COLD_ARCHIVE_ARCHIVED_LEAF = 0, // Full LedgerEntry that was archived during the epoch +// COLD_ARCHIVE_DELETED_LEAF = 1, // LedgerKey that was deleted during the epoch +// COLD_ARCHIVE_BOUNDARY_LEAF = 2, // Dummy leaf representing low/high bound +// COLD_ARCHIVE_HASH = 3 // Intermediary Merkle hash entry +// }; +// +// =========================================================================== +xdr.enum("ColdArchiveBucketEntryType", { + coldArchiveMetaentry: -1, + coldArchiveArchivedLeaf: 0, + coldArchiveDeletedLeaf: 1, + coldArchiveBoundaryLeaf: 2, + coldArchiveHash: 3, +}); + +// === xdr source ============================================================ +// +// union switch (int v) +// { +// case 0: +// void; +// case 1: +// BucketListType bucketListType; +// } +// +// =========================================================================== +xdr.union("BucketMetadataExt", { + switchOn: xdr.int(), + switchName: "v", + switches: [ + [0, xdr.void()], + [1, "bucketListType"], + ], + arms: { + bucketListType: xdr.lookup("BucketListType"), + }, +}); + +// === xdr source ============================================================ +// +// struct BucketMetadata +// { +// // Indicates the protocol version used to create / merge this bucket. +// uint32 ledgerVersion; +// +// // reserved for future use +// union switch (int v) +// { +// case 0: +// void; +// case 1: +// BucketListType bucketListType; +// } +// ext; +// }; +// +// =========================================================================== +xdr.struct("BucketMetadata", [ + ["ledgerVersion", xdr.lookup("Uint32")], + ["ext", xdr.lookup("BucketMetadataExt")], +]); + +// === xdr source ============================================================ +// +// union BucketEntry switch (BucketEntryType type) +// { +// case LIVEENTRY: +// case INITENTRY: +// LedgerEntry liveEntry; +// +// case DEADENTRY: +// LedgerKey deadEntry; +// case METAENTRY: +// BucketMetadata metaEntry; +// }; +// +// =========================================================================== +xdr.union("BucketEntry", { + switchOn: xdr.lookup("BucketEntryType"), + switchName: "type", + switches: [ + ["liveentry", "liveEntry"], + ["initentry", "liveEntry"], + ["deadentry", "deadEntry"], + ["metaentry", "metaEntry"], + ], + arms: { + liveEntry: xdr.lookup("LedgerEntry"), + deadEntry: xdr.lookup("LedgerKey"), + metaEntry: xdr.lookup("BucketMetadata"), + }, +}); + +// === xdr source ============================================================ +// +// 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; +// }; +// +// =========================================================================== +xdr.union("HotArchiveBucketEntry", { + switchOn: xdr.lookup("HotArchiveBucketEntryType"), + switchName: "type", + switches: [ + ["hotArchiveArchived", "archivedEntry"], + ["hotArchiveLive", "key"], + ["hotArchiveDeleted", "key"], + ["hotArchiveMetaentry", "metaEntry"], + ], + arms: { + archivedEntry: xdr.lookup("LedgerEntry"), + key: xdr.lookup("LedgerKey"), + metaEntry: xdr.lookup("BucketMetadata"), + }, +}); + +// === xdr source ============================================================ +// +// struct ColdArchiveArchivedLeaf +// { +// uint32 index; +// LedgerEntry archivedEntry; +// }; +// +// =========================================================================== +xdr.struct("ColdArchiveArchivedLeaf", [ + ["index", xdr.lookup("Uint32")], + ["archivedEntry", xdr.lookup("LedgerEntry")], +]); + +// === xdr source ============================================================ +// +// struct ColdArchiveDeletedLeaf +// { +// uint32 index; +// LedgerKey deletedKey; +// }; +// +// =========================================================================== +xdr.struct("ColdArchiveDeletedLeaf", [ + ["index", xdr.lookup("Uint32")], + ["deletedKey", xdr.lookup("LedgerKey")], +]); + +// === xdr source ============================================================ +// +// struct ColdArchiveBoundaryLeaf +// { +// uint32 index; +// bool isLowerBound; +// }; +// +// =========================================================================== +xdr.struct("ColdArchiveBoundaryLeaf", [ + ["index", xdr.lookup("Uint32")], + ["isLowerBound", xdr.bool()], +]); + +// === xdr source ============================================================ +// +// struct ColdArchiveHashEntry +// { +// uint32 index; +// uint32 level; +// Hash hash; +// }; +// +// =========================================================================== +xdr.struct("ColdArchiveHashEntry", [ + ["index", xdr.lookup("Uint32")], + ["level", xdr.lookup("Uint32")], + ["hash", xdr.lookup("Hash")], +]); + +// === xdr source ============================================================ +// +// union ColdArchiveBucketEntry switch (ColdArchiveBucketEntryType type) +// { +// case COLD_ARCHIVE_METAENTRY: +// BucketMetadata metaEntry; +// case COLD_ARCHIVE_ARCHIVED_LEAF: +// ColdArchiveArchivedLeaf archivedLeaf; +// case COLD_ARCHIVE_DELETED_LEAF: +// ColdArchiveDeletedLeaf deletedLeaf; +// case COLD_ARCHIVE_BOUNDARY_LEAF: +// ColdArchiveBoundaryLeaf boundaryLeaf; +// case COLD_ARCHIVE_HASH: +// ColdArchiveHashEntry hashEntry; +// }; +// +// =========================================================================== +xdr.union("ColdArchiveBucketEntry", { + switchOn: xdr.lookup("ColdArchiveBucketEntryType"), + switchName: "type", + switches: [ + ["coldArchiveMetaentry", "metaEntry"], + ["coldArchiveArchivedLeaf", "archivedLeaf"], + ["coldArchiveDeletedLeaf", "deletedLeaf"], + ["coldArchiveBoundaryLeaf", "boundaryLeaf"], + ["coldArchiveHash", "hashEntry"], + ], + arms: { + metaEntry: xdr.lookup("BucketMetadata"), + archivedLeaf: xdr.lookup("ColdArchiveArchivedLeaf"), + deletedLeaf: xdr.lookup("ColdArchiveDeletedLeaf"), + boundaryLeaf: xdr.lookup("ColdArchiveBoundaryLeaf"), + hashEntry: xdr.lookup("ColdArchiveHashEntry"), + }, +}); + // === xdr source ============================================================ // // typedef opaque UpgradeType<128>; @@ -2388,109 +2667,45 @@ xdr.struct("ConfigUpgradeSet", [ // === xdr source ============================================================ // -// enum BucketEntryType +// enum TxSetComponentType // { -// METAENTRY = -// -1, // At-and-after protocol 11: bucket metadata, should come first. -// LIVEENTRY = 0, // Before protocol 11: created-or-updated; -// // At-and-after protocol 11: only updated. -// DEADENTRY = 1, -// INITENTRY = 2 // At-and-after protocol 11: only created. +// // txs with effective fee <= bid derived from a base fee (if any). +// // If base fee is not specified, no discount is applied. +// TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE = 0 // }; // // =========================================================================== -xdr.enum("BucketEntryType", { - metaentry: -1, - liveentry: 0, - deadentry: 1, - initentry: 2, -}); - -// === xdr source ============================================================ -// -// union switch (int v) -// { -// case 0: -// void; -// } -// -// =========================================================================== -xdr.union("BucketMetadataExt", { - switchOn: xdr.int(), - switchName: "v", - switches: [ - [0, xdr.void()], - ], - arms: { - }, +xdr.enum("TxSetComponentType", { + txsetCompTxsMaybeDiscountedFee: 0, }); // === xdr source ============================================================ // -// struct BucketMetadata -// { -// // Indicates the protocol version used to create / merge this bucket. -// uint32 ledgerVersion; -// -// // reserved for future use -// union switch (int v) -// { -// case 0: -// void; -// } -// ext; -// }; +// typedef TransactionEnvelope TxExecutionThread<>; // // =========================================================================== -xdr.struct("BucketMetadata", [ - ["ledgerVersion", xdr.lookup("Uint32")], - ["ext", xdr.lookup("BucketMetadataExt")], -]); +xdr.typedef("TxExecutionThread", xdr.varArray(xdr.lookup("TransactionEnvelope"), 2147483647)); // === xdr source ============================================================ // -// union BucketEntry switch (BucketEntryType type) -// { -// case LIVEENTRY: -// case INITENTRY: -// LedgerEntry liveEntry; -// -// case DEADENTRY: -// LedgerKey deadEntry; -// case METAENTRY: -// BucketMetadata metaEntry; -// }; +// typedef TxExecutionThread ParallelTxExecutionStage<>; // // =========================================================================== -xdr.union("BucketEntry", { - switchOn: xdr.lookup("BucketEntryType"), - switchName: "type", - switches: [ - ["liveentry", "liveEntry"], - ["initentry", "liveEntry"], - ["deadentry", "deadEntry"], - ["metaentry", "metaEntry"], - ], - arms: { - liveEntry: xdr.lookup("LedgerEntry"), - deadEntry: xdr.lookup("LedgerKey"), - metaEntry: xdr.lookup("BucketMetadata"), - }, -}); +xdr.typedef("ParallelTxExecutionStage", xdr.varArray(xdr.lookup("TxExecutionThread"), 2147483647)); // === xdr source ============================================================ // -// enum TxSetComponentType +// struct ParallelTxsComponent // { -// // txs with effective fee <= bid derived from a base fee (if any). -// // If base fee is not specified, no discount is applied. -// TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE = 0 +// int64* baseFee; +// ParallelTxExecutionStage executionStages<>; // }; // // =========================================================================== -xdr.enum("TxSetComponentType", { - txsetCompTxsMaybeDiscountedFee: 0, -}); +xdr.struct("ParallelTxsComponent", [ + ["baseFee", xdr.option(xdr.lookup("Int64"))], + ["executionStages", xdr.varArray(xdr.lookup("ParallelTxExecutionStage"), 2147483647)], +]); // === xdr source ============================================================ // @@ -2536,6 +2751,8 @@ xdr.union("TxSetComponent", { // { // case 0: // TxSetComponent v0Components<>; +// case 1: +// ParallelTxsComponent parallelTxsComponent; // }; // // =========================================================================== @@ -2544,9 +2761,11 @@ xdr.union("TransactionPhase", { switchName: "v", switches: [ [0, "v0Components"], + [1, "parallelTxsComponent"], ], arms: { v0Components: xdr.varArray(xdr.lookup("TxSetComponent"), 2147483647), + parallelTxsComponent: xdr.lookup("ParallelTxsComponent"), }, }); @@ -3549,7 +3768,12 @@ xdr.struct("PeerAddress", [ // SEND_MORE_EXTENDED = 20, // // FLOOD_ADVERT = 18, -// FLOOD_DEMAND = 19 +// FLOOD_DEMAND = 19, +// +// TIME_SLICED_SURVEY_REQUEST = 21, +// TIME_SLICED_SURVEY_RESPONSE = 22, +// TIME_SLICED_SURVEY_START_COLLECTING = 23, +// TIME_SLICED_SURVEY_STOP_COLLECTING = 24 // }; // // =========================================================================== @@ -3574,47 +3798,115 @@ xdr.enum("MessageType", { sendMoreExtended: 20, floodAdvert: 18, floodDemand: 19, + timeSlicedSurveyRequest: 21, + timeSlicedSurveyResponse: 22, + timeSlicedSurveyStartCollecting: 23, + timeSlicedSurveyStopCollecting: 24, +}); + +// === xdr source ============================================================ +// +// struct DontHave +// { +// MessageType type; +// uint256 reqHash; +// }; +// +// =========================================================================== +xdr.struct("DontHave", [ + ["type", xdr.lookup("MessageType")], + ["reqHash", xdr.lookup("Uint256")], +]); + +// === xdr source ============================================================ +// +// enum SurveyMessageCommandType +// { +// SURVEY_TOPOLOGY = 0, +// TIME_SLICED_SURVEY_TOPOLOGY = 1 +// }; +// +// =========================================================================== +xdr.enum("SurveyMessageCommandType", { + surveyTopology: 0, + timeSlicedSurveyTopology: 1, +}); + +// === xdr source ============================================================ +// +// enum SurveyMessageResponseType +// { +// SURVEY_TOPOLOGY_RESPONSE_V0 = 0, +// SURVEY_TOPOLOGY_RESPONSE_V1 = 1, +// SURVEY_TOPOLOGY_RESPONSE_V2 = 2 +// }; +// +// =========================================================================== +xdr.enum("SurveyMessageResponseType", { + surveyTopologyResponseV0: 0, + surveyTopologyResponseV1: 1, + surveyTopologyResponseV2: 2, }); // === xdr source ============================================================ // -// struct DontHave +// struct TimeSlicedSurveyStartCollectingMessage // { -// MessageType type; -// uint256 reqHash; +// NodeID surveyorID; +// uint32 nonce; +// uint32 ledgerNum; // }; // // =========================================================================== -xdr.struct("DontHave", [ - ["type", xdr.lookup("MessageType")], - ["reqHash", xdr.lookup("Uint256")], +xdr.struct("TimeSlicedSurveyStartCollectingMessage", [ + ["surveyorId", xdr.lookup("NodeId")], + ["nonce", xdr.lookup("Uint32")], + ["ledgerNum", xdr.lookup("Uint32")], ]); // === xdr source ============================================================ // -// enum SurveyMessageCommandType +// struct SignedTimeSlicedSurveyStartCollectingMessage // { -// SURVEY_TOPOLOGY = 0 +// Signature signature; +// TimeSlicedSurveyStartCollectingMessage startCollecting; // }; // // =========================================================================== -xdr.enum("SurveyMessageCommandType", { - surveyTopology: 0, -}); +xdr.struct("SignedTimeSlicedSurveyStartCollectingMessage", [ + ["signature", xdr.lookup("Signature")], + ["startCollecting", xdr.lookup("TimeSlicedSurveyStartCollectingMessage")], +]); // === xdr source ============================================================ // -// enum SurveyMessageResponseType +// struct TimeSlicedSurveyStopCollectingMessage // { -// SURVEY_TOPOLOGY_RESPONSE_V0 = 0, -// SURVEY_TOPOLOGY_RESPONSE_V1 = 1 +// NodeID surveyorID; +// uint32 nonce; +// uint32 ledgerNum; // }; // // =========================================================================== -xdr.enum("SurveyMessageResponseType", { - surveyTopologyResponseV0: 0, - surveyTopologyResponseV1: 1, -}); +xdr.struct("TimeSlicedSurveyStopCollectingMessage", [ + ["surveyorId", xdr.lookup("NodeId")], + ["nonce", xdr.lookup("Uint32")], + ["ledgerNum", xdr.lookup("Uint32")], +]); + +// === xdr source ============================================================ +// +// struct SignedTimeSlicedSurveyStopCollectingMessage +// { +// Signature signature; +// TimeSlicedSurveyStopCollectingMessage stopCollecting; +// }; +// +// =========================================================================== +xdr.struct("SignedTimeSlicedSurveyStopCollectingMessage", [ + ["signature", xdr.lookup("Signature")], + ["stopCollecting", xdr.lookup("TimeSlicedSurveyStopCollectingMessage")], +]); // === xdr source ============================================================ // @@ -3636,6 +3928,24 @@ xdr.struct("SurveyRequestMessage", [ ["commandType", xdr.lookup("SurveyMessageCommandType")], ]); +// === xdr source ============================================================ +// +// struct TimeSlicedSurveyRequestMessage +// { +// SurveyRequestMessage request; +// uint32 nonce; +// uint32 inboundPeersIndex; +// uint32 outboundPeersIndex; +// }; +// +// =========================================================================== +xdr.struct("TimeSlicedSurveyRequestMessage", [ + ["request", xdr.lookup("SurveyRequestMessage")], + ["nonce", xdr.lookup("Uint32")], + ["inboundPeersIndex", xdr.lookup("Uint32")], + ["outboundPeersIndex", xdr.lookup("Uint32")], +]); + // === xdr source ============================================================ // // struct SignedSurveyRequestMessage @@ -3650,6 +3960,20 @@ xdr.struct("SignedSurveyRequestMessage", [ ["request", xdr.lookup("SurveyRequestMessage")], ]); +// === xdr source ============================================================ +// +// struct SignedTimeSlicedSurveyRequestMessage +// { +// Signature requestSignature; +// TimeSlicedSurveyRequestMessage request; +// }; +// +// =========================================================================== +xdr.struct("SignedTimeSlicedSurveyRequestMessage", [ + ["requestSignature", xdr.lookup("Signature")], + ["request", xdr.lookup("TimeSlicedSurveyRequestMessage")], +]); + // === xdr source ============================================================ // // typedef opaque EncryptedBody<64000>; @@ -3677,6 +4001,20 @@ xdr.struct("SurveyResponseMessage", [ ["encryptedBody", xdr.lookup("EncryptedBody")], ]); +// === xdr source ============================================================ +// +// struct TimeSlicedSurveyResponseMessage +// { +// SurveyResponseMessage response; +// uint32 nonce; +// }; +// +// =========================================================================== +xdr.struct("TimeSlicedSurveyResponseMessage", [ + ["response", xdr.lookup("SurveyResponseMessage")], + ["nonce", xdr.lookup("Uint32")], +]); + // === xdr source ============================================================ // // struct SignedSurveyResponseMessage @@ -3691,6 +4029,20 @@ xdr.struct("SignedSurveyResponseMessage", [ ["response", xdr.lookup("SurveyResponseMessage")], ]); +// === xdr source ============================================================ +// +// struct SignedTimeSlicedSurveyResponseMessage +// { +// Signature responseSignature; +// TimeSlicedSurveyResponseMessage response; +// }; +// +// =========================================================================== +xdr.struct("SignedTimeSlicedSurveyResponseMessage", [ + ["responseSignature", xdr.lookup("Signature")], + ["response", xdr.lookup("TimeSlicedSurveyResponseMessage")], +]); + // === xdr source ============================================================ // // struct PeerStats @@ -3740,6 +4092,63 @@ xdr.struct("PeerStats", [ // =========================================================================== xdr.typedef("PeerStatList", xdr.varArray(xdr.lookup("PeerStats"), 25)); +// === xdr source ============================================================ +// +// struct TimeSlicedNodeData +// { +// uint32 addedAuthenticatedPeers; +// uint32 droppedAuthenticatedPeers; +// uint32 totalInboundPeerCount; +// uint32 totalOutboundPeerCount; +// +// // SCP stats +// uint32 p75SCPFirstToSelfLatencyMs; +// uint32 p75SCPSelfToOtherLatencyMs; +// +// // How many times the node lost sync in the time slice +// uint32 lostSyncCount; +// +// // Config data +// bool isValidator; +// uint32 maxInboundPeerCount; +// uint32 maxOutboundPeerCount; +// }; +// +// =========================================================================== +xdr.struct("TimeSlicedNodeData", [ + ["addedAuthenticatedPeers", xdr.lookup("Uint32")], + ["droppedAuthenticatedPeers", xdr.lookup("Uint32")], + ["totalInboundPeerCount", xdr.lookup("Uint32")], + ["totalOutboundPeerCount", xdr.lookup("Uint32")], + ["p75ScpFirstToSelfLatencyMs", xdr.lookup("Uint32")], + ["p75ScpSelfToOtherLatencyMs", xdr.lookup("Uint32")], + ["lostSyncCount", xdr.lookup("Uint32")], + ["isValidator", xdr.bool()], + ["maxInboundPeerCount", xdr.lookup("Uint32")], + ["maxOutboundPeerCount", xdr.lookup("Uint32")], +]); + +// === xdr source ============================================================ +// +// struct TimeSlicedPeerData +// { +// PeerStats peerStats; +// uint32 averageLatencyMs; +// }; +// +// =========================================================================== +xdr.struct("TimeSlicedPeerData", [ + ["peerStats", xdr.lookup("PeerStats")], + ["averageLatencyMs", xdr.lookup("Uint32")], +]); + +// === xdr source ============================================================ +// +// typedef TimeSlicedPeerData TimeSlicedPeerDataList<25>; +// +// =========================================================================== +xdr.typedef("TimeSlicedPeerDataList", xdr.varArray(xdr.lookup("TimeSlicedPeerData"), 25)); + // === xdr source ============================================================ // // struct TopologyResponseBodyV0 @@ -3783,6 +4192,22 @@ xdr.struct("TopologyResponseBodyV1", [ ["maxOutboundPeerCount", xdr.lookup("Uint32")], ]); +// === xdr source ============================================================ +// +// struct TopologyResponseBodyV2 +// { +// TimeSlicedPeerDataList inboundPeers; +// TimeSlicedPeerDataList outboundPeers; +// TimeSlicedNodeData nodeData; +// }; +// +// =========================================================================== +xdr.struct("TopologyResponseBodyV2", [ + ["inboundPeers", xdr.lookup("TimeSlicedPeerDataList")], + ["outboundPeers", xdr.lookup("TimeSlicedPeerDataList")], + ["nodeData", xdr.lookup("TimeSlicedNodeData")], +]); + // === xdr source ============================================================ // // union SurveyResponseBody switch (SurveyMessageResponseType type) @@ -3791,6 +4216,8 @@ xdr.struct("TopologyResponseBodyV1", [ // TopologyResponseBodyV0 topologyResponseBodyV0; // case SURVEY_TOPOLOGY_RESPONSE_V1: // TopologyResponseBodyV1 topologyResponseBodyV1; +// case SURVEY_TOPOLOGY_RESPONSE_V2: +// TopologyResponseBodyV2 topologyResponseBodyV2; // }; // // =========================================================================== @@ -3800,10 +4227,12 @@ xdr.union("SurveyResponseBody", { switches: [ ["surveyTopologyResponseV0", "topologyResponseBodyV0"], ["surveyTopologyResponseV1", "topologyResponseBodyV1"], + ["surveyTopologyResponseV2", "topologyResponseBodyV2"], ], arms: { topologyResponseBodyV0: xdr.lookup("TopologyResponseBodyV0"), topologyResponseBodyV1: xdr.lookup("TopologyResponseBodyV1"), + topologyResponseBodyV2: xdr.lookup("TopologyResponseBodyV2"), }, }); @@ -3892,6 +4321,20 @@ xdr.struct("FloodDemand", [ // case SURVEY_RESPONSE: // SignedSurveyResponseMessage signedSurveyResponseMessage; // +// case TIME_SLICED_SURVEY_REQUEST: +// SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage; +// +// case TIME_SLICED_SURVEY_RESPONSE: +// SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage; +// +// case TIME_SLICED_SURVEY_START_COLLECTING: +// SignedTimeSlicedSurveyStartCollectingMessage +// signedTimeSlicedSurveyStartCollectingMessage; +// +// case TIME_SLICED_SURVEY_STOP_COLLECTING: +// SignedTimeSlicedSurveyStopCollectingMessage +// signedTimeSlicedSurveyStopCollectingMessage; +// // // SCP // case GET_SCP_QUORUMSET: // uint256 qSetHash; @@ -3929,6 +4372,10 @@ xdr.union("StellarMessage", { ["transaction", "transaction"], ["surveyRequest", "signedSurveyRequestMessage"], ["surveyResponse", "signedSurveyResponseMessage"], + ["timeSlicedSurveyRequest", "signedTimeSlicedSurveyRequestMessage"], + ["timeSlicedSurveyResponse", "signedTimeSlicedSurveyResponseMessage"], + ["timeSlicedSurveyStartCollecting", "signedTimeSlicedSurveyStartCollectingMessage"], + ["timeSlicedSurveyStopCollecting", "signedTimeSlicedSurveyStopCollectingMessage"], ["getScpQuorumset", "qSetHash"], ["scpQuorumset", "qSet"], ["scpMessage", "envelope"], @@ -3950,6 +4397,10 @@ xdr.union("StellarMessage", { transaction: xdr.lookup("TransactionEnvelope"), signedSurveyRequestMessage: xdr.lookup("SignedSurveyRequestMessage"), signedSurveyResponseMessage: xdr.lookup("SignedSurveyResponseMessage"), + signedTimeSlicedSurveyRequestMessage: xdr.lookup("SignedTimeSlicedSurveyRequestMessage"), + signedTimeSlicedSurveyResponseMessage: xdr.lookup("SignedTimeSlicedSurveyResponseMessage"), + signedTimeSlicedSurveyStartCollectingMessage: xdr.lookup("SignedTimeSlicedSurveyStartCollectingMessage"), + signedTimeSlicedSurveyStopCollectingMessage: xdr.lookup("SignedTimeSlicedSurveyStopCollectingMessage"), qSetHash: xdr.lookup("Uint256"), qSet: xdr.lookup("ScpQuorumSet"), envelope: xdr.lookup("ScpEnvelope"), @@ -4619,7 +5070,8 @@ xdr.struct("LiquidityPoolWithdrawOp", [ // { // HOST_FUNCTION_TYPE_INVOKE_CONTRACT = 0, // HOST_FUNCTION_TYPE_CREATE_CONTRACT = 1, -// HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM = 2 +// HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM = 2, +// HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2 = 3 // }; // // =========================================================================== @@ -4627,6 +5079,7 @@ xdr.enum("HostFunctionType", { hostFunctionTypeInvokeContract: 0, hostFunctionTypeCreateContract: 1, hostFunctionTypeUploadContractWasm: 2, + hostFunctionTypeCreateContractV2: 3, }); // === xdr source ============================================================ @@ -4699,6 +5152,23 @@ xdr.struct("CreateContractArgs", [ ["executable", xdr.lookup("ContractExecutable")], ]); +// === xdr source ============================================================ +// +// struct CreateContractArgsV2 +// { +// ContractIDPreimage contractIDPreimage; +// ContractExecutable executable; +// // Arguments of the contract's constructor. +// SCVal constructorArgs<>; +// }; +// +// =========================================================================== +xdr.struct("CreateContractArgsV2", [ + ["contractIdPreimage", xdr.lookup("ContractIdPreimage")], + ["executable", xdr.lookup("ContractExecutable")], + ["constructorArgs", xdr.varArray(xdr.lookup("ScVal"), 2147483647)], +]); + // === xdr source ============================================================ // // struct InvokeContractArgs { @@ -4724,6 +5194,8 @@ xdr.struct("InvokeContractArgs", [ // CreateContractArgs createContract; // case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: // opaque wasm<>; +// case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: +// CreateContractArgsV2 createContractV2; // }; // // =========================================================================== @@ -4734,11 +5206,13 @@ xdr.union("HostFunction", { ["hostFunctionTypeInvokeContract", "invokeContract"], ["hostFunctionTypeCreateContract", "createContract"], ["hostFunctionTypeUploadContractWasm", "wasm"], + ["hostFunctionTypeCreateContractV2", "createContractV2"], ], arms: { invokeContract: xdr.lookup("InvokeContractArgs"), createContract: xdr.lookup("CreateContractArgs"), wasm: xdr.varOpaque(), + createContractV2: xdr.lookup("CreateContractArgsV2"), }, }); @@ -4747,13 +5221,15 @@ xdr.union("HostFunction", { // enum SorobanAuthorizedFunctionType // { // SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN = 0, -// SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN = 1 +// SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN = 1, +// SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN = 2 // }; // // =========================================================================== xdr.enum("SorobanAuthorizedFunctionType", { sorobanAuthorizedFunctionTypeContractFn: 0, sorobanAuthorizedFunctionTypeCreateContractHostFn: 1, + sorobanAuthorizedFunctionTypeCreateContractV2HostFn: 2, }); // === xdr source ============================================================ @@ -4762,8 +5238,14 @@ xdr.enum("SorobanAuthorizedFunctionType", { // { // case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: // InvokeContractArgs contractFn; +// // This variant of auth payload for creating new contract instances is no +// // longer accepted after protocol 22. // case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: // CreateContractArgs createContractHostFn; +// // This variant of auth payload for creating new contract instances +// // is only accepted in and after protocol 22. +// case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: +// CreateContractArgsV2 createContractV2HostFn; // }; // // =========================================================================== @@ -4773,10 +5255,12 @@ xdr.union("SorobanAuthorizedFunction", { switches: [ ["sorobanAuthorizedFunctionTypeContractFn", "contractFn"], ["sorobanAuthorizedFunctionTypeCreateContractHostFn", "createContractHostFn"], + ["sorobanAuthorizedFunctionTypeCreateContractV2HostFn", "createContractV2HostFn"], ], arms: { contractFn: xdr.lookup("InvokeContractArgs"), createContractHostFn: xdr.lookup("CreateContractArgs"), + createContractV2HostFn: xdr.lookup("CreateContractArgsV2"), }, }); @@ -5409,6 +5893,127 @@ xdr.struct("LedgerFootprint", [ ["readWrite", xdr.varArray(xdr.lookup("LedgerKey"), 2147483647)], ]); +// === xdr source ============================================================ +// +// enum ArchivalProofType +// { +// EXISTENCE = 0, +// NONEXISTENCE = 1 +// }; +// +// =========================================================================== +xdr.enum("ArchivalProofType", { + existence: 0, + nonexistence: 1, +}); + +// === xdr source ============================================================ +// +// struct ArchivalProofNode +// { +// uint32 index; +// Hash hash; +// }; +// +// =========================================================================== +xdr.struct("ArchivalProofNode", [ + ["index", xdr.lookup("Uint32")], + ["hash", xdr.lookup("Hash")], +]); + +// === xdr source ============================================================ +// +// typedef ArchivalProofNode ProofLevel<>; +// +// =========================================================================== +xdr.typedef("ProofLevel", xdr.varArray(xdr.lookup("ArchivalProofNode"), 2147483647)); + +// === xdr source ============================================================ +// +// struct NonexistenceProofBody +// { +// ColdArchiveBucketEntry entriesToProve<>; +// +// // Vector of vectors, where proofLevels[level] +// // contains all HashNodes that correspond with that level +// ProofLevel proofLevels<>; +// }; +// +// =========================================================================== +xdr.struct("NonexistenceProofBody", [ + ["entriesToProve", xdr.varArray(xdr.lookup("ColdArchiveBucketEntry"), 2147483647)], + ["proofLevels", xdr.varArray(xdr.lookup("ProofLevel"), 2147483647)], +]); + +// === xdr source ============================================================ +// +// struct ExistenceProofBody +// { +// LedgerKey keysToProve<>; +// +// // Bounds for each key being proved, where bound[n] +// // corresponds to keysToProve[n] +// ColdArchiveBucketEntry lowBoundEntries<>; +// ColdArchiveBucketEntry highBoundEntries<>; +// +// // Vector of vectors, where proofLevels[level] +// // contains all HashNodes that correspond with that level +// ProofLevel proofLevels<>; +// }; +// +// =========================================================================== +xdr.struct("ExistenceProofBody", [ + ["keysToProve", xdr.varArray(xdr.lookup("LedgerKey"), 2147483647)], + ["lowBoundEntries", xdr.varArray(xdr.lookup("ColdArchiveBucketEntry"), 2147483647)], + ["highBoundEntries", xdr.varArray(xdr.lookup("ColdArchiveBucketEntry"), 2147483647)], + ["proofLevels", xdr.varArray(xdr.lookup("ProofLevel"), 2147483647)], +]); + +// === xdr source ============================================================ +// +// union switch (ArchivalProofType t) +// { +// case EXISTENCE: +// NonexistenceProofBody nonexistenceProof; +// case NONEXISTENCE: +// ExistenceProofBody existenceProof; +// } +// +// =========================================================================== +xdr.union("ArchivalProofBody", { + switchOn: xdr.lookup("ArchivalProofType"), + switchName: "t", + switches: [ + ["existence", "nonexistenceProof"], + ["nonexistence", "existenceProof"], + ], + arms: { + nonexistenceProof: xdr.lookup("NonexistenceProofBody"), + existenceProof: xdr.lookup("ExistenceProofBody"), + }, +}); + +// === xdr source ============================================================ +// +// struct ArchivalProof +// { +// uint32 epoch; // AST Subtree for this proof +// +// union switch (ArchivalProofType t) +// { +// case EXISTENCE: +// NonexistenceProofBody nonexistenceProof; +// case NONEXISTENCE: +// ExistenceProofBody existenceProof; +// } body; +// }; +// +// =========================================================================== +xdr.struct("ArchivalProof", [ + ["epoch", xdr.lookup("Uint32")], + ["body", xdr.lookup("ArchivalProofBody")], +]); + // === xdr source ============================================================ // // struct SorobanResources @@ -5432,11 +6037,40 @@ xdr.struct("SorobanResources", [ ["writeBytes", xdr.lookup("Uint32")], ]); +// === xdr source ============================================================ +// +// union switch (int v) +// { +// case 0: +// void; +// case 1: +// ArchivalProof proofs<>; +// } +// +// =========================================================================== +xdr.union("SorobanTransactionDataExt", { + switchOn: xdr.int(), + switchName: "v", + switches: [ + [0, xdr.void()], + [1, "proofs"], + ], + arms: { + proofs: xdr.varArray(xdr.lookup("ArchivalProof"), 2147483647), + }, +}); + // === xdr source ============================================================ // // struct SorobanTransactionData // { -// ExtensionPoint ext; +// union switch (int v) +// { +// case 0: +// void; +// case 1: +// ArchivalProof proofs<>; +// } ext; // SorobanResources resources; // // Amount of the transaction `fee` allocated to the Soroban resource fees. // // The fraction of `resourceFee` corresponding to `resources` specified @@ -5452,7 +6086,7 @@ xdr.struct("SorobanResources", [ // // =========================================================================== xdr.struct("SorobanTransactionData", [ - ["ext", xdr.lookup("ExtensionPoint")], + ["ext", xdr.lookup("SorobanTransactionDataExt")], ["resources", xdr.lookup("SorobanResources")], ["resourceFee", xdr.lookup("Int64")], ]); @@ -8420,6 +9054,68 @@ xdr.struct("HmacSha256Mac", [ ["mac", xdr.opaque(32)], ]); +// === xdr source ============================================================ +// +// struct ShortHashSeed +// { +// opaque seed[16]; +// }; +// +// =========================================================================== +xdr.struct("ShortHashSeed", [ + ["seed", xdr.opaque(16)], +]); + +// === xdr source ============================================================ +// +// enum BinaryFuseFilterType +// { +// BINARY_FUSE_FILTER_8_BIT = 0, +// BINARY_FUSE_FILTER_16_BIT = 1, +// BINARY_FUSE_FILTER_32_BIT = 2 +// }; +// +// =========================================================================== +xdr.enum("BinaryFuseFilterType", { + binaryFuseFilter8Bit: 0, + binaryFuseFilter16Bit: 1, + binaryFuseFilter32Bit: 2, +}); + +// === xdr source ============================================================ +// +// struct SerializedBinaryFuseFilter +// { +// BinaryFuseFilterType type; +// +// // Seed used to hash input to filter +// ShortHashSeed inputHashSeed; +// +// // Seed used for internal filter hash operations +// ShortHashSeed filterSeed; +// uint32 segmentLength; +// uint32 segementLengthMask; +// uint32 segmentCount; +// uint32 segmentCountLength; +// uint32 fingerprintLength; // Length in terms of element count, not bytes +// +// // Array of uint8_t, uint16_t, or uint32_t depending on filter type +// opaque fingerprints<>; +// }; +// +// =========================================================================== +xdr.struct("SerializedBinaryFuseFilter", [ + ["type", xdr.lookup("BinaryFuseFilterType")], + ["inputHashSeed", xdr.lookup("ShortHashSeed")], + ["filterSeed", xdr.lookup("ShortHashSeed")], + ["segmentLength", xdr.lookup("Uint32")], + ["segementLengthMask", xdr.lookup("Uint32")], + ["segmentCount", xdr.lookup("Uint32")], + ["segmentCountLength", xdr.lookup("Uint32")], + ["fingerprintLength", xdr.lookup("Uint32")], + ["fingerprints", xdr.varOpaque()], +]); + // === xdr source ============================================================ // // enum SCValType @@ -9569,6 +10265,24 @@ xdr.struct("ConfigSettingContractComputeV0", [ ["txMemoryLimit", xdr.lookup("Uint32")], ]); +// === xdr source ============================================================ +// +// struct ConfigSettingContractParallelComputeV0 +// { +// // Maximum number of threads that can be used to apply a +// // transaction set to close the ledger. +// // This doesn't limit or defined the actual number of +// // threads used and instead only defines the minimum number +// // of physical threads that a tier-1 validator has to support +// // in order to not fall out of sync with the network. +// uint32 ledgerMaxParallelThreads; +// }; +// +// =========================================================================== +xdr.struct("ConfigSettingContractParallelComputeV0", [ + ["ledgerMaxParallelThreads", xdr.lookup("Uint32")], +]); + // === xdr source ============================================================ // // struct ConfigSettingContractLedgerCostV0 @@ -9931,7 +10645,8 @@ xdr.typedef("ContractCostParams", xdr.varArray(xdr.lookup("ContractCostParamEntr // CONFIG_SETTING_STATE_ARCHIVAL = 10, // CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, // CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW = 12, -// CONFIG_SETTING_EVICTION_ITERATOR = 13 +// CONFIG_SETTING_EVICTION_ITERATOR = 13, +// CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14 // }; // // =========================================================================== @@ -9950,6 +10665,7 @@ xdr.enum("ConfigSettingId", { configSettingContractExecutionLanes: 11, configSettingBucketlistSizeWindow: 12, configSettingEvictionIterator: 13, + configSettingContractParallelComputeV0: 14, }); // === xdr source ============================================================ @@ -9984,6 +10700,8 @@ xdr.enum("ConfigSettingId", { // uint64 bucketListSizeWindow<>; // case CONFIG_SETTING_EVICTION_ITERATOR: // EvictionIterator evictionIterator; +// case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: +// ConfigSettingContractParallelComputeV0 contractParallelCompute; // }; // // =========================================================================== @@ -10005,6 +10723,7 @@ xdr.union("ConfigSettingEntry", { ["configSettingContractExecutionLanes", "contractExecutionLanes"], ["configSettingBucketlistSizeWindow", "bucketListSizeWindow"], ["configSettingEvictionIterator", "evictionIterator"], + ["configSettingContractParallelComputeV0", "contractParallelCompute"], ], arms: { contractMaxSizeBytes: xdr.lookup("Uint32"), @@ -10021,6 +10740,7 @@ xdr.union("ConfigSettingEntry", { contractExecutionLanes: xdr.lookup("ConfigSettingContractExecutionLanesV0"), bucketListSizeWindow: xdr.varArray(xdr.lookup("Uint64"), 2147483647), evictionIterator: xdr.lookup("EvictionIterator"), + contractParallelCompute: xdr.lookup("ConfigSettingContractParallelComputeV0"), }, }); diff --git a/types/curr.d.ts b/types/curr.d.ts index 7f2dcdfd..0c4d18a8 100644 --- a/types/curr.d.ts +++ b/types/curr.d.ts @@ -1,4 +1,5 @@ -// Automatically generated on 2023-10-16T10:48:00-08:00 +// Automatically generated by xdrgen on 2024-08-23T12:09:00-08:00 +// DO NOT EDIT or your changes may be overwritten import { Operation } from './index'; export {}; @@ -487,6 +488,71 @@ export namespace xdr { static envelopeTypeSorobanAuthorization(): EnvelopeType; } + class BucketListType { + readonly name: 'live' | 'hotArchive' | 'coldArchive'; + + readonly value: 0 | 1 | 2; + + static live(): BucketListType; + + static hotArchive(): BucketListType; + + static coldArchive(): BucketListType; + } + + class BucketEntryType { + readonly name: 'metaentry' | 'liveentry' | 'deadentry' | 'initentry'; + + readonly value: -1 | 0 | 1 | 2; + + static metaentry(): BucketEntryType; + + static liveentry(): BucketEntryType; + + static deadentry(): BucketEntryType; + + static initentry(): BucketEntryType; + } + + class HotArchiveBucketEntryType { + readonly name: + | 'hotArchiveMetaentry' + | 'hotArchiveArchived' + | 'hotArchiveLive' + | 'hotArchiveDeleted'; + + readonly value: -1 | 0 | 1 | 2; + + static hotArchiveMetaentry(): HotArchiveBucketEntryType; + + static hotArchiveArchived(): HotArchiveBucketEntryType; + + static hotArchiveLive(): HotArchiveBucketEntryType; + + static hotArchiveDeleted(): HotArchiveBucketEntryType; + } + + class ColdArchiveBucketEntryType { + readonly name: + | 'coldArchiveMetaentry' + | 'coldArchiveArchivedLeaf' + | 'coldArchiveDeletedLeaf' + | 'coldArchiveBoundaryLeaf' + | 'coldArchiveHash'; + + readonly value: -1 | 0 | 1 | 2 | 3; + + static coldArchiveMetaentry(): ColdArchiveBucketEntryType; + + static coldArchiveArchivedLeaf(): ColdArchiveBucketEntryType; + + static coldArchiveDeletedLeaf(): ColdArchiveBucketEntryType; + + static coldArchiveBoundaryLeaf(): ColdArchiveBucketEntryType; + + static coldArchiveHash(): ColdArchiveBucketEntryType; + } + class StellarValueType { readonly name: 'stellarValueBasic' | 'stellarValueSigned'; @@ -539,20 +605,6 @@ export namespace xdr { static ledgerUpgradeMaxSorobanTxSetSize(): LedgerUpgradeType; } - class BucketEntryType { - readonly name: 'metaentry' | 'liveentry' | 'deadentry' | 'initentry'; - - readonly value: -1 | 0 | 1 | 2; - - static metaentry(): BucketEntryType; - - static liveentry(): BucketEntryType; - - static deadentry(): BucketEntryType; - - static initentry(): BucketEntryType; - } - class TxSetComponentType { readonly name: 'txsetCompTxsMaybeDiscountedFee'; @@ -638,7 +690,11 @@ export namespace xdr { | 'sendMore' | 'sendMoreExtended' | 'floodAdvert' - | 'floodDemand'; + | 'floodDemand' + | 'timeSlicedSurveyRequest' + | 'timeSlicedSurveyResponse' + | 'timeSlicedSurveyStartCollecting' + | 'timeSlicedSurveyStopCollecting'; readonly value: | 0 @@ -660,7 +716,11 @@ export namespace xdr { | 16 | 20 | 18 - | 19; + | 19 + | 21 + | 22 + | 23 + | 24; static errorMsg(): MessageType; @@ -701,24 +761,39 @@ export namespace xdr { static floodAdvert(): MessageType; static floodDemand(): MessageType; + + static timeSlicedSurveyRequest(): MessageType; + + static timeSlicedSurveyResponse(): MessageType; + + static timeSlicedSurveyStartCollecting(): MessageType; + + static timeSlicedSurveyStopCollecting(): MessageType; } class SurveyMessageCommandType { - readonly name: 'surveyTopology'; + readonly name: 'surveyTopology' | 'timeSlicedSurveyTopology'; - readonly value: 0; + readonly value: 0 | 1; static surveyTopology(): SurveyMessageCommandType; + + static timeSlicedSurveyTopology(): SurveyMessageCommandType; } class SurveyMessageResponseType { - readonly name: 'surveyTopologyResponseV0' | 'surveyTopologyResponseV1'; + readonly name: + | 'surveyTopologyResponseV0' + | 'surveyTopologyResponseV1' + | 'surveyTopologyResponseV2'; - readonly value: 0 | 1; + readonly value: 0 | 1 | 2; static surveyTopologyResponseV0(): SurveyMessageResponseType; static surveyTopologyResponseV1(): SurveyMessageResponseType; + + static surveyTopologyResponseV2(): SurveyMessageResponseType; } class OperationType { @@ -849,15 +924,18 @@ export namespace xdr { readonly name: | 'hostFunctionTypeInvokeContract' | 'hostFunctionTypeCreateContract' - | 'hostFunctionTypeUploadContractWasm'; + | 'hostFunctionTypeUploadContractWasm' + | 'hostFunctionTypeCreateContractV2'; - readonly value: 0 | 1 | 2; + readonly value: 0 | 1 | 2 | 3; static hostFunctionTypeInvokeContract(): HostFunctionType; static hostFunctionTypeCreateContract(): HostFunctionType; static hostFunctionTypeUploadContractWasm(): HostFunctionType; + + static hostFunctionTypeCreateContractV2(): HostFunctionType; } class ContractIdPreimageType { @@ -875,13 +953,16 @@ export namespace xdr { class SorobanAuthorizedFunctionType { readonly name: | 'sorobanAuthorizedFunctionTypeContractFn' - | 'sorobanAuthorizedFunctionTypeCreateContractHostFn'; + | 'sorobanAuthorizedFunctionTypeCreateContractHostFn' + | 'sorobanAuthorizedFunctionTypeCreateContractV2HostFn'; - readonly value: 0 | 1; + readonly value: 0 | 1 | 2; static sorobanAuthorizedFunctionTypeContractFn(): SorobanAuthorizedFunctionType; static sorobanAuthorizedFunctionTypeCreateContractHostFn(): SorobanAuthorizedFunctionType; + + static sorobanAuthorizedFunctionTypeCreateContractV2HostFn(): SorobanAuthorizedFunctionType; } class SorobanCredentialsType { @@ -929,6 +1010,16 @@ export namespace xdr { static precondV2(): PreconditionType; } + class ArchivalProofType { + readonly name: 'existence' | 'nonexistence'; + + readonly value: 0 | 1; + + static existence(): ArchivalProofType; + + static nonexistence(): ArchivalProofType; + } + class ClaimAtomType { readonly name: | 'claimAtomTypeV0' @@ -1853,6 +1944,21 @@ export namespace xdr { static signerKeyTypeEd25519SignedPayload(): SignerKeyType; } + class BinaryFuseFilterType { + readonly name: + | 'binaryFuseFilter8Bit' + | 'binaryFuseFilter16Bit' + | 'binaryFuseFilter32Bit'; + + readonly value: 0 | 1 | 2; + + static binaryFuseFilter8Bit(): BinaryFuseFilterType; + + static binaryFuseFilter16Bit(): BinaryFuseFilterType; + + static binaryFuseFilter32Bit(): BinaryFuseFilterType; + } + class ScValType { readonly name: | 'scvBool' @@ -2450,14 +2556,20 @@ export namespace xdr { const LedgerEntryChanges: XDRArray; + const DiagnosticEvents: XDRArray; + const EncryptedBody: VarOpaque; const PeerStatList: XDRArray; + const TimeSlicedPeerDataList: XDRArray; + const TxAdvertVector: XDRArray; const TxDemandVector: XDRArray; + const ProofLevel: XDRArray; + const Hash: Opaque; const Uint256: Opaque; @@ -4068,6 +4180,160 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class BucketMetadata { + constructor(attributes: { ledgerVersion: number; ext: BucketMetadataExt }); + + ledgerVersion(value?: number): number; + + ext(value?: BucketMetadataExt): BucketMetadataExt; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): BucketMetadata; + + static write(value: BucketMetadata, io: Buffer): void; + + static isValid(value: BucketMetadata): boolean; + + static toXDR(value: BucketMetadata): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): BucketMetadata; + + static fromXDR(input: string, format: 'hex' | 'base64'): BucketMetadata; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class ColdArchiveArchivedLeaf { + constructor(attributes: { index: number; archivedEntry: LedgerEntry }); + + index(value?: number): number; + + archivedEntry(value?: LedgerEntry): LedgerEntry; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ColdArchiveArchivedLeaf; + + static write(value: ColdArchiveArchivedLeaf, io: Buffer): void; + + static isValid(value: ColdArchiveArchivedLeaf): boolean; + + static toXDR(value: ColdArchiveArchivedLeaf): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ColdArchiveArchivedLeaf; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): ColdArchiveArchivedLeaf; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class ColdArchiveDeletedLeaf { + constructor(attributes: { index: number; deletedKey: LedgerKey }); + + index(value?: number): number; + + deletedKey(value?: LedgerKey): LedgerKey; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ColdArchiveDeletedLeaf; + + static write(value: ColdArchiveDeletedLeaf, io: Buffer): void; + + static isValid(value: ColdArchiveDeletedLeaf): boolean; + + static toXDR(value: ColdArchiveDeletedLeaf): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ColdArchiveDeletedLeaf; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): ColdArchiveDeletedLeaf; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class ColdArchiveBoundaryLeaf { + constructor(attributes: { index: number; isLowerBound: boolean }); + + index(value?: number): number; + + isLowerBound(value?: boolean): boolean; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ColdArchiveBoundaryLeaf; + + static write(value: ColdArchiveBoundaryLeaf, io: Buffer): void; + + static isValid(value: ColdArchiveBoundaryLeaf): boolean; + + static toXDR(value: ColdArchiveBoundaryLeaf): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ColdArchiveBoundaryLeaf; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): ColdArchiveBoundaryLeaf; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class ColdArchiveHashEntry { + constructor(attributes: { index: number; level: number; hash: Buffer }); + + index(value?: number): number; + + level(value?: number): number; + + hash(value?: Buffer): Buffer; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ColdArchiveHashEntry; + + static write(value: ColdArchiveHashEntry, io: Buffer): void; + + static isValid(value: ColdArchiveHashEntry): boolean; + + static toXDR(value: ColdArchiveHashEntry): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ColdArchiveHashEntry; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): ColdArchiveHashEntry; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class LedgerCloseValueSignature { constructor(attributes: { nodeId: NodeId; signature: Buffer }); @@ -4294,34 +4560,6 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } - class BucketMetadata { - constructor(attributes: { ledgerVersion: number; ext: BucketMetadataExt }); - - ledgerVersion(value?: number): number; - - ext(value?: BucketMetadataExt): BucketMetadataExt; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BucketMetadata; - - static write(value: BucketMetadata, io: Buffer): void; - - static isValid(value: BucketMetadata): boolean; - - static toXDR(value: BucketMetadata): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): BucketMetadata; - - static fromXDR(input: string, format: 'hex' | 'base64'): BucketMetadata; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - class TxSetComponentTxsMaybeDiscountedFee { constructor(attributes: { baseFee: null | Int64; @@ -5449,43 +5687,258 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } - class SurveyRequestMessage { + class TimeSlicedSurveyStartCollectingMessage { constructor(attributes: { - surveyorPeerId: NodeId; - surveyedPeerId: NodeId; + surveyorId: NodeId; + nonce: number; ledgerNum: number; - encryptionKey: Curve25519Public; - commandType: SurveyMessageCommandType; }); - surveyorPeerId(value?: NodeId): NodeId; + surveyorId(value?: NodeId): NodeId; - surveyedPeerId(value?: NodeId): NodeId; + nonce(value?: number): number; ledgerNum(value?: number): number; - encryptionKey(value?: Curve25519Public): Curve25519Public; - - commandType(value?: SurveyMessageCommandType): SurveyMessageCommandType; - toXDR(format?: 'raw'): Buffer; toXDR(format: 'hex' | 'base64'): string; - static read(io: Buffer): SurveyRequestMessage; + static read(io: Buffer): TimeSlicedSurveyStartCollectingMessage; - static write(value: SurveyRequestMessage, io: Buffer): void; + static write( + value: TimeSlicedSurveyStartCollectingMessage, + io: Buffer, + ): void; - static isValid(value: SurveyRequestMessage): boolean; + static isValid(value: TimeSlicedSurveyStartCollectingMessage): boolean; - static toXDR(value: SurveyRequestMessage): Buffer; + static toXDR(value: TimeSlicedSurveyStartCollectingMessage): Buffer; - static fromXDR(input: Buffer, format?: 'raw'): SurveyRequestMessage; + static fromXDR( + input: Buffer, + format?: 'raw', + ): TimeSlicedSurveyStartCollectingMessage; static fromXDR( input: string, format: 'hex' | 'base64', - ): SurveyRequestMessage; + ): TimeSlicedSurveyStartCollectingMessage; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class SignedTimeSlicedSurveyStartCollectingMessage { + constructor(attributes: { + signature: Buffer; + startCollecting: TimeSlicedSurveyStartCollectingMessage; + }); + + signature(value?: Buffer): Buffer; + + startCollecting( + value?: TimeSlicedSurveyStartCollectingMessage, + ): TimeSlicedSurveyStartCollectingMessage; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): SignedTimeSlicedSurveyStartCollectingMessage; + + static write( + value: SignedTimeSlicedSurveyStartCollectingMessage, + io: Buffer, + ): void; + + static isValid( + value: SignedTimeSlicedSurveyStartCollectingMessage, + ): boolean; + + static toXDR(value: SignedTimeSlicedSurveyStartCollectingMessage): Buffer; + + static fromXDR( + input: Buffer, + format?: 'raw', + ): SignedTimeSlicedSurveyStartCollectingMessage; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): SignedTimeSlicedSurveyStartCollectingMessage; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class TimeSlicedSurveyStopCollectingMessage { + constructor(attributes: { + surveyorId: NodeId; + nonce: number; + ledgerNum: number; + }); + + surveyorId(value?: NodeId): NodeId; + + nonce(value?: number): number; + + ledgerNum(value?: number): number; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): TimeSlicedSurveyStopCollectingMessage; + + static write( + value: TimeSlicedSurveyStopCollectingMessage, + io: Buffer, + ): void; + + static isValid(value: TimeSlicedSurveyStopCollectingMessage): boolean; + + static toXDR(value: TimeSlicedSurveyStopCollectingMessage): Buffer; + + static fromXDR( + input: Buffer, + format?: 'raw', + ): TimeSlicedSurveyStopCollectingMessage; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): TimeSlicedSurveyStopCollectingMessage; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class SignedTimeSlicedSurveyStopCollectingMessage { + constructor(attributes: { + signature: Buffer; + stopCollecting: TimeSlicedSurveyStopCollectingMessage; + }); + + signature(value?: Buffer): Buffer; + + stopCollecting( + value?: TimeSlicedSurveyStopCollectingMessage, + ): TimeSlicedSurveyStopCollectingMessage; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): SignedTimeSlicedSurveyStopCollectingMessage; + + static write( + value: SignedTimeSlicedSurveyStopCollectingMessage, + io: Buffer, + ): void; + + static isValid(value: SignedTimeSlicedSurveyStopCollectingMessage): boolean; + + static toXDR(value: SignedTimeSlicedSurveyStopCollectingMessage): Buffer; + + static fromXDR( + input: Buffer, + format?: 'raw', + ): SignedTimeSlicedSurveyStopCollectingMessage; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): SignedTimeSlicedSurveyStopCollectingMessage; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class SurveyRequestMessage { + constructor(attributes: { + surveyorPeerId: NodeId; + surveyedPeerId: NodeId; + ledgerNum: number; + encryptionKey: Curve25519Public; + commandType: SurveyMessageCommandType; + }); + + surveyorPeerId(value?: NodeId): NodeId; + + surveyedPeerId(value?: NodeId): NodeId; + + ledgerNum(value?: number): number; + + encryptionKey(value?: Curve25519Public): Curve25519Public; + + commandType(value?: SurveyMessageCommandType): SurveyMessageCommandType; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): SurveyRequestMessage; + + static write(value: SurveyRequestMessage, io: Buffer): void; + + static isValid(value: SurveyRequestMessage): boolean; + + static toXDR(value: SurveyRequestMessage): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): SurveyRequestMessage; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): SurveyRequestMessage; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class TimeSlicedSurveyRequestMessage { + constructor(attributes: { + request: SurveyRequestMessage; + nonce: number; + inboundPeersIndex: number; + outboundPeersIndex: number; + }); + + request(value?: SurveyRequestMessage): SurveyRequestMessage; + + nonce(value?: number): number; + + inboundPeersIndex(value?: number): number; + + outboundPeersIndex(value?: number): number; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): TimeSlicedSurveyRequestMessage; + + static write(value: TimeSlicedSurveyRequestMessage, io: Buffer): void; + + static isValid(value: TimeSlicedSurveyRequestMessage): boolean; + + static toXDR(value: TimeSlicedSurveyRequestMessage): Buffer; + + static fromXDR( + input: Buffer, + format?: 'raw', + ): TimeSlicedSurveyRequestMessage; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): TimeSlicedSurveyRequestMessage; static validateXDR(input: Buffer, format?: 'raw'): boolean; @@ -5526,6 +5979,45 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class SignedTimeSlicedSurveyRequestMessage { + constructor(attributes: { + requestSignature: Buffer; + request: TimeSlicedSurveyRequestMessage; + }); + + requestSignature(value?: Buffer): Buffer; + + request( + value?: TimeSlicedSurveyRequestMessage, + ): TimeSlicedSurveyRequestMessage; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): SignedTimeSlicedSurveyRequestMessage; + + static write(value: SignedTimeSlicedSurveyRequestMessage, io: Buffer): void; + + static isValid(value: SignedTimeSlicedSurveyRequestMessage): boolean; + + static toXDR(value: SignedTimeSlicedSurveyRequestMessage): Buffer; + + static fromXDR( + input: Buffer, + format?: 'raw', + ): SignedTimeSlicedSurveyRequestMessage; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): SignedTimeSlicedSurveyRequestMessage; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class SurveyResponseMessage { constructor(attributes: { surveyorPeerId: NodeId; @@ -5569,6 +6061,40 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class TimeSlicedSurveyResponseMessage { + constructor(attributes: { response: SurveyResponseMessage; nonce: number }); + + response(value?: SurveyResponseMessage): SurveyResponseMessage; + + nonce(value?: number): number; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): TimeSlicedSurveyResponseMessage; + + static write(value: TimeSlicedSurveyResponseMessage, io: Buffer): void; + + static isValid(value: TimeSlicedSurveyResponseMessage): boolean; + + static toXDR(value: TimeSlicedSurveyResponseMessage): Buffer; + + static fromXDR( + input: Buffer, + format?: 'raw', + ): TimeSlicedSurveyResponseMessage; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): TimeSlicedSurveyResponseMessage; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class SignedSurveyResponseMessage { constructor(attributes: { responseSignature: Buffer; @@ -5603,6 +6129,48 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class SignedTimeSlicedSurveyResponseMessage { + constructor(attributes: { + responseSignature: Buffer; + response: TimeSlicedSurveyResponseMessage; + }); + + responseSignature(value?: Buffer): Buffer; + + response( + value?: TimeSlicedSurveyResponseMessage, + ): TimeSlicedSurveyResponseMessage; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): SignedTimeSlicedSurveyResponseMessage; + + static write( + value: SignedTimeSlicedSurveyResponseMessage, + io: Buffer, + ): void; + + static isValid(value: SignedTimeSlicedSurveyResponseMessage): boolean; + + static toXDR(value: SignedTimeSlicedSurveyResponseMessage): Buffer; + + static fromXDR( + input: Buffer, + format?: 'raw', + ): SignedTimeSlicedSurveyResponseMessage; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): SignedTimeSlicedSurveyResponseMessage; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class PeerStats { constructor(attributes: { id: NodeId; @@ -5673,6 +6241,89 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class TimeSlicedNodeData { + constructor(attributes: { + addedAuthenticatedPeers: number; + droppedAuthenticatedPeers: number; + totalInboundPeerCount: number; + totalOutboundPeerCount: number; + p75ScpFirstToSelfLatencyMs: number; + p75ScpSelfToOtherLatencyMs: number; + lostSyncCount: number; + isValidator: boolean; + maxInboundPeerCount: number; + maxOutboundPeerCount: number; + }); + + addedAuthenticatedPeers(value?: number): number; + + droppedAuthenticatedPeers(value?: number): number; + + totalInboundPeerCount(value?: number): number; + + totalOutboundPeerCount(value?: number): number; + + p75ScpFirstToSelfLatencyMs(value?: number): number; + + p75ScpSelfToOtherLatencyMs(value?: number): number; + + lostSyncCount(value?: number): number; + + isValidator(value?: boolean): boolean; + + maxInboundPeerCount(value?: number): number; + + maxOutboundPeerCount(value?: number): number; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): TimeSlicedNodeData; + + static write(value: TimeSlicedNodeData, io: Buffer): void; + + static isValid(value: TimeSlicedNodeData): boolean; + + static toXDR(value: TimeSlicedNodeData): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): TimeSlicedNodeData; + + static fromXDR(input: string, format: 'hex' | 'base64'): TimeSlicedNodeData; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class TimeSlicedPeerData { + constructor(attributes: { peerStats: PeerStats; averageLatencyMs: number }); + + peerStats(value?: PeerStats): PeerStats; + + averageLatencyMs(value?: number): number; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): TimeSlicedPeerData; + + static write(value: TimeSlicedPeerData, io: Buffer): void; + + static isValid(value: TimeSlicedPeerData): boolean; + + static toXDR(value: TimeSlicedPeerData): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): TimeSlicedPeerData; + + static fromXDR(input: string, format: 'hex' | 'base64'): TimeSlicedPeerData; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class TopologyResponseBodyV0 { constructor(attributes: { inboundPeers: PeerStats[]; @@ -5759,6 +6410,43 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class TopologyResponseBodyV2 { + constructor(attributes: { + inboundPeers: TimeSlicedPeerData[]; + outboundPeers: TimeSlicedPeerData[]; + nodeData: TimeSlicedNodeData; + }); + + inboundPeers(value?: TimeSlicedPeerData[]): TimeSlicedPeerData[]; + + outboundPeers(value?: TimeSlicedPeerData[]): TimeSlicedPeerData[]; + + nodeData(value?: TimeSlicedNodeData): TimeSlicedNodeData; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): TopologyResponseBodyV2; + + static write(value: TopologyResponseBodyV2, io: Buffer): void; + + static isValid(value: TopologyResponseBodyV2): boolean; + + static toXDR(value: TopologyResponseBodyV2): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): TopologyResponseBodyV2; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): TopologyResponseBodyV2; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class FloodAdvert { constructor(attributes: { txHashes: Hash[] }); @@ -6732,6 +7420,43 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class CreateContractArgsV2 { + constructor(attributes: { + contractIdPreimage: ContractIdPreimage; + executable: ContractExecutable; + constructorArgs: ScVal[]; + }); + + contractIdPreimage(value?: ContractIdPreimage): ContractIdPreimage; + + executable(value?: ContractExecutable): ContractExecutable; + + constructorArgs(value?: ScVal[]): ScVal[]; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): CreateContractArgsV2; + + static write(value: CreateContractArgsV2, io: Buffer): void; + + static isValid(value: CreateContractArgsV2): boolean; + + static toXDR(value: CreateContractArgsV2): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): CreateContractArgsV2; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): CreateContractArgsV2; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class InvokeContractArgs { constructor(attributes: { contractAddress: ScAddress; @@ -7255,6 +7980,135 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class ArchivalProofNode { + constructor(attributes: { index: number; hash: Buffer }); + + index(value?: number): number; + + hash(value?: Buffer): Buffer; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ArchivalProofNode; + + static write(value: ArchivalProofNode, io: Buffer): void; + + static isValid(value: ArchivalProofNode): boolean; + + static toXDR(value: ArchivalProofNode): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ArchivalProofNode; + + static fromXDR(input: string, format: 'hex' | 'base64'): ArchivalProofNode; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class NonexistenceProofBody { + constructor(attributes: { + entriesToProve: ColdArchiveBucketEntry[]; + proofLevels: ArchivalProofNode[][]; + }); + + entriesToProve(value?: ColdArchiveBucketEntry[]): ColdArchiveBucketEntry[]; + + proofLevels(value?: ArchivalProofNode[][]): ArchivalProofNode[][]; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): NonexistenceProofBody; + + static write(value: NonexistenceProofBody, io: Buffer): void; + + static isValid(value: NonexistenceProofBody): boolean; + + static toXDR(value: NonexistenceProofBody): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): NonexistenceProofBody; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): NonexistenceProofBody; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class ExistenceProofBody { + constructor(attributes: { + keysToProve: LedgerKey[]; + lowBoundEntries: ColdArchiveBucketEntry[]; + highBoundEntries: ColdArchiveBucketEntry[]; + proofLevels: ArchivalProofNode[][]; + }); + + keysToProve(value?: LedgerKey[]): LedgerKey[]; + + lowBoundEntries(value?: ColdArchiveBucketEntry[]): ColdArchiveBucketEntry[]; + + highBoundEntries( + value?: ColdArchiveBucketEntry[], + ): ColdArchiveBucketEntry[]; + + proofLevels(value?: ArchivalProofNode[][]): ArchivalProofNode[][]; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ExistenceProofBody; + + static write(value: ExistenceProofBody, io: Buffer): void; + + static isValid(value: ExistenceProofBody): boolean; + + static toXDR(value: ExistenceProofBody): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ExistenceProofBody; + + static fromXDR(input: string, format: 'hex' | 'base64'): ExistenceProofBody; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class ArchivalProof { + constructor(attributes: { epoch: number; body: ArchivalProofBody }); + + epoch(value?: number): number; + + body(value?: ArchivalProofBody): ArchivalProofBody; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ArchivalProof; + + static write(value: ArchivalProof, io: Buffer): void; + + static isValid(value: ArchivalProof): boolean; + + static toXDR(value: ArchivalProof): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ArchivalProof; + + static fromXDR(input: string, format: 'hex' | 'base64'): ArchivalProof; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class SorobanResources { constructor(attributes: { footprint: LedgerFootprint; @@ -8100,35 +8954,116 @@ export namespace xdr { static toXDR(value: HmacSha256Key): Buffer; - static fromXDR(input: Buffer, format?: 'raw'): HmacSha256Key; + static fromXDR(input: Buffer, format?: 'raw'): HmacSha256Key; + + static fromXDR(input: string, format: 'hex' | 'base64'): HmacSha256Key; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class HmacSha256Mac { + constructor(attributes: { mac: Buffer }); + + mac(value?: Buffer): Buffer; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): HmacSha256Mac; + + static write(value: HmacSha256Mac, io: Buffer): void; + + static isValid(value: HmacSha256Mac): boolean; + + static toXDR(value: HmacSha256Mac): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): HmacSha256Mac; + + static fromXDR(input: string, format: 'hex' | 'base64'): HmacSha256Mac; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class ShortHashSeed { + constructor(attributes: { seed: Buffer }); + + seed(value?: Buffer): Buffer; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ShortHashSeed; + + static write(value: ShortHashSeed, io: Buffer): void; + + static isValid(value: ShortHashSeed): boolean; + + static toXDR(value: ShortHashSeed): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ShortHashSeed; + + static fromXDR(input: string, format: 'hex' | 'base64'): ShortHashSeed; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class SerializedBinaryFuseFilter { + constructor(attributes: { + type: BinaryFuseFilterType; + inputHashSeed: ShortHashSeed; + filterSeed: ShortHashSeed; + segmentLength: number; + segementLengthMask: number; + segmentCount: number; + segmentCountLength: number; + fingerprintLength: number; + fingerprints: Buffer; + }); + + type(value?: BinaryFuseFilterType): BinaryFuseFilterType; + + inputHashSeed(value?: ShortHashSeed): ShortHashSeed; + + filterSeed(value?: ShortHashSeed): ShortHashSeed; + + segmentLength(value?: number): number; - static fromXDR(input: string, format: 'hex' | 'base64'): HmacSha256Key; + segementLengthMask(value?: number): number; - static validateXDR(input: Buffer, format?: 'raw'): boolean; + segmentCount(value?: number): number; - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } + segmentCountLength(value?: number): number; - class HmacSha256Mac { - constructor(attributes: { mac: Buffer }); + fingerprintLength(value?: number): number; - mac(value?: Buffer): Buffer; + fingerprints(value?: Buffer): Buffer; toXDR(format?: 'raw'): Buffer; toXDR(format: 'hex' | 'base64'): string; - static read(io: Buffer): HmacSha256Mac; + static read(io: Buffer): SerializedBinaryFuseFilter; - static write(value: HmacSha256Mac, io: Buffer): void; + static write(value: SerializedBinaryFuseFilter, io: Buffer): void; - static isValid(value: HmacSha256Mac): boolean; + static isValid(value: SerializedBinaryFuseFilter): boolean; - static toXDR(value: HmacSha256Mac): Buffer; + static toXDR(value: SerializedBinaryFuseFilter): Buffer; - static fromXDR(input: Buffer, format?: 'raw'): HmacSha256Mac; + static fromXDR(input: Buffer, format?: 'raw'): SerializedBinaryFuseFilter; - static fromXDR(input: string, format: 'hex' | 'base64'): HmacSha256Mac; + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): SerializedBinaryFuseFilter; static validateXDR(input: Buffer, format?: 'raw'): boolean; @@ -10261,6 +11196,181 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class BucketMetadataExt { + switch(): number; + + bucketListType(value?: BucketListType): BucketListType; + + static 0(): BucketMetadataExt; + + static 1(value: BucketListType): BucketMetadataExt; + + value(): BucketListType | void; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): BucketMetadataExt; + + static write(value: BucketMetadataExt, io: Buffer): void; + + static isValid(value: BucketMetadataExt): boolean; + + static toXDR(value: BucketMetadataExt): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): BucketMetadataExt; + + static fromXDR(input: string, format: 'hex' | 'base64'): BucketMetadataExt; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class BucketEntry { + switch(): BucketEntryType; + + liveEntry(value?: LedgerEntry): LedgerEntry; + + deadEntry(value?: LedgerKey): LedgerKey; + + metaEntry(value?: BucketMetadata): BucketMetadata; + + static liveentry(value: LedgerEntry): BucketEntry; + + static initentry(value: LedgerEntry): BucketEntry; + + static deadentry(value: LedgerKey): BucketEntry; + + static metaentry(value: BucketMetadata): BucketEntry; + + value(): LedgerEntry | LedgerKey | BucketMetadata; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): BucketEntry; + + static write(value: BucketEntry, io: Buffer): void; + + static isValid(value: BucketEntry): boolean; + + static toXDR(value: BucketEntry): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): BucketEntry; + + static fromXDR(input: string, format: 'hex' | 'base64'): BucketEntry; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class HotArchiveBucketEntry { + switch(): HotArchiveBucketEntryType; + + archivedEntry(value?: LedgerEntry): LedgerEntry; + + key(value?: LedgerKey): LedgerKey; + + metaEntry(value?: BucketMetadata): BucketMetadata; + + static hotArchiveArchived(value: LedgerEntry): HotArchiveBucketEntry; + + static hotArchiveLive(value: LedgerKey): HotArchiveBucketEntry; + + static hotArchiveDeleted(value: LedgerKey): HotArchiveBucketEntry; + + static hotArchiveMetaentry(value: BucketMetadata): HotArchiveBucketEntry; + + value(): LedgerEntry | LedgerKey | BucketMetadata; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): HotArchiveBucketEntry; + + static write(value: HotArchiveBucketEntry, io: Buffer): void; + + static isValid(value: HotArchiveBucketEntry): boolean; + + static toXDR(value: HotArchiveBucketEntry): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): HotArchiveBucketEntry; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): HotArchiveBucketEntry; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class ColdArchiveBucketEntry { + switch(): ColdArchiveBucketEntryType; + + metaEntry(value?: BucketMetadata): BucketMetadata; + + archivedLeaf(value?: ColdArchiveArchivedLeaf): ColdArchiveArchivedLeaf; + + deletedLeaf(value?: ColdArchiveDeletedLeaf): ColdArchiveDeletedLeaf; + + boundaryLeaf(value?: ColdArchiveBoundaryLeaf): ColdArchiveBoundaryLeaf; + + hashEntry(value?: ColdArchiveHashEntry): ColdArchiveHashEntry; + + static coldArchiveMetaentry(value: BucketMetadata): ColdArchiveBucketEntry; + + static coldArchiveArchivedLeaf( + value: ColdArchiveArchivedLeaf, + ): ColdArchiveBucketEntry; + + static coldArchiveDeletedLeaf( + value: ColdArchiveDeletedLeaf, + ): ColdArchiveBucketEntry; + + static coldArchiveBoundaryLeaf( + value: ColdArchiveBoundaryLeaf, + ): ColdArchiveBucketEntry; + + static coldArchiveHash(value: ColdArchiveHashEntry): ColdArchiveBucketEntry; + + value(): + | BucketMetadata + | ColdArchiveArchivedLeaf + | ColdArchiveDeletedLeaf + | ColdArchiveBoundaryLeaf + | ColdArchiveHashEntry; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ColdArchiveBucketEntry; + + static write(value: ColdArchiveBucketEntry, io: Buffer): void; + + static isValid(value: ColdArchiveBucketEntry): boolean; + + static toXDR(value: ColdArchiveBucketEntry): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ColdArchiveBucketEntry; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): ColdArchiveBucketEntry; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class StellarValueExt { switch(): StellarValueType; @@ -10421,74 +11531,6 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } - class BucketMetadataExt { - switch(): number; - - static 0(): BucketMetadataExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BucketMetadataExt; - - static write(value: BucketMetadataExt, io: Buffer): void; - - static isValid(value: BucketMetadataExt): boolean; - - static toXDR(value: BucketMetadataExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): BucketMetadataExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): BucketMetadataExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class BucketEntry { - switch(): BucketEntryType; - - liveEntry(value?: LedgerEntry): LedgerEntry; - - deadEntry(value?: LedgerKey): LedgerKey; - - metaEntry(value?: BucketMetadata): BucketMetadata; - - static liveentry(value: LedgerEntry): BucketEntry; - - static initentry(value: LedgerEntry): BucketEntry; - - static deadentry(value: LedgerKey): BucketEntry; - - static metaentry(value: BucketMetadata): BucketEntry; - - value(): LedgerEntry | LedgerKey | BucketMetadata; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BucketEntry; - - static write(value: BucketEntry, io: Buffer): void; - - static isValid(value: BucketEntry): boolean; - - static toXDR(value: BucketEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): BucketEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): BucketEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - class TxSetComponent { switch(): TxSetComponentType; @@ -10982,6 +12024,10 @@ export namespace xdr { value?: TopologyResponseBodyV1, ): TopologyResponseBodyV1; + topologyResponseBodyV2( + value?: TopologyResponseBodyV2, + ): TopologyResponseBodyV2; + static surveyTopologyResponseV0( value: TopologyResponseBodyV0, ): SurveyResponseBody; @@ -10990,7 +12036,14 @@ export namespace xdr { value: TopologyResponseBodyV1, ): SurveyResponseBody; - value(): TopologyResponseBodyV0 | TopologyResponseBodyV1; + static surveyTopologyResponseV2( + value: TopologyResponseBodyV2, + ): SurveyResponseBody; + + value(): + | TopologyResponseBodyV0 + | TopologyResponseBodyV1 + | TopologyResponseBodyV2; toXDR(format?: 'raw'): Buffer; @@ -11044,6 +12097,22 @@ export namespace xdr { value?: SignedSurveyResponseMessage, ): SignedSurveyResponseMessage; + signedTimeSlicedSurveyRequestMessage( + value?: SignedTimeSlicedSurveyRequestMessage, + ): SignedTimeSlicedSurveyRequestMessage; + + signedTimeSlicedSurveyResponseMessage( + value?: SignedTimeSlicedSurveyResponseMessage, + ): SignedTimeSlicedSurveyResponseMessage; + + signedTimeSlicedSurveyStartCollectingMessage( + value?: SignedTimeSlicedSurveyStartCollectingMessage, + ): SignedTimeSlicedSurveyStartCollectingMessage; + + signedTimeSlicedSurveyStopCollectingMessage( + value?: SignedTimeSlicedSurveyStopCollectingMessage, + ): SignedTimeSlicedSurveyStopCollectingMessage; + qSetHash(value?: Buffer): Buffer; qSet(value?: ScpQuorumSet): ScpQuorumSet; @@ -11084,6 +12153,22 @@ export namespace xdr { static surveyResponse(value: SignedSurveyResponseMessage): StellarMessage; + static timeSlicedSurveyRequest( + value: SignedTimeSlicedSurveyRequestMessage, + ): StellarMessage; + + static timeSlicedSurveyResponse( + value: SignedTimeSlicedSurveyResponseMessage, + ): StellarMessage; + + static timeSlicedSurveyStartCollecting( + value: SignedTimeSlicedSurveyStartCollectingMessage, + ): StellarMessage; + + static timeSlicedSurveyStopCollecting( + value: SignedTimeSlicedSurveyStopCollectingMessage, + ): StellarMessage; + static getScpQuorumset(value: Buffer): StellarMessage; static scpQuorumset(value: ScpQuorumSet): StellarMessage; @@ -11112,6 +12197,10 @@ export namespace xdr { | TransactionEnvelope | SignedSurveyRequestMessage | SignedSurveyResponseMessage + | SignedTimeSlicedSurveyRequestMessage + | SignedTimeSlicedSurveyResponseMessage + | SignedTimeSlicedSurveyStartCollectingMessage + | SignedTimeSlicedSurveyStopCollectingMessage | Buffer | ScpQuorumSet | ScpEnvelope @@ -11373,6 +12462,8 @@ export namespace xdr { wasm(value?: Buffer): Buffer; + createContractV2(value?: CreateContractArgsV2): CreateContractArgsV2; + static hostFunctionTypeInvokeContract( value: InvokeContractArgs, ): HostFunction; @@ -11383,7 +12474,15 @@ export namespace xdr { static hostFunctionTypeUploadContractWasm(value: Buffer): HostFunction; - value(): InvokeContractArgs | CreateContractArgs | Buffer; + static hostFunctionTypeCreateContractV2( + value: CreateContractArgsV2, + ): HostFunction; + + value(): + | InvokeContractArgs + | CreateContractArgs + | Buffer + | CreateContractArgsV2; toXDR(format?: 'raw'): Buffer; @@ -11413,6 +12512,8 @@ export namespace xdr { createContractHostFn(value?: CreateContractArgs): CreateContractArgs; + createContractV2HostFn(value?: CreateContractArgsV2): CreateContractArgsV2; + static sorobanAuthorizedFunctionTypeContractFn( value: InvokeContractArgs, ): SorobanAuthorizedFunction; @@ -11421,7 +12522,11 @@ export namespace xdr { value: CreateContractArgs, ): SorobanAuthorizedFunction; - value(): InvokeContractArgs | CreateContractArgs; + static sorobanAuthorizedFunctionTypeCreateContractV2HostFn( + value: CreateContractArgsV2, + ): SorobanAuthorizedFunction; + + value(): InvokeContractArgs | CreateContractArgs | CreateContractArgsV2; toXDR(format?: 'raw'): Buffer; @@ -11799,6 +12904,40 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class ArchivalProofBody { + switch(): ArchivalProofType; + + nonexistenceProof(value?: NonexistenceProofBody): NonexistenceProofBody; + + existenceProof(value?: ExistenceProofBody): ExistenceProofBody; + + static existence(value: NonexistenceProofBody): ArchivalProofBody; + + static nonexistence(value: ExistenceProofBody): ArchivalProofBody; + + value(): NonexistenceProofBody | ExistenceProofBody; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ArchivalProofBody; + + static write(value: ArchivalProofBody, io: Buffer): void; + + static isValid(value: ArchivalProofBody): boolean; + + static toXDR(value: ArchivalProofBody): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ArchivalProofBody; + + static fromXDR(input: string, format: 'hex' | 'base64'): ArchivalProofBody; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class TransactionV0Ext { switch(): number; diff --git a/types/next.d.ts b/types/next.d.ts index 7f2dcdfd..77510de8 100644 --- a/types/next.d.ts +++ b/types/next.d.ts @@ -1,4 +1,5 @@ -// Automatically generated on 2023-10-16T10:48:00-08:00 +// Automatically generated by xdrgen on 2024-08-23T12:09:00-08:00 +// DO NOT EDIT or your changes may be overwritten import { Operation } from './index'; export {}; @@ -487,6 +488,71 @@ export namespace xdr { static envelopeTypeSorobanAuthorization(): EnvelopeType; } + class BucketListType { + readonly name: 'live' | 'hotArchive' | 'coldArchive'; + + readonly value: 0 | 1 | 2; + + static live(): BucketListType; + + static hotArchive(): BucketListType; + + static coldArchive(): BucketListType; + } + + class BucketEntryType { + readonly name: 'metaentry' | 'liveentry' | 'deadentry' | 'initentry'; + + readonly value: -1 | 0 | 1 | 2; + + static metaentry(): BucketEntryType; + + static liveentry(): BucketEntryType; + + static deadentry(): BucketEntryType; + + static initentry(): BucketEntryType; + } + + class HotArchiveBucketEntryType { + readonly name: + | 'hotArchiveMetaentry' + | 'hotArchiveArchived' + | 'hotArchiveLive' + | 'hotArchiveDeleted'; + + readonly value: -1 | 0 | 1 | 2; + + static hotArchiveMetaentry(): HotArchiveBucketEntryType; + + static hotArchiveArchived(): HotArchiveBucketEntryType; + + static hotArchiveLive(): HotArchiveBucketEntryType; + + static hotArchiveDeleted(): HotArchiveBucketEntryType; + } + + class ColdArchiveBucketEntryType { + readonly name: + | 'coldArchiveMetaentry' + | 'coldArchiveArchivedLeaf' + | 'coldArchiveDeletedLeaf' + | 'coldArchiveBoundaryLeaf' + | 'coldArchiveHash'; + + readonly value: -1 | 0 | 1 | 2 | 3; + + static coldArchiveMetaentry(): ColdArchiveBucketEntryType; + + static coldArchiveArchivedLeaf(): ColdArchiveBucketEntryType; + + static coldArchiveDeletedLeaf(): ColdArchiveBucketEntryType; + + static coldArchiveBoundaryLeaf(): ColdArchiveBucketEntryType; + + static coldArchiveHash(): ColdArchiveBucketEntryType; + } + class StellarValueType { readonly name: 'stellarValueBasic' | 'stellarValueSigned'; @@ -539,20 +605,6 @@ export namespace xdr { static ledgerUpgradeMaxSorobanTxSetSize(): LedgerUpgradeType; } - class BucketEntryType { - readonly name: 'metaentry' | 'liveentry' | 'deadentry' | 'initentry'; - - readonly value: -1 | 0 | 1 | 2; - - static metaentry(): BucketEntryType; - - static liveentry(): BucketEntryType; - - static deadentry(): BucketEntryType; - - static initentry(): BucketEntryType; - } - class TxSetComponentType { readonly name: 'txsetCompTxsMaybeDiscountedFee'; @@ -638,7 +690,11 @@ export namespace xdr { | 'sendMore' | 'sendMoreExtended' | 'floodAdvert' - | 'floodDemand'; + | 'floodDemand' + | 'timeSlicedSurveyRequest' + | 'timeSlicedSurveyResponse' + | 'timeSlicedSurveyStartCollecting' + | 'timeSlicedSurveyStopCollecting'; readonly value: | 0 @@ -660,7 +716,11 @@ export namespace xdr { | 16 | 20 | 18 - | 19; + | 19 + | 21 + | 22 + | 23 + | 24; static errorMsg(): MessageType; @@ -701,24 +761,39 @@ export namespace xdr { static floodAdvert(): MessageType; static floodDemand(): MessageType; + + static timeSlicedSurveyRequest(): MessageType; + + static timeSlicedSurveyResponse(): MessageType; + + static timeSlicedSurveyStartCollecting(): MessageType; + + static timeSlicedSurveyStopCollecting(): MessageType; } class SurveyMessageCommandType { - readonly name: 'surveyTopology'; + readonly name: 'surveyTopology' | 'timeSlicedSurveyTopology'; - readonly value: 0; + readonly value: 0 | 1; static surveyTopology(): SurveyMessageCommandType; + + static timeSlicedSurveyTopology(): SurveyMessageCommandType; } class SurveyMessageResponseType { - readonly name: 'surveyTopologyResponseV0' | 'surveyTopologyResponseV1'; + readonly name: + | 'surveyTopologyResponseV0' + | 'surveyTopologyResponseV1' + | 'surveyTopologyResponseV2'; - readonly value: 0 | 1; + readonly value: 0 | 1 | 2; static surveyTopologyResponseV0(): SurveyMessageResponseType; static surveyTopologyResponseV1(): SurveyMessageResponseType; + + static surveyTopologyResponseV2(): SurveyMessageResponseType; } class OperationType { @@ -849,15 +924,18 @@ export namespace xdr { readonly name: | 'hostFunctionTypeInvokeContract' | 'hostFunctionTypeCreateContract' - | 'hostFunctionTypeUploadContractWasm'; + | 'hostFunctionTypeUploadContractWasm' + | 'hostFunctionTypeCreateContractV2'; - readonly value: 0 | 1 | 2; + readonly value: 0 | 1 | 2 | 3; static hostFunctionTypeInvokeContract(): HostFunctionType; static hostFunctionTypeCreateContract(): HostFunctionType; static hostFunctionTypeUploadContractWasm(): HostFunctionType; + + static hostFunctionTypeCreateContractV2(): HostFunctionType; } class ContractIdPreimageType { @@ -875,13 +953,16 @@ export namespace xdr { class SorobanAuthorizedFunctionType { readonly name: | 'sorobanAuthorizedFunctionTypeContractFn' - | 'sorobanAuthorizedFunctionTypeCreateContractHostFn'; + | 'sorobanAuthorizedFunctionTypeCreateContractHostFn' + | 'sorobanAuthorizedFunctionTypeCreateContractV2HostFn'; - readonly value: 0 | 1; + readonly value: 0 | 1 | 2; static sorobanAuthorizedFunctionTypeContractFn(): SorobanAuthorizedFunctionType; static sorobanAuthorizedFunctionTypeCreateContractHostFn(): SorobanAuthorizedFunctionType; + + static sorobanAuthorizedFunctionTypeCreateContractV2HostFn(): SorobanAuthorizedFunctionType; } class SorobanCredentialsType { @@ -929,6 +1010,16 @@ export namespace xdr { static precondV2(): PreconditionType; } + class ArchivalProofType { + readonly name: 'existence' | 'nonexistence'; + + readonly value: 0 | 1; + + static existence(): ArchivalProofType; + + static nonexistence(): ArchivalProofType; + } + class ClaimAtomType { readonly name: | 'claimAtomTypeV0' @@ -1853,6 +1944,21 @@ export namespace xdr { static signerKeyTypeEd25519SignedPayload(): SignerKeyType; } + class BinaryFuseFilterType { + readonly name: + | 'binaryFuseFilter8Bit' + | 'binaryFuseFilter16Bit' + | 'binaryFuseFilter32Bit'; + + readonly value: 0 | 1 | 2; + + static binaryFuseFilter8Bit(): BinaryFuseFilterType; + + static binaryFuseFilter16Bit(): BinaryFuseFilterType; + + static binaryFuseFilter32Bit(): BinaryFuseFilterType; + } + class ScValType { readonly name: | 'scvBool' @@ -2393,9 +2499,25 @@ export namespace xdr { | 'configSettingStateArchival' | 'configSettingContractExecutionLanes' | 'configSettingBucketlistSizeWindow' - | 'configSettingEvictionIterator'; + | 'configSettingEvictionIterator' + | 'configSettingContractParallelComputeV0'; - readonly value: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13; + readonly value: + | 0 + | 1 + | 2 + | 3 + | 4 + | 5 + | 6 + | 7 + | 8 + | 9 + | 10 + | 11 + | 12 + | 13 + | 14; static configSettingContractMaxSizeBytes(): ConfigSettingId; @@ -2424,6 +2546,8 @@ export namespace xdr { static configSettingBucketlistSizeWindow(): ConfigSettingId; static configSettingEvictionIterator(): ConfigSettingId; + + static configSettingContractParallelComputeV0(): ConfigSettingId; } const Value: VarOpaque; @@ -2448,16 +2572,24 @@ export namespace xdr { const UpgradeType: VarOpaque; + const TxExecutionThread: XDRArray; + + const ParallelTxExecutionStage: XDRArray; + const LedgerEntryChanges: XDRArray; const EncryptedBody: VarOpaque; const PeerStatList: XDRArray; + const TimeSlicedPeerDataList: XDRArray; + const TxAdvertVector: XDRArray; const TxDemandVector: XDRArray; + const ProofLevel: XDRArray; + const Hash: Opaque; const Uint256: Opaque; @@ -4068,6 +4200,160 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class BucketMetadata { + constructor(attributes: { ledgerVersion: number; ext: BucketMetadataExt }); + + ledgerVersion(value?: number): number; + + ext(value?: BucketMetadataExt): BucketMetadataExt; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): BucketMetadata; + + static write(value: BucketMetadata, io: Buffer): void; + + static isValid(value: BucketMetadata): boolean; + + static toXDR(value: BucketMetadata): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): BucketMetadata; + + static fromXDR(input: string, format: 'hex' | 'base64'): BucketMetadata; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class ColdArchiveArchivedLeaf { + constructor(attributes: { index: number; archivedEntry: LedgerEntry }); + + index(value?: number): number; + + archivedEntry(value?: LedgerEntry): LedgerEntry; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ColdArchiveArchivedLeaf; + + static write(value: ColdArchiveArchivedLeaf, io: Buffer): void; + + static isValid(value: ColdArchiveArchivedLeaf): boolean; + + static toXDR(value: ColdArchiveArchivedLeaf): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ColdArchiveArchivedLeaf; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): ColdArchiveArchivedLeaf; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class ColdArchiveDeletedLeaf { + constructor(attributes: { index: number; deletedKey: LedgerKey }); + + index(value?: number): number; + + deletedKey(value?: LedgerKey): LedgerKey; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ColdArchiveDeletedLeaf; + + static write(value: ColdArchiveDeletedLeaf, io: Buffer): void; + + static isValid(value: ColdArchiveDeletedLeaf): boolean; + + static toXDR(value: ColdArchiveDeletedLeaf): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ColdArchiveDeletedLeaf; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): ColdArchiveDeletedLeaf; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class ColdArchiveBoundaryLeaf { + constructor(attributes: { index: number; isLowerBound: boolean }); + + index(value?: number): number; + + isLowerBound(value?: boolean): boolean; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ColdArchiveBoundaryLeaf; + + static write(value: ColdArchiveBoundaryLeaf, io: Buffer): void; + + static isValid(value: ColdArchiveBoundaryLeaf): boolean; + + static toXDR(value: ColdArchiveBoundaryLeaf): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ColdArchiveBoundaryLeaf; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): ColdArchiveBoundaryLeaf; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class ColdArchiveHashEntry { + constructor(attributes: { index: number; level: number; hash: Buffer }); + + index(value?: number): number; + + level(value?: number): number; + + hash(value?: Buffer): Buffer; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ColdArchiveHashEntry; + + static write(value: ColdArchiveHashEntry, io: Buffer): void; + + static isValid(value: ColdArchiveHashEntry): boolean; + + static toXDR(value: ColdArchiveHashEntry): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ColdArchiveHashEntry; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): ColdArchiveHashEntry; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class LedgerCloseValueSignature { constructor(attributes: { nodeId: NodeId; signature: Buffer }); @@ -4294,28 +4580,36 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } - class BucketMetadata { - constructor(attributes: { ledgerVersion: number; ext: BucketMetadataExt }); + class ParallelTxsComponent { + constructor(attributes: { + baseFee: null | Int64; + executionStages: TransactionEnvelope[][][]; + }); - ledgerVersion(value?: number): number; + baseFee(value?: null | Int64): null | Int64; - ext(value?: BucketMetadataExt): BucketMetadataExt; + executionStages( + value?: TransactionEnvelope[][][], + ): TransactionEnvelope[][][]; toXDR(format?: 'raw'): Buffer; toXDR(format: 'hex' | 'base64'): string; - static read(io: Buffer): BucketMetadata; + static read(io: Buffer): ParallelTxsComponent; - static write(value: BucketMetadata, io: Buffer): void; + static write(value: ParallelTxsComponent, io: Buffer): void; - static isValid(value: BucketMetadata): boolean; + static isValid(value: ParallelTxsComponent): boolean; - static toXDR(value: BucketMetadata): Buffer; + static toXDR(value: ParallelTxsComponent): Buffer; - static fromXDR(input: Buffer, format?: 'raw'): BucketMetadata; + static fromXDR(input: Buffer, format?: 'raw'): ParallelTxsComponent; - static fromXDR(input: string, format: 'hex' | 'base64'): BucketMetadata; + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): ParallelTxsComponent; static validateXDR(input: Buffer, format?: 'raw'): boolean; @@ -5449,34 +5743,206 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } - class SurveyRequestMessage { + class TimeSlicedSurveyStartCollectingMessage { constructor(attributes: { - surveyorPeerId: NodeId; - surveyedPeerId: NodeId; + surveyorId: NodeId; + nonce: number; ledgerNum: number; - encryptionKey: Curve25519Public; - commandType: SurveyMessageCommandType; }); - surveyorPeerId(value?: NodeId): NodeId; + surveyorId(value?: NodeId): NodeId; - surveyedPeerId(value?: NodeId): NodeId; + nonce(value?: number): number; ledgerNum(value?: number): number; - encryptionKey(value?: Curve25519Public): Curve25519Public; - - commandType(value?: SurveyMessageCommandType): SurveyMessageCommandType; - toXDR(format?: 'raw'): Buffer; toXDR(format: 'hex' | 'base64'): string; - static read(io: Buffer): SurveyRequestMessage; + static read(io: Buffer): TimeSlicedSurveyStartCollectingMessage; - static write(value: SurveyRequestMessage, io: Buffer): void; + static write( + value: TimeSlicedSurveyStartCollectingMessage, + io: Buffer, + ): void; - static isValid(value: SurveyRequestMessage): boolean; + static isValid(value: TimeSlicedSurveyStartCollectingMessage): boolean; + + static toXDR(value: TimeSlicedSurveyStartCollectingMessage): Buffer; + + static fromXDR( + input: Buffer, + format?: 'raw', + ): TimeSlicedSurveyStartCollectingMessage; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): TimeSlicedSurveyStartCollectingMessage; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class SignedTimeSlicedSurveyStartCollectingMessage { + constructor(attributes: { + signature: Buffer; + startCollecting: TimeSlicedSurveyStartCollectingMessage; + }); + + signature(value?: Buffer): Buffer; + + startCollecting( + value?: TimeSlicedSurveyStartCollectingMessage, + ): TimeSlicedSurveyStartCollectingMessage; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): SignedTimeSlicedSurveyStartCollectingMessage; + + static write( + value: SignedTimeSlicedSurveyStartCollectingMessage, + io: Buffer, + ): void; + + static isValid( + value: SignedTimeSlicedSurveyStartCollectingMessage, + ): boolean; + + static toXDR(value: SignedTimeSlicedSurveyStartCollectingMessage): Buffer; + + static fromXDR( + input: Buffer, + format?: 'raw', + ): SignedTimeSlicedSurveyStartCollectingMessage; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): SignedTimeSlicedSurveyStartCollectingMessage; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class TimeSlicedSurveyStopCollectingMessage { + constructor(attributes: { + surveyorId: NodeId; + nonce: number; + ledgerNum: number; + }); + + surveyorId(value?: NodeId): NodeId; + + nonce(value?: number): number; + + ledgerNum(value?: number): number; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): TimeSlicedSurveyStopCollectingMessage; + + static write( + value: TimeSlicedSurveyStopCollectingMessage, + io: Buffer, + ): void; + + static isValid(value: TimeSlicedSurveyStopCollectingMessage): boolean; + + static toXDR(value: TimeSlicedSurveyStopCollectingMessage): Buffer; + + static fromXDR( + input: Buffer, + format?: 'raw', + ): TimeSlicedSurveyStopCollectingMessage; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): TimeSlicedSurveyStopCollectingMessage; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class SignedTimeSlicedSurveyStopCollectingMessage { + constructor(attributes: { + signature: Buffer; + stopCollecting: TimeSlicedSurveyStopCollectingMessage; + }); + + signature(value?: Buffer): Buffer; + + stopCollecting( + value?: TimeSlicedSurveyStopCollectingMessage, + ): TimeSlicedSurveyStopCollectingMessage; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): SignedTimeSlicedSurveyStopCollectingMessage; + + static write( + value: SignedTimeSlicedSurveyStopCollectingMessage, + io: Buffer, + ): void; + + static isValid(value: SignedTimeSlicedSurveyStopCollectingMessage): boolean; + + static toXDR(value: SignedTimeSlicedSurveyStopCollectingMessage): Buffer; + + static fromXDR( + input: Buffer, + format?: 'raw', + ): SignedTimeSlicedSurveyStopCollectingMessage; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): SignedTimeSlicedSurveyStopCollectingMessage; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class SurveyRequestMessage { + constructor(attributes: { + surveyorPeerId: NodeId; + surveyedPeerId: NodeId; + ledgerNum: number; + encryptionKey: Curve25519Public; + commandType: SurveyMessageCommandType; + }); + + surveyorPeerId(value?: NodeId): NodeId; + + surveyedPeerId(value?: NodeId): NodeId; + + ledgerNum(value?: number): number; + + encryptionKey(value?: Curve25519Public): Curve25519Public; + + commandType(value?: SurveyMessageCommandType): SurveyMessageCommandType; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): SurveyRequestMessage; + + static write(value: SurveyRequestMessage, io: Buffer): void; + + static isValid(value: SurveyRequestMessage): boolean; static toXDR(value: SurveyRequestMessage): Buffer; @@ -5492,6 +5958,49 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class TimeSlicedSurveyRequestMessage { + constructor(attributes: { + request: SurveyRequestMessage; + nonce: number; + inboundPeersIndex: number; + outboundPeersIndex: number; + }); + + request(value?: SurveyRequestMessage): SurveyRequestMessage; + + nonce(value?: number): number; + + inboundPeersIndex(value?: number): number; + + outboundPeersIndex(value?: number): number; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): TimeSlicedSurveyRequestMessage; + + static write(value: TimeSlicedSurveyRequestMessage, io: Buffer): void; + + static isValid(value: TimeSlicedSurveyRequestMessage): boolean; + + static toXDR(value: TimeSlicedSurveyRequestMessage): Buffer; + + static fromXDR( + input: Buffer, + format?: 'raw', + ): TimeSlicedSurveyRequestMessage; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): TimeSlicedSurveyRequestMessage; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class SignedSurveyRequestMessage { constructor(attributes: { requestSignature: Buffer; @@ -5526,6 +6035,45 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class SignedTimeSlicedSurveyRequestMessage { + constructor(attributes: { + requestSignature: Buffer; + request: TimeSlicedSurveyRequestMessage; + }); + + requestSignature(value?: Buffer): Buffer; + + request( + value?: TimeSlicedSurveyRequestMessage, + ): TimeSlicedSurveyRequestMessage; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): SignedTimeSlicedSurveyRequestMessage; + + static write(value: SignedTimeSlicedSurveyRequestMessage, io: Buffer): void; + + static isValid(value: SignedTimeSlicedSurveyRequestMessage): boolean; + + static toXDR(value: SignedTimeSlicedSurveyRequestMessage): Buffer; + + static fromXDR( + input: Buffer, + format?: 'raw', + ): SignedTimeSlicedSurveyRequestMessage; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): SignedTimeSlicedSurveyRequestMessage; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class SurveyResponseMessage { constructor(attributes: { surveyorPeerId: NodeId; @@ -5569,6 +6117,40 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class TimeSlicedSurveyResponseMessage { + constructor(attributes: { response: SurveyResponseMessage; nonce: number }); + + response(value?: SurveyResponseMessage): SurveyResponseMessage; + + nonce(value?: number): number; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): TimeSlicedSurveyResponseMessage; + + static write(value: TimeSlicedSurveyResponseMessage, io: Buffer): void; + + static isValid(value: TimeSlicedSurveyResponseMessage): boolean; + + static toXDR(value: TimeSlicedSurveyResponseMessage): Buffer; + + static fromXDR( + input: Buffer, + format?: 'raw', + ): TimeSlicedSurveyResponseMessage; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): TimeSlicedSurveyResponseMessage; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class SignedSurveyResponseMessage { constructor(attributes: { responseSignature: Buffer; @@ -5603,6 +6185,48 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class SignedTimeSlicedSurveyResponseMessage { + constructor(attributes: { + responseSignature: Buffer; + response: TimeSlicedSurveyResponseMessage; + }); + + responseSignature(value?: Buffer): Buffer; + + response( + value?: TimeSlicedSurveyResponseMessage, + ): TimeSlicedSurveyResponseMessage; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): SignedTimeSlicedSurveyResponseMessage; + + static write( + value: SignedTimeSlicedSurveyResponseMessage, + io: Buffer, + ): void; + + static isValid(value: SignedTimeSlicedSurveyResponseMessage): boolean; + + static toXDR(value: SignedTimeSlicedSurveyResponseMessage): Buffer; + + static fromXDR( + input: Buffer, + format?: 'raw', + ): SignedTimeSlicedSurveyResponseMessage; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): SignedTimeSlicedSurveyResponseMessage; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class PeerStats { constructor(attributes: { id: NodeId; @@ -5673,6 +6297,89 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class TimeSlicedNodeData { + constructor(attributes: { + addedAuthenticatedPeers: number; + droppedAuthenticatedPeers: number; + totalInboundPeerCount: number; + totalOutboundPeerCount: number; + p75ScpFirstToSelfLatencyMs: number; + p75ScpSelfToOtherLatencyMs: number; + lostSyncCount: number; + isValidator: boolean; + maxInboundPeerCount: number; + maxOutboundPeerCount: number; + }); + + addedAuthenticatedPeers(value?: number): number; + + droppedAuthenticatedPeers(value?: number): number; + + totalInboundPeerCount(value?: number): number; + + totalOutboundPeerCount(value?: number): number; + + p75ScpFirstToSelfLatencyMs(value?: number): number; + + p75ScpSelfToOtherLatencyMs(value?: number): number; + + lostSyncCount(value?: number): number; + + isValidator(value?: boolean): boolean; + + maxInboundPeerCount(value?: number): number; + + maxOutboundPeerCount(value?: number): number; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): TimeSlicedNodeData; + + static write(value: TimeSlicedNodeData, io: Buffer): void; + + static isValid(value: TimeSlicedNodeData): boolean; + + static toXDR(value: TimeSlicedNodeData): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): TimeSlicedNodeData; + + static fromXDR(input: string, format: 'hex' | 'base64'): TimeSlicedNodeData; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class TimeSlicedPeerData { + constructor(attributes: { peerStats: PeerStats; averageLatencyMs: number }); + + peerStats(value?: PeerStats): PeerStats; + + averageLatencyMs(value?: number): number; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): TimeSlicedPeerData; + + static write(value: TimeSlicedPeerData, io: Buffer): void; + + static isValid(value: TimeSlicedPeerData): boolean; + + static toXDR(value: TimeSlicedPeerData): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): TimeSlicedPeerData; + + static fromXDR(input: string, format: 'hex' | 'base64'): TimeSlicedPeerData; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class TopologyResponseBodyV0 { constructor(attributes: { inboundPeers: PeerStats[]; @@ -5759,6 +6466,43 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class TopologyResponseBodyV2 { + constructor(attributes: { + inboundPeers: TimeSlicedPeerData[]; + outboundPeers: TimeSlicedPeerData[]; + nodeData: TimeSlicedNodeData; + }); + + inboundPeers(value?: TimeSlicedPeerData[]): TimeSlicedPeerData[]; + + outboundPeers(value?: TimeSlicedPeerData[]): TimeSlicedPeerData[]; + + nodeData(value?: TimeSlicedNodeData): TimeSlicedNodeData; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): TopologyResponseBodyV2; + + static write(value: TopologyResponseBodyV2, io: Buffer): void; + + static isValid(value: TopologyResponseBodyV2): boolean; + + static toXDR(value: TopologyResponseBodyV2): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): TopologyResponseBodyV2; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): TopologyResponseBodyV2; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class FloodAdvert { constructor(attributes: { txHashes: Hash[] }); @@ -6732,6 +7476,43 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class CreateContractArgsV2 { + constructor(attributes: { + contractIdPreimage: ContractIdPreimage; + executable: ContractExecutable; + constructorArgs: ScVal[]; + }); + + contractIdPreimage(value?: ContractIdPreimage): ContractIdPreimage; + + executable(value?: ContractExecutable): ContractExecutable; + + constructorArgs(value?: ScVal[]): ScVal[]; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): CreateContractArgsV2; + + static write(value: CreateContractArgsV2, io: Buffer): void; + + static isValid(value: CreateContractArgsV2): boolean; + + static toXDR(value: CreateContractArgsV2): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): CreateContractArgsV2; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): CreateContractArgsV2; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class InvokeContractArgs { constructor(attributes: { contractAddress: ScAddress; @@ -7184,71 +7965,200 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } - class PreconditionsV2 { + class PreconditionsV2 { + constructor(attributes: { + timeBounds: null | TimeBounds; + ledgerBounds: null | LedgerBounds; + minSeqNum: null | SequenceNumber; + minSeqAge: Duration; + minSeqLedgerGap: number; + extraSigners: SignerKey[]; + }); + + timeBounds(value?: null | TimeBounds): null | TimeBounds; + + ledgerBounds(value?: null | LedgerBounds): null | LedgerBounds; + + minSeqNum(value?: null | SequenceNumber): null | SequenceNumber; + + minSeqAge(value?: Duration): Duration; + + minSeqLedgerGap(value?: number): number; + + extraSigners(value?: SignerKey[]): SignerKey[]; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): PreconditionsV2; + + static write(value: PreconditionsV2, io: Buffer): void; + + static isValid(value: PreconditionsV2): boolean; + + static toXDR(value: PreconditionsV2): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): PreconditionsV2; + + static fromXDR(input: string, format: 'hex' | 'base64'): PreconditionsV2; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class LedgerFootprint { + constructor(attributes: { readOnly: LedgerKey[]; readWrite: LedgerKey[] }); + + readOnly(value?: LedgerKey[]): LedgerKey[]; + + readWrite(value?: LedgerKey[]): LedgerKey[]; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): LedgerFootprint; + + static write(value: LedgerFootprint, io: Buffer): void; + + static isValid(value: LedgerFootprint): boolean; + + static toXDR(value: LedgerFootprint): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): LedgerFootprint; + + static fromXDR(input: string, format: 'hex' | 'base64'): LedgerFootprint; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class ArchivalProofNode { + constructor(attributes: { index: number; hash: Buffer }); + + index(value?: number): number; + + hash(value?: Buffer): Buffer; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ArchivalProofNode; + + static write(value: ArchivalProofNode, io: Buffer): void; + + static isValid(value: ArchivalProofNode): boolean; + + static toXDR(value: ArchivalProofNode): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ArchivalProofNode; + + static fromXDR(input: string, format: 'hex' | 'base64'): ArchivalProofNode; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class NonexistenceProofBody { + constructor(attributes: { + entriesToProve: ColdArchiveBucketEntry[]; + proofLevels: ArchivalProofNode[][]; + }); + + entriesToProve(value?: ColdArchiveBucketEntry[]): ColdArchiveBucketEntry[]; + + proofLevels(value?: ArchivalProofNode[][]): ArchivalProofNode[][]; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): NonexistenceProofBody; + + static write(value: NonexistenceProofBody, io: Buffer): void; + + static isValid(value: NonexistenceProofBody): boolean; + + static toXDR(value: NonexistenceProofBody): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): NonexistenceProofBody; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): NonexistenceProofBody; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class ExistenceProofBody { constructor(attributes: { - timeBounds: null | TimeBounds; - ledgerBounds: null | LedgerBounds; - minSeqNum: null | SequenceNumber; - minSeqAge: Duration; - minSeqLedgerGap: number; - extraSigners: SignerKey[]; + keysToProve: LedgerKey[]; + lowBoundEntries: ColdArchiveBucketEntry[]; + highBoundEntries: ColdArchiveBucketEntry[]; + proofLevels: ArchivalProofNode[][]; }); - timeBounds(value?: null | TimeBounds): null | TimeBounds; - - ledgerBounds(value?: null | LedgerBounds): null | LedgerBounds; - - minSeqNum(value?: null | SequenceNumber): null | SequenceNumber; + keysToProve(value?: LedgerKey[]): LedgerKey[]; - minSeqAge(value?: Duration): Duration; + lowBoundEntries(value?: ColdArchiveBucketEntry[]): ColdArchiveBucketEntry[]; - minSeqLedgerGap(value?: number): number; + highBoundEntries( + value?: ColdArchiveBucketEntry[], + ): ColdArchiveBucketEntry[]; - extraSigners(value?: SignerKey[]): SignerKey[]; + proofLevels(value?: ArchivalProofNode[][]): ArchivalProofNode[][]; toXDR(format?: 'raw'): Buffer; toXDR(format: 'hex' | 'base64'): string; - static read(io: Buffer): PreconditionsV2; + static read(io: Buffer): ExistenceProofBody; - static write(value: PreconditionsV2, io: Buffer): void; + static write(value: ExistenceProofBody, io: Buffer): void; - static isValid(value: PreconditionsV2): boolean; + static isValid(value: ExistenceProofBody): boolean; - static toXDR(value: PreconditionsV2): Buffer; + static toXDR(value: ExistenceProofBody): Buffer; - static fromXDR(input: Buffer, format?: 'raw'): PreconditionsV2; + static fromXDR(input: Buffer, format?: 'raw'): ExistenceProofBody; - static fromXDR(input: string, format: 'hex' | 'base64'): PreconditionsV2; + static fromXDR(input: string, format: 'hex' | 'base64'): ExistenceProofBody; static validateXDR(input: Buffer, format?: 'raw'): boolean; static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } - class LedgerFootprint { - constructor(attributes: { readOnly: LedgerKey[]; readWrite: LedgerKey[] }); + class ArchivalProof { + constructor(attributes: { epoch: number; body: ArchivalProofBody }); - readOnly(value?: LedgerKey[]): LedgerKey[]; + epoch(value?: number): number; - readWrite(value?: LedgerKey[]): LedgerKey[]; + body(value?: ArchivalProofBody): ArchivalProofBody; toXDR(format?: 'raw'): Buffer; toXDR(format: 'hex' | 'base64'): string; - static read(io: Buffer): LedgerFootprint; + static read(io: Buffer): ArchivalProof; - static write(value: LedgerFootprint, io: Buffer): void; + static write(value: ArchivalProof, io: Buffer): void; - static isValid(value: LedgerFootprint): boolean; + static isValid(value: ArchivalProof): boolean; - static toXDR(value: LedgerFootprint): Buffer; + static toXDR(value: ArchivalProof): Buffer; - static fromXDR(input: Buffer, format?: 'raw'): LedgerFootprint; + static fromXDR(input: Buffer, format?: 'raw'): ArchivalProof; - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerFootprint; + static fromXDR(input: string, format: 'hex' | 'base64'): ArchivalProof; static validateXDR(input: Buffer, format?: 'raw'): boolean; @@ -7294,12 +8204,12 @@ export namespace xdr { class SorobanTransactionData { constructor(attributes: { - ext: ExtensionPoint; + ext: SorobanTransactionDataExt; resources: SorobanResources; resourceFee: Int64; }); - ext(value?: ExtensionPoint): ExtensionPoint; + ext(value?: SorobanTransactionDataExt): SorobanTransactionDataExt; resources(value?: SorobanResources): SorobanResources; @@ -8135,6 +9045,87 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class ShortHashSeed { + constructor(attributes: { seed: Buffer }); + + seed(value?: Buffer): Buffer; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ShortHashSeed; + + static write(value: ShortHashSeed, io: Buffer): void; + + static isValid(value: ShortHashSeed): boolean; + + static toXDR(value: ShortHashSeed): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ShortHashSeed; + + static fromXDR(input: string, format: 'hex' | 'base64'): ShortHashSeed; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class SerializedBinaryFuseFilter { + constructor(attributes: { + type: BinaryFuseFilterType; + inputHashSeed: ShortHashSeed; + filterSeed: ShortHashSeed; + segmentLength: number; + segementLengthMask: number; + segmentCount: number; + segmentCountLength: number; + fingerprintLength: number; + fingerprints: Buffer; + }); + + type(value?: BinaryFuseFilterType): BinaryFuseFilterType; + + inputHashSeed(value?: ShortHashSeed): ShortHashSeed; + + filterSeed(value?: ShortHashSeed): ShortHashSeed; + + segmentLength(value?: number): number; + + segementLengthMask(value?: number): number; + + segmentCount(value?: number): number; + + segmentCountLength(value?: number): number; + + fingerprintLength(value?: number): number; + + fingerprints(value?: Buffer): Buffer; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): SerializedBinaryFuseFilter; + + static write(value: SerializedBinaryFuseFilter, io: Buffer): void; + + static isValid(value: SerializedBinaryFuseFilter): boolean; + + static toXDR(value: SerializedBinaryFuseFilter): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): SerializedBinaryFuseFilter; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): SerializedBinaryFuseFilter; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class UInt128Parts { constructor(attributes: { hi: Uint64; lo: Uint64 }); @@ -9052,6 +10043,41 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class ConfigSettingContractParallelComputeV0 { + constructor(attributes: { ledgerMaxParallelThreads: number }); + + ledgerMaxParallelThreads(value?: number): number; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ConfigSettingContractParallelComputeV0; + + static write( + value: ConfigSettingContractParallelComputeV0, + io: Buffer, + ): void; + + static isValid(value: ConfigSettingContractParallelComputeV0): boolean; + + static toXDR(value: ConfigSettingContractParallelComputeV0): Buffer; + + static fromXDR( + input: Buffer, + format?: 'raw', + ): ConfigSettingContractParallelComputeV0; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): ConfigSettingContractParallelComputeV0; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class ConfigSettingContractLedgerCostV0 { constructor(attributes: { ledgerMaxReadLedgerEntries: number; @@ -10118,143 +11144,318 @@ export namespace xdr { static ttl(value: TtlEntry): LedgerEntryData; - value(): - | AccountEntry - | TrustLineEntry - | OfferEntry - | DataEntry - | ClaimableBalanceEntry - | LiquidityPoolEntry - | ContractDataEntry - | ContractCodeEntry - | ConfigSettingEntry - | TtlEntry; + value(): + | AccountEntry + | TrustLineEntry + | OfferEntry + | DataEntry + | ClaimableBalanceEntry + | LiquidityPoolEntry + | ContractDataEntry + | ContractCodeEntry + | ConfigSettingEntry + | TtlEntry; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): LedgerEntryData; + + static write(value: LedgerEntryData, io: Buffer): void; + + static isValid(value: LedgerEntryData): boolean; + + static toXDR(value: LedgerEntryData): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): LedgerEntryData; + + static fromXDR(input: string, format: 'hex' | 'base64'): LedgerEntryData; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class LedgerEntryExt { + switch(): number; + + v1(value?: LedgerEntryExtensionV1): LedgerEntryExtensionV1; + + static 0(): LedgerEntryExt; + + static 1(value: LedgerEntryExtensionV1): LedgerEntryExt; + + value(): LedgerEntryExtensionV1 | void; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): LedgerEntryExt; + + static write(value: LedgerEntryExt, io: Buffer): void; + + static isValid(value: LedgerEntryExt): boolean; + + static toXDR(value: LedgerEntryExt): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): LedgerEntryExt; + + static fromXDR(input: string, format: 'hex' | 'base64'): LedgerEntryExt; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class LedgerKey { + switch(): LedgerEntryType; + + account(value?: LedgerKeyAccount): LedgerKeyAccount; + + trustLine(value?: LedgerKeyTrustLine): LedgerKeyTrustLine; + + offer(value?: LedgerKeyOffer): LedgerKeyOffer; + + data(value?: LedgerKeyData): LedgerKeyData; + + claimableBalance( + value?: LedgerKeyClaimableBalance, + ): LedgerKeyClaimableBalance; + + liquidityPool(value?: LedgerKeyLiquidityPool): LedgerKeyLiquidityPool; + + contractData(value?: LedgerKeyContractData): LedgerKeyContractData; + + contractCode(value?: LedgerKeyContractCode): LedgerKeyContractCode; + + configSetting(value?: LedgerKeyConfigSetting): LedgerKeyConfigSetting; + + ttl(value?: LedgerKeyTtl): LedgerKeyTtl; + + static account(value: LedgerKeyAccount): LedgerKey; + + static trustline(value: LedgerKeyTrustLine): LedgerKey; + + static offer(value: LedgerKeyOffer): LedgerKey; + + static data(value: LedgerKeyData): LedgerKey; + + static claimableBalance(value: LedgerKeyClaimableBalance): LedgerKey; + + static liquidityPool(value: LedgerKeyLiquidityPool): LedgerKey; + + static contractData(value: LedgerKeyContractData): LedgerKey; + + static contractCode(value: LedgerKeyContractCode): LedgerKey; + + static configSetting(value: LedgerKeyConfigSetting): LedgerKey; + + static ttl(value: LedgerKeyTtl): LedgerKey; + + value(): + | LedgerKeyAccount + | LedgerKeyTrustLine + | LedgerKeyOffer + | LedgerKeyData + | LedgerKeyClaimableBalance + | LedgerKeyLiquidityPool + | LedgerKeyContractData + | LedgerKeyContractCode + | LedgerKeyConfigSetting + | LedgerKeyTtl; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): LedgerKey; + + static write(value: LedgerKey, io: Buffer): void; + + static isValid(value: LedgerKey): boolean; + + static toXDR(value: LedgerKey): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): LedgerKey; + + static fromXDR(input: string, format: 'hex' | 'base64'): LedgerKey; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class BucketMetadataExt { + switch(): number; + + bucketListType(value?: BucketListType): BucketListType; + + static 0(): BucketMetadataExt; + + static 1(value: BucketListType): BucketMetadataExt; + + value(): BucketListType | void; toXDR(format?: 'raw'): Buffer; toXDR(format: 'hex' | 'base64'): string; - static read(io: Buffer): LedgerEntryData; + static read(io: Buffer): BucketMetadataExt; - static write(value: LedgerEntryData, io: Buffer): void; + static write(value: BucketMetadataExt, io: Buffer): void; - static isValid(value: LedgerEntryData): boolean; + static isValid(value: BucketMetadataExt): boolean; - static toXDR(value: LedgerEntryData): Buffer; + static toXDR(value: BucketMetadataExt): Buffer; - static fromXDR(input: Buffer, format?: 'raw'): LedgerEntryData; + static fromXDR(input: Buffer, format?: 'raw'): BucketMetadataExt; - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerEntryData; + static fromXDR(input: string, format: 'hex' | 'base64'): BucketMetadataExt; static validateXDR(input: Buffer, format?: 'raw'): boolean; static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } - class LedgerEntryExt { - switch(): number; + class BucketEntry { + switch(): BucketEntryType; - v1(value?: LedgerEntryExtensionV1): LedgerEntryExtensionV1; + liveEntry(value?: LedgerEntry): LedgerEntry; - static 0(): LedgerEntryExt; + deadEntry(value?: LedgerKey): LedgerKey; - static 1(value: LedgerEntryExtensionV1): LedgerEntryExt; + metaEntry(value?: BucketMetadata): BucketMetadata; - value(): LedgerEntryExtensionV1 | void; + static liveentry(value: LedgerEntry): BucketEntry; + + static initentry(value: LedgerEntry): BucketEntry; + + static deadentry(value: LedgerKey): BucketEntry; + + static metaentry(value: BucketMetadata): BucketEntry; + + value(): LedgerEntry | LedgerKey | BucketMetadata; toXDR(format?: 'raw'): Buffer; toXDR(format: 'hex' | 'base64'): string; - static read(io: Buffer): LedgerEntryExt; + static read(io: Buffer): BucketEntry; - static write(value: LedgerEntryExt, io: Buffer): void; + static write(value: BucketEntry, io: Buffer): void; - static isValid(value: LedgerEntryExt): boolean; + static isValid(value: BucketEntry): boolean; - static toXDR(value: LedgerEntryExt): Buffer; + static toXDR(value: BucketEntry): Buffer; - static fromXDR(input: Buffer, format?: 'raw'): LedgerEntryExt; + static fromXDR(input: Buffer, format?: 'raw'): BucketEntry; - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerEntryExt; + static fromXDR(input: string, format: 'hex' | 'base64'): BucketEntry; static validateXDR(input: Buffer, format?: 'raw'): boolean; static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } - class LedgerKey { - switch(): LedgerEntryType; + class HotArchiveBucketEntry { + switch(): HotArchiveBucketEntryType; - account(value?: LedgerKeyAccount): LedgerKeyAccount; + archivedEntry(value?: LedgerEntry): LedgerEntry; - trustLine(value?: LedgerKeyTrustLine): LedgerKeyTrustLine; + key(value?: LedgerKey): LedgerKey; - offer(value?: LedgerKeyOffer): LedgerKeyOffer; + metaEntry(value?: BucketMetadata): BucketMetadata; - data(value?: LedgerKeyData): LedgerKeyData; + static hotArchiveArchived(value: LedgerEntry): HotArchiveBucketEntry; - claimableBalance( - value?: LedgerKeyClaimableBalance, - ): LedgerKeyClaimableBalance; + static hotArchiveLive(value: LedgerKey): HotArchiveBucketEntry; - liquidityPool(value?: LedgerKeyLiquidityPool): LedgerKeyLiquidityPool; + static hotArchiveDeleted(value: LedgerKey): HotArchiveBucketEntry; - contractData(value?: LedgerKeyContractData): LedgerKeyContractData; + static hotArchiveMetaentry(value: BucketMetadata): HotArchiveBucketEntry; - contractCode(value?: LedgerKeyContractCode): LedgerKeyContractCode; + value(): LedgerEntry | LedgerKey | BucketMetadata; - configSetting(value?: LedgerKeyConfigSetting): LedgerKeyConfigSetting; + toXDR(format?: 'raw'): Buffer; - ttl(value?: LedgerKeyTtl): LedgerKeyTtl; + toXDR(format: 'hex' | 'base64'): string; - static account(value: LedgerKeyAccount): LedgerKey; + static read(io: Buffer): HotArchiveBucketEntry; - static trustline(value: LedgerKeyTrustLine): LedgerKey; + static write(value: HotArchiveBucketEntry, io: Buffer): void; - static offer(value: LedgerKeyOffer): LedgerKey; + static isValid(value: HotArchiveBucketEntry): boolean; - static data(value: LedgerKeyData): LedgerKey; + static toXDR(value: HotArchiveBucketEntry): Buffer; - static claimableBalance(value: LedgerKeyClaimableBalance): LedgerKey; + static fromXDR(input: Buffer, format?: 'raw'): HotArchiveBucketEntry; - static liquidityPool(value: LedgerKeyLiquidityPool): LedgerKey; + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): HotArchiveBucketEntry; - static contractData(value: LedgerKeyContractData): LedgerKey; + static validateXDR(input: Buffer, format?: 'raw'): boolean; - static contractCode(value: LedgerKeyContractCode): LedgerKey; + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } - static configSetting(value: LedgerKeyConfigSetting): LedgerKey; + class ColdArchiveBucketEntry { + switch(): ColdArchiveBucketEntryType; - static ttl(value: LedgerKeyTtl): LedgerKey; + metaEntry(value?: BucketMetadata): BucketMetadata; + + archivedLeaf(value?: ColdArchiveArchivedLeaf): ColdArchiveArchivedLeaf; + + deletedLeaf(value?: ColdArchiveDeletedLeaf): ColdArchiveDeletedLeaf; + + boundaryLeaf(value?: ColdArchiveBoundaryLeaf): ColdArchiveBoundaryLeaf; + + hashEntry(value?: ColdArchiveHashEntry): ColdArchiveHashEntry; + + static coldArchiveMetaentry(value: BucketMetadata): ColdArchiveBucketEntry; + + static coldArchiveArchivedLeaf( + value: ColdArchiveArchivedLeaf, + ): ColdArchiveBucketEntry; + + static coldArchiveDeletedLeaf( + value: ColdArchiveDeletedLeaf, + ): ColdArchiveBucketEntry; + + static coldArchiveBoundaryLeaf( + value: ColdArchiveBoundaryLeaf, + ): ColdArchiveBucketEntry; + + static coldArchiveHash(value: ColdArchiveHashEntry): ColdArchiveBucketEntry; value(): - | LedgerKeyAccount - | LedgerKeyTrustLine - | LedgerKeyOffer - | LedgerKeyData - | LedgerKeyClaimableBalance - | LedgerKeyLiquidityPool - | LedgerKeyContractData - | LedgerKeyContractCode - | LedgerKeyConfigSetting - | LedgerKeyTtl; + | BucketMetadata + | ColdArchiveArchivedLeaf + | ColdArchiveDeletedLeaf + | ColdArchiveBoundaryLeaf + | ColdArchiveHashEntry; toXDR(format?: 'raw'): Buffer; toXDR(format: 'hex' | 'base64'): string; - static read(io: Buffer): LedgerKey; + static read(io: Buffer): ColdArchiveBucketEntry; - static write(value: LedgerKey, io: Buffer): void; + static write(value: ColdArchiveBucketEntry, io: Buffer): void; - static isValid(value: LedgerKey): boolean; + static isValid(value: ColdArchiveBucketEntry): boolean; - static toXDR(value: LedgerKey): Buffer; + static toXDR(value: ColdArchiveBucketEntry): Buffer; - static fromXDR(input: Buffer, format?: 'raw'): LedgerKey; + static fromXDR(input: Buffer, format?: 'raw'): ColdArchiveBucketEntry; - static fromXDR(input: string, format: 'hex' | 'base64'): LedgerKey; + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): ColdArchiveBucketEntry; static validateXDR(input: Buffer, format?: 'raw'): boolean; @@ -10421,74 +11622,6 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } - class BucketMetadataExt { - switch(): number; - - static 0(): BucketMetadataExt; - - value(): void; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BucketMetadataExt; - - static write(value: BucketMetadataExt, io: Buffer): void; - - static isValid(value: BucketMetadataExt): boolean; - - static toXDR(value: BucketMetadataExt): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): BucketMetadataExt; - - static fromXDR(input: string, format: 'hex' | 'base64'): BucketMetadataExt; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - - class BucketEntry { - switch(): BucketEntryType; - - liveEntry(value?: LedgerEntry): LedgerEntry; - - deadEntry(value?: LedgerKey): LedgerKey; - - metaEntry(value?: BucketMetadata): BucketMetadata; - - static liveentry(value: LedgerEntry): BucketEntry; - - static initentry(value: LedgerEntry): BucketEntry; - - static deadentry(value: LedgerKey): BucketEntry; - - static metaentry(value: BucketMetadata): BucketEntry; - - value(): LedgerEntry | LedgerKey | BucketMetadata; - - toXDR(format?: 'raw'): Buffer; - - toXDR(format: 'hex' | 'base64'): string; - - static read(io: Buffer): BucketEntry; - - static write(value: BucketEntry, io: Buffer): void; - - static isValid(value: BucketEntry): boolean; - - static toXDR(value: BucketEntry): Buffer; - - static fromXDR(input: Buffer, format?: 'raw'): BucketEntry; - - static fromXDR(input: string, format: 'hex' | 'base64'): BucketEntry; - - static validateXDR(input: Buffer, format?: 'raw'): boolean; - - static validateXDR(input: string, format: 'hex' | 'base64'): boolean; - } - class TxSetComponent { switch(): TxSetComponentType; @@ -10528,9 +11661,13 @@ export namespace xdr { v0Components(value?: TxSetComponent[]): TxSetComponent[]; + parallelTxsComponent(value?: ParallelTxsComponent): ParallelTxsComponent; + static 0(value: TxSetComponent[]): TransactionPhase; - value(): TxSetComponent[]; + static 1(value: ParallelTxsComponent): TransactionPhase; + + value(): TxSetComponent[] | ParallelTxsComponent; toXDR(format?: 'raw'): Buffer; @@ -10982,6 +12119,10 @@ export namespace xdr { value?: TopologyResponseBodyV1, ): TopologyResponseBodyV1; + topologyResponseBodyV2( + value?: TopologyResponseBodyV2, + ): TopologyResponseBodyV2; + static surveyTopologyResponseV0( value: TopologyResponseBodyV0, ): SurveyResponseBody; @@ -10990,7 +12131,14 @@ export namespace xdr { value: TopologyResponseBodyV1, ): SurveyResponseBody; - value(): TopologyResponseBodyV0 | TopologyResponseBodyV1; + static surveyTopologyResponseV2( + value: TopologyResponseBodyV2, + ): SurveyResponseBody; + + value(): + | TopologyResponseBodyV0 + | TopologyResponseBodyV1 + | TopologyResponseBodyV2; toXDR(format?: 'raw'): Buffer; @@ -11044,6 +12192,22 @@ export namespace xdr { value?: SignedSurveyResponseMessage, ): SignedSurveyResponseMessage; + signedTimeSlicedSurveyRequestMessage( + value?: SignedTimeSlicedSurveyRequestMessage, + ): SignedTimeSlicedSurveyRequestMessage; + + signedTimeSlicedSurveyResponseMessage( + value?: SignedTimeSlicedSurveyResponseMessage, + ): SignedTimeSlicedSurveyResponseMessage; + + signedTimeSlicedSurveyStartCollectingMessage( + value?: SignedTimeSlicedSurveyStartCollectingMessage, + ): SignedTimeSlicedSurveyStartCollectingMessage; + + signedTimeSlicedSurveyStopCollectingMessage( + value?: SignedTimeSlicedSurveyStopCollectingMessage, + ): SignedTimeSlicedSurveyStopCollectingMessage; + qSetHash(value?: Buffer): Buffer; qSet(value?: ScpQuorumSet): ScpQuorumSet; @@ -11084,6 +12248,22 @@ export namespace xdr { static surveyResponse(value: SignedSurveyResponseMessage): StellarMessage; + static timeSlicedSurveyRequest( + value: SignedTimeSlicedSurveyRequestMessage, + ): StellarMessage; + + static timeSlicedSurveyResponse( + value: SignedTimeSlicedSurveyResponseMessage, + ): StellarMessage; + + static timeSlicedSurveyStartCollecting( + value: SignedTimeSlicedSurveyStartCollectingMessage, + ): StellarMessage; + + static timeSlicedSurveyStopCollecting( + value: SignedTimeSlicedSurveyStopCollectingMessage, + ): StellarMessage; + static getScpQuorumset(value: Buffer): StellarMessage; static scpQuorumset(value: ScpQuorumSet): StellarMessage; @@ -11112,6 +12292,10 @@ export namespace xdr { | TransactionEnvelope | SignedSurveyRequestMessage | SignedSurveyResponseMessage + | SignedTimeSlicedSurveyRequestMessage + | SignedTimeSlicedSurveyResponseMessage + | SignedTimeSlicedSurveyStartCollectingMessage + | SignedTimeSlicedSurveyStopCollectingMessage | Buffer | ScpQuorumSet | ScpEnvelope @@ -11373,6 +12557,8 @@ export namespace xdr { wasm(value?: Buffer): Buffer; + createContractV2(value?: CreateContractArgsV2): CreateContractArgsV2; + static hostFunctionTypeInvokeContract( value: InvokeContractArgs, ): HostFunction; @@ -11383,7 +12569,15 @@ export namespace xdr { static hostFunctionTypeUploadContractWasm(value: Buffer): HostFunction; - value(): InvokeContractArgs | CreateContractArgs | Buffer; + static hostFunctionTypeCreateContractV2( + value: CreateContractArgsV2, + ): HostFunction; + + value(): + | InvokeContractArgs + | CreateContractArgs + | Buffer + | CreateContractArgsV2; toXDR(format?: 'raw'): Buffer; @@ -11413,6 +12607,8 @@ export namespace xdr { createContractHostFn(value?: CreateContractArgs): CreateContractArgs; + createContractV2HostFn(value?: CreateContractArgsV2): CreateContractArgsV2; + static sorobanAuthorizedFunctionTypeContractFn( value: InvokeContractArgs, ): SorobanAuthorizedFunction; @@ -11421,7 +12617,11 @@ export namespace xdr { value: CreateContractArgs, ): SorobanAuthorizedFunction; - value(): InvokeContractArgs | CreateContractArgs; + static sorobanAuthorizedFunctionTypeCreateContractV2HostFn( + value: CreateContractArgsV2, + ): SorobanAuthorizedFunction; + + value(): InvokeContractArgs | CreateContractArgs | CreateContractArgsV2; toXDR(format?: 'raw'): Buffer; @@ -11799,6 +12999,75 @@ export namespace xdr { static validateXDR(input: string, format: 'hex' | 'base64'): boolean; } + class ArchivalProofBody { + switch(): ArchivalProofType; + + nonexistenceProof(value?: NonexistenceProofBody): NonexistenceProofBody; + + existenceProof(value?: ExistenceProofBody): ExistenceProofBody; + + static existence(value: NonexistenceProofBody): ArchivalProofBody; + + static nonexistence(value: ExistenceProofBody): ArchivalProofBody; + + value(): NonexistenceProofBody | ExistenceProofBody; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): ArchivalProofBody; + + static write(value: ArchivalProofBody, io: Buffer): void; + + static isValid(value: ArchivalProofBody): boolean; + + static toXDR(value: ArchivalProofBody): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): ArchivalProofBody; + + static fromXDR(input: string, format: 'hex' | 'base64'): ArchivalProofBody; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + + class SorobanTransactionDataExt { + switch(): number; + + proofs(value?: ArchivalProof[]): ArchivalProof[]; + + static 0(): SorobanTransactionDataExt; + + static 1(value: ArchivalProof[]): SorobanTransactionDataExt; + + value(): ArchivalProof[] | void; + + toXDR(format?: 'raw'): Buffer; + + toXDR(format: 'hex' | 'base64'): string; + + static read(io: Buffer): SorobanTransactionDataExt; + + static write(value: SorobanTransactionDataExt, io: Buffer): void; + + static isValid(value: SorobanTransactionDataExt): boolean; + + static toXDR(value: SorobanTransactionDataExt): Buffer; + + static fromXDR(input: Buffer, format?: 'raw'): SorobanTransactionDataExt; + + static fromXDR( + input: string, + format: 'hex' | 'base64', + ): SorobanTransactionDataExt; + + static validateXDR(input: Buffer, format?: 'raw'): boolean; + + static validateXDR(input: string, format: 'hex' | 'base64'): boolean; + } + class TransactionV0Ext { switch(): number; @@ -14344,6 +15613,10 @@ export namespace xdr { evictionIterator(value?: EvictionIterator): EvictionIterator; + contractParallelCompute( + value?: ConfigSettingContractParallelComputeV0, + ): ConfigSettingContractParallelComputeV0; + static configSettingContractMaxSizeBytes(value: number): ConfigSettingEntry; static configSettingContractComputeV0( @@ -14398,6 +15671,10 @@ export namespace xdr { value: EvictionIterator, ): ConfigSettingEntry; + static configSettingContractParallelComputeV0( + value: ConfigSettingContractParallelComputeV0, + ): ConfigSettingEntry; + value(): | number | ConfigSettingContractComputeV0 @@ -14412,7 +15689,8 @@ export namespace xdr { | StateArchivalSettings | ConfigSettingContractExecutionLanesV0 | Uint64[] - | EvictionIterator; + | EvictionIterator + | ConfigSettingContractParallelComputeV0; toXDR(format?: 'raw'): Buffer; diff --git a/xdr/curr/Stellar-ledger-entries.x b/xdr/curr/Stellar-ledger-entries.x index 3a137ae6..5bf4f9d3 100644 --- a/xdr/curr/Stellar-ledger-entries.x +++ b/xdr/curr/Stellar-ledger-entries.x @@ -678,4 +678,120 @@ enum EnvelopeType ENVELOPE_TYPE_CONTRACT_ID = 8, ENVELOPE_TYPE_SOROBAN_AUTHORIZATION = 9 }; -} + +enum BucketListType +{ + LIVE = 0, + HOT_ARCHIVE = 1, + COLD_ARCHIVE = 2 +}; + +/* Entries used to define the bucket list */ +enum BucketEntryType +{ + METAENTRY = + -1, // At-and-after protocol 11: bucket metadata, should come first. + LIVEENTRY = 0, // Before protocol 11: created-or-updated; + // At-and-after protocol 11: only updated. + DEADENTRY = 1, + 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) +}; + +enum ColdArchiveBucketEntryType +{ + COLD_ARCHIVE_METAENTRY = -1, // Bucket metadata, should come first. + COLD_ARCHIVE_ARCHIVED_LEAF = 0, // Full LedgerEntry that was archived during the epoch + COLD_ARCHIVE_DELETED_LEAF = 1, // LedgerKey that was deleted during the epoch + COLD_ARCHIVE_BOUNDARY_LEAF = 2, // Dummy leaf representing low/high bound + COLD_ARCHIVE_HASH = 3 // Intermediary Merkle hash entry +}; + +struct BucketMetadata +{ + // Indicates the protocol version used to create / merge this bucket. + uint32 ledgerVersion; + + // reserved for future use + union switch (int v) + { + case 0: + void; + case 1: + BucketListType bucketListType; + } + ext; +}; + +union BucketEntry switch (BucketEntryType type) +{ +case LIVEENTRY: +case INITENTRY: + LedgerEntry liveEntry; + +case DEADENTRY: + LedgerKey deadEntry; +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; +}; + +struct ColdArchiveArchivedLeaf +{ + uint32 index; + LedgerEntry archivedEntry; +}; + +struct ColdArchiveDeletedLeaf +{ + uint32 index; + LedgerKey deletedKey; +}; + +struct ColdArchiveBoundaryLeaf +{ + uint32 index; + bool isLowerBound; +}; + +struct ColdArchiveHashEntry +{ + uint32 index; + uint32 level; + Hash hash; +}; + +union ColdArchiveBucketEntry switch (ColdArchiveBucketEntryType type) +{ +case COLD_ARCHIVE_METAENTRY: + BucketMetadata metaEntry; +case COLD_ARCHIVE_ARCHIVED_LEAF: + ColdArchiveArchivedLeaf archivedLeaf; +case COLD_ARCHIVE_DELETED_LEAF: + ColdArchiveDeletedLeaf deletedLeaf; +case COLD_ARCHIVE_BOUNDARY_LEAF: + ColdArchiveBoundaryLeaf boundaryLeaf; +case COLD_ARCHIVE_HASH: + ColdArchiveHashEntry hashEntry; +}; +} \ No newline at end of file diff --git a/xdr/curr/Stellar-ledger.x b/xdr/curr/Stellar-ledger.x index dd58ae8d..0fc03e2a 100644 --- a/xdr/curr/Stellar-ledger.x +++ b/xdr/curr/Stellar-ledger.x @@ -157,43 +157,6 @@ struct ConfigUpgradeSet { ConfigSettingEntry updatedEntry<>; }; -/* Entries used to define the bucket list */ -enum BucketEntryType -{ - METAENTRY = - -1, // At-and-after protocol 11: bucket metadata, should come first. - LIVEENTRY = 0, // Before protocol 11: created-or-updated; - // At-and-after protocol 11: only updated. - DEADENTRY = 1, - INITENTRY = 2 // At-and-after protocol 11: only created. -}; - -struct BucketMetadata -{ - // Indicates the protocol version used to create / merge this bucket. - uint32 ledgerVersion; - - // reserved for future use - union switch (int v) - { - case 0: - void; - } - ext; -}; - -union BucketEntry switch (BucketEntryType type) -{ -case LIVEENTRY: -case INITENTRY: - LedgerEntry liveEntry; - -case DEADENTRY: - LedgerKey deadEntry; -case METAENTRY: - BucketMetadata metaEntry; -}; - enum TxSetComponentType { // txs with effective fee <= bid derived from a base fee (if any). @@ -400,6 +363,8 @@ struct DiagnosticEvent ContractEvent event; }; +typedef DiagnosticEvent DiagnosticEvents<>; + struct SorobanTransactionMetaExtV1 { ExtensionPoint ext; diff --git a/xdr/curr/Stellar-overlay.x b/xdr/curr/Stellar-overlay.x index 4c964736..b398f883 100644 --- a/xdr/curr/Stellar-overlay.x +++ b/xdr/curr/Stellar-overlay.x @@ -119,7 +119,12 @@ enum MessageType SEND_MORE_EXTENDED = 20, FLOOD_ADVERT = 18, - FLOOD_DEMAND = 19 + FLOOD_DEMAND = 19, + + TIME_SLICED_SURVEY_REQUEST = 21, + TIME_SLICED_SURVEY_RESPONSE = 22, + TIME_SLICED_SURVEY_START_COLLECTING = 23, + TIME_SLICED_SURVEY_STOP_COLLECTING = 24 }; struct DontHave @@ -130,13 +135,41 @@ struct DontHave enum SurveyMessageCommandType { - SURVEY_TOPOLOGY = 0 + SURVEY_TOPOLOGY = 0, + TIME_SLICED_SURVEY_TOPOLOGY = 1 }; enum SurveyMessageResponseType { SURVEY_TOPOLOGY_RESPONSE_V0 = 0, - SURVEY_TOPOLOGY_RESPONSE_V1 = 1 + SURVEY_TOPOLOGY_RESPONSE_V1 = 1, + SURVEY_TOPOLOGY_RESPONSE_V2 = 2 +}; + +struct TimeSlicedSurveyStartCollectingMessage +{ + NodeID surveyorID; + uint32 nonce; + uint32 ledgerNum; +}; + +struct SignedTimeSlicedSurveyStartCollectingMessage +{ + Signature signature; + TimeSlicedSurveyStartCollectingMessage startCollecting; +}; + +struct TimeSlicedSurveyStopCollectingMessage +{ + NodeID surveyorID; + uint32 nonce; + uint32 ledgerNum; +}; + +struct SignedTimeSlicedSurveyStopCollectingMessage +{ + Signature signature; + TimeSlicedSurveyStopCollectingMessage stopCollecting; }; struct SurveyRequestMessage @@ -148,12 +181,26 @@ struct SurveyRequestMessage SurveyMessageCommandType commandType; }; +struct TimeSlicedSurveyRequestMessage +{ + SurveyRequestMessage request; + uint32 nonce; + uint32 inboundPeersIndex; + uint32 outboundPeersIndex; +}; + struct SignedSurveyRequestMessage { Signature requestSignature; SurveyRequestMessage request; }; +struct SignedTimeSlicedSurveyRequestMessage +{ + Signature requestSignature; + TimeSlicedSurveyRequestMessage request; +}; + typedef opaque EncryptedBody<64000>; struct SurveyResponseMessage { @@ -164,12 +211,24 @@ struct SurveyResponseMessage EncryptedBody encryptedBody; }; +struct TimeSlicedSurveyResponseMessage +{ + SurveyResponseMessage response; + uint32 nonce; +}; + struct SignedSurveyResponseMessage { Signature responseSignature; SurveyResponseMessage response; }; +struct SignedTimeSlicedSurveyResponseMessage +{ + Signature responseSignature; + TimeSlicedSurveyResponseMessage response; +}; + struct PeerStats { NodeID id; @@ -193,6 +252,34 @@ struct PeerStats typedef PeerStats PeerStatList<25>; +struct TimeSlicedNodeData +{ + uint32 addedAuthenticatedPeers; + uint32 droppedAuthenticatedPeers; + uint32 totalInboundPeerCount; + uint32 totalOutboundPeerCount; + + // SCP stats + uint32 p75SCPFirstToSelfLatencyMs; + uint32 p75SCPSelfToOtherLatencyMs; + + // How many times the node lost sync in the time slice + uint32 lostSyncCount; + + // Config data + bool isValidator; + uint32 maxInboundPeerCount; + uint32 maxOutboundPeerCount; +}; + +struct TimeSlicedPeerData +{ + PeerStats peerStats; + uint32 averageLatencyMs; +}; + +typedef TimeSlicedPeerData TimeSlicedPeerDataList<25>; + struct TopologyResponseBodyV0 { PeerStatList inboundPeers; @@ -214,12 +301,21 @@ struct TopologyResponseBodyV1 uint32 maxOutboundPeerCount; }; +struct TopologyResponseBodyV2 +{ + TimeSlicedPeerDataList inboundPeers; + TimeSlicedPeerDataList outboundPeers; + TimeSlicedNodeData nodeData; +}; + union SurveyResponseBody switch (SurveyMessageResponseType type) { case SURVEY_TOPOLOGY_RESPONSE_V0: TopologyResponseBodyV0 topologyResponseBodyV0; case SURVEY_TOPOLOGY_RESPONSE_V1: TopologyResponseBodyV1 topologyResponseBodyV1; +case SURVEY_TOPOLOGY_RESPONSE_V2: + TopologyResponseBodyV2 topologyResponseBodyV2; }; const TX_ADVERT_VECTOR_MAX_SIZE = 1000; @@ -269,6 +365,20 @@ case SURVEY_REQUEST: case SURVEY_RESPONSE: SignedSurveyResponseMessage signedSurveyResponseMessage; +case TIME_SLICED_SURVEY_REQUEST: + SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage; + +case TIME_SLICED_SURVEY_RESPONSE: + SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage; + +case TIME_SLICED_SURVEY_START_COLLECTING: + SignedTimeSlicedSurveyStartCollectingMessage + signedTimeSlicedSurveyStartCollectingMessage; + +case TIME_SLICED_SURVEY_STOP_COLLECTING: + SignedTimeSlicedSurveyStopCollectingMessage + signedTimeSlicedSurveyStopCollectingMessage; + // SCP case GET_SCP_QUORUMSET: uint256 qSetHash; diff --git a/xdr/curr/Stellar-transaction.x b/xdr/curr/Stellar-transaction.x index 87dd32d3..d0ed328c 100644 --- a/xdr/curr/Stellar-transaction.x +++ b/xdr/curr/Stellar-transaction.x @@ -476,7 +476,8 @@ enum HostFunctionType { HOST_FUNCTION_TYPE_INVOKE_CONTRACT = 0, HOST_FUNCTION_TYPE_CREATE_CONTRACT = 1, - HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM = 2 + HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM = 2, + HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2 = 3 }; enum ContractIDPreimageType @@ -503,6 +504,14 @@ struct CreateContractArgs ContractExecutable executable; }; +struct CreateContractArgsV2 +{ + ContractIDPreimage contractIDPreimage; + ContractExecutable executable; + // Arguments of the contract's constructor. + SCVal constructorArgs<>; +}; + struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; @@ -517,20 +526,29 @@ case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; +case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: + CreateContractArgsV2 createContractV2; }; enum SorobanAuthorizedFunctionType { SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN = 0, - SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN = 1 + SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN = 1, + SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN = 2 }; union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; +// This variant of auth payload for creating new contract instances is no +// longer accepted after protocol 22. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; +// This variant of auth payload for creating new contract instances +// is only accepted in and after protocol 22. +case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: + CreateContractArgsV2 createContractV2HostFn; }; struct SorobanAuthorizedInvocation @@ -801,6 +819,56 @@ struct LedgerFootprint LedgerKey readWrite<>; }; +enum ArchivalProofType +{ + EXISTENCE = 0, + NONEXISTENCE = 1 +}; + +struct ArchivalProofNode +{ + uint32 index; + Hash hash; +}; + +typedef ArchivalProofNode ProofLevel<>; + +struct NonexistenceProofBody +{ + ColdArchiveBucketEntry entriesToProve<>; + + // Vector of vectors, where proofLevels[level] + // contains all HashNodes that correspond with that level + ProofLevel proofLevels<>; +}; + +struct ExistenceProofBody +{ + LedgerKey keysToProve<>; + + // Bounds for each key being proved, where bound[n] + // corresponds to keysToProve[n] + ColdArchiveBucketEntry lowBoundEntries<>; + ColdArchiveBucketEntry highBoundEntries<>; + + // Vector of vectors, where proofLevels[level] + // contains all HashNodes that correspond with that level + ProofLevel proofLevels<>; +}; + +struct ArchivalProof +{ + uint32 epoch; // AST Subtree for this proof + + union switch (ArchivalProofType t) + { + case EXISTENCE: + NonexistenceProofBody nonexistenceProof; + case NONEXISTENCE: + ExistenceProofBody existenceProof; + } body; +}; + // Resource limits for a Soroban transaction. // The transaction will fail if it exceeds any of these limits. struct SorobanResources diff --git a/xdr/curr/Stellar-types.x b/xdr/curr/Stellar-types.x index d71bf0d4..73c4e795 100644 --- a/xdr/curr/Stellar-types.x +++ b/xdr/curr/Stellar-types.x @@ -103,4 +103,35 @@ struct HmacSha256Mac { opaque mac[32]; }; -} + +struct ShortHashSeed +{ + opaque seed[16]; +}; + +enum BinaryFuseFilterType +{ + BINARY_FUSE_FILTER_8_BIT = 0, + BINARY_FUSE_FILTER_16_BIT = 1, + BINARY_FUSE_FILTER_32_BIT = 2 +}; + +struct SerializedBinaryFuseFilter +{ + BinaryFuseFilterType type; + + // Seed used to hash input to filter + ShortHashSeed inputHashSeed; + + // Seed used for internal filter hash operations + ShortHashSeed filterSeed; + uint32 segmentLength; + uint32 segementLengthMask; + uint32 segmentCount; + uint32 segmentCountLength; + uint32 fingerprintLength; // Length in terms of element count, not bytes + + // Array of uint8_t, uint16_t, or uint32_t depending on filter type + opaque fingerprints<>; +}; +} \ No newline at end of file diff --git a/xdr/next/Stellar-contract-config-setting.x b/xdr/next/Stellar-contract-config-setting.x index 52cc0224..4c6c6ee4 100644 --- a/xdr/next/Stellar-contract-config-setting.x +++ b/xdr/next/Stellar-contract-config-setting.x @@ -23,6 +23,18 @@ struct ConfigSettingContractComputeV0 uint32 txMemoryLimit; }; +// Settings for running the contract transactions in parallel. +struct ConfigSettingContractParallelComputeV0 +{ + // Maximum number of threads that can be used to apply a + // transaction set to close the ledger. + // This doesn't limit or defined the actual number of + // threads used and instead only defines the minimum number + // of physical threads that a tier-1 validator has to support + // in order to not fall out of sync with the network. + uint32 ledgerMaxParallelThreads; +}; + // Ledger access settings for contracts. struct ConfigSettingContractLedgerCostV0 { @@ -251,7 +263,8 @@ enum ConfigSettingID CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW = 12, - CONFIG_SETTING_EVICTION_ITERATOR = 13 + CONFIG_SETTING_EVICTION_ITERATOR = 13, + CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14 }; union ConfigSettingEntry switch (ConfigSettingID configSettingID) @@ -284,5 +297,7 @@ case CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW: uint64 bucketListSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; +case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: + ConfigSettingContractParallelComputeV0 contractParallelCompute; }; } diff --git a/xdr/next/Stellar-ledger-entries.x b/xdr/next/Stellar-ledger-entries.x index 3a137ae6..9238fcda 100644 --- a/xdr/next/Stellar-ledger-entries.x +++ b/xdr/next/Stellar-ledger-entries.x @@ -678,4 +678,120 @@ enum EnvelopeType ENVELOPE_TYPE_CONTRACT_ID = 8, ENVELOPE_TYPE_SOROBAN_AUTHORIZATION = 9 }; + +enum BucketListType +{ + LIVE = 0, + HOT_ARCHIVE = 1, + COLD_ARCHIVE = 2 +}; + +/* Entries used to define the bucket list */ +enum BucketEntryType +{ + METAENTRY = + -1, // At-and-after protocol 11: bucket metadata, should come first. + LIVEENTRY = 0, // Before protocol 11: created-or-updated; + // At-and-after protocol 11: only updated. + DEADENTRY = 1, + 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) +}; + +enum ColdArchiveBucketEntryType +{ + COLD_ARCHIVE_METAENTRY = -1, // Bucket metadata, should come first. + COLD_ARCHIVE_ARCHIVED_LEAF = 0, // Full LedgerEntry that was archived during the epoch + COLD_ARCHIVE_DELETED_LEAF = 1, // LedgerKey that was deleted during the epoch + COLD_ARCHIVE_BOUNDARY_LEAF = 2, // Dummy leaf representing low/high bound + COLD_ARCHIVE_HASH = 3 // Intermediary Merkle hash entry +}; + +struct BucketMetadata +{ + // Indicates the protocol version used to create / merge this bucket. + uint32 ledgerVersion; + + // reserved for future use + union switch (int v) + { + case 0: + void; + case 1: + BucketListType bucketListType; + } + ext; +}; + +union BucketEntry switch (BucketEntryType type) +{ +case LIVEENTRY: +case INITENTRY: + LedgerEntry liveEntry; + +case DEADENTRY: + LedgerKey deadEntry; +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; +}; + +struct ColdArchiveArchivedLeaf +{ + uint32 index; + LedgerEntry archivedEntry; +}; + +struct ColdArchiveDeletedLeaf +{ + uint32 index; + LedgerKey deletedKey; +}; + +struct ColdArchiveBoundaryLeaf +{ + uint32 index; + bool isLowerBound; +}; + +struct ColdArchiveHashEntry +{ + uint32 index; + uint32 level; + Hash hash; +}; + +union ColdArchiveBucketEntry switch (ColdArchiveBucketEntryType type) +{ +case COLD_ARCHIVE_METAENTRY: + BucketMetadata metaEntry; +case COLD_ARCHIVE_ARCHIVED_LEAF: + ColdArchiveArchivedLeaf archivedLeaf; +case COLD_ARCHIVE_DELETED_LEAF: + ColdArchiveDeletedLeaf deletedLeaf; +case COLD_ARCHIVE_BOUNDARY_LEAF: + ColdArchiveBoundaryLeaf boundaryLeaf; +case COLD_ARCHIVE_HASH: + ColdArchiveHashEntry hashEntry; +}; } diff --git a/xdr/next/Stellar-ledger.x b/xdr/next/Stellar-ledger.x index dd58ae8d..9c0d0360 100644 --- a/xdr/next/Stellar-ledger.x +++ b/xdr/next/Stellar-ledger.x @@ -157,43 +157,6 @@ struct ConfigUpgradeSet { ConfigSettingEntry updatedEntry<>; }; -/* Entries used to define the bucket list */ -enum BucketEntryType -{ - METAENTRY = - -1, // At-and-after protocol 11: bucket metadata, should come first. - LIVEENTRY = 0, // Before protocol 11: created-or-updated; - // At-and-after protocol 11: only updated. - DEADENTRY = 1, - INITENTRY = 2 // At-and-after protocol 11: only created. -}; - -struct BucketMetadata -{ - // Indicates the protocol version used to create / merge this bucket. - uint32 ledgerVersion; - - // reserved for future use - union switch (int v) - { - case 0: - void; - } - ext; -}; - -union BucketEntry switch (BucketEntryType type) -{ -case LIVEENTRY: -case INITENTRY: - LedgerEntry liveEntry; - -case DEADENTRY: - LedgerKey deadEntry; -case METAENTRY: - BucketMetadata metaEntry; -}; - enum TxSetComponentType { // txs with effective fee <= bid derived from a base fee (if any). @@ -201,6 +164,15 @@ enum TxSetComponentType TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE = 0 }; +typedef TransactionEnvelope TxExecutionThread<>; +typedef TxExecutionThread ParallelTxExecutionStage<>; + +struct ParallelTxsComponent +{ + int64* baseFee; + ParallelTxExecutionStage executionStages<>; +}; + union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: @@ -215,6 +187,8 @@ union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; +case 1: + ParallelTxsComponent parallelTxsComponent; }; // Transaction sets are the unit used by SCP to decide on transitions diff --git a/xdr/next/Stellar-overlay.x b/xdr/next/Stellar-overlay.x index 4c964736..b398f883 100644 --- a/xdr/next/Stellar-overlay.x +++ b/xdr/next/Stellar-overlay.x @@ -119,7 +119,12 @@ enum MessageType SEND_MORE_EXTENDED = 20, FLOOD_ADVERT = 18, - FLOOD_DEMAND = 19 + FLOOD_DEMAND = 19, + + TIME_SLICED_SURVEY_REQUEST = 21, + TIME_SLICED_SURVEY_RESPONSE = 22, + TIME_SLICED_SURVEY_START_COLLECTING = 23, + TIME_SLICED_SURVEY_STOP_COLLECTING = 24 }; struct DontHave @@ -130,13 +135,41 @@ struct DontHave enum SurveyMessageCommandType { - SURVEY_TOPOLOGY = 0 + SURVEY_TOPOLOGY = 0, + TIME_SLICED_SURVEY_TOPOLOGY = 1 }; enum SurveyMessageResponseType { SURVEY_TOPOLOGY_RESPONSE_V0 = 0, - SURVEY_TOPOLOGY_RESPONSE_V1 = 1 + SURVEY_TOPOLOGY_RESPONSE_V1 = 1, + SURVEY_TOPOLOGY_RESPONSE_V2 = 2 +}; + +struct TimeSlicedSurveyStartCollectingMessage +{ + NodeID surveyorID; + uint32 nonce; + uint32 ledgerNum; +}; + +struct SignedTimeSlicedSurveyStartCollectingMessage +{ + Signature signature; + TimeSlicedSurveyStartCollectingMessage startCollecting; +}; + +struct TimeSlicedSurveyStopCollectingMessage +{ + NodeID surveyorID; + uint32 nonce; + uint32 ledgerNum; +}; + +struct SignedTimeSlicedSurveyStopCollectingMessage +{ + Signature signature; + TimeSlicedSurveyStopCollectingMessage stopCollecting; }; struct SurveyRequestMessage @@ -148,12 +181,26 @@ struct SurveyRequestMessage SurveyMessageCommandType commandType; }; +struct TimeSlicedSurveyRequestMessage +{ + SurveyRequestMessage request; + uint32 nonce; + uint32 inboundPeersIndex; + uint32 outboundPeersIndex; +}; + struct SignedSurveyRequestMessage { Signature requestSignature; SurveyRequestMessage request; }; +struct SignedTimeSlicedSurveyRequestMessage +{ + Signature requestSignature; + TimeSlicedSurveyRequestMessage request; +}; + typedef opaque EncryptedBody<64000>; struct SurveyResponseMessage { @@ -164,12 +211,24 @@ struct SurveyResponseMessage EncryptedBody encryptedBody; }; +struct TimeSlicedSurveyResponseMessage +{ + SurveyResponseMessage response; + uint32 nonce; +}; + struct SignedSurveyResponseMessage { Signature responseSignature; SurveyResponseMessage response; }; +struct SignedTimeSlicedSurveyResponseMessage +{ + Signature responseSignature; + TimeSlicedSurveyResponseMessage response; +}; + struct PeerStats { NodeID id; @@ -193,6 +252,34 @@ struct PeerStats typedef PeerStats PeerStatList<25>; +struct TimeSlicedNodeData +{ + uint32 addedAuthenticatedPeers; + uint32 droppedAuthenticatedPeers; + uint32 totalInboundPeerCount; + uint32 totalOutboundPeerCount; + + // SCP stats + uint32 p75SCPFirstToSelfLatencyMs; + uint32 p75SCPSelfToOtherLatencyMs; + + // How many times the node lost sync in the time slice + uint32 lostSyncCount; + + // Config data + bool isValidator; + uint32 maxInboundPeerCount; + uint32 maxOutboundPeerCount; +}; + +struct TimeSlicedPeerData +{ + PeerStats peerStats; + uint32 averageLatencyMs; +}; + +typedef TimeSlicedPeerData TimeSlicedPeerDataList<25>; + struct TopologyResponseBodyV0 { PeerStatList inboundPeers; @@ -214,12 +301,21 @@ struct TopologyResponseBodyV1 uint32 maxOutboundPeerCount; }; +struct TopologyResponseBodyV2 +{ + TimeSlicedPeerDataList inboundPeers; + TimeSlicedPeerDataList outboundPeers; + TimeSlicedNodeData nodeData; +}; + union SurveyResponseBody switch (SurveyMessageResponseType type) { case SURVEY_TOPOLOGY_RESPONSE_V0: TopologyResponseBodyV0 topologyResponseBodyV0; case SURVEY_TOPOLOGY_RESPONSE_V1: TopologyResponseBodyV1 topologyResponseBodyV1; +case SURVEY_TOPOLOGY_RESPONSE_V2: + TopologyResponseBodyV2 topologyResponseBodyV2; }; const TX_ADVERT_VECTOR_MAX_SIZE = 1000; @@ -269,6 +365,20 @@ case SURVEY_REQUEST: case SURVEY_RESPONSE: SignedSurveyResponseMessage signedSurveyResponseMessage; +case TIME_SLICED_SURVEY_REQUEST: + SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage; + +case TIME_SLICED_SURVEY_RESPONSE: + SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage; + +case TIME_SLICED_SURVEY_START_COLLECTING: + SignedTimeSlicedSurveyStartCollectingMessage + signedTimeSlicedSurveyStartCollectingMessage; + +case TIME_SLICED_SURVEY_STOP_COLLECTING: + SignedTimeSlicedSurveyStopCollectingMessage + signedTimeSlicedSurveyStopCollectingMessage; + // SCP case GET_SCP_QUORUMSET: uint256 qSetHash; diff --git a/xdr/next/Stellar-transaction.x b/xdr/next/Stellar-transaction.x index 87dd32d3..3a548ab8 100644 --- a/xdr/next/Stellar-transaction.x +++ b/xdr/next/Stellar-transaction.x @@ -476,7 +476,8 @@ enum HostFunctionType { HOST_FUNCTION_TYPE_INVOKE_CONTRACT = 0, HOST_FUNCTION_TYPE_CREATE_CONTRACT = 1, - HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM = 2 + HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM = 2, + HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2 = 3 }; enum ContractIDPreimageType @@ -503,6 +504,14 @@ struct CreateContractArgs ContractExecutable executable; }; +struct CreateContractArgsV2 +{ + ContractIDPreimage contractIDPreimage; + ContractExecutable executable; + // Arguments of the contract's constructor. + SCVal constructorArgs<>; +}; + struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; @@ -517,20 +526,29 @@ case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; +case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: + CreateContractArgsV2 createContractV2; }; enum SorobanAuthorizedFunctionType { SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN = 0, - SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN = 1 + SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN = 1, + SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN = 2 }; union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; +// This variant of auth payload for creating new contract instances is no +// longer accepted after protocol 22. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; +// This variant of auth payload for creating new contract instances +// is only accepted in and after protocol 22. +case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: + CreateContractArgsV2 createContractV2HostFn; }; struct SorobanAuthorizedInvocation @@ -801,6 +819,56 @@ struct LedgerFootprint LedgerKey readWrite<>; }; +enum ArchivalProofType +{ + EXISTENCE = 0, + NONEXISTENCE = 1 +}; + +struct ArchivalProofNode +{ + uint32 index; + Hash hash; +}; + +typedef ArchivalProofNode ProofLevel<>; + +struct NonexistenceProofBody +{ + ColdArchiveBucketEntry entriesToProve<>; + + // Vector of vectors, where proofLevels[level] + // contains all HashNodes that correspond with that level + ProofLevel proofLevels<>; +}; + +struct ExistenceProofBody +{ + LedgerKey keysToProve<>; + + // Bounds for each key being proved, where bound[n] + // corresponds to keysToProve[n] + ColdArchiveBucketEntry lowBoundEntries<>; + ColdArchiveBucketEntry highBoundEntries<>; + + // Vector of vectors, where proofLevels[level] + // contains all HashNodes that correspond with that level + ProofLevel proofLevels<>; +}; + +struct ArchivalProof +{ + uint32 epoch; // AST Subtree for this proof + + union switch (ArchivalProofType t) + { + case EXISTENCE: + NonexistenceProofBody nonexistenceProof; + case NONEXISTENCE: + ExistenceProofBody existenceProof; + } body; +}; + // Resource limits for a Soroban transaction. // The transaction will fail if it exceeds any of these limits. struct SorobanResources @@ -819,7 +887,13 @@ struct SorobanResources // The transaction extension for Soroban. struct SorobanTransactionData { - ExtensionPoint ext; + union switch (int v) + { + case 0: + void; + case 1: + ArchivalProof proofs<>; + } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified diff --git a/xdr/next/Stellar-types.x b/xdr/next/Stellar-types.x index d71bf0d4..758c2954 100644 --- a/xdr/next/Stellar-types.x +++ b/xdr/next/Stellar-types.x @@ -103,4 +103,35 @@ struct HmacSha256Mac { opaque mac[32]; }; + +struct ShortHashSeed +{ + opaque seed[16]; +}; + +enum BinaryFuseFilterType +{ + BINARY_FUSE_FILTER_8_BIT = 0, + BINARY_FUSE_FILTER_16_BIT = 1, + BINARY_FUSE_FILTER_32_BIT = 2 +}; + +struct SerializedBinaryFuseFilter +{ + BinaryFuseFilterType type; + + // Seed used to hash input to filter + ShortHashSeed inputHashSeed; + + // Seed used for internal filter hash operations + ShortHashSeed filterSeed; + uint32 segmentLength; + uint32 segementLengthMask; + uint32 segmentCount; + uint32 segmentCountLength; + uint32 fingerprintLength; // Length in terms of element count, not bytes + + // Array of uint8_t, uint16_t, or uint32_t depending on filter type + opaque fingerprints<>; +}; }