From 1bc833ece2ec836c526f487a336791561a954622 Mon Sep 17 00:00:00 2001 From: David Edey Date: Tue, 22 Oct 2024 00:54:06 +0100 Subject: [PATCH 01/12] feature: Enable cuttlefish --- .../com/radixdlt/protocol/ProtocolConfig.java | 3 +- core-rust/Cargo.lock | 38 +-- core-rust/Cargo.toml | 24 +- .../core-api-server/core-api-schema.yaml | 93 ++++++- .../src/core_api/conversions/addressing.rs | 14 +- .../src/core_api/conversions/receipt.rs | 4 +- .../substates/boot_loader_module.rs | 77 ++++- .../src/core_api/conversions/substates/mod.rs | 2 + .../protocol_update_status_module.rs | 18 ++ .../conversions/substates/substate.rs | 8 +- .../always_visible_global_nodes_version.rs | 40 +++ ...oader_module_field_kernel_boot_substate.rs | 6 +- ...odule_field_kernel_boot_substate_all_of.rs | 6 +- ...t_loader_module_field_kernel_boot_value.rs | 28 ++ ...t_loader_module_field_system_boot_value.rs | 3 + ...ction_validation_configuration_substate.rs | 31 +++ .../generated/models/entity_module.rs | 3 + .../generated/models/ledger_transaction.rs | 8 + .../src/core_api/generated/models/mod.rs | 20 ++ .../models/notarized_transaction_v2.rs | 28 ++ ...zed_transaction_all_of_validation_error.rs | 4 +- .../models/parsed_notarized_transaction_v2.rs | 37 +++ .../parsed_notarized_transaction_v2_all_of.rs | 34 +++ .../generated/models/parsed_transaction.rs | 9 + .../models/parsed_transaction_type.rs | 3 + ...te_status_module_field_summary_substate.rs | 31 +++ .../src/core_api/generated/models/substate.rs | 12 +- .../generated/models/substate_type.rs | 6 + .../generated/models/system_field_kind.rs | 6 + .../generated/models/system_version.rs | 40 +++ .../models/user_ledger_transaction_v2.rs | 35 +++ .../user_ledger_transaction_v2_all_of.rs | 28 ++ .../core_api/handlers/stream_transactions.rs | 28 +- .../core_api/handlers/transaction_parse.rs | 137 +++++---- .../protocol_configs/config_printer.rs | 123 +++++--- .../dumunet_protocol_config.rs | 21 +- .../mainnet_protocol_config.rs | 2 +- .../stokenet_protocol_config.rs | 21 +- .../testnet_protocol_config.rs | 3 + .../AccessControllerFieldStateSubstate.java | 6 + ...countAuthorizedDepositorEntrySubstate.java | 6 + .../models/AccountFieldStateSubstate.java | 6 + ...countLockerAccountClaimsEntrySubstate.java | 6 + ...ccountResourcePreferenceEntrySubstate.java | 6 + .../models/AccountVaultEntrySubstate.java | 6 + .../AlwaysVisibleGlobalNodesVersion.java | 62 +++++ ...otLoaderModuleFieldKernelBootSubstate.java | 15 +- ...derModuleFieldKernelBootSubstateAllOf.java | 9 +- .../BootLoaderModuleFieldKernelBootValue.java | 112 ++++++++ ...otLoaderModuleFieldSystemBootSubstate.java | 6 + .../BootLoaderModuleFieldSystemBootValue.java | 37 ++- ...actionValidationConfigurationSubstate.java | 262 ++++++++++++++++++ .../BootLoaderModuleFieldVmBootSubstate.java | 6 + .../ConsensusManagerFieldConfigSubstate.java | 6 + ...FieldCurrentProposalStatisticSubstate.java | 6 + ...ldCurrentTimeRoundedToMinutesSubstate.java | 6 + ...sensusManagerFieldCurrentTimeSubstate.java | 6 + ...nagerFieldCurrentValidatorSetSubstate.java | 6 + .../ConsensusManagerFieldStateSubstate.java | 6 + ...sManagerFieldValidatorRewardsSubstate.java | 6 + ...edValidatorsByStakeIndexEntrySubstate.java | 6 + .../core/generated/models/EntityModule.java | 4 +- .../models/FlashLedgerTransaction.java | 3 + ...ourceManagerFieldDivisibilitySubstate.java | 6 + ...sourceManagerFieldTotalSupplySubstate.java | 6 + .../FungibleVaultFieldBalanceSubstate.java | 6 + ...ungibleVaultFieldFrozenStatusSubstate.java | 6 + .../GenericKeyValueStoreEntrySubstate.java | 6 + ...ricScryptoComponentFieldStateSubstate.java | 6 + .../models/GenesisLedgerTransaction.java | 3 + .../generated/models/LedgerTransaction.java | 5 + .../models/MetadataModuleEntrySubstate.java | 6 + .../MultiResourcePoolFieldStateSubstate.java | 6 + ...gibleResourceManagerDataEntrySubstate.java | 6 + ...bleResourceManagerFieldIdTypeSubstate.java | 6 + ...urceManagerFieldMutableFieldsSubstate.java | 6 + ...sourceManagerFieldTotalSupplySubstate.java | 6 + ...ngibleVaultContentsIndexEntrySubstate.java | 6 + .../NonFungibleVaultFieldBalanceSubstate.java | 6 + ...ungibleVaultFieldFrozenStatusSubstate.java | 6 + .../models/NotarizedTransactionV2.java | 111 ++++++++ .../OneResourcePoolFieldStateSubstate.java | 6 + ...ageBlueprintAuthTemplateEntrySubstate.java | 6 + ...ckageBlueprintDefinitionEntrySubstate.java | 6 + ...ageBlueprintDependenciesEntrySubstate.java | 6 + .../PackageBlueprintRoyaltyEntrySubstate.java | 6 + ...kageCodeInstrumentedCodeEntrySubstate.java | 6 + .../PackageCodeOriginalCodeEntrySubstate.java | 6 + .../PackageCodeVmTypeEntrySubstate.java | 6 + ...ackageFieldRoyaltyAccumulatorSubstate.java | 6 + .../models/ParsedLedgerTransaction.java | 3 + .../models/ParsedNotarizedTransaction.java | 3 + ...arizedTransactionAllOfValidationError.java | 4 +- .../models/ParsedNotarizedTransactionV2.java | 216 +++++++++++++++ .../ParsedNotarizedTransactionV2AllOf.java | 178 ++++++++++++ .../models/ParsedSignedTransactionIntent.java | 3 + .../generated/models/ParsedTransaction.java | 5 + .../models/ParsedTransactionIntent.java | 3 + .../models/ParsedTransactionType.java | 4 +- ...pdateStatusModuleFieldSummarySubstate.java | 262 ++++++++++++++++++ ...ssignmentModuleFieldOwnerRoleSubstate.java | 6 + ...RoleAssignmentModuleRuleEntrySubstate.java | 6 + .../models/RoundUpdateLedgerTransaction.java | 3 + .../RoyaltyModuleFieldStateSubstate.java | 6 + ...yaltyModuleMethodRoyaltyEntrySubstate.java | 6 + .../generated/models/SchemaEntrySubstate.java | 6 + .../api/core/generated/models/Substate.java | 10 + .../core/generated/models/SubstateType.java | 6 +- .../generated/models/SystemFieldKind.java | 6 +- .../core/generated/models/SystemVersion.java | 62 +++++ ...sactionTrackerCollectionEntrySubstate.java | 6 + .../TransactionTrackerFieldStateSubstate.java | 6 + .../TwoResourcePoolFieldStateSubstate.java | 6 + .../TypeInfoModuleFieldTypeInfoSubstate.java | 6 + .../models/UserLedgerTransaction.java | 3 + .../models/UserLedgerTransactionV2.java | 150 ++++++++++ .../models/UserLedgerTransactionV2AllOf.java | 112 ++++++++ ...ProtocolUpdateReadinessSignalSubstate.java | 6 + .../models/ValidatorFieldStateSubstate.java | 6 + .../lib/generated/.openapi-generator/FILES | 12 + .../models/AlwaysVisibleGlobalNodesVersion.ts | 38 +++ ...BootLoaderModuleFieldKernelBootSubstate.ts | 15 +- ...oaderModuleFieldKernelBootSubstateAllOf.ts | 15 +- .../BootLoaderModuleFieldKernelBootValue.ts | 72 +++++ .../BootLoaderModuleFieldSystemBootValue.ts | 14 + ...nsactionValidationConfigurationSubstate.ts | 85 ++++++ ...ionValidationConfigurationSubstateAllOf.ts | 75 +++++ .../lib/generated/models/EntityModule.ts | 3 +- .../lib/generated/models/LedgerTransaction.ts | 13 +- .../models/NotarizedTransactionV2.ts | 65 +++++ ...otarizedTransactionAllOfValidationError.ts | 2 +- .../models/ParsedNotarizedTransactionV2.ts | 120 ++++++++ .../ParsedNotarizedTransactionV2AllOf.ts | 119 ++++++++ .../lib/generated/models/ParsedTransaction.ts | 13 +- .../generated/models/ParsedTransactionType.ts | 3 +- ...lUpdateStatusModuleFieldSummarySubstate.ts | 85 ++++++ ...teStatusModuleFieldSummarySubstateAllOf.ts | 75 +++++ .../lib/generated/models/Substate.ts | 24 +- .../lib/generated/models/SubstateType.ts | 4 +- .../lib/generated/models/SystemFieldKind.ts | 4 +- .../lib/generated/models/SystemVersion.ts | 38 +++ .../models/UserLedgerTransactionV2.ts | 100 +++++++ .../models/UserLedgerTransactionV2AllOf.ts | 91 ++++++ sdk/typescript/lib/generated/models/index.ts | 12 + 144 files changed, 3894 insertions(+), 199 deletions(-) create mode 100644 core-rust/core-api-server/src/core_api/conversions/substates/protocol_update_status_module.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/always_visible_global_nodes_version.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_kernel_boot_value.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_transaction_validation_configuration_substate.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/notarized_transaction_v2.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/parsed_notarized_transaction_v2.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/parsed_notarized_transaction_v2_all_of.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_module_field_summary_substate.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/system_version.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/user_ledger_transaction_v2.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/user_ledger_transaction_v2_all_of.rs create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/AlwaysVisibleGlobalNodesVersion.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldKernelBootValue.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldTransactionValidationConfigurationSubstate.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/NotarizedTransactionV2.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransactionV2.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransactionV2AllOf.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstate.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/SystemVersion.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/UserLedgerTransactionV2.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/UserLedgerTransactionV2AllOf.java create mode 100644 sdk/typescript/lib/generated/models/AlwaysVisibleGlobalNodesVersion.ts create mode 100644 sdk/typescript/lib/generated/models/BootLoaderModuleFieldKernelBootValue.ts create mode 100644 sdk/typescript/lib/generated/models/BootLoaderModuleFieldTransactionValidationConfigurationSubstate.ts create mode 100644 sdk/typescript/lib/generated/models/BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOf.ts create mode 100644 sdk/typescript/lib/generated/models/NotarizedTransactionV2.ts create mode 100644 sdk/typescript/lib/generated/models/ParsedNotarizedTransactionV2.ts create mode 100644 sdk/typescript/lib/generated/models/ParsedNotarizedTransactionV2AllOf.ts create mode 100644 sdk/typescript/lib/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstate.ts create mode 100644 sdk/typescript/lib/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstateAllOf.ts create mode 100644 sdk/typescript/lib/generated/models/SystemVersion.ts create mode 100644 sdk/typescript/lib/generated/models/UserLedgerTransactionV2.ts create mode 100644 sdk/typescript/lib/generated/models/UserLedgerTransactionV2AllOf.ts diff --git a/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolConfig.java b/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolConfig.java index 8ed91b4a4f..661ef79730 100644 --- a/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolConfig.java +++ b/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolConfig.java @@ -80,8 +80,9 @@ public record ProtocolConfig( public static final String GENESIS_PROTOCOL_VERSION_NAME = "babylon-genesis"; public static final String ANEMONE_PROTOCOL_VERSION_NAME = "anemone"; public static final String BOTTLENOSE_PROTOCOL_VERSION_NAME = "bottlenose"; + public static final String CUTTLEFISH_PROTOCOL_VERSION_NAME = "cuttlefish"; - public static final String LATEST_PROTOCOL_VERSION_NAME = BOTTLENOSE_PROTOCOL_VERSION_NAME; + public static final String LATEST_PROTOCOL_VERSION_NAME = CUTTLEFISH_PROTOCOL_VERSION_NAME; public ProtocolConfig(ImmutableList protocolUpdateTriggers) { this(protocolUpdateTriggers, Map.of()); diff --git a/core-rust/Cargo.lock b/core-rust/Cargo.lock index f15aa239ff..a979ef93f7 100644 --- a/core-rust/Cargo.lock +++ b/core-rust/Cargo.lock @@ -1764,7 +1764,7 @@ dependencies = [ [[package]] name = "radix-blueprint-schema-init" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "bitflags 1.3.2", "radix-common", @@ -1775,7 +1775,7 @@ dependencies = [ [[package]] name = "radix-common" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "bech32", "blake2", @@ -1801,7 +1801,7 @@ dependencies = [ [[package]] name = "radix-common-derive" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "paste", "proc-macro2", @@ -1813,7 +1813,7 @@ dependencies = [ [[package]] name = "radix-engine" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "bitflags 1.3.2", "colored", @@ -1844,7 +1844,7 @@ dependencies = [ [[package]] name = "radix-engine-interface" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "bitflags 1.3.2", "const-sha1", @@ -1865,7 +1865,7 @@ dependencies = [ [[package]] name = "radix-engine-profiling" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "fixedstr", ] @@ -1873,7 +1873,7 @@ dependencies = [ [[package]] name = "radix-engine-profiling-derive" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "proc-macro2", "quote", @@ -1884,7 +1884,7 @@ dependencies = [ [[package]] name = "radix-engine-toolkit-common" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "radix-common", "radix-engine", @@ -1898,7 +1898,7 @@ dependencies = [ [[package]] name = "radix-native-sdk" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "radix-common", "radix-engine-interface", @@ -1909,7 +1909,7 @@ dependencies = [ [[package]] name = "radix-rust" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "indexmap 2.2.6", "serde", @@ -1918,7 +1918,7 @@ dependencies = [ [[package]] name = "radix-sbor-derive" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "proc-macro2", "quote", @@ -1929,7 +1929,7 @@ dependencies = [ [[package]] name = "radix-substate-store-impls" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "hex", "itertools", @@ -1943,7 +1943,7 @@ dependencies = [ [[package]] name = "radix-substate-store-interface" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "hex", "itertools", @@ -1955,7 +1955,7 @@ dependencies = [ [[package]] name = "radix-substate-store-queries" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "hex", "itertools", @@ -1972,7 +1972,7 @@ dependencies = [ [[package]] name = "radix-transaction-scenarios" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "hex", "itertools", @@ -1992,7 +1992,7 @@ dependencies = [ [[package]] name = "radix-transactions" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "annotate-snippets", "bech32", @@ -2165,7 +2165,7 @@ dependencies = [ [[package]] name = "sbor" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "const-sha1", "hex", @@ -2179,7 +2179,7 @@ dependencies = [ [[package]] name = "sbor-derive" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "proc-macro2", "sbor-derive-common", @@ -2189,7 +2189,7 @@ dependencies = [ [[package]] name = "sbor-derive-common" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-a583a405#a583a4050911e76115b31760abebe38b87df98f6" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" dependencies = [ "const-sha1", "indexmap 2.2.6", diff --git a/core-rust/Cargo.toml b/core-rust/Cargo.toml index 1e0a4a55f3..d7f3e5e10c 100644 --- a/core-rust/Cargo.toml +++ b/core-rust/Cargo.toml @@ -26,18 +26,18 @@ resolver = "2" # Then use tag="release_name-BLAH" in the below dependencies. # ================================================================= -sbor = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-a583a405", features = ["serde"] } -radix-transactions = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-a583a405" } -radix-transaction-scenarios = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-a583a405" } -radix-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-a583a405", features = ["serde"] } -radix-engine-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-a583a405" } -radix-engine = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-a583a405" } -radix-substate-store-impls = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-a583a405" } -radix-substate-store-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-a583a405" } -radix-substate-store-queries = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-a583a405" } -radix-rust = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-a583a405", features = ["serde"] } -radix-blueprint-schema-init = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-a583a405", features = ["serde"] } -radix-engine-toolkit-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-a583a405" } +sbor = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d", features = ["serde"] } +radix-transactions = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d" } +radix-transaction-scenarios = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d" } +radix-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d", features = ["serde"] } +radix-engine-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d" } +radix-engine = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d" } +radix-substate-store-impls = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d" } +radix-substate-store-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d" } +radix-substate-store-queries = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d" } +radix-rust = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d", features = ["serde"] } +radix-blueprint-schema-init = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d", features = ["serde"] } +radix-engine-toolkit-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d" } itertools = { version = "=0.10.5" } jni = { version = "=0.19.0" } diff --git a/core-rust/core-api-server/core-api-schema.yaml b/core-rust/core-api-server/core-api-schema.yaml index b3ec6a32a2..555fad8e41 100644 --- a/core-rust/core-api-server/core-api-schema.yaml +++ b/core-rust/core-api-server/core-api-schema.yaml @@ -148,7 +148,7 @@ tags: Once submitted, a transaction payload can end up being either rejected or committed. Transactions get rejected if they fail to pass certain criteria at the given time. A transaction payload can be marked as a: - - **Permanent Rejection** if it is never possible for it to be committed (eg it's statically invalid, or only valid up until epoch 100 and it's now epoch 101) + - **Permanent Rejection** if it is never possible for it to be committed (e.g. it's statically invalid, or only valid up until epoch 100 and it's now epoch 101) - **Temporary Rejection** if it still may be possible that the transaction payload could be committed A given intent typically is only part of one submitted notarized payload, but it's possible for a notary to notarize and submit multiple payloads for the same intent. @@ -1444,6 +1444,12 @@ components: message: description: The optional transaction message. Only returned if present and enabled in `TransactionFormatOptions` on your request. $ref: "#/components/schemas/TransactionMessage" + NotarizedTransactionV2: + type: object + properties: + todo: + type: string + # TODO:CUTTLEFISH TransactionMessageType: type: string enum: @@ -2152,6 +2158,7 @@ components: - Main - Schema - BootLoader + - ProtocolUpdateStatus PartitionKind: type: string description: | @@ -3291,6 +3298,8 @@ components: - TypeInfo - SystemBoot - KernelBoot + - TransactionValidationConfiguration + - ProtocolUpdateStatusSummary ObjectSubstateTypeReferenceType: type: string enum: @@ -3796,7 +3805,7 @@ components: # - [SubstateSpecifier] is either: # - Field[SubstateDescriptor] for Field partitions # - [SubstateDescriptor]Entry for Collection partitions (KeyValueStore, Index and SortedIndex) - # - [SubstateTypeVersion] is empty ("") for V1 substates, but will eg be V2/V3/V4 for newer substate versions + # - [SubstateTypeVersion] is empty ("") for V1 substates, but will e.g. be V2/V3/V4 for newer substate versions # # And then define: # - [SubstateName] = [SubstateType]Substate @@ -3812,6 +3821,8 @@ components: BootLoaderModuleFieldSystemBoot: '#/components/schemas/BootLoaderModuleFieldSystemBootSubstate' BootLoaderModuleFieldVmBoot: '#/components/schemas/BootLoaderModuleFieldVmBootSubstate' BootLoaderModuleFieldKernelBoot: '#/components/schemas/BootLoaderModuleFieldKernelBootSubstate' + BootLoaderModuleFieldTransactionValidationConfiguration: '#/components/schemas/BootLoaderModuleFieldTransactionValidationConfigurationSubstate' + ProtocolUpdateStatusModuleFieldSummary: '#/components/schemas/ProtocolUpdateStatusModuleFieldSummarySubstate' TypeInfoModuleFieldTypeInfo: '#/components/schemas/TypeInfoModuleFieldTypeInfoSubstate' RoleAssignmentModuleFieldOwnerRole: '#/components/schemas/RoleAssignmentModuleFieldOwnerRoleSubstate' RoleAssignmentModuleRuleEntry: '#/components/schemas/RoleAssignmentModuleRuleEntrySubstate' @@ -3918,6 +3929,8 @@ components: - AccountLockerAccountClaimsEntry - BootLoaderModuleFieldSystemBoot - BootLoaderModuleFieldKernelBoot + - BootLoaderModuleFieldTransactionValidationConfiguration + - ProtocolUpdateStatusModuleFieldSummary ################################################ # GENERAL / SHARED MODELS - substate key types # ################################################ @@ -4085,8 +4098,16 @@ components: required: - system_parameters properties: + system_version: + $ref: '#/components/schemas/SystemVersion' system_parameters: $ref: '#/components/schemas/SystemParameters' + SystemVersion: + description: The SystemVersion was added at Cuttlefish. Before that it can be assumed to be V1. + type: string + enum: + - V1 + - V2 SystemParameters: type: object required: @@ -4291,6 +4312,29 @@ components: $ref: '#/components/schemas/BootLoaderModuleFieldKernelBootValue' BootLoaderModuleFieldKernelBootValue: type: object + properties: + always_visible_nodes_version: + $ref: '#/components/schemas/AlwaysVisibleGlobalNodesVersion' + AlwaysVisibleGlobalNodesVersion: + type: string + description: | + This was added in Cuttlefish. Before that, this value was missing, but can be assumed to be V1. + enum: + - V1 + - V2 + BootLoaderModuleFieldTransactionValidationConfigurationSubstate: + allOf: + - $ref: '#/components/schemas/Substate' + - type: object + # TODO:CUTTLEFISH + ProtocolUpdateStatusModuleFieldSummarySubstate: + allOf: + - $ref: '#/components/schemas/Substate' + - type: object + description: | + This substate is only used in resim to track protocol update status. + It isn't expected to be seen in the node, which uses proofs to track protocol update status. + # TODO:CUTTLEFISH TypeInfoModuleFieldTypeInfoSubstate: allOf: - $ref: '#/components/schemas/Substate' @@ -6895,6 +6939,7 @@ components: - SignedTransactionIntent - TransactionIntent - LedgerTransaction + - NotarizedTransactionV2 ParsedTransaction: type: object required: @@ -6907,6 +6952,7 @@ components: mapping: # NOTE: These need to match ParsedTransactionType NotarizedTransaction: '#/components/schemas/ParsedNotarizedTransaction' + NotarizedTransactionV2: '#/components/schemas/ParsedNotarizedTransactionV2' SignedTransactionIntent: '#/components/schemas/ParsedSignedTransactionIntent' TransactionIntent: '#/components/schemas/ParsedTransactionIntent' LedgerTransaction: '#/components/schemas/ParsedLedgerTransaction' @@ -6927,7 +6973,38 @@ components: If the transaction is known to not be valid, this gives a reason. Different levels of validation are performed, dependent on the validation mode. Note that, even if validation mode is Static or Full, the transaction may - still be rejected or fail due to issues at runtime (eg if the loan cannot be repaid). + still be rejected or fail due to issues at runtime (e.g. if the loan cannot be repaid). + required: + - reason + - is_permanent + properties: + reason: + type: string + description: | + The error message. + is_permanent: + type: boolean + description: | + Whether the error is known to be permanent, or not. + This relates to whether the transaction would be rejected permanently or temporarily if submitted. + ParsedNotarizedTransactionV2: + allOf: + - $ref: "#/components/schemas/ParsedTransaction" + - type: object + required: + - identifiers + properties: + notarized_transaction: + $ref: "#/components/schemas/NotarizedTransactionV2" + identifiers: + $ref: "#/components/schemas/ParsedNotarizedTransactionIdentifiers" + validation_error: + type: object + description: | + If the transaction is known to not be valid, this gives a reason. + Different levels of validation are performed, dependent on the validation mode. + Note that, even if validation mode is Static or Full, the transaction may + still be rejected or fail due to issues at runtime (e.g. if the loan cannot be repaid). required: - reason - is_permanent @@ -8110,6 +8187,7 @@ components: # NOTE: These need to match LedgerTransactionType Genesis: '#/components/schemas/GenesisLedgerTransaction' User: '#/components/schemas/UserLedgerTransaction' + UserV2: '#/components/schemas/UserLedgerTransactionV2' RoundUpdate: '#/components/schemas/RoundUpdateLedgerTransaction' Flash: '#/components/schemas/FlashLedgerTransaction' GenesisLedgerTransaction: @@ -8135,6 +8213,15 @@ components: properties: notarized_transaction: $ref: "#/components/schemas/NotarizedTransaction" + UserLedgerTransactionV2: + allOf: + - $ref: "#/components/schemas/LedgerTransaction" + - type: object + required: + - notarized_transaction + properties: + notarized_transaction: + $ref: "#/components/schemas/NotarizedTransactionV2" RoundUpdateLedgerTransaction: allOf: - $ref: "#/components/schemas/LedgerTransaction" diff --git a/core-rust/core-api-server/src/core_api/conversions/addressing.rs b/core-rust/core-api-server/src/core_api/conversions/addressing.rs index 8268910b9e..7fd061d168 100644 --- a/core-rust/core-api-server/src/core_api/conversions/addressing.rs +++ b/core-rust/core-api-server/src/core_api/conversions/addressing.rs @@ -142,8 +142,16 @@ pub fn to_api_substate_id( ), TypedSubstateKey::BootLoader(TypedBootLoaderSubstateKey::BootLoaderField( BootLoaderField::TransactionValidationConfiguration, - )) => todo!(), - TypedSubstateKey::ProtocolUpdateStatus(_) => todo!(), + )) => ( + SubstateType::BootLoaderModuleFieldTransactionValidationConfiguration, + models::PartitionKind::Field, + ), + TypedSubstateKey::ProtocolUpdateStatus(TypedProtocolUpdateStatusSubstateKey::ProtocolUpdateStatusField( + ProtocolUpdateStatusField::Summary + )) => ( + SubstateType::ProtocolUpdateStatusModuleFieldSummary, + models::PartitionKind::Field, + ), TypedSubstateKey::TypeInfo(TypedTypeInfoSubstateKey::TypeInfoField( TypeInfoField::TypeInfo, )) => ( @@ -463,7 +471,7 @@ pub fn to_api_substate_id( let entity_module = match typed_substate_key { TypedSubstateKey::BootLoader(_) => models::EntityModule::BootLoader, - TypedSubstateKey::ProtocolUpdateStatus(_) => todo!(), + TypedSubstateKey::ProtocolUpdateStatus(_) => models::EntityModule::ProtocolUpdateStatus, TypedSubstateKey::TypeInfo(_) => models::EntityModule::TypeInfo, TypedSubstateKey::RoleAssignmentModule(_) => models::EntityModule::RoleAssignment, TypedSubstateKey::RoyaltyModule(_) => models::EntityModule::Royalty, diff --git a/core-rust/core-api-server/src/core_api/conversions/receipt.rs b/core-rust/core-api-server/src/core_api/conversions/receipt.rs index 4b28aa99d0..1530a03f7e 100644 --- a/core-rust/core-api-server/src/core_api/conversions/receipt.rs +++ b/core-rust/core-api-server/src/core_api/conversions/receipt.rs @@ -148,8 +148,8 @@ pub fn to_api_substate_system_structure( SystemFieldKind::VmBoot => models::SystemFieldKind::VmBoot, SystemFieldKind::SystemBoot => models::SystemFieldKind::SystemBoot, SystemFieldKind::KernelBoot => models::SystemFieldKind::KernelBoot, - SystemFieldKind::TransactionValidationConfiguration => todo!(), - SystemFieldKind::ProtocolUpdateStatusSummary => todo!(), + SystemFieldKind::TransactionValidationConfiguration => models::SystemFieldKind::TransactionValidationConfiguration, + SystemFieldKind::ProtocolUpdateStatusSummary => models::SystemFieldKind::ProtocolUpdateStatusSummary, }, } } diff --git a/core-rust/core-api-server/src/core_api/conversions/substates/boot_loader_module.rs b/core-rust/core-api-server/src/core_api/conversions/substates/boot_loader_module.rs index 17d900760a..1bc4ee042a 100644 --- a/core-rust/core-api-server/src/core_api/conversions/substates/boot_loader_module.rs +++ b/core-rust/core-api-server/src/core_api/conversions/substates/boot_loader_module.rs @@ -1,8 +1,7 @@ use super::super::*; use crate::core_api::models; - -use crate::engine_prelude::*; +use crate::prelude::*; pub fn to_api_system_boot_substate( context: &MappingContext, @@ -10,10 +9,18 @@ pub fn to_api_system_boot_substate( substate: &SystemBoot, ) -> Result { let value = match substate { - SystemBoot::V1(system_parameters) => models::BootLoaderModuleFieldSystemBootValue::new( - to_api_system_parameters(context, system_parameters)?, - ), - SystemBoot::V2(..) => todo!(), + SystemBoot::V1(system_parameters) => { + models::BootLoaderModuleFieldSystemBootValue { + system_version: None, + system_parameters: Box::new(to_api_system_parameters(context, system_parameters)?), + } + }, + SystemBoot::V2(system_version, system_parameters) => { + models::BootLoaderModuleFieldSystemBootValue { + system_version: Some(to_api_system_version(system_version)), + system_parameters: Box::new(to_api_system_parameters(context, system_parameters)?), + } + }, }; Ok(models::Substate::BootLoaderModuleFieldSystemBootSubstate { @@ -22,6 +29,15 @@ pub fn to_api_system_boot_substate( }) } +fn to_api_system_version( + system_version: &SystemVersion +) -> models::SystemVersion { + match system_version { + SystemVersion::V1 => models::SystemVersion::V1, + SystemVersion::V2 => models::SystemVersion::V2, + } +} + pub fn to_api_vm_boot_substate( _context: &MappingContext, _state_mapping_lookups: &StateMappingLookups, @@ -46,13 +62,24 @@ pub fn to_api_kernel_boot_substate( ) -> Result { let value = match substate { // Note: this is how OpenAPI generator represents an empty object type, even when named: - KernelBoot::V1 => serde_json::Value::Object(serde_json::Map::default()), - KernelBoot::V2 { .. } => todo!(), + KernelBoot::V1 => { + models::BootLoaderModuleFieldKernelBootValue { + always_visible_nodes_version: None, + } + }, + KernelBoot::V2 { global_nodes_version } => { + models::BootLoaderModuleFieldKernelBootValue { + always_visible_nodes_version: Some(match global_nodes_version { + AlwaysVisibleGlobalNodesVersion::V1 => models::AlwaysVisibleGlobalNodesVersion::V1, + AlwaysVisibleGlobalNodesVersion::V2 => models::AlwaysVisibleGlobalNodesVersion::V2, + }), + } + }, }; Ok(models::Substate::BootLoaderModuleFieldKernelBootSubstate { is_locked: false, - value, + value: Box::new(value), }) } @@ -169,3 +196,35 @@ fn to_api_limit_parameters( max_number_of_events: to_api_usize_as_string(*max_number_of_events), }) } + +pub fn to_api_transaction_validator_configuration_substate( + _context: &MappingContext, + substate: &TransactionValidationConfigurationSubstate, +) -> Result { + let value = match substate.as_versions() { + TransactionValidationConfigurationVersions::V1(config) => { + let TransactionValidationConfigV1 { + max_signer_signatures_per_intent, + max_references_per_intent, + min_tip_percentage, + max_tip_percentage, + max_epoch_range, + max_instructions, + message_validation, + allow_notary_to_duplicate_signer, + preparation_settings, + manifest_validation, + v2_transactions_allowed, + min_tip_basis_points, + max_tip_basis_points, + max_subintent_depth, + max_total_signer_signatures, + max_total_references, + } = config; + + // TODO: Add this to the substate. + }, + }; + + Ok(models::Substate::BootLoaderModuleFieldTransactionValidationConfigurationSubstate { is_locked: false }) +} \ No newline at end of file diff --git a/core-rust/core-api-server/src/core_api/conversions/substates/mod.rs b/core-rust/core-api-server/src/core_api/conversions/substates/mod.rs index a2aa07989c..755ea82063 100644 --- a/core-rust/core-api-server/src/core_api/conversions/substates/mod.rs +++ b/core-rust/core-api-server/src/core_api/conversions/substates/mod.rs @@ -10,6 +10,7 @@ mod generic; mod metadata_module; mod package; mod pools; +mod protocol_update_status_module; mod resource; mod royalty_module; mod substate; @@ -26,6 +27,7 @@ pub use generic::*; pub use metadata_module::*; pub use package::*; pub use pools::*; +pub use protocol_update_status_module::*; pub use resource::*; pub use royalty_module::*; pub use substate::*; diff --git a/core-rust/core-api-server/src/core_api/conversions/substates/protocol_update_status_module.rs b/core-rust/core-api-server/src/core_api/conversions/substates/protocol_update_status_module.rs new file mode 100644 index 0000000000..c3ff377880 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/conversions/substates/protocol_update_status_module.rs @@ -0,0 +1,18 @@ +use radix_engine::updates::{ProtocolUpdateStatusSummary, ProtocolUpdateStatusSummarySubstate}; + +use super::super::*; + +use crate::core_api::models; +use crate::prelude::*; + +pub fn to_api_protocol_update_status_substate( + context: &MappingContext, + substate: &ProtocolUpdateStatusSummarySubstate, +) -> Result { + let ProtocolUpdateStatusSummary { + protocol_version, + update_status, + } = substate.as_unique_version(); + + Ok(models::Substate::ProtocolUpdateStatusModuleFieldSummarySubstate { is_locked: false }) +} \ No newline at end of file diff --git a/core-rust/core-api-server/src/core_api/conversions/substates/substate.rs b/core-rust/core-api-server/src/core_api/conversions/substates/substate.rs index 0bfdb3ee85..92cbf0c6f2 100644 --- a/core-rust/core-api-server/src/core_api/conversions/substates/substate.rs +++ b/core-rust/core-api-server/src/core_api/conversions/substates/substate.rs @@ -20,10 +20,12 @@ pub fn to_api_substate( TypedSubstateValue::BootLoader(BootLoaderSubstateValue::Kernel(kernel_boot_substate)) => { to_api_kernel_boot_substate(context, state_mapping_lookups, kernel_boot_substate)? } - TypedSubstateValue::BootLoader(BootLoaderSubstateValue::TransactionValidation(_)) => { - todo!() + TypedSubstateValue::BootLoader(BootLoaderSubstateValue::TransactionValidation(substate)) => { + to_api_transaction_validator_configuration_substate(context, substate)? } - TypedSubstateValue::ProtocolUpdateStatus(_) => todo!(), + TypedSubstateValue::ProtocolUpdateStatus(ProtocolUpdateStatusSubstateValue::Summary(substate)) => { + to_api_protocol_update_status_substate(context, substate)? + }, TypedSubstateValue::TypeInfoModule(TypedTypeInfoModuleSubstateValue::TypeInfo( type_info_substate, )) => to_api_type_info_substate(context, state_mapping_lookups, type_info_substate)?, diff --git a/core-rust/core-api-server/src/core_api/generated/models/always_visible_global_nodes_version.rs b/core-rust/core-api-server/src/core_api/generated/models/always_visible_global_nodes_version.rs new file mode 100644 index 0000000000..03df4013cc --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/always_visible_global_nodes_version.rs @@ -0,0 +1,40 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + +/// AlwaysVisibleGlobalNodesVersion : This was added in Cuttlefish. Before that, this value was missing, but can be assumed to be V1. + +/// This was added in Cuttlefish. Before that, this value was missing, but can be assumed to be V1. +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, serde::Serialize, serde::Deserialize)] +pub enum AlwaysVisibleGlobalNodesVersion { + #[serde(rename = "V1")] + V1, + #[serde(rename = "V2")] + V2, + +} + +impl ToString for AlwaysVisibleGlobalNodesVersion { + fn to_string(&self) -> String { + match self { + Self::V1 => String::from("V1"), + Self::V2 => String::from("V2"), + } + } +} + +impl Default for AlwaysVisibleGlobalNodesVersion { + fn default() -> AlwaysVisibleGlobalNodesVersion { + Self::V1 + } +} + + + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_kernel_boot_substate.rs b/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_kernel_boot_substate.rs index 7b17833597..46cb105d05 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_kernel_boot_substate.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_kernel_boot_substate.rs @@ -18,15 +18,15 @@ pub struct BootLoaderModuleFieldKernelBootSubstate { #[serde(rename = "is_locked")] pub is_locked: bool, #[serde(rename = "value")] - pub value: serde_json::Value, + pub value: Box, } impl BootLoaderModuleFieldKernelBootSubstate { - pub fn new(substate_type: crate::core_api::generated::models::SubstateType, is_locked: bool, value: serde_json::Value) -> BootLoaderModuleFieldKernelBootSubstate { + pub fn new(substate_type: crate::core_api::generated::models::SubstateType, is_locked: bool, value: crate::core_api::generated::models::BootLoaderModuleFieldKernelBootValue) -> BootLoaderModuleFieldKernelBootSubstate { BootLoaderModuleFieldKernelBootSubstate { substate_type, is_locked, - value, + value: Box::new(value), } } } diff --git a/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_kernel_boot_substate_all_of.rs b/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_kernel_boot_substate_all_of.rs index 18a8dc9ff4..7ed7387887 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_kernel_boot_substate_all_of.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_kernel_boot_substate_all_of.rs @@ -14,13 +14,13 @@ #[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] pub struct BootLoaderModuleFieldKernelBootSubstateAllOf { #[serde(rename = "value")] - pub value: serde_json::Value, + pub value: Box, } impl BootLoaderModuleFieldKernelBootSubstateAllOf { - pub fn new(value: serde_json::Value) -> BootLoaderModuleFieldKernelBootSubstateAllOf { + pub fn new(value: crate::core_api::generated::models::BootLoaderModuleFieldKernelBootValue) -> BootLoaderModuleFieldKernelBootSubstateAllOf { BootLoaderModuleFieldKernelBootSubstateAllOf { - value, + value: Box::new(value), } } } diff --git a/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_kernel_boot_value.rs b/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_kernel_boot_value.rs new file mode 100644 index 0000000000..9bbba0d905 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_kernel_boot_value.rs @@ -0,0 +1,28 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct BootLoaderModuleFieldKernelBootValue { + #[serde(rename = "always_visible_nodes_version", skip_serializing_if = "Option::is_none")] + pub always_visible_nodes_version: Option, +} + +impl BootLoaderModuleFieldKernelBootValue { + pub fn new() -> BootLoaderModuleFieldKernelBootValue { + BootLoaderModuleFieldKernelBootValue { + always_visible_nodes_version: None, + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_system_boot_value.rs b/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_system_boot_value.rs index 636da90a0b..f4f0bbc643 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_system_boot_value.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_system_boot_value.rs @@ -13,6 +13,8 @@ #[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] pub struct BootLoaderModuleFieldSystemBootValue { + #[serde(rename = "system_version", skip_serializing_if = "Option::is_none")] + pub system_version: Option, #[serde(rename = "system_parameters")] pub system_parameters: Box, } @@ -20,6 +22,7 @@ pub struct BootLoaderModuleFieldSystemBootValue { impl BootLoaderModuleFieldSystemBootValue { pub fn new(system_parameters: crate::core_api::generated::models::SystemParameters) -> BootLoaderModuleFieldSystemBootValue { BootLoaderModuleFieldSystemBootValue { + system_version: None, system_parameters: Box::new(system_parameters), } } diff --git a/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_transaction_validation_configuration_substate.rs b/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_transaction_validation_configuration_substate.rs new file mode 100644 index 0000000000..ea4600702b --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/boot_loader_module_field_transaction_validation_configuration_substate.rs @@ -0,0 +1,31 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct BootLoaderModuleFieldTransactionValidationConfigurationSubstate { + #[serde(rename = "substate_type")] + pub substate_type: crate::core_api::generated::models::SubstateType, + #[serde(rename = "is_locked")] + pub is_locked: bool, +} + +impl BootLoaderModuleFieldTransactionValidationConfigurationSubstate { + pub fn new(substate_type: crate::core_api::generated::models::SubstateType, is_locked: bool) -> BootLoaderModuleFieldTransactionValidationConfigurationSubstate { + BootLoaderModuleFieldTransactionValidationConfigurationSubstate { + substate_type, + is_locked, + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/entity_module.rs b/core-rust/core-api-server/src/core_api/generated/models/entity_module.rs index b9576052b0..535cbf19eb 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/entity_module.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/entity_module.rs @@ -26,6 +26,8 @@ pub enum EntityModule { Schema, #[serde(rename = "BootLoader")] BootLoader, + #[serde(rename = "ProtocolUpdateStatus")] + ProtocolUpdateStatus, } @@ -39,6 +41,7 @@ impl ToString for EntityModule { Self::Main => String::from("Main"), Self::Schema => String::from("Schema"), Self::BootLoader => String::from("BootLoader"), + Self::ProtocolUpdateStatus => String::from("ProtocolUpdateStatus"), } } } diff --git a/core-rust/core-api-server/src/core_api/generated/models/ledger_transaction.rs b/core-rust/core-api-server/src/core_api/generated/models/ledger_transaction.rs index 8fdf39a251..e645f9597d 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/ledger_transaction.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/ledger_transaction.rs @@ -51,6 +51,14 @@ pub enum LedgerTransaction { #[serde(rename = "notarized_transaction")] notarized_transaction: Box, }, + #[serde(rename="UserV2")] + UserLedgerTransactionV2 { + /// The hex-encoded full ledger transaction payload. Only returned if enabled in TransactionFormatOptions on your request. + #[serde(rename = "payload_hex", skip_serializing_if = "Option::is_none")] + payload_hex: Option, + #[serde(rename = "notarized_transaction")] + notarized_transaction: Box, + }, } diff --git a/core-rust/core-api-server/src/core_api/generated/models/mod.rs b/core-rust/core-api-server/src/core_api/generated/models/mod.rs index d64fa66925..f932be6659 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/mod.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/mod.rs @@ -60,6 +60,8 @@ pub mod all_of_proof_rule_all_of; pub use self::all_of_proof_rule_all_of::AllOfProofRuleAllOf; pub mod allow_all_access_rule; pub use self::allow_all_access_rule::AllowAllAccessRule; +pub mod always_visible_global_nodes_version; +pub use self::always_visible_global_nodes_version::AlwaysVisibleGlobalNodesVersion; pub mod amount_of_proof_rule; pub use self::amount_of_proof_rule::AmountOfProofRule; pub mod amount_of_proof_rule_all_of; @@ -130,12 +132,16 @@ pub mod boot_loader_module_field_kernel_boot_substate; pub use self::boot_loader_module_field_kernel_boot_substate::BootLoaderModuleFieldKernelBootSubstate; pub mod boot_loader_module_field_kernel_boot_substate_all_of; pub use self::boot_loader_module_field_kernel_boot_substate_all_of::BootLoaderModuleFieldKernelBootSubstateAllOf; +pub mod boot_loader_module_field_kernel_boot_value; +pub use self::boot_loader_module_field_kernel_boot_value::BootLoaderModuleFieldKernelBootValue; pub mod boot_loader_module_field_system_boot_substate; pub use self::boot_loader_module_field_system_boot_substate::BootLoaderModuleFieldSystemBootSubstate; pub mod boot_loader_module_field_system_boot_substate_all_of; pub use self::boot_loader_module_field_system_boot_substate_all_of::BootLoaderModuleFieldSystemBootSubstateAllOf; pub mod boot_loader_module_field_system_boot_value; pub use self::boot_loader_module_field_system_boot_value::BootLoaderModuleFieldSystemBootValue; +pub mod boot_loader_module_field_transaction_validation_configuration_substate; +pub use self::boot_loader_module_field_transaction_validation_configuration_substate::BootLoaderModuleFieldTransactionValidationConfigurationSubstate; pub mod boot_loader_module_field_vm_boot_substate; pub use self::boot_loader_module_field_vm_boot_substate::BootLoaderModuleFieldVmBootSubstate; pub mod boot_loader_module_field_vm_boot_substate_all_of; @@ -662,6 +668,8 @@ pub mod non_fungible_vault_field_frozen_status_value; pub use self::non_fungible_vault_field_frozen_status_value::NonFungibleVaultFieldFrozenStatusValue; pub mod notarized_transaction; pub use self::notarized_transaction::NotarizedTransaction; +pub mod notarized_transaction_v2; +pub use self::notarized_transaction_v2::NotarizedTransactionV2; pub mod object_field_structure; pub use self::object_field_structure::ObjectFieldStructure; pub mod object_field_structure_all_of; @@ -772,6 +780,10 @@ pub mod parsed_notarized_transaction_all_of_validation_error; pub use self::parsed_notarized_transaction_all_of_validation_error::ParsedNotarizedTransactionAllOfValidationError; pub mod parsed_notarized_transaction_identifiers; pub use self::parsed_notarized_transaction_identifiers::ParsedNotarizedTransactionIdentifiers; +pub mod parsed_notarized_transaction_v2; +pub use self::parsed_notarized_transaction_v2::ParsedNotarizedTransactionV2; +pub mod parsed_notarized_transaction_v2_all_of; +pub use self::parsed_notarized_transaction_v2_all_of::ParsedNotarizedTransactionV2AllOf; pub mod parsed_signed_transaction_intent; pub use self::parsed_signed_transaction_intent::ParsedSignedTransactionIntent; pub mod parsed_signed_transaction_intent_all_of; @@ -836,6 +848,8 @@ pub mod protocol_update_ledger_proof_origin; pub use self::protocol_update_ledger_proof_origin::ProtocolUpdateLedgerProofOrigin; pub mod protocol_update_ledger_proof_origin_all_of; pub use self::protocol_update_ledger_proof_origin_all_of::ProtocolUpdateLedgerProofOriginAllOf; +pub mod protocol_update_status_module_field_summary_substate; +pub use self::protocol_update_status_module_field_summary_substate::ProtocolUpdateStatusModuleFieldSummarySubstate; pub mod protocol_version_readiness; pub use self::protocol_version_readiness::ProtocolVersionReadiness; pub mod public_key; @@ -1108,6 +1122,8 @@ pub mod system_schema_structure; pub use self::system_schema_structure::SystemSchemaStructure; pub mod system_transaction; pub use self::system_transaction::SystemTransaction; +pub mod system_version; +pub use self::system_version::SystemVersion; pub mod target_identifier; pub use self::target_identifier::TargetIdentifier; pub mod target_identifier_type; @@ -1218,6 +1234,10 @@ pub mod user_ledger_transaction; pub use self::user_ledger_transaction::UserLedgerTransaction; pub mod user_ledger_transaction_all_of; pub use self::user_ledger_transaction_all_of::UserLedgerTransactionAllOf; +pub mod user_ledger_transaction_v2; +pub use self::user_ledger_transaction_v2::UserLedgerTransactionV2; +pub mod user_ledger_transaction_v2_all_of; +pub use self::user_ledger_transaction_v2_all_of::UserLedgerTransactionV2AllOf; pub mod validator_fee_change_request; pub use self::validator_fee_change_request::ValidatorFeeChangeRequest; pub mod validator_field_protocol_update_readiness_signal_substate; diff --git a/core-rust/core-api-server/src/core_api/generated/models/notarized_transaction_v2.rs b/core-rust/core-api-server/src/core_api/generated/models/notarized_transaction_v2.rs new file mode 100644 index 0000000000..fb03092588 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/notarized_transaction_v2.rs @@ -0,0 +1,28 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct NotarizedTransactionV2 { + #[serde(rename = "todo", skip_serializing_if = "Option::is_none")] + pub todo: Option, +} + +impl NotarizedTransactionV2 { + pub fn new() -> NotarizedTransactionV2 { + NotarizedTransactionV2 { + todo: None, + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/parsed_notarized_transaction_all_of_validation_error.rs b/core-rust/core-api-server/src/core_api/generated/models/parsed_notarized_transaction_all_of_validation_error.rs index f47cda2488..57f8b28288 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/parsed_notarized_transaction_all_of_validation_error.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/parsed_notarized_transaction_all_of_validation_error.rs @@ -8,7 +8,7 @@ * Generated by: https://openapi-generator.tech */ -/// ParsedNotarizedTransactionAllOfValidationError : If the transaction is known to not be valid, this gives a reason. Different levels of validation are performed, dependent on the validation mode. Note that, even if validation mode is Static or Full, the transaction may still be rejected or fail due to issues at runtime (eg if the loan cannot be repaid). +/// ParsedNotarizedTransactionAllOfValidationError : If the transaction is known to not be valid, this gives a reason. Different levels of validation are performed, dependent on the validation mode. Note that, even if validation mode is Static or Full, the transaction may still be rejected or fail due to issues at runtime (e.g. if the loan cannot be repaid). @@ -23,7 +23,7 @@ pub struct ParsedNotarizedTransactionAllOfValidationError { } impl ParsedNotarizedTransactionAllOfValidationError { - /// If the transaction is known to not be valid, this gives a reason. Different levels of validation are performed, dependent on the validation mode. Note that, even if validation mode is Static or Full, the transaction may still be rejected or fail due to issues at runtime (eg if the loan cannot be repaid). + /// If the transaction is known to not be valid, this gives a reason. Different levels of validation are performed, dependent on the validation mode. Note that, even if validation mode is Static or Full, the transaction may still be rejected or fail due to issues at runtime (e.g. if the loan cannot be repaid). pub fn new(reason: String, is_permanent: bool) -> ParsedNotarizedTransactionAllOfValidationError { ParsedNotarizedTransactionAllOfValidationError { reason, diff --git a/core-rust/core-api-server/src/core_api/generated/models/parsed_notarized_transaction_v2.rs b/core-rust/core-api-server/src/core_api/generated/models/parsed_notarized_transaction_v2.rs new file mode 100644 index 0000000000..0d7e0b7f0d --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/parsed_notarized_transaction_v2.rs @@ -0,0 +1,37 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct ParsedNotarizedTransactionV2 { + #[serde(rename = "type")] + pub _type: crate::core_api::generated::models::ParsedTransactionType, + #[serde(rename = "notarized_transaction", skip_serializing_if = "Option::is_none")] + pub notarized_transaction: Option>, + #[serde(rename = "identifiers")] + pub identifiers: Box, + #[serde(rename = "validation_error", skip_serializing_if = "Option::is_none")] + pub validation_error: Option>, +} + +impl ParsedNotarizedTransactionV2 { + pub fn new(_type: crate::core_api::generated::models::ParsedTransactionType, identifiers: crate::core_api::generated::models::ParsedNotarizedTransactionIdentifiers) -> ParsedNotarizedTransactionV2 { + ParsedNotarizedTransactionV2 { + _type, + notarized_transaction: None, + identifiers: Box::new(identifiers), + validation_error: None, + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/parsed_notarized_transaction_v2_all_of.rs b/core-rust/core-api-server/src/core_api/generated/models/parsed_notarized_transaction_v2_all_of.rs new file mode 100644 index 0000000000..cc4f1e5342 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/parsed_notarized_transaction_v2_all_of.rs @@ -0,0 +1,34 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct ParsedNotarizedTransactionV2AllOf { + #[serde(rename = "notarized_transaction", skip_serializing_if = "Option::is_none")] + pub notarized_transaction: Option>, + #[serde(rename = "identifiers")] + pub identifiers: Box, + #[serde(rename = "validation_error", skip_serializing_if = "Option::is_none")] + pub validation_error: Option>, +} + +impl ParsedNotarizedTransactionV2AllOf { + pub fn new(identifiers: crate::core_api::generated::models::ParsedNotarizedTransactionIdentifiers) -> ParsedNotarizedTransactionV2AllOf { + ParsedNotarizedTransactionV2AllOf { + notarized_transaction: None, + identifiers: Box::new(identifiers), + validation_error: None, + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/parsed_transaction.rs b/core-rust/core-api-server/src/core_api/generated/models/parsed_transaction.rs index b233a4027b..a6f84586d4 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/parsed_transaction.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/parsed_transaction.rs @@ -29,6 +29,15 @@ pub enum ParsedTransaction { #[serde(rename = "validation_error", skip_serializing_if = "Option::is_none")] validation_error: Option>, }, + #[serde(rename="NotarizedTransactionV2")] + ParsedNotarizedTransactionV2 { + #[serde(rename = "notarized_transaction", skip_serializing_if = "Option::is_none")] + notarized_transaction: Option>, + #[serde(rename = "identifiers")] + identifiers: Box, + #[serde(rename = "validation_error", skip_serializing_if = "Option::is_none")] + validation_error: Option>, + }, #[serde(rename="SignedTransactionIntent")] ParsedSignedTransactionIntent { #[serde(rename = "signed_intent", skip_serializing_if = "Option::is_none")] diff --git a/core-rust/core-api-server/src/core_api/generated/models/parsed_transaction_type.rs b/core-rust/core-api-server/src/core_api/generated/models/parsed_transaction_type.rs index e7fd3cb98c..64e50a02cd 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/parsed_transaction_type.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/parsed_transaction_type.rs @@ -21,6 +21,8 @@ pub enum ParsedTransactionType { TransactionIntent, #[serde(rename = "LedgerTransaction")] LedgerTransaction, + #[serde(rename = "NotarizedTransactionV2")] + NotarizedTransactionV2, } @@ -31,6 +33,7 @@ impl ToString for ParsedTransactionType { Self::SignedTransactionIntent => String::from("SignedTransactionIntent"), Self::TransactionIntent => String::from("TransactionIntent"), Self::LedgerTransaction => String::from("LedgerTransaction"), + Self::NotarizedTransactionV2 => String::from("NotarizedTransactionV2"), } } } diff --git a/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_module_field_summary_substate.rs b/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_module_field_summary_substate.rs new file mode 100644 index 0000000000..20827f1ba4 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_module_field_summary_substate.rs @@ -0,0 +1,31 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct ProtocolUpdateStatusModuleFieldSummarySubstate { + #[serde(rename = "substate_type")] + pub substate_type: crate::core_api::generated::models::SubstateType, + #[serde(rename = "is_locked")] + pub is_locked: bool, +} + +impl ProtocolUpdateStatusModuleFieldSummarySubstate { + pub fn new(substate_type: crate::core_api::generated::models::SubstateType, is_locked: bool) -> ProtocolUpdateStatusModuleFieldSummarySubstate { + ProtocolUpdateStatusModuleFieldSummarySubstate { + substate_type, + is_locked, + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/substate.rs b/core-rust/core-api-server/src/core_api/generated/models/substate.rs index bac09fa3ee..ea82f542e9 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/substate.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/substate.rs @@ -68,7 +68,7 @@ pub enum Substate { #[serde(rename = "is_locked")] is_locked: bool, #[serde(rename = "value")] - value: serde_json::Value, + value: Box, }, #[serde(rename="BootLoaderModuleFieldSystemBoot")] BootLoaderModuleFieldSystemBootSubstate { @@ -77,6 +77,11 @@ pub enum Substate { #[serde(rename = "value")] value: Box, }, + #[serde(rename="BootLoaderModuleFieldTransactionValidationConfiguration")] + BootLoaderModuleFieldTransactionValidationConfigurationSubstate { + #[serde(rename = "is_locked")] + is_locked: bool, + }, #[serde(rename="BootLoaderModuleFieldVmBoot")] BootLoaderModuleFieldVmBootSubstate { #[serde(rename = "is_locked")] @@ -332,6 +337,11 @@ pub enum Substate { #[serde(rename = "value")] value: Box, }, + #[serde(rename="ProtocolUpdateStatusModuleFieldSummary")] + ProtocolUpdateStatusModuleFieldSummarySubstate { + #[serde(rename = "is_locked")] + is_locked: bool, + }, #[serde(rename="RoleAssignmentModuleFieldOwnerRole")] RoleAssignmentModuleFieldOwnerRoleSubstate { #[serde(rename = "is_locked")] diff --git a/core-rust/core-api-server/src/core_api/generated/models/substate_type.rs b/core-rust/core-api-server/src/core_api/generated/models/substate_type.rs index bc079e6020..37e376ce27 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/substate_type.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/substate_type.rs @@ -120,6 +120,10 @@ pub enum SubstateType { BootLoaderModuleFieldSystemBoot, #[serde(rename = "BootLoaderModuleFieldKernelBoot")] BootLoaderModuleFieldKernelBoot, + #[serde(rename = "BootLoaderModuleFieldTransactionValidationConfiguration")] + BootLoaderModuleFieldTransactionValidationConfiguration, + #[serde(rename = "ProtocolUpdateStatusModuleFieldSummary")] + ProtocolUpdateStatusModuleFieldSummary, } @@ -180,6 +184,8 @@ impl ToString for SubstateType { Self::AccountLockerAccountClaimsEntry => String::from("AccountLockerAccountClaimsEntry"), Self::BootLoaderModuleFieldSystemBoot => String::from("BootLoaderModuleFieldSystemBoot"), Self::BootLoaderModuleFieldKernelBoot => String::from("BootLoaderModuleFieldKernelBoot"), + Self::BootLoaderModuleFieldTransactionValidationConfiguration => String::from("BootLoaderModuleFieldTransactionValidationConfiguration"), + Self::ProtocolUpdateStatusModuleFieldSummary => String::from("ProtocolUpdateStatusModuleFieldSummary"), } } } diff --git a/core-rust/core-api-server/src/core_api/generated/models/system_field_kind.rs b/core-rust/core-api-server/src/core_api/generated/models/system_field_kind.rs index 6ad487d612..7e3aa70ead 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/system_field_kind.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/system_field_kind.rs @@ -20,6 +20,10 @@ pub enum SystemFieldKind { SystemBoot, #[serde(rename = "KernelBoot")] KernelBoot, + #[serde(rename = "TransactionValidationConfiguration")] + TransactionValidationConfiguration, + #[serde(rename = "ProtocolUpdateStatusSummary")] + ProtocolUpdateStatusSummary, } @@ -30,6 +34,8 @@ impl ToString for SystemFieldKind { Self::TypeInfo => String::from("TypeInfo"), Self::SystemBoot => String::from("SystemBoot"), Self::KernelBoot => String::from("KernelBoot"), + Self::TransactionValidationConfiguration => String::from("TransactionValidationConfiguration"), + Self::ProtocolUpdateStatusSummary => String::from("ProtocolUpdateStatusSummary"), } } } diff --git a/core-rust/core-api-server/src/core_api/generated/models/system_version.rs b/core-rust/core-api-server/src/core_api/generated/models/system_version.rs new file mode 100644 index 0000000000..63056f3635 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/system_version.rs @@ -0,0 +1,40 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + +/// SystemVersion : The SystemVersion was added at Cuttlefish. Before that it can be assumed to be V1. + +/// The SystemVersion was added at Cuttlefish. Before that it can be assumed to be V1. +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, serde::Serialize, serde::Deserialize)] +pub enum SystemVersion { + #[serde(rename = "V1")] + V1, + #[serde(rename = "V2")] + V2, + +} + +impl ToString for SystemVersion { + fn to_string(&self) -> String { + match self { + Self::V1 => String::from("V1"), + Self::V2 => String::from("V2"), + } + } +} + +impl Default for SystemVersion { + fn default() -> SystemVersion { + Self::V1 + } +} + + + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/user_ledger_transaction_v2.rs b/core-rust/core-api-server/src/core_api/generated/models/user_ledger_transaction_v2.rs new file mode 100644 index 0000000000..3e2b966020 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/user_ledger_transaction_v2.rs @@ -0,0 +1,35 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct UserLedgerTransactionV2 { + #[serde(rename = "type")] + pub _type: crate::core_api::generated::models::LedgerTransactionType, + /// The hex-encoded full ledger transaction payload. Only returned if enabled in TransactionFormatOptions on your request. + #[serde(rename = "payload_hex", skip_serializing_if = "Option::is_none")] + pub payload_hex: Option, + #[serde(rename = "notarized_transaction")] + pub notarized_transaction: Box, +} + +impl UserLedgerTransactionV2 { + pub fn new(_type: crate::core_api::generated::models::LedgerTransactionType, notarized_transaction: crate::core_api::generated::models::NotarizedTransactionV2) -> UserLedgerTransactionV2 { + UserLedgerTransactionV2 { + _type, + payload_hex: None, + notarized_transaction: Box::new(notarized_transaction), + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/user_ledger_transaction_v2_all_of.rs b/core-rust/core-api-server/src/core_api/generated/models/user_ledger_transaction_v2_all_of.rs new file mode 100644 index 0000000000..f643753364 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/user_ledger_transaction_v2_all_of.rs @@ -0,0 +1,28 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct UserLedgerTransactionV2AllOf { + #[serde(rename = "notarized_transaction")] + pub notarized_transaction: Box, +} + +impl UserLedgerTransactionV2AllOf { + pub fn new(notarized_transaction: crate::core_api::generated::models::NotarizedTransactionV2) -> UserLedgerTransactionV2AllOf { + UserLedgerTransactionV2AllOf { + notarized_transaction: Box::new(notarized_transaction), + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/handlers/stream_transactions.rs b/core-rust/core-api-server/src/core_api/handlers/stream_transactions.rs index a97637d637..6b9cd72300 100644 --- a/core-rust/core-api-server/src/core_api/handlers/stream_transactions.rs +++ b/core-rust/core-api-server/src/core_api/handlers/stream_transactions.rs @@ -340,14 +340,26 @@ pub fn to_api_ledger_transaction( })?; models::LedgerTransaction::UserLedgerTransaction { payload_hex, - notarized_transaction: Box::new(to_api_notarized_transaction( + notarized_transaction: Box::new(to_api_notarized_transaction_v1( context, tx, &user_hashes, )?), } } - LedgerTransaction::UserV2(..) => todo!(), + LedgerTransaction::UserV2(tx) => { + let user_hashes = + hashes + .as_user() + .ok_or_else(|| MappingError::MismatchedTransactionIdentifiers { + message: "Transaction hashes for notarized transaction were not user" + .to_string(), + })?; + models::LedgerTransaction::UserLedgerTransactionV2 { + payload_hex, + notarized_transaction: Box::new(to_api_notarized_transaction_v2(context, tx, &user_hashes)?), + } + } LedgerTransaction::RoundUpdateV1(tx) => { models::LedgerTransaction::RoundUpdateLedgerTransaction { payload_hex, @@ -380,7 +392,7 @@ pub fn to_api_ledger_transaction( } #[tracing::instrument(skip_all)] -pub fn to_api_notarized_transaction( +pub fn to_api_notarized_transaction_v1( context: &MappingContext, notarized: &NotarizedTransactionV1, user_hashes: &UserTransactionHashes, @@ -413,6 +425,16 @@ pub fn to_api_notarized_transaction( }) } +pub fn to_api_notarized_transaction_v2( + context: &MappingContext, + notarized: &NotarizedTransactionV2, + user_hashes: &UserTransactionHashes, +) -> Result { + Ok(models::NotarizedTransactionV2 { + todo: Some("TODO:CUTTLEFISH".to_string()), + }) +} + #[tracing::instrument(skip_all)] pub fn to_api_signed_intent( context: &MappingContext, diff --git a/core-rust/core-api-server/src/core_api/handlers/transaction_parse.rs b/core-rust/core-api-server/src/core_api/handlers/transaction_parse.rs index 23123577d2..f155734883 100644 --- a/core-rust/core-api-server/src/core_api/handlers/transaction_parse.rs +++ b/core-rust/core-api-server/src/core_api/handlers/transaction_parse.rs @@ -4,7 +4,7 @@ use models::transaction_parse_request::{ParseMode, ResponseMode, ValidationMode} use models::transaction_parse_response::TransactionParseResponse; use super::{ - to_api_intent_v1, to_api_ledger_transaction, to_api_notarized_transaction, to_api_signed_intent, + to_api_intent_v1, to_api_ledger_transaction, to_api_notarized_transaction_v1, to_api_notarized_transaction_v2, to_api_signed_intent }; pub struct ParseContext<'a> { @@ -100,17 +100,17 @@ fn attempt_parsing_as_any_payload_type_and_map_for_api( Err(client_error("The payload isn't a valid notarized transaction, signed transaction intent, unsigned transaction intent or ledger transaction payload.")) } -struct ParsedNotarizedTransactionV1 { - model: NotarizedTransactionV1, +struct ParsedNotarizedTransaction { + model: UserTransaction, hashes: UserTransactionHashes, - prepared: PreparedNotarizedTransactionV1, + prepared: PreparedUserTransaction, validation: Option>, } fn attempt_parsing_as_notarized_transaction( context: &ParseContext, bytes: &[u8], -) -> Option { +) -> Option { let raw = RawNotarizedTransaction::from_slice(bytes); let prepared = raw .prepare(context.transaction_validator.preparation_settings()) @@ -118,15 +118,10 @@ fn attempt_parsing_as_notarized_transaction( let hashes = prepared.hashes(); - let prepared = match prepared { - PreparedUserTransaction::V1(prepared) => prepared, - PreparedUserTransaction::V2(_) => todo!(), - }; - - let model = NotarizedTransactionV1::from_raw(&raw).ok()?; + let model = UserTransaction::from_raw(&raw).ok()?; Some(match context.validation_mode { - ValidationMode::None => ParsedNotarizedTransactionV1 { + ValidationMode::None => ParsedNotarizedTransaction { model, hashes, prepared, @@ -140,7 +135,7 @@ fn attempt_parsing_as_notarized_transaction( .map(|_| ()) .map_err(MempoolRejectionReason::ValidationError), ); - ParsedNotarizedTransactionV1 { + ParsedNotarizedTransaction { model, hashes, prepared, @@ -168,7 +163,7 @@ fn attempt_parsing_as_notarized_transaction( } }) }); - ParsedNotarizedTransactionV1 { + ParsedNotarizedTransaction { model, hashes, prepared, @@ -180,17 +175,8 @@ fn attempt_parsing_as_notarized_transaction( fn to_api_parsed_notarized_transaction( context: &ParseContext, - parsed: ParsedNotarizedTransactionV1, -) -> Result> { - let model = match context.response_mode { - ResponseMode::Basic => None, - ResponseMode::Full => Some(Box::new(to_api_notarized_transaction( - &context.mapping_context, - &parsed.model, - &parsed.hashes, - )?)), - }; - + parsed: ParsedNotarizedTransaction, +) -> Result> { let validation_error = parsed .validation .and_then(|result| result.err()) @@ -201,36 +187,79 @@ fn to_api_parsed_notarized_transaction( }) }); - let ledger_hash = - PreparedLedgerTransactionInner::User(PreparedUserTransaction::V1(parsed.prepared)) - .get_ledger_hash(); + match (parsed.model, parsed.prepared) { + (UserTransaction::V1(model), PreparedUserTransaction::V1(prepared)) => { + let model = match context.response_mode { + ResponseMode::Basic => None, + ResponseMode::Full => Some(Box::new(to_api_notarized_transaction_v1( + &context.mapping_context, + &model, + &parsed.hashes, + )?)), + }; + + let ledger_hash = + PreparedLedgerTransactionInner::User(PreparedUserTransaction::V1(prepared)) + .get_ledger_hash(); + + Ok(models::ParsedTransaction::ParsedNotarizedTransaction { + notarized_transaction: model, + identifiers: Box::new(to_api_parsed_notarized_transaction_identifiers(context, &parsed.hashes, ledger_hash)?), + validation_error, + }) + + }, + (UserTransaction::V2(model), PreparedUserTransaction::V2(prepared)) => { + let model = match context.response_mode { + ResponseMode::Basic => None, + ResponseMode::Full => Some(Box::new(to_api_notarized_transaction_v2( + &context.mapping_context, + &model, + &parsed.hashes, + )?)), + }; + + let ledger_hash = + PreparedLedgerTransactionInner::User(PreparedUserTransaction::V2(prepared)) + .get_ledger_hash(); + + Ok(models::ParsedTransaction::ParsedNotarizedTransactionV2 { + notarized_transaction: model, + identifiers: Box::new(to_api_parsed_notarized_transaction_identifiers(context, &parsed.hashes, ledger_hash)?), + validation_error, + }) + }, + (UserTransaction::V1(_), _) | (UserTransaction::V2(_), _) => panic!("Unexpected combination"), + } +} - Ok(models::ParsedTransaction::ParsedNotarizedTransaction { - notarized_transaction: model, - identifiers: Box::new(models::ParsedNotarizedTransactionIdentifiers { - intent_hash: to_api_transaction_intent_hash(&parsed.hashes.transaction_intent_hash), - intent_hash_bech32m: to_api_hash_bech32m( - &context.mapping_context, - &parsed.hashes.transaction_intent_hash, - )?, - signed_intent_hash: to_api_signed_transaction_intent_hash( - &parsed.hashes.signed_transaction_intent_hash, - ), - signed_intent_hash_bech32m: to_api_hash_bech32m( - &context.mapping_context, - &parsed.hashes.signed_transaction_intent_hash, - )?, - payload_hash: to_api_notarized_transaction_hash( - &parsed.hashes.notarized_transaction_hash, - ), - payload_hash_bech32m: to_api_hash_bech32m( - &context.mapping_context, - &parsed.hashes.notarized_transaction_hash, - )?, - ledger_hash: to_api_ledger_hash(&ledger_hash), - ledger_hash_bech32m: to_api_hash_bech32m(&context.mapping_context, &ledger_hash)?, - }), - validation_error, +fn to_api_parsed_notarized_transaction_identifiers( + context: &ParseContext, + hashes: &UserTransactionHashes, + ledger_hash: LedgerTransactionHash, +) -> Result { + Ok(models::ParsedNotarizedTransactionIdentifiers { + intent_hash: to_api_transaction_intent_hash(&hashes.transaction_intent_hash), + intent_hash_bech32m: to_api_hash_bech32m( + &context.mapping_context, + &hashes.transaction_intent_hash, + )?, + signed_intent_hash: to_api_signed_transaction_intent_hash( + &hashes.signed_transaction_intent_hash, + ), + signed_intent_hash_bech32m: to_api_hash_bech32m( + &context.mapping_context, + &hashes.signed_transaction_intent_hash, + )?, + payload_hash: to_api_notarized_transaction_hash( + &hashes.notarized_transaction_hash, + ), + payload_hash_bech32m: to_api_hash_bech32m( + &context.mapping_context, + &hashes.notarized_transaction_hash, + )?, + ledger_hash: to_api_ledger_hash(&ledger_hash), + ledger_hash_bech32m: to_api_hash_bech32m(&context.mapping_context, &ledger_hash)?, }) } diff --git a/core-rust/state-manager/src/protocol/protocol_configs/config_printer.rs b/core-rust/state-manager/src/protocol/protocol_configs/config_printer.rs index 4cf981bf4f..ec137b0efc 100644 --- a/core-rust/state-manager/src/protocol/protocol_configs/config_printer.rs +++ b/core-rust/state-manager/src/protocol/protocol_configs/config_printer.rs @@ -17,7 +17,21 @@ use super::*; // ============================================================================ #[test] -fn print_protocol_config_code() { +fn print_fixed_config_code() { + let version = ProtocolVersionName::cuttlefish(); + let start_epoch = Epoch::of(1); + let end_epoch = Epoch::of(10000000); + let thresholds = vec![ + SignalledReadinessThreshold { + required_ratio_of_stake_supported: dec!(0.8), + required_consecutive_completed_epochs_of_support: 10, + } + ]; + output(version, start_epoch, end_epoch, thresholds, None) +} + +#[test] +fn print_calculated_protocol_config_code() { // PARAMETERS let calculator = CalculationParameters { expected_epoch_length: Duration::minutes(5), @@ -26,13 +40,12 @@ fn print_protocol_config_code() { base_epoch_effective_start: DateTime::::from_str("2024-05-09T18:01:00.000Z").unwrap(), }; - let version = ProtocolVersionName::babylon(); - let version_code = stringify!(ProtocolVersionName::babylon()); + let version = ProtocolVersionName::cuttlefish(); let target_start = DateTime::::from_str("2024-06-03T18:00:00.000Z").unwrap(); let enactment_window = Duration::days(28); let proposed_thresholds = [(dec!(0.75), Duration::days(14))]; - // OUTPUT + // CALCULATE let start_epoch = calculator .estimate_current_epoch_at(target_start) .next() @@ -51,6 +64,17 @@ fn print_protocol_config_code() { }) .collect::>(); + output(version, start_epoch, end_epoch, thresholds, Some(calculator)) +} + +fn output( + version: ProtocolVersionName, + start_epoch: Epoch, + end_epoch: Epoch, + thresholds: Vec, + calculator: Option, +) { + // OUTPUT let trigger = ProtocolUpdateTrigger::of( version.clone(), ProtocolUpdateEnactmentCondition::EnactAtStartOfEpochIfValidatorsReady { @@ -64,14 +88,11 @@ fn print_protocol_config_code() { .expect("Generated protocol update trigger should be valid"); let base_indent = " "; - println!("{base_indent}{version_code} => EnactAtStartOfEpochIfValidatorsReady {{"); + println!("{base_indent}ProtocolVersionName::{version}() => EnactAtStartOfEpochIfValidatorsReady {{"); println!( "{base_indent} // =================================================================" ); - println!( - "{base_indent} // PROTOCOL_VERSION: \"{}\"", - version.as_str() - ); + println!("{base_indent} // PROTOCOL_VERSION: \"{version}\""); println!( "{base_indent} // READINESS_SIGNAL: \"{}\"", trigger.readiness_signal_name() @@ -79,33 +100,44 @@ fn print_protocol_config_code() { println!( "{base_indent} // =================================================================" ); - println!("{base_indent} // The below estimates are based off:"); - println!( - "{base_indent} // - Calculating relative to epoch {}", - calculator.base_epoch.number(), - ); - println!( - "{base_indent} // - Using that epoch {} started at {}", - calculator.base_epoch.number(), - display_instant(calculator.base_epoch_effective_start), - ); - println!( - "{base_indent} // - Assuming epoch length will be {}", - display_duration(calculator.expected_epoch_length), - ); - println!( - "{base_indent} // =================================================================" - ); - println!( - "{base_indent} lower_bound_inclusive: Epoch::of({}), // estimated: {}", - start_epoch.number(), - display_instant(calculator.estimate_start_of_epoch(start_epoch)), - ); - println!( - "{base_indent} upper_bound_exclusive: Epoch::of({}), // estimated: {}", - end_epoch.number(), - display_instant(calculator.estimate_start_of_epoch(end_epoch)), - ); + if let Some(calculator) = &calculator { + println!("{base_indent} // The below estimates are based off:"); + println!( + "{base_indent} // - Calculating relative to epoch {}", + calculator.base_epoch.number(), + ); + println!( + "{base_indent} // - Using that epoch {} started at {}", + calculator.base_epoch.number(), + display_instant(calculator.base_epoch_effective_start), + ); + println!( + "{base_indent} // - Assuming epoch length will be {}", + display_duration(calculator.expected_epoch_length), + ); + println!( + "{base_indent} // =================================================================" + ); + println!( + "{base_indent} lower_bound_inclusive: Epoch::of({}), // estimated: {}", + start_epoch.number(), + display_instant(calculator.estimate_start_of_epoch(start_epoch)), + ); + println!( + "{base_indent} upper_bound_exclusive: Epoch::of({}), // estimated: {}", + end_epoch.number(), + display_instant(calculator.estimate_start_of_epoch(end_epoch)), + ); + } else { + println!( + "{base_indent} lower_bound_inclusive: Epoch::of({}),", + start_epoch.number(), + ); + println!( + "{base_indent} upper_bound_exclusive: Epoch::of({}),", + end_epoch.number(), + ); + } if thresholds.is_empty() { println!("{base_indent} readiness_thresholds: vec![],"); @@ -114,17 +146,24 @@ fn print_protocol_config_code() { for threshold in thresholds { let ratio = threshold.required_ratio_of_stake_supported; let epochs = threshold.required_consecutive_completed_epochs_of_support; - let est_duration = calculator.estimate_duration_of_full_epochs(epochs); println!("{base_indent} SignalledReadinessThreshold {{"); println!( "{base_indent} required_ratio_of_stake_supported: dec!({}),", ratio ); - println!( - "{base_indent} required_consecutive_completed_epochs_of_support: {}, // estimated: {}", - epochs, - display_duration(est_duration), - ); + if let Some(calculator) = &calculator { + let est_duration = calculator.estimate_duration_of_full_epochs(epochs); + println!( + "{base_indent} required_consecutive_completed_epochs_of_support: {}, // estimated: {}", + epochs, + display_duration(est_duration), + ); + } else { + println!( + "{base_indent} required_consecutive_completed_epochs_of_support: {},", + epochs, + ); + } println!("{base_indent} }},"); } println!("{base_indent} ],"); diff --git a/core-rust/state-manager/src/protocol/protocol_configs/dumunet_protocol_config.rs b/core-rust/state-manager/src/protocol/protocol_configs/dumunet_protocol_config.rs index 9d515ca915..334639a564 100644 --- a/core-rust/state-manager/src/protocol/protocol_configs/dumunet_protocol_config.rs +++ b/core-rust/state-manager/src/protocol/protocol_configs/dumunet_protocol_config.rs @@ -4,6 +4,7 @@ use crate::protocol::*; use ProtocolUpdateEnactmentCondition::*; pub fn dumunet_protocol_config() -> ProtocolConfig { + // See config_printer.rs > print_fixed_config_code() ProtocolConfig::new_with_triggers(hashmap! { ProtocolVersionName::anemone() => EnactAtStartOfEpochIfValidatorsReady { // ================================================================= @@ -13,7 +14,7 @@ pub fn dumunet_protocol_config() -> ProtocolConfig { lower_bound_inclusive: Epoch::of(1), upper_bound_exclusive: Epoch::of(1000000), readiness_thresholds: vec![SignalledReadinessThreshold { - required_ratio_of_stake_supported: dec!("0.80"), + required_ratio_of_stake_supported: dec!(0.8), required_consecutive_completed_epochs_of_support: 10, }], }, @@ -25,9 +26,23 @@ pub fn dumunet_protocol_config() -> ProtocolConfig { lower_bound_inclusive: Epoch::of(1), upper_bound_exclusive: Epoch::of(1000000), readiness_thresholds: vec![SignalledReadinessThreshold { - required_ratio_of_stake_supported: dec!("0.80"), + required_ratio_of_stake_supported: dec!(0.8), required_consecutive_completed_epochs_of_support: 10, }], - } + }, + ProtocolVersionName::cuttlefish() => EnactAtStartOfEpochIfValidatorsReady { + // ================================================================= + // PROTOCOL_VERSION: "cuttlefish" + // READINESS_SIGNAL: "034d3327f58995c6000000cuttlefish" + // ================================================================= + lower_bound_inclusive: Epoch::of(1), + upper_bound_exclusive: Epoch::of(10000000), + readiness_thresholds: vec![ + SignalledReadinessThreshold { + required_ratio_of_stake_supported: dec!(0.8), + required_consecutive_completed_epochs_of_support: 10, + }, + ], + }, }) } diff --git a/core-rust/state-manager/src/protocol/protocol_configs/mainnet_protocol_config.rs b/core-rust/state-manager/src/protocol/protocol_configs/mainnet_protocol_config.rs index b10f97a25f..6502acf8f0 100644 --- a/core-rust/state-manager/src/protocol/protocol_configs/mainnet_protocol_config.rs +++ b/core-rust/state-manager/src/protocol/protocol_configs/mainnet_protocol_config.rs @@ -4,7 +4,7 @@ use crate::protocol::*; use ProtocolUpdateEnactmentCondition::*; pub fn mainnet_protocol_config() -> ProtocolConfig { - // See config_printer.rs + // See config_printer.rs > print_calculated_protocol_config_code() ProtocolConfig::new_with_triggers(hashmap! { ProtocolVersionName::anemone() => EnactAtStartOfEpochIfValidatorsReady { // ================================================================= diff --git a/core-rust/state-manager/src/protocol/protocol_configs/stokenet_protocol_config.rs b/core-rust/state-manager/src/protocol/protocol_configs/stokenet_protocol_config.rs index 37c1bff893..e5fe46531e 100644 --- a/core-rust/state-manager/src/protocol/protocol_configs/stokenet_protocol_config.rs +++ b/core-rust/state-manager/src/protocol/protocol_configs/stokenet_protocol_config.rs @@ -4,6 +4,7 @@ use crate::protocol::*; use ProtocolUpdateEnactmentCondition::*; pub fn stokenet_protocol_config() -> ProtocolConfig { + // See config_printer.rs > print_fixed_config_code() ProtocolConfig::new_with_triggers(hashmap! { ProtocolVersionName::anemone() => EnactAtStartOfEpochIfValidatorsReady { // ================================================================= @@ -13,7 +14,7 @@ pub fn stokenet_protocol_config() -> ProtocolConfig { lower_bound_inclusive: Epoch::of(1), upper_bound_exclusive: Epoch::of(1000000), readiness_thresholds: vec![SignalledReadinessThreshold { - required_ratio_of_stake_supported: dec!("0.80"), + required_ratio_of_stake_supported: dec!(0.8), required_consecutive_completed_epochs_of_support: 10, }], }, @@ -25,9 +26,23 @@ pub fn stokenet_protocol_config() -> ProtocolConfig { lower_bound_inclusive: Epoch::of(1), upper_bound_exclusive: Epoch::of(1000000), readiness_thresholds: vec![SignalledReadinessThreshold { - required_ratio_of_stake_supported: dec!("0.80"), + required_ratio_of_stake_supported: dec!(0.8), required_consecutive_completed_epochs_of_support: 10, }], - } + }, + ProtocolVersionName::cuttlefish() => EnactAtStartOfEpochIfValidatorsReady { + // ================================================================= + // PROTOCOL_VERSION: "cuttlefish" + // READINESS_SIGNAL: "034d3327f58995c6000000cuttlefish" + // ================================================================= + lower_bound_inclusive: Epoch::of(1), + upper_bound_exclusive: Epoch::of(10000000), + readiness_thresholds: vec![ + SignalledReadinessThreshold { + required_ratio_of_stake_supported: dec!(0.8), + required_consecutive_completed_epochs_of_support: 10, + }, + ], + }, }) } diff --git a/core-rust/state-manager/src/protocol/protocol_configs/testnet_protocol_config.rs b/core-rust/state-manager/src/protocol/protocol_configs/testnet_protocol_config.rs index 48b7934c36..29dac64d91 100644 --- a/core-rust/state-manager/src/protocol/protocol_configs/testnet_protocol_config.rs +++ b/core-rust/state-manager/src/protocol/protocol_configs/testnet_protocol_config.rs @@ -13,5 +13,8 @@ pub fn testnet_protocol_config() -> ProtocolConfig { ProtocolVersionName::bottlenose() => EnactImmediatelyAfterEndOfProtocolUpdate { trigger_after: ProtocolVersionName::anemone(), }, + ProtocolVersionName::cuttlefish() => EnactImmediatelyAfterEndOfProtocolUpdate { + trigger_after: ProtocolVersionName::bottlenose(), + }, }) } diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccessControllerFieldStateSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccessControllerFieldStateSubstate.java index 678006aafb..8878e0b993 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccessControllerFieldStateSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccessControllerFieldStateSubstate.java @@ -35,6 +35,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountAuthorizedDepositorEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountAuthorizedDepositorEntrySubstate.java index f598068d52..fc8b8a024c 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountAuthorizedDepositorEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountAuthorizedDepositorEntrySubstate.java @@ -36,6 +36,7 @@ import com.radixdlt.api.core.generated.models.AuthorizedDepositorKey; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -69,6 +70,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountFieldStateSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountFieldStateSubstate.java index a481215bef..88467b7b0b 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountFieldStateSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountFieldStateSubstate.java @@ -35,6 +35,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountLockerAccountClaimsEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountLockerAccountClaimsEntrySubstate.java index 7d20c2c4bb..1deaf03235 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountLockerAccountClaimsEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountLockerAccountClaimsEntrySubstate.java @@ -36,6 +36,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -69,6 +70,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountResourcePreferenceEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountResourcePreferenceEntrySubstate.java index 5cc69dfdda..7a1d655f17 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountResourcePreferenceEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountResourcePreferenceEntrySubstate.java @@ -35,6 +35,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.ResourceKey; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountVaultEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountVaultEntrySubstate.java index b4af741969..08f1a158a5 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountVaultEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/AccountVaultEntrySubstate.java @@ -35,6 +35,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntryValue; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.ResourceKey; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/AlwaysVisibleGlobalNodesVersion.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/AlwaysVisibleGlobalNodesVersion.java new file mode 100644 index 0000000000..f6306bb754 --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/AlwaysVisibleGlobalNodesVersion.java @@ -0,0 +1,62 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * This was added in Cuttlefish. Before that, this value was missing, but can be assumed to be V1. + */ +public enum AlwaysVisibleGlobalNodesVersion { + + V1("V1"), + + V2("V2"); + + private String value; + + AlwaysVisibleGlobalNodesVersion(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AlwaysVisibleGlobalNodesVersion fromValue(String value) { + for (AlwaysVisibleGlobalNodesVersion b : AlwaysVisibleGlobalNodesVersion.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldKernelBootSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldKernelBootSubstate.java index b1cd897eaf..29c68e49c8 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldKernelBootSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldKernelBootSubstate.java @@ -33,7 +33,9 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstateAllOf; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootValue; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -67,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -107,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -140,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -155,12 +160,12 @@ public class BootLoaderModuleFieldKernelBootSubstate extends Substate { public static final String JSON_PROPERTY_VALUE = "value"; - private Object value; + private BootLoaderModuleFieldKernelBootValue value; public BootLoaderModuleFieldKernelBootSubstate() { } - public BootLoaderModuleFieldKernelBootSubstate value(Object value) { + public BootLoaderModuleFieldKernelBootSubstate value(BootLoaderModuleFieldKernelBootValue value) { this.value = value; return this; } @@ -174,14 +179,14 @@ public BootLoaderModuleFieldKernelBootSubstate value(Object value) { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Object getValue() { + public BootLoaderModuleFieldKernelBootValue getValue() { return value; } @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setValue(Object value) { + public void setValue(BootLoaderModuleFieldKernelBootValue value) { this.value = value; } @@ -239,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -272,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldKernelBootSubstateAllOf.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldKernelBootSubstateAllOf.java index dac20804ed..326209b055 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldKernelBootSubstateAllOf.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldKernelBootSubstateAllOf.java @@ -22,6 +22,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -36,12 +37,12 @@ @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class BootLoaderModuleFieldKernelBootSubstateAllOf { public static final String JSON_PROPERTY_VALUE = "value"; - private Object value; + private BootLoaderModuleFieldKernelBootValue value; public BootLoaderModuleFieldKernelBootSubstateAllOf() { } - public BootLoaderModuleFieldKernelBootSubstateAllOf value(Object value) { + public BootLoaderModuleFieldKernelBootSubstateAllOf value(BootLoaderModuleFieldKernelBootValue value) { this.value = value; return this; } @@ -55,14 +56,14 @@ public BootLoaderModuleFieldKernelBootSubstateAllOf value(Object value) { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Object getValue() { + public BootLoaderModuleFieldKernelBootValue getValue() { return value; } @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setValue(Object value) { + public void setValue(BootLoaderModuleFieldKernelBootValue value) { this.value = value; } diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldKernelBootValue.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldKernelBootValue.java new file mode 100644 index 0000000000..e5ee0245da --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldKernelBootValue.java @@ -0,0 +1,112 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.AlwaysVisibleGlobalNodesVersion; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BootLoaderModuleFieldKernelBootValue + */ +@JsonPropertyOrder({ + BootLoaderModuleFieldKernelBootValue.JSON_PROPERTY_ALWAYS_VISIBLE_NODES_VERSION +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BootLoaderModuleFieldKernelBootValue { + public static final String JSON_PROPERTY_ALWAYS_VISIBLE_NODES_VERSION = "always_visible_nodes_version"; + private AlwaysVisibleGlobalNodesVersion alwaysVisibleNodesVersion; + + public BootLoaderModuleFieldKernelBootValue() { + } + + public BootLoaderModuleFieldKernelBootValue alwaysVisibleNodesVersion(AlwaysVisibleGlobalNodesVersion alwaysVisibleNodesVersion) { + this.alwaysVisibleNodesVersion = alwaysVisibleNodesVersion; + return this; + } + + /** + * Get alwaysVisibleNodesVersion + * @return alwaysVisibleNodesVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_ALWAYS_VISIBLE_NODES_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public AlwaysVisibleGlobalNodesVersion getAlwaysVisibleNodesVersion() { + return alwaysVisibleNodesVersion; + } + + + @JsonProperty(JSON_PROPERTY_ALWAYS_VISIBLE_NODES_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAlwaysVisibleNodesVersion(AlwaysVisibleGlobalNodesVersion alwaysVisibleNodesVersion) { + this.alwaysVisibleNodesVersion = alwaysVisibleNodesVersion; + } + + + /** + * Return true if this BootLoaderModuleFieldKernelBootValue object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BootLoaderModuleFieldKernelBootValue bootLoaderModuleFieldKernelBootValue = (BootLoaderModuleFieldKernelBootValue) o; + return Objects.equals(this.alwaysVisibleNodesVersion, bootLoaderModuleFieldKernelBootValue.alwaysVisibleNodesVersion); + } + + @Override + public int hashCode() { + return Objects.hash(alwaysVisibleNodesVersion); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BootLoaderModuleFieldKernelBootValue {\n"); + sb.append(" alwaysVisibleNodesVersion: ").append(toIndentedString(alwaysVisibleNodesVersion)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldSystemBootSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldSystemBootSubstate.java index 0e833866c8..7c0f27c02a 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldSystemBootSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldSystemBootSubstate.java @@ -35,6 +35,7 @@ import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstateAllOf; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootValue; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldSystemBootValue.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldSystemBootValue.java index f37435bc62..280b36758f 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldSystemBootValue.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldSystemBootValue.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.radixdlt.api.core.generated.models.SystemParameters; +import com.radixdlt.api.core.generated.models.SystemVersion; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -32,16 +33,46 @@ * BootLoaderModuleFieldSystemBootValue */ @JsonPropertyOrder({ + BootLoaderModuleFieldSystemBootValue.JSON_PROPERTY_SYSTEM_VERSION, BootLoaderModuleFieldSystemBootValue.JSON_PROPERTY_SYSTEM_PARAMETERS }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class BootLoaderModuleFieldSystemBootValue { + public static final String JSON_PROPERTY_SYSTEM_VERSION = "system_version"; + private SystemVersion systemVersion; + public static final String JSON_PROPERTY_SYSTEM_PARAMETERS = "system_parameters"; private SystemParameters systemParameters; public BootLoaderModuleFieldSystemBootValue() { } + public BootLoaderModuleFieldSystemBootValue systemVersion(SystemVersion systemVersion) { + this.systemVersion = systemVersion; + return this; + } + + /** + * Get systemVersion + * @return systemVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_SYSTEM_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SystemVersion getSystemVersion() { + return systemVersion; + } + + + @JsonProperty(JSON_PROPERTY_SYSTEM_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSystemVersion(SystemVersion systemVersion) { + this.systemVersion = systemVersion; + } + + public BootLoaderModuleFieldSystemBootValue systemParameters(SystemParameters systemParameters) { this.systemParameters = systemParameters; return this; @@ -80,18 +111,20 @@ public boolean equals(Object o) { return false; } BootLoaderModuleFieldSystemBootValue bootLoaderModuleFieldSystemBootValue = (BootLoaderModuleFieldSystemBootValue) o; - return Objects.equals(this.systemParameters, bootLoaderModuleFieldSystemBootValue.systemParameters); + return Objects.equals(this.systemVersion, bootLoaderModuleFieldSystemBootValue.systemVersion) && + Objects.equals(this.systemParameters, bootLoaderModuleFieldSystemBootValue.systemParameters); } @Override public int hashCode() { - return Objects.hash(systemParameters); + return Objects.hash(systemVersion, systemParameters); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BootLoaderModuleFieldSystemBootValue {\n"); + sb.append(" systemVersion: ").append(toIndentedString(systemVersion)).append("\n"); sb.append(" systemParameters: ").append(toIndentedString(systemParameters)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldTransactionValidationConfigurationSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldTransactionValidationConfigurationSubstate.java new file mode 100644 index 0000000000..6c9d7208c0 --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldTransactionValidationConfigurationSubstate.java @@ -0,0 +1,262 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.AccessControllerFieldStateSubstate; +import com.radixdlt.api.core.generated.models.AccountAuthorizedDepositorEntrySubstate; +import com.radixdlt.api.core.generated.models.AccountFieldStateSubstate; +import com.radixdlt.api.core.generated.models.AccountLockerAccountClaimsEntrySubstate; +import com.radixdlt.api.core.generated.models.AccountResourcePreferenceEntrySubstate; +import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; +import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; +import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; +import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentTimeRoundedToMinutesSubstate; +import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentTimeSubstate; +import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentValidatorSetSubstate; +import com.radixdlt.api.core.generated.models.ConsensusManagerFieldStateSubstate; +import com.radixdlt.api.core.generated.models.ConsensusManagerFieldValidatorRewardsSubstate; +import com.radixdlt.api.core.generated.models.ConsensusManagerRegisteredValidatorsByStakeIndexEntrySubstate; +import com.radixdlt.api.core.generated.models.FungibleResourceManagerFieldDivisibilitySubstate; +import com.radixdlt.api.core.generated.models.FungibleResourceManagerFieldTotalSupplySubstate; +import com.radixdlt.api.core.generated.models.FungibleVaultFieldBalanceSubstate; +import com.radixdlt.api.core.generated.models.FungibleVaultFieldFrozenStatusSubstate; +import com.radixdlt.api.core.generated.models.GenericKeyValueStoreEntrySubstate; +import com.radixdlt.api.core.generated.models.GenericScryptoComponentFieldStateSubstate; +import com.radixdlt.api.core.generated.models.MetadataModuleEntrySubstate; +import com.radixdlt.api.core.generated.models.MultiResourcePoolFieldStateSubstate; +import com.radixdlt.api.core.generated.models.NonFungibleResourceManagerDataEntrySubstate; +import com.radixdlt.api.core.generated.models.NonFungibleResourceManagerFieldIdTypeSubstate; +import com.radixdlt.api.core.generated.models.NonFungibleResourceManagerFieldMutableFieldsSubstate; +import com.radixdlt.api.core.generated.models.NonFungibleResourceManagerFieldTotalSupplySubstate; +import com.radixdlt.api.core.generated.models.NonFungibleVaultContentsIndexEntrySubstate; +import com.radixdlt.api.core.generated.models.NonFungibleVaultFieldBalanceSubstate; +import com.radixdlt.api.core.generated.models.NonFungibleVaultFieldFrozenStatusSubstate; +import com.radixdlt.api.core.generated.models.OneResourcePoolFieldStateSubstate; +import com.radixdlt.api.core.generated.models.PackageBlueprintAuthTemplateEntrySubstate; +import com.radixdlt.api.core.generated.models.PackageBlueprintDefinitionEntrySubstate; +import com.radixdlt.api.core.generated.models.PackageBlueprintDependenciesEntrySubstate; +import com.radixdlt.api.core.generated.models.PackageBlueprintRoyaltyEntrySubstate; +import com.radixdlt.api.core.generated.models.PackageCodeInstrumentedCodeEntrySubstate; +import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; +import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; +import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; +import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; +import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; +import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; +import com.radixdlt.api.core.generated.models.RoyaltyModuleMethodRoyaltyEntrySubstate; +import com.radixdlt.api.core.generated.models.SchemaEntrySubstate; +import com.radixdlt.api.core.generated.models.Substate; +import com.radixdlt.api.core.generated.models.SubstateType; +import com.radixdlt.api.core.generated.models.TransactionTrackerCollectionEntrySubstate; +import com.radixdlt.api.core.generated.models.TransactionTrackerFieldStateSubstate; +import com.radixdlt.api.core.generated.models.TwoResourcePoolFieldStateSubstate; +import com.radixdlt.api.core.generated.models.TypeInfoModuleFieldTypeInfoSubstate; +import com.radixdlt.api.core.generated.models.ValidatorFieldProtocolUpdateReadinessSignalSubstate; +import com.radixdlt.api.core.generated.models.ValidatorFieldStateSubstate; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.radixdlt.api.core.generated.client.JSON; +/** + * BootLoaderModuleFieldTransactionValidationConfigurationSubstate + */ +@JsonPropertyOrder({ +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "substate_type", // ignore manually set substate_type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the substate_type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "substate_type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = AccessControllerFieldStateSubstate.class, name = "AccessControllerFieldState"), + @JsonSubTypes.Type(value = AccountAuthorizedDepositorEntrySubstate.class, name = "AccountAuthorizedDepositorEntry"), + @JsonSubTypes.Type(value = AccountFieldStateSubstate.class, name = "AccountFieldState"), + @JsonSubTypes.Type(value = AccountLockerAccountClaimsEntrySubstate.class, name = "AccountLockerAccountClaimsEntry"), + @JsonSubTypes.Type(value = AccountResourcePreferenceEntrySubstate.class, name = "AccountResourcePreferenceEntry"), + @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), + @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), + @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), + @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentTimeSubstate.class, name = "ConsensusManagerFieldCurrentTime"), + @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentTimeRoundedToMinutesSubstate.class, name = "ConsensusManagerFieldCurrentTimeRoundedToMinutes"), + @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentValidatorSetSubstate.class, name = "ConsensusManagerFieldCurrentValidatorSet"), + @JsonSubTypes.Type(value = ConsensusManagerFieldStateSubstate.class, name = "ConsensusManagerFieldState"), + @JsonSubTypes.Type(value = ConsensusManagerFieldValidatorRewardsSubstate.class, name = "ConsensusManagerFieldValidatorRewards"), + @JsonSubTypes.Type(value = ConsensusManagerRegisteredValidatorsByStakeIndexEntrySubstate.class, name = "ConsensusManagerRegisteredValidatorsByStakeIndexEntry"), + @JsonSubTypes.Type(value = FungibleResourceManagerFieldDivisibilitySubstate.class, name = "FungibleResourceManagerFieldDivisibility"), + @JsonSubTypes.Type(value = FungibleResourceManagerFieldTotalSupplySubstate.class, name = "FungibleResourceManagerFieldTotalSupply"), + @JsonSubTypes.Type(value = FungibleVaultFieldBalanceSubstate.class, name = "FungibleVaultFieldBalance"), + @JsonSubTypes.Type(value = FungibleVaultFieldFrozenStatusSubstate.class, name = "FungibleVaultFieldFrozenStatus"), + @JsonSubTypes.Type(value = GenericKeyValueStoreEntrySubstate.class, name = "GenericKeyValueStoreEntry"), + @JsonSubTypes.Type(value = GenericScryptoComponentFieldStateSubstate.class, name = "GenericScryptoComponentFieldState"), + @JsonSubTypes.Type(value = MetadataModuleEntrySubstate.class, name = "MetadataModuleEntry"), + @JsonSubTypes.Type(value = MultiResourcePoolFieldStateSubstate.class, name = "MultiResourcePoolFieldState"), + @JsonSubTypes.Type(value = NonFungibleResourceManagerDataEntrySubstate.class, name = "NonFungibleResourceManagerDataEntry"), + @JsonSubTypes.Type(value = NonFungibleResourceManagerFieldIdTypeSubstate.class, name = "NonFungibleResourceManagerFieldIdType"), + @JsonSubTypes.Type(value = NonFungibleResourceManagerFieldMutableFieldsSubstate.class, name = "NonFungibleResourceManagerFieldMutableFields"), + @JsonSubTypes.Type(value = NonFungibleResourceManagerFieldTotalSupplySubstate.class, name = "NonFungibleResourceManagerFieldTotalSupply"), + @JsonSubTypes.Type(value = NonFungibleVaultContentsIndexEntrySubstate.class, name = "NonFungibleVaultContentsIndexEntry"), + @JsonSubTypes.Type(value = NonFungibleVaultFieldBalanceSubstate.class, name = "NonFungibleVaultFieldBalance"), + @JsonSubTypes.Type(value = NonFungibleVaultFieldFrozenStatusSubstate.class, name = "NonFungibleVaultFieldFrozenStatus"), + @JsonSubTypes.Type(value = OneResourcePoolFieldStateSubstate.class, name = "OneResourcePoolFieldState"), + @JsonSubTypes.Type(value = PackageBlueprintAuthTemplateEntrySubstate.class, name = "PackageBlueprintAuthTemplateEntry"), + @JsonSubTypes.Type(value = PackageBlueprintDefinitionEntrySubstate.class, name = "PackageBlueprintDefinitionEntry"), + @JsonSubTypes.Type(value = PackageBlueprintDependenciesEntrySubstate.class, name = "PackageBlueprintDependenciesEntry"), + @JsonSubTypes.Type(value = PackageBlueprintRoyaltyEntrySubstate.class, name = "PackageBlueprintRoyaltyEntry"), + @JsonSubTypes.Type(value = PackageCodeInstrumentedCodeEntrySubstate.class, name = "PackageCodeInstrumentedCodeEntry"), + @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), + @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), + @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), + @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), + @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), + @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), + @JsonSubTypes.Type(value = RoyaltyModuleMethodRoyaltyEntrySubstate.class, name = "RoyaltyModuleMethodRoyaltyEntry"), + @JsonSubTypes.Type(value = SchemaEntrySubstate.class, name = "SchemaEntry"), + @JsonSubTypes.Type(value = TransactionTrackerCollectionEntrySubstate.class, name = "TransactionTrackerCollectionEntry"), + @JsonSubTypes.Type(value = TransactionTrackerFieldStateSubstate.class, name = "TransactionTrackerFieldState"), + @JsonSubTypes.Type(value = TwoResourcePoolFieldStateSubstate.class, name = "TwoResourcePoolFieldState"), + @JsonSubTypes.Type(value = TypeInfoModuleFieldTypeInfoSubstate.class, name = "TypeInfoModuleFieldTypeInfo"), + @JsonSubTypes.Type(value = ValidatorFieldProtocolUpdateReadinessSignalSubstate.class, name = "ValidatorFieldProtocolUpdateReadinessSignal"), + @JsonSubTypes.Type(value = ValidatorFieldStateSubstate.class, name = "ValidatorFieldState"), +}) + +public class BootLoaderModuleFieldTransactionValidationConfigurationSubstate extends Substate { + public BootLoaderModuleFieldTransactionValidationConfigurationSubstate() { + } + + /** + * Return true if this BootLoaderModuleFieldTransactionValidationConfigurationSubstate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BootLoaderModuleFieldTransactionValidationConfigurationSubstate {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AccessControllerFieldState", AccessControllerFieldStateSubstate.class); + mappings.put("AccountAuthorizedDepositorEntry", AccountAuthorizedDepositorEntrySubstate.class); + mappings.put("AccountFieldState", AccountFieldStateSubstate.class); + mappings.put("AccountLockerAccountClaimsEntry", AccountLockerAccountClaimsEntrySubstate.class); + mappings.put("AccountResourcePreferenceEntry", AccountResourcePreferenceEntrySubstate.class); + mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); + mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); + mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); + mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); + mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); + mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); + mappings.put("ConsensusManagerFieldCurrentTime", ConsensusManagerFieldCurrentTimeSubstate.class); + mappings.put("ConsensusManagerFieldCurrentTimeRoundedToMinutes", ConsensusManagerFieldCurrentTimeRoundedToMinutesSubstate.class); + mappings.put("ConsensusManagerFieldCurrentValidatorSet", ConsensusManagerFieldCurrentValidatorSetSubstate.class); + mappings.put("ConsensusManagerFieldState", ConsensusManagerFieldStateSubstate.class); + mappings.put("ConsensusManagerFieldValidatorRewards", ConsensusManagerFieldValidatorRewardsSubstate.class); + mappings.put("ConsensusManagerRegisteredValidatorsByStakeIndexEntry", ConsensusManagerRegisteredValidatorsByStakeIndexEntrySubstate.class); + mappings.put("FungibleResourceManagerFieldDivisibility", FungibleResourceManagerFieldDivisibilitySubstate.class); + mappings.put("FungibleResourceManagerFieldTotalSupply", FungibleResourceManagerFieldTotalSupplySubstate.class); + mappings.put("FungibleVaultFieldBalance", FungibleVaultFieldBalanceSubstate.class); + mappings.put("FungibleVaultFieldFrozenStatus", FungibleVaultFieldFrozenStatusSubstate.class); + mappings.put("GenericKeyValueStoreEntry", GenericKeyValueStoreEntrySubstate.class); + mappings.put("GenericScryptoComponentFieldState", GenericScryptoComponentFieldStateSubstate.class); + mappings.put("MetadataModuleEntry", MetadataModuleEntrySubstate.class); + mappings.put("MultiResourcePoolFieldState", MultiResourcePoolFieldStateSubstate.class); + mappings.put("NonFungibleResourceManagerDataEntry", NonFungibleResourceManagerDataEntrySubstate.class); + mappings.put("NonFungibleResourceManagerFieldIdType", NonFungibleResourceManagerFieldIdTypeSubstate.class); + mappings.put("NonFungibleResourceManagerFieldMutableFields", NonFungibleResourceManagerFieldMutableFieldsSubstate.class); + mappings.put("NonFungibleResourceManagerFieldTotalSupply", NonFungibleResourceManagerFieldTotalSupplySubstate.class); + mappings.put("NonFungibleVaultContentsIndexEntry", NonFungibleVaultContentsIndexEntrySubstate.class); + mappings.put("NonFungibleVaultFieldBalance", NonFungibleVaultFieldBalanceSubstate.class); + mappings.put("NonFungibleVaultFieldFrozenStatus", NonFungibleVaultFieldFrozenStatusSubstate.class); + mappings.put("OneResourcePoolFieldState", OneResourcePoolFieldStateSubstate.class); + mappings.put("PackageBlueprintAuthTemplateEntry", PackageBlueprintAuthTemplateEntrySubstate.class); + mappings.put("PackageBlueprintDefinitionEntry", PackageBlueprintDefinitionEntrySubstate.class); + mappings.put("PackageBlueprintDependenciesEntry", PackageBlueprintDependenciesEntrySubstate.class); + mappings.put("PackageBlueprintRoyaltyEntry", PackageBlueprintRoyaltyEntrySubstate.class); + mappings.put("PackageCodeInstrumentedCodeEntry", PackageCodeInstrumentedCodeEntrySubstate.class); + mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); + mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); + mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); + mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); + mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); + mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); + mappings.put("RoyaltyModuleMethodRoyaltyEntry", RoyaltyModuleMethodRoyaltyEntrySubstate.class); + mappings.put("SchemaEntry", SchemaEntrySubstate.class); + mappings.put("TransactionTrackerCollectionEntry", TransactionTrackerCollectionEntrySubstate.class); + mappings.put("TransactionTrackerFieldState", TransactionTrackerFieldStateSubstate.class); + mappings.put("TwoResourcePoolFieldState", TwoResourcePoolFieldStateSubstate.class); + mappings.put("TypeInfoModuleFieldTypeInfo", TypeInfoModuleFieldTypeInfoSubstate.class); + mappings.put("ValidatorFieldProtocolUpdateReadinessSignal", ValidatorFieldProtocolUpdateReadinessSignalSubstate.class); + mappings.put("ValidatorFieldState", ValidatorFieldStateSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfigurationSubstate", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); + JSON.registerDiscriminator(BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, "substate_type", mappings); +} +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldVmBootSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldVmBootSubstate.java index 08b676d281..5bd4eb941c 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldVmBootSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/BootLoaderModuleFieldVmBootSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstateAllOf; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootValue; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldConfigSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldConfigSubstate.java index b1663b19ff..52f8ba2587 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldConfigSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldConfigSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstateAllOf; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldCurrentProposalStatisticSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldCurrentProposalStatisticSubstate.java index 19e1b4bb9a..f1517c4878 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldCurrentProposalStatisticSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldCurrentProposalStatisticSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldCurrentTimeRoundedToMinutesSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldCurrentTimeRoundedToMinutesSubstate.java index 2e79ba701c..b9ea6a8eaa 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldCurrentTimeRoundedToMinutesSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldCurrentTimeRoundedToMinutesSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldCurrentTimeSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldCurrentTimeSubstate.java index b3ed7de127..858912a115 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldCurrentTimeSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldCurrentTimeSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldCurrentValidatorSetSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldCurrentValidatorSetSubstate.java index fadd5b7e2f..80859acb65 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldCurrentValidatorSetSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldCurrentValidatorSetSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldStateSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldStateSubstate.java index ee892a868f..e9bbd72ba0 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldStateSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldStateSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldValidatorRewardsSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldValidatorRewardsSubstate.java index b463329b57..7091a04ec1 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldValidatorRewardsSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerFieldValidatorRewardsSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerRegisteredValidatorsByStakeIndexEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerRegisteredValidatorsByStakeIndexEntrySubstate.java index 0f45335c53..0a387735ea 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerRegisteredValidatorsByStakeIndexEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ConsensusManagerRegisteredValidatorsByStakeIndexEntrySubstate.java @@ -34,6 +34,7 @@ import com.radixdlt.api.core.generated.models.ActiveValidatorKey; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -69,6 +70,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/EntityModule.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/EntityModule.java index 45aeabc968..cf5dbe78e2 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/EntityModule.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/EntityModule.java @@ -40,7 +40,9 @@ public enum EntityModule { SCHEMA("Schema"), - BOOTLOADER("BootLoader"); + BOOTLOADER("BootLoader"), + + PROTOCOLUPDATESTATUS("ProtocolUpdateStatus"); private String value; diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/FlashLedgerTransaction.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/FlashLedgerTransaction.java index 3fd45eb2da..54211cb73e 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/FlashLedgerTransaction.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/FlashLedgerTransaction.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.LedgerTransactionType; import com.radixdlt.api.core.generated.models.RoundUpdateLedgerTransaction; import com.radixdlt.api.core.generated.models.UserLedgerTransaction; +import com.radixdlt.api.core.generated.models.UserLedgerTransactionV2; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -57,6 +58,7 @@ @JsonSubTypes.Type(value = GenesisLedgerTransaction.class, name = "Genesis"), @JsonSubTypes.Type(value = RoundUpdateLedgerTransaction.class, name = "RoundUpdate"), @JsonSubTypes.Type(value = UserLedgerTransaction.class, name = "User"), + @JsonSubTypes.Type(value = UserLedgerTransactionV2.class, name = "UserV2"), }) public class FlashLedgerTransaction extends LedgerTransaction { @@ -172,6 +174,7 @@ private String toIndentedString(Object o) { mappings.put("Genesis", GenesisLedgerTransaction.class); mappings.put("RoundUpdate", RoundUpdateLedgerTransaction.class); mappings.put("User", UserLedgerTransaction.class); + mappings.put("UserV2", UserLedgerTransactionV2.class); mappings.put("FlashLedgerTransaction", FlashLedgerTransaction.class); JSON.registerDiscriminator(FlashLedgerTransaction.class, "type", mappings); } diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/FungibleResourceManagerFieldDivisibilitySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/FungibleResourceManagerFieldDivisibilitySubstate.java index 629b96de94..e7c5218f1c 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/FungibleResourceManagerFieldDivisibilitySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/FungibleResourceManagerFieldDivisibilitySubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/FungibleResourceManagerFieldTotalSupplySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/FungibleResourceManagerFieldTotalSupplySubstate.java index 1dc7876389..c1efe10e3b 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/FungibleResourceManagerFieldTotalSupplySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/FungibleResourceManagerFieldTotalSupplySubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/FungibleVaultFieldBalanceSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/FungibleVaultFieldBalanceSubstate.java index 57b2c4fc22..69fafaf1f7 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/FungibleVaultFieldBalanceSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/FungibleVaultFieldBalanceSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/FungibleVaultFieldFrozenStatusSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/FungibleVaultFieldFrozenStatusSubstate.java index de706c5567..8a080ce7a6 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/FungibleVaultFieldFrozenStatusSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/FungibleVaultFieldFrozenStatusSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/GenericKeyValueStoreEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/GenericKeyValueStoreEntrySubstate.java index 41669e9377..cd0fd32baf 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/GenericKeyValueStoreEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/GenericKeyValueStoreEntrySubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -69,6 +70,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/GenericScryptoComponentFieldStateSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/GenericScryptoComponentFieldStateSubstate.java index ed7ea3bfe9..3690bad633 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/GenericScryptoComponentFieldStateSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/GenericScryptoComponentFieldStateSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/GenesisLedgerTransaction.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/GenesisLedgerTransaction.java index ddca8a86bf..9a03390b2e 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/GenesisLedgerTransaction.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/GenesisLedgerTransaction.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.RoundUpdateLedgerTransaction; import com.radixdlt.api.core.generated.models.SystemTransaction; import com.radixdlt.api.core.generated.models.UserLedgerTransaction; +import com.radixdlt.api.core.generated.models.UserLedgerTransactionV2; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -57,6 +58,7 @@ @JsonSubTypes.Type(value = GenesisLedgerTransaction.class, name = "Genesis"), @JsonSubTypes.Type(value = RoundUpdateLedgerTransaction.class, name = "RoundUpdate"), @JsonSubTypes.Type(value = UserLedgerTransaction.class, name = "User"), + @JsonSubTypes.Type(value = UserLedgerTransactionV2.class, name = "UserV2"), }) public class GenesisLedgerTransaction extends LedgerTransaction { @@ -172,6 +174,7 @@ private String toIndentedString(Object o) { mappings.put("Genesis", GenesisLedgerTransaction.class); mappings.put("RoundUpdate", RoundUpdateLedgerTransaction.class); mappings.put("User", UserLedgerTransaction.class); + mappings.put("UserV2", UserLedgerTransactionV2.class); mappings.put("GenesisLedgerTransaction", GenesisLedgerTransaction.class); JSON.registerDiscriminator(GenesisLedgerTransaction.class, "type", mappings); } diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/LedgerTransaction.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/LedgerTransaction.java index 7478c8366e..20c557f8b3 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/LedgerTransaction.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/LedgerTransaction.java @@ -30,6 +30,7 @@ import com.radixdlt.api.core.generated.models.LedgerTransactionType; import com.radixdlt.api.core.generated.models.RoundUpdateLedgerTransaction; import com.radixdlt.api.core.generated.models.UserLedgerTransaction; +import com.radixdlt.api.core.generated.models.UserLedgerTransactionV2; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -58,6 +59,8 @@ @JsonSubTypes.Type(value = RoundUpdateLedgerTransaction.class, name = "RoundUpdateLedgerTransaction"), @JsonSubTypes.Type(value = UserLedgerTransaction.class, name = "User"), @JsonSubTypes.Type(value = UserLedgerTransaction.class, name = "UserLedgerTransaction"), + @JsonSubTypes.Type(value = UserLedgerTransactionV2.class, name = "UserLedgerTransactionV2"), + @JsonSubTypes.Type(value = UserLedgerTransactionV2.class, name = "UserV2"), }) public class LedgerTransaction { @@ -175,6 +178,8 @@ private String toIndentedString(Object o) { mappings.put("RoundUpdateLedgerTransaction", RoundUpdateLedgerTransaction.class); mappings.put("User", UserLedgerTransaction.class); mappings.put("UserLedgerTransaction", UserLedgerTransaction.class); + mappings.put("UserLedgerTransactionV2", UserLedgerTransactionV2.class); + mappings.put("UserV2", UserLedgerTransactionV2.class); mappings.put("LedgerTransaction", LedgerTransaction.class); JSON.registerDiscriminator(LedgerTransaction.class, "type", mappings); } diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/MetadataModuleEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/MetadataModuleEntrySubstate.java index c738eab9c0..8c31fb6acd 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/MetadataModuleEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/MetadataModuleEntrySubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -69,6 +70,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/MultiResourcePoolFieldStateSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/MultiResourcePoolFieldStateSubstate.java index 5a1c9b283b..dc8877be10 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/MultiResourcePoolFieldStateSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/MultiResourcePoolFieldStateSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleResourceManagerDataEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleResourceManagerDataEntrySubstate.java index 9920e45c99..2921962355 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleResourceManagerDataEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleResourceManagerDataEntrySubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -69,6 +70,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleResourceManagerFieldIdTypeSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleResourceManagerFieldIdTypeSubstate.java index 846936e7ad..9619f7b782 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleResourceManagerFieldIdTypeSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleResourceManagerFieldIdTypeSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleResourceManagerFieldMutableFieldsSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleResourceManagerFieldMutableFieldsSubstate.java index 6277cd8141..9ce466c199 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleResourceManagerFieldMutableFieldsSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleResourceManagerFieldMutableFieldsSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleResourceManagerFieldTotalSupplySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleResourceManagerFieldTotalSupplySubstate.java index b9a87874a5..e07a9ecde9 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleResourceManagerFieldTotalSupplySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleResourceManagerFieldTotalSupplySubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleVaultContentsIndexEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleVaultContentsIndexEntrySubstate.java index e80cfb26b3..a1edc24ce2 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleVaultContentsIndexEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleVaultContentsIndexEntrySubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -69,6 +70,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleVaultFieldBalanceSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleVaultFieldBalanceSubstate.java index a7ff61663a..1862c07d61 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleVaultFieldBalanceSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleVaultFieldBalanceSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleVaultFieldFrozenStatusSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleVaultFieldFrozenStatusSubstate.java index 3fb2a4d1d2..f4847fd309 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleVaultFieldFrozenStatusSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NonFungibleVaultFieldFrozenStatusSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NotarizedTransactionV2.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NotarizedTransactionV2.java new file mode 100644 index 0000000000..8c46fec7ad --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NotarizedTransactionV2.java @@ -0,0 +1,111 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * NotarizedTransactionV2 + */ +@JsonPropertyOrder({ + NotarizedTransactionV2.JSON_PROPERTY_TODO +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NotarizedTransactionV2 { + public static final String JSON_PROPERTY_TODO = "todo"; + private String todo; + + public NotarizedTransactionV2() { + } + + public NotarizedTransactionV2 todo(String todo) { + this.todo = todo; + return this; + } + + /** + * Get todo + * @return todo + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TODO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTodo() { + return todo; + } + + + @JsonProperty(JSON_PROPERTY_TODO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTodo(String todo) { + this.todo = todo; + } + + + /** + * Return true if this NotarizedTransactionV2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotarizedTransactionV2 notarizedTransactionV2 = (NotarizedTransactionV2) o; + return Objects.equals(this.todo, notarizedTransactionV2.todo); + } + + @Override + public int hashCode() { + return Objects.hash(todo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotarizedTransactionV2 {\n"); + sb.append(" todo: ").append(toIndentedString(todo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/OneResourcePoolFieldStateSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/OneResourcePoolFieldStateSubstate.java index 9ec7eee560..ed3dc20cb8 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/OneResourcePoolFieldStateSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/OneResourcePoolFieldStateSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageBlueprintAuthTemplateEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageBlueprintAuthTemplateEntrySubstate.java index 5e1b7ad396..019cde6d58 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageBlueprintAuthTemplateEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageBlueprintAuthTemplateEntrySubstate.java @@ -34,6 +34,7 @@ import com.radixdlt.api.core.generated.models.BlueprintVersionKey; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -69,6 +70,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageBlueprintDefinitionEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageBlueprintDefinitionEntrySubstate.java index 266b922277..c39acca13c 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageBlueprintDefinitionEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageBlueprintDefinitionEntrySubstate.java @@ -34,6 +34,7 @@ import com.radixdlt.api.core.generated.models.BlueprintVersionKey; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -69,6 +70,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageBlueprintDependenciesEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageBlueprintDependenciesEntrySubstate.java index 94e57542a2..11ef600649 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageBlueprintDependenciesEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageBlueprintDependenciesEntrySubstate.java @@ -34,6 +34,7 @@ import com.radixdlt.api.core.generated.models.BlueprintVersionKey; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -69,6 +70,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageBlueprintRoyaltyEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageBlueprintRoyaltyEntrySubstate.java index 3cd5c0a62a..f62c53b00a 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageBlueprintRoyaltyEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageBlueprintRoyaltyEntrySubstate.java @@ -34,6 +34,7 @@ import com.radixdlt.api.core.generated.models.BlueprintVersionKey; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -69,6 +70,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageCodeInstrumentedCodeEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageCodeInstrumentedCodeEntrySubstate.java index 8feb0f8e56..1b6db8095e 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageCodeInstrumentedCodeEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageCodeInstrumentedCodeEntrySubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -69,6 +70,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageCodeOriginalCodeEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageCodeOriginalCodeEntrySubstate.java index 2b163a8398..e7daf84035 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageCodeOriginalCodeEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageCodeOriginalCodeEntrySubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -69,6 +70,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntryValue; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageCodeVmTypeEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageCodeVmTypeEntrySubstate.java index 2f38d8ec03..ad02370b70 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageCodeVmTypeEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageCodeVmTypeEntrySubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -69,6 +70,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstateAllOf; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntryValue; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageFieldRoyaltyAccumulatorSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageFieldRoyaltyAccumulatorSubstate.java index db36ef5a07..099de4481c 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageFieldRoyaltyAccumulatorSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/PackageFieldRoyaltyAccumulatorSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -68,6 +69,7 @@ import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstateAllOf; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorValue; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedLedgerTransaction.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedLedgerTransaction.java index 94d7a3fc26..bd86625b23 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedLedgerTransaction.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedLedgerTransaction.java @@ -30,6 +30,7 @@ import com.radixdlt.api.core.generated.models.ParsedLedgerTransactionAllOf; import com.radixdlt.api.core.generated.models.ParsedLedgerTransactionIdentifiers; import com.radixdlt.api.core.generated.models.ParsedNotarizedTransaction; +import com.radixdlt.api.core.generated.models.ParsedNotarizedTransactionV2; import com.radixdlt.api.core.generated.models.ParsedSignedTransactionIntent; import com.radixdlt.api.core.generated.models.ParsedTransaction; import com.radixdlt.api.core.generated.models.ParsedTransactionIntent; @@ -56,6 +57,7 @@ @JsonSubTypes({ @JsonSubTypes.Type(value = ParsedLedgerTransaction.class, name = "LedgerTransaction"), @JsonSubTypes.Type(value = ParsedNotarizedTransaction.class, name = "NotarizedTransaction"), + @JsonSubTypes.Type(value = ParsedNotarizedTransactionV2.class, name = "NotarizedTransactionV2"), @JsonSubTypes.Type(value = ParsedSignedTransactionIntent.class, name = "SignedTransactionIntent"), @JsonSubTypes.Type(value = ParsedTransactionIntent.class, name = "TransactionIntent"), }) @@ -171,6 +173,7 @@ private String toIndentedString(Object o) { Map> mappings = new HashMap>(); mappings.put("LedgerTransaction", ParsedLedgerTransaction.class); mappings.put("NotarizedTransaction", ParsedNotarizedTransaction.class); + mappings.put("NotarizedTransactionV2", ParsedNotarizedTransactionV2.class); mappings.put("SignedTransactionIntent", ParsedSignedTransactionIntent.class); mappings.put("TransactionIntent", ParsedTransactionIntent.class); mappings.put("ParsedLedgerTransaction", ParsedLedgerTransaction.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransaction.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransaction.java index 2144519048..d1f169b4c7 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransaction.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransaction.java @@ -31,6 +31,7 @@ import com.radixdlt.api.core.generated.models.ParsedNotarizedTransactionAllOf; import com.radixdlt.api.core.generated.models.ParsedNotarizedTransactionAllOfValidationError; import com.radixdlt.api.core.generated.models.ParsedNotarizedTransactionIdentifiers; +import com.radixdlt.api.core.generated.models.ParsedNotarizedTransactionV2; import com.radixdlt.api.core.generated.models.ParsedSignedTransactionIntent; import com.radixdlt.api.core.generated.models.ParsedTransaction; import com.radixdlt.api.core.generated.models.ParsedTransactionIntent; @@ -58,6 +59,7 @@ @JsonSubTypes({ @JsonSubTypes.Type(value = ParsedLedgerTransaction.class, name = "LedgerTransaction"), @JsonSubTypes.Type(value = ParsedNotarizedTransaction.class, name = "NotarizedTransaction"), + @JsonSubTypes.Type(value = ParsedNotarizedTransactionV2.class, name = "NotarizedTransactionV2"), @JsonSubTypes.Type(value = ParsedSignedTransactionIntent.class, name = "SignedTransactionIntent"), @JsonSubTypes.Type(value = ParsedTransactionIntent.class, name = "TransactionIntent"), }) @@ -204,6 +206,7 @@ private String toIndentedString(Object o) { Map> mappings = new HashMap>(); mappings.put("LedgerTransaction", ParsedLedgerTransaction.class); mappings.put("NotarizedTransaction", ParsedNotarizedTransaction.class); + mappings.put("NotarizedTransactionV2", ParsedNotarizedTransactionV2.class); mappings.put("SignedTransactionIntent", ParsedSignedTransactionIntent.class); mappings.put("TransactionIntent", ParsedTransactionIntent.class); mappings.put("ParsedNotarizedTransaction", ParsedNotarizedTransaction.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransactionAllOfValidationError.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransactionAllOfValidationError.java index 655127bb86..95b99ed38f 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransactionAllOfValidationError.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransactionAllOfValidationError.java @@ -28,9 +28,9 @@ /** - * If the transaction is known to not be valid, this gives a reason. Different levels of validation are performed, dependent on the validation mode. Note that, even if validation mode is Static or Full, the transaction may still be rejected or fail due to issues at runtime (eg if the loan cannot be repaid). + * If the transaction is known to not be valid, this gives a reason. Different levels of validation are performed, dependent on the validation mode. Note that, even if validation mode is Static or Full, the transaction may still be rejected or fail due to issues at runtime (e.g. if the loan cannot be repaid). */ -@ApiModel(description = "If the transaction is known to not be valid, this gives a reason. Different levels of validation are performed, dependent on the validation mode. Note that, even if validation mode is Static or Full, the transaction may still be rejected or fail due to issues at runtime (eg if the loan cannot be repaid). ") +@ApiModel(description = "If the transaction is known to not be valid, this gives a reason. Different levels of validation are performed, dependent on the validation mode. Note that, even if validation mode is Static or Full, the transaction may still be rejected or fail due to issues at runtime (e.g. if the loan cannot be repaid). ") @JsonPropertyOrder({ ParsedNotarizedTransactionAllOfValidationError.JSON_PROPERTY_REASON, ParsedNotarizedTransactionAllOfValidationError.JSON_PROPERTY_IS_PERMANENT diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransactionV2.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransactionV2.java new file mode 100644 index 0000000000..00fc90b3f3 --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransactionV2.java @@ -0,0 +1,216 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.NotarizedTransactionV2; +import com.radixdlt.api.core.generated.models.ParsedLedgerTransaction; +import com.radixdlt.api.core.generated.models.ParsedNotarizedTransaction; +import com.radixdlt.api.core.generated.models.ParsedNotarizedTransactionAllOfValidationError; +import com.radixdlt.api.core.generated.models.ParsedNotarizedTransactionIdentifiers; +import com.radixdlt.api.core.generated.models.ParsedNotarizedTransactionV2; +import com.radixdlt.api.core.generated.models.ParsedNotarizedTransactionV2AllOf; +import com.radixdlt.api.core.generated.models.ParsedSignedTransactionIntent; +import com.radixdlt.api.core.generated.models.ParsedTransaction; +import com.radixdlt.api.core.generated.models.ParsedTransactionIntent; +import com.radixdlt.api.core.generated.models.ParsedTransactionType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.radixdlt.api.core.generated.client.JSON; +/** + * ParsedNotarizedTransactionV2 + */ +@JsonPropertyOrder({ + ParsedNotarizedTransactionV2.JSON_PROPERTY_NOTARIZED_TRANSACTION, + ParsedNotarizedTransactionV2.JSON_PROPERTY_IDENTIFIERS, + ParsedNotarizedTransactionV2.JSON_PROPERTY_VALIDATION_ERROR +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ParsedLedgerTransaction.class, name = "LedgerTransaction"), + @JsonSubTypes.Type(value = ParsedNotarizedTransaction.class, name = "NotarizedTransaction"), + @JsonSubTypes.Type(value = ParsedNotarizedTransactionV2.class, name = "NotarizedTransactionV2"), + @JsonSubTypes.Type(value = ParsedSignedTransactionIntent.class, name = "SignedTransactionIntent"), + @JsonSubTypes.Type(value = ParsedTransactionIntent.class, name = "TransactionIntent"), +}) + +public class ParsedNotarizedTransactionV2 extends ParsedTransaction { + public static final String JSON_PROPERTY_NOTARIZED_TRANSACTION = "notarized_transaction"; + private NotarizedTransactionV2 notarizedTransaction; + + public static final String JSON_PROPERTY_IDENTIFIERS = "identifiers"; + private ParsedNotarizedTransactionIdentifiers identifiers; + + public static final String JSON_PROPERTY_VALIDATION_ERROR = "validation_error"; + private ParsedNotarizedTransactionAllOfValidationError validationError; + + public ParsedNotarizedTransactionV2() { + } + + public ParsedNotarizedTransactionV2 notarizedTransaction(NotarizedTransactionV2 notarizedTransaction) { + this.notarizedTransaction = notarizedTransaction; + return this; + } + + /** + * Get notarizedTransaction + * @return notarizedTransaction + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NOTARIZED_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotarizedTransactionV2 getNotarizedTransaction() { + return notarizedTransaction; + } + + + @JsonProperty(JSON_PROPERTY_NOTARIZED_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotarizedTransaction(NotarizedTransactionV2 notarizedTransaction) { + this.notarizedTransaction = notarizedTransaction; + } + + + public ParsedNotarizedTransactionV2 identifiers(ParsedNotarizedTransactionIdentifiers identifiers) { + this.identifiers = identifiers; + return this; + } + + /** + * Get identifiers + * @return identifiers + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_IDENTIFIERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ParsedNotarizedTransactionIdentifiers getIdentifiers() { + return identifiers; + } + + + @JsonProperty(JSON_PROPERTY_IDENTIFIERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIdentifiers(ParsedNotarizedTransactionIdentifiers identifiers) { + this.identifiers = identifiers; + } + + + public ParsedNotarizedTransactionV2 validationError(ParsedNotarizedTransactionAllOfValidationError validationError) { + this.validationError = validationError; + return this; + } + + /** + * Get validationError + * @return validationError + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_VALIDATION_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ParsedNotarizedTransactionAllOfValidationError getValidationError() { + return validationError; + } + + + @JsonProperty(JSON_PROPERTY_VALIDATION_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValidationError(ParsedNotarizedTransactionAllOfValidationError validationError) { + this.validationError = validationError; + } + + + /** + * Return true if this ParsedNotarizedTransactionV2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParsedNotarizedTransactionV2 parsedNotarizedTransactionV2 = (ParsedNotarizedTransactionV2) o; + return Objects.equals(this.notarizedTransaction, parsedNotarizedTransactionV2.notarizedTransaction) && + Objects.equals(this.identifiers, parsedNotarizedTransactionV2.identifiers) && + Objects.equals(this.validationError, parsedNotarizedTransactionV2.validationError) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(notarizedTransaction, identifiers, validationError, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParsedNotarizedTransactionV2 {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" notarizedTransaction: ").append(toIndentedString(notarizedTransaction)).append("\n"); + sb.append(" identifiers: ").append(toIndentedString(identifiers)).append("\n"); + sb.append(" validationError: ").append(toIndentedString(validationError)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("LedgerTransaction", ParsedLedgerTransaction.class); + mappings.put("NotarizedTransaction", ParsedNotarizedTransaction.class); + mappings.put("NotarizedTransactionV2", ParsedNotarizedTransactionV2.class); + mappings.put("SignedTransactionIntent", ParsedSignedTransactionIntent.class); + mappings.put("TransactionIntent", ParsedTransactionIntent.class); + mappings.put("ParsedNotarizedTransactionV2", ParsedNotarizedTransactionV2.class); + JSON.registerDiscriminator(ParsedNotarizedTransactionV2.class, "type", mappings); +} +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransactionV2AllOf.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransactionV2AllOf.java new file mode 100644 index 0000000000..b5e9677b6c --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransactionV2AllOf.java @@ -0,0 +1,178 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.NotarizedTransactionV2; +import com.radixdlt.api.core.generated.models.ParsedNotarizedTransactionAllOfValidationError; +import com.radixdlt.api.core.generated.models.ParsedNotarizedTransactionIdentifiers; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ParsedNotarizedTransactionV2AllOf + */ +@JsonPropertyOrder({ + ParsedNotarizedTransactionV2AllOf.JSON_PROPERTY_NOTARIZED_TRANSACTION, + ParsedNotarizedTransactionV2AllOf.JSON_PROPERTY_IDENTIFIERS, + ParsedNotarizedTransactionV2AllOf.JSON_PROPERTY_VALIDATION_ERROR +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ParsedNotarizedTransactionV2AllOf { + public static final String JSON_PROPERTY_NOTARIZED_TRANSACTION = "notarized_transaction"; + private NotarizedTransactionV2 notarizedTransaction; + + public static final String JSON_PROPERTY_IDENTIFIERS = "identifiers"; + private ParsedNotarizedTransactionIdentifiers identifiers; + + public static final String JSON_PROPERTY_VALIDATION_ERROR = "validation_error"; + private ParsedNotarizedTransactionAllOfValidationError validationError; + + public ParsedNotarizedTransactionV2AllOf() { + } + + public ParsedNotarizedTransactionV2AllOf notarizedTransaction(NotarizedTransactionV2 notarizedTransaction) { + this.notarizedTransaction = notarizedTransaction; + return this; + } + + /** + * Get notarizedTransaction + * @return notarizedTransaction + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_NOTARIZED_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public NotarizedTransactionV2 getNotarizedTransaction() { + return notarizedTransaction; + } + + + @JsonProperty(JSON_PROPERTY_NOTARIZED_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotarizedTransaction(NotarizedTransactionV2 notarizedTransaction) { + this.notarizedTransaction = notarizedTransaction; + } + + + public ParsedNotarizedTransactionV2AllOf identifiers(ParsedNotarizedTransactionIdentifiers identifiers) { + this.identifiers = identifiers; + return this; + } + + /** + * Get identifiers + * @return identifiers + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_IDENTIFIERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ParsedNotarizedTransactionIdentifiers getIdentifiers() { + return identifiers; + } + + + @JsonProperty(JSON_PROPERTY_IDENTIFIERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIdentifiers(ParsedNotarizedTransactionIdentifiers identifiers) { + this.identifiers = identifiers; + } + + + public ParsedNotarizedTransactionV2AllOf validationError(ParsedNotarizedTransactionAllOfValidationError validationError) { + this.validationError = validationError; + return this; + } + + /** + * Get validationError + * @return validationError + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_VALIDATION_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ParsedNotarizedTransactionAllOfValidationError getValidationError() { + return validationError; + } + + + @JsonProperty(JSON_PROPERTY_VALIDATION_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValidationError(ParsedNotarizedTransactionAllOfValidationError validationError) { + this.validationError = validationError; + } + + + /** + * Return true if this ParsedNotarizedTransactionV2_allOf object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParsedNotarizedTransactionV2AllOf parsedNotarizedTransactionV2AllOf = (ParsedNotarizedTransactionV2AllOf) o; + return Objects.equals(this.notarizedTransaction, parsedNotarizedTransactionV2AllOf.notarizedTransaction) && + Objects.equals(this.identifiers, parsedNotarizedTransactionV2AllOf.identifiers) && + Objects.equals(this.validationError, parsedNotarizedTransactionV2AllOf.validationError); + } + + @Override + public int hashCode() { + return Objects.hash(notarizedTransaction, identifiers, validationError); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParsedNotarizedTransactionV2AllOf {\n"); + sb.append(" notarizedTransaction: ").append(toIndentedString(notarizedTransaction)).append("\n"); + sb.append(" identifiers: ").append(toIndentedString(identifiers)).append("\n"); + sb.append(" validationError: ").append(toIndentedString(validationError)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedSignedTransactionIntent.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedSignedTransactionIntent.java index 02316d547e..b497e7f6ab 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedSignedTransactionIntent.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedSignedTransactionIntent.java @@ -27,6 +27,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import com.radixdlt.api.core.generated.models.ParsedLedgerTransaction; import com.radixdlt.api.core.generated.models.ParsedNotarizedTransaction; +import com.radixdlt.api.core.generated.models.ParsedNotarizedTransactionV2; import com.radixdlt.api.core.generated.models.ParsedSignedTransactionIntent; import com.radixdlt.api.core.generated.models.ParsedSignedTransactionIntentAllOf; import com.radixdlt.api.core.generated.models.ParsedSignedTransactionIntentIdentifiers; @@ -56,6 +57,7 @@ @JsonSubTypes({ @JsonSubTypes.Type(value = ParsedLedgerTransaction.class, name = "LedgerTransaction"), @JsonSubTypes.Type(value = ParsedNotarizedTransaction.class, name = "NotarizedTransaction"), + @JsonSubTypes.Type(value = ParsedNotarizedTransactionV2.class, name = "NotarizedTransactionV2"), @JsonSubTypes.Type(value = ParsedSignedTransactionIntent.class, name = "SignedTransactionIntent"), @JsonSubTypes.Type(value = ParsedTransactionIntent.class, name = "TransactionIntent"), }) @@ -171,6 +173,7 @@ private String toIndentedString(Object o) { Map> mappings = new HashMap>(); mappings.put("LedgerTransaction", ParsedLedgerTransaction.class); mappings.put("NotarizedTransaction", ParsedNotarizedTransaction.class); + mappings.put("NotarizedTransactionV2", ParsedNotarizedTransactionV2.class); mappings.put("SignedTransactionIntent", ParsedSignedTransactionIntent.class); mappings.put("TransactionIntent", ParsedTransactionIntent.class); mappings.put("ParsedSignedTransactionIntent", ParsedSignedTransactionIntent.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransaction.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransaction.java index ce9c6573dc..fb73b732fc 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransaction.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransaction.java @@ -27,6 +27,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import com.radixdlt.api.core.generated.models.ParsedLedgerTransaction; import com.radixdlt.api.core.generated.models.ParsedNotarizedTransaction; +import com.radixdlt.api.core.generated.models.ParsedNotarizedTransactionV2; import com.radixdlt.api.core.generated.models.ParsedSignedTransactionIntent; import com.radixdlt.api.core.generated.models.ParsedTransactionIntent; import com.radixdlt.api.core.generated.models.ParsedTransactionType; @@ -51,8 +52,10 @@ @JsonSubTypes({ @JsonSubTypes.Type(value = ParsedLedgerTransaction.class, name = "LedgerTransaction"), @JsonSubTypes.Type(value = ParsedNotarizedTransaction.class, name = "NotarizedTransaction"), + @JsonSubTypes.Type(value = ParsedNotarizedTransactionV2.class, name = "NotarizedTransactionV2"), @JsonSubTypes.Type(value = ParsedLedgerTransaction.class, name = "ParsedLedgerTransaction"), @JsonSubTypes.Type(value = ParsedNotarizedTransaction.class, name = "ParsedNotarizedTransaction"), + @JsonSubTypes.Type(value = ParsedNotarizedTransactionV2.class, name = "ParsedNotarizedTransactionV2"), @JsonSubTypes.Type(value = ParsedSignedTransactionIntent.class, name = "ParsedSignedTransactionIntent"), @JsonSubTypes.Type(value = ParsedTransactionIntent.class, name = "ParsedTransactionIntent"), @JsonSubTypes.Type(value = ParsedSignedTransactionIntent.class, name = "SignedTransactionIntent"), @@ -137,8 +140,10 @@ private String toIndentedString(Object o) { Map> mappings = new HashMap>(); mappings.put("LedgerTransaction", ParsedLedgerTransaction.class); mappings.put("NotarizedTransaction", ParsedNotarizedTransaction.class); + mappings.put("NotarizedTransactionV2", ParsedNotarizedTransactionV2.class); mappings.put("ParsedLedgerTransaction", ParsedLedgerTransaction.class); mappings.put("ParsedNotarizedTransaction", ParsedNotarizedTransaction.class); + mappings.put("ParsedNotarizedTransactionV2", ParsedNotarizedTransactionV2.class); mappings.put("ParsedSignedTransactionIntent", ParsedSignedTransactionIntent.class); mappings.put("ParsedTransactionIntent", ParsedTransactionIntent.class); mappings.put("SignedTransactionIntent", ParsedSignedTransactionIntent.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransactionIntent.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransactionIntent.java index b9b1d1b839..d1779cf157 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransactionIntent.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransactionIntent.java @@ -27,6 +27,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import com.radixdlt.api.core.generated.models.ParsedLedgerTransaction; import com.radixdlt.api.core.generated.models.ParsedNotarizedTransaction; +import com.radixdlt.api.core.generated.models.ParsedNotarizedTransactionV2; import com.radixdlt.api.core.generated.models.ParsedSignedTransactionIntent; import com.radixdlt.api.core.generated.models.ParsedTransaction; import com.radixdlt.api.core.generated.models.ParsedTransactionIntent; @@ -56,6 +57,7 @@ @JsonSubTypes({ @JsonSubTypes.Type(value = ParsedLedgerTransaction.class, name = "LedgerTransaction"), @JsonSubTypes.Type(value = ParsedNotarizedTransaction.class, name = "NotarizedTransaction"), + @JsonSubTypes.Type(value = ParsedNotarizedTransactionV2.class, name = "NotarizedTransactionV2"), @JsonSubTypes.Type(value = ParsedSignedTransactionIntent.class, name = "SignedTransactionIntent"), @JsonSubTypes.Type(value = ParsedTransactionIntent.class, name = "TransactionIntent"), }) @@ -171,6 +173,7 @@ private String toIndentedString(Object o) { Map> mappings = new HashMap>(); mappings.put("LedgerTransaction", ParsedLedgerTransaction.class); mappings.put("NotarizedTransaction", ParsedNotarizedTransaction.class); + mappings.put("NotarizedTransactionV2", ParsedNotarizedTransactionV2.class); mappings.put("SignedTransactionIntent", ParsedSignedTransactionIntent.class); mappings.put("TransactionIntent", ParsedTransactionIntent.class); mappings.put("ParsedTransactionIntent", ParsedTransactionIntent.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransactionType.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransactionType.java index a93e72d85a..49ff69eca7 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransactionType.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransactionType.java @@ -35,7 +35,9 @@ public enum ParsedTransactionType { TRANSACTIONINTENT("TransactionIntent"), - LEDGERTRANSACTION("LedgerTransaction"); + LEDGERTRANSACTION("LedgerTransaction"), + + NOTARIZEDTRANSACTIONV2("NotarizedTransactionV2"); private String value; diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstate.java new file mode 100644 index 0000000000..8de5ffd7c9 --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstate.java @@ -0,0 +1,262 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.AccessControllerFieldStateSubstate; +import com.radixdlt.api.core.generated.models.AccountAuthorizedDepositorEntrySubstate; +import com.radixdlt.api.core.generated.models.AccountFieldStateSubstate; +import com.radixdlt.api.core.generated.models.AccountLockerAccountClaimsEntrySubstate; +import com.radixdlt.api.core.generated.models.AccountResourcePreferenceEntrySubstate; +import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; +import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; +import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; +import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentTimeRoundedToMinutesSubstate; +import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentTimeSubstate; +import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentValidatorSetSubstate; +import com.radixdlt.api.core.generated.models.ConsensusManagerFieldStateSubstate; +import com.radixdlt.api.core.generated.models.ConsensusManagerFieldValidatorRewardsSubstate; +import com.radixdlt.api.core.generated.models.ConsensusManagerRegisteredValidatorsByStakeIndexEntrySubstate; +import com.radixdlt.api.core.generated.models.FungibleResourceManagerFieldDivisibilitySubstate; +import com.radixdlt.api.core.generated.models.FungibleResourceManagerFieldTotalSupplySubstate; +import com.radixdlt.api.core.generated.models.FungibleVaultFieldBalanceSubstate; +import com.radixdlt.api.core.generated.models.FungibleVaultFieldFrozenStatusSubstate; +import com.radixdlt.api.core.generated.models.GenericKeyValueStoreEntrySubstate; +import com.radixdlt.api.core.generated.models.GenericScryptoComponentFieldStateSubstate; +import com.radixdlt.api.core.generated.models.MetadataModuleEntrySubstate; +import com.radixdlt.api.core.generated.models.MultiResourcePoolFieldStateSubstate; +import com.radixdlt.api.core.generated.models.NonFungibleResourceManagerDataEntrySubstate; +import com.radixdlt.api.core.generated.models.NonFungibleResourceManagerFieldIdTypeSubstate; +import com.radixdlt.api.core.generated.models.NonFungibleResourceManagerFieldMutableFieldsSubstate; +import com.radixdlt.api.core.generated.models.NonFungibleResourceManagerFieldTotalSupplySubstate; +import com.radixdlt.api.core.generated.models.NonFungibleVaultContentsIndexEntrySubstate; +import com.radixdlt.api.core.generated.models.NonFungibleVaultFieldBalanceSubstate; +import com.radixdlt.api.core.generated.models.NonFungibleVaultFieldFrozenStatusSubstate; +import com.radixdlt.api.core.generated.models.OneResourcePoolFieldStateSubstate; +import com.radixdlt.api.core.generated.models.PackageBlueprintAuthTemplateEntrySubstate; +import com.radixdlt.api.core.generated.models.PackageBlueprintDefinitionEntrySubstate; +import com.radixdlt.api.core.generated.models.PackageBlueprintDependenciesEntrySubstate; +import com.radixdlt.api.core.generated.models.PackageBlueprintRoyaltyEntrySubstate; +import com.radixdlt.api.core.generated.models.PackageCodeInstrumentedCodeEntrySubstate; +import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; +import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; +import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; +import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; +import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; +import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; +import com.radixdlt.api.core.generated.models.RoyaltyModuleMethodRoyaltyEntrySubstate; +import com.radixdlt.api.core.generated.models.SchemaEntrySubstate; +import com.radixdlt.api.core.generated.models.Substate; +import com.radixdlt.api.core.generated.models.SubstateType; +import com.radixdlt.api.core.generated.models.TransactionTrackerCollectionEntrySubstate; +import com.radixdlt.api.core.generated.models.TransactionTrackerFieldStateSubstate; +import com.radixdlt.api.core.generated.models.TwoResourcePoolFieldStateSubstate; +import com.radixdlt.api.core.generated.models.TypeInfoModuleFieldTypeInfoSubstate; +import com.radixdlt.api.core.generated.models.ValidatorFieldProtocolUpdateReadinessSignalSubstate; +import com.radixdlt.api.core.generated.models.ValidatorFieldStateSubstate; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.radixdlt.api.core.generated.client.JSON; +/** + * ProtocolUpdateStatusModuleFieldSummarySubstate + */ +@JsonPropertyOrder({ +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "substate_type", // ignore manually set substate_type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the substate_type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "substate_type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = AccessControllerFieldStateSubstate.class, name = "AccessControllerFieldState"), + @JsonSubTypes.Type(value = AccountAuthorizedDepositorEntrySubstate.class, name = "AccountAuthorizedDepositorEntry"), + @JsonSubTypes.Type(value = AccountFieldStateSubstate.class, name = "AccountFieldState"), + @JsonSubTypes.Type(value = AccountLockerAccountClaimsEntrySubstate.class, name = "AccountLockerAccountClaimsEntry"), + @JsonSubTypes.Type(value = AccountResourcePreferenceEntrySubstate.class, name = "AccountResourcePreferenceEntry"), + @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), + @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), + @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), + @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentTimeSubstate.class, name = "ConsensusManagerFieldCurrentTime"), + @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentTimeRoundedToMinutesSubstate.class, name = "ConsensusManagerFieldCurrentTimeRoundedToMinutes"), + @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentValidatorSetSubstate.class, name = "ConsensusManagerFieldCurrentValidatorSet"), + @JsonSubTypes.Type(value = ConsensusManagerFieldStateSubstate.class, name = "ConsensusManagerFieldState"), + @JsonSubTypes.Type(value = ConsensusManagerFieldValidatorRewardsSubstate.class, name = "ConsensusManagerFieldValidatorRewards"), + @JsonSubTypes.Type(value = ConsensusManagerRegisteredValidatorsByStakeIndexEntrySubstate.class, name = "ConsensusManagerRegisteredValidatorsByStakeIndexEntry"), + @JsonSubTypes.Type(value = FungibleResourceManagerFieldDivisibilitySubstate.class, name = "FungibleResourceManagerFieldDivisibility"), + @JsonSubTypes.Type(value = FungibleResourceManagerFieldTotalSupplySubstate.class, name = "FungibleResourceManagerFieldTotalSupply"), + @JsonSubTypes.Type(value = FungibleVaultFieldBalanceSubstate.class, name = "FungibleVaultFieldBalance"), + @JsonSubTypes.Type(value = FungibleVaultFieldFrozenStatusSubstate.class, name = "FungibleVaultFieldFrozenStatus"), + @JsonSubTypes.Type(value = GenericKeyValueStoreEntrySubstate.class, name = "GenericKeyValueStoreEntry"), + @JsonSubTypes.Type(value = GenericScryptoComponentFieldStateSubstate.class, name = "GenericScryptoComponentFieldState"), + @JsonSubTypes.Type(value = MetadataModuleEntrySubstate.class, name = "MetadataModuleEntry"), + @JsonSubTypes.Type(value = MultiResourcePoolFieldStateSubstate.class, name = "MultiResourcePoolFieldState"), + @JsonSubTypes.Type(value = NonFungibleResourceManagerDataEntrySubstate.class, name = "NonFungibleResourceManagerDataEntry"), + @JsonSubTypes.Type(value = NonFungibleResourceManagerFieldIdTypeSubstate.class, name = "NonFungibleResourceManagerFieldIdType"), + @JsonSubTypes.Type(value = NonFungibleResourceManagerFieldMutableFieldsSubstate.class, name = "NonFungibleResourceManagerFieldMutableFields"), + @JsonSubTypes.Type(value = NonFungibleResourceManagerFieldTotalSupplySubstate.class, name = "NonFungibleResourceManagerFieldTotalSupply"), + @JsonSubTypes.Type(value = NonFungibleVaultContentsIndexEntrySubstate.class, name = "NonFungibleVaultContentsIndexEntry"), + @JsonSubTypes.Type(value = NonFungibleVaultFieldBalanceSubstate.class, name = "NonFungibleVaultFieldBalance"), + @JsonSubTypes.Type(value = NonFungibleVaultFieldFrozenStatusSubstate.class, name = "NonFungibleVaultFieldFrozenStatus"), + @JsonSubTypes.Type(value = OneResourcePoolFieldStateSubstate.class, name = "OneResourcePoolFieldState"), + @JsonSubTypes.Type(value = PackageBlueprintAuthTemplateEntrySubstate.class, name = "PackageBlueprintAuthTemplateEntry"), + @JsonSubTypes.Type(value = PackageBlueprintDefinitionEntrySubstate.class, name = "PackageBlueprintDefinitionEntry"), + @JsonSubTypes.Type(value = PackageBlueprintDependenciesEntrySubstate.class, name = "PackageBlueprintDependenciesEntry"), + @JsonSubTypes.Type(value = PackageBlueprintRoyaltyEntrySubstate.class, name = "PackageBlueprintRoyaltyEntry"), + @JsonSubTypes.Type(value = PackageCodeInstrumentedCodeEntrySubstate.class, name = "PackageCodeInstrumentedCodeEntry"), + @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), + @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), + @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), + @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), + @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), + @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), + @JsonSubTypes.Type(value = RoyaltyModuleMethodRoyaltyEntrySubstate.class, name = "RoyaltyModuleMethodRoyaltyEntry"), + @JsonSubTypes.Type(value = SchemaEntrySubstate.class, name = "SchemaEntry"), + @JsonSubTypes.Type(value = TransactionTrackerCollectionEntrySubstate.class, name = "TransactionTrackerCollectionEntry"), + @JsonSubTypes.Type(value = TransactionTrackerFieldStateSubstate.class, name = "TransactionTrackerFieldState"), + @JsonSubTypes.Type(value = TwoResourcePoolFieldStateSubstate.class, name = "TwoResourcePoolFieldState"), + @JsonSubTypes.Type(value = TypeInfoModuleFieldTypeInfoSubstate.class, name = "TypeInfoModuleFieldTypeInfo"), + @JsonSubTypes.Type(value = ValidatorFieldProtocolUpdateReadinessSignalSubstate.class, name = "ValidatorFieldProtocolUpdateReadinessSignal"), + @JsonSubTypes.Type(value = ValidatorFieldStateSubstate.class, name = "ValidatorFieldState"), +}) + +public class ProtocolUpdateStatusModuleFieldSummarySubstate extends Substate { + public ProtocolUpdateStatusModuleFieldSummarySubstate() { + } + + /** + * Return true if this ProtocolUpdateStatusModuleFieldSummarySubstate object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProtocolUpdateStatusModuleFieldSummarySubstate {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("AccessControllerFieldState", AccessControllerFieldStateSubstate.class); + mappings.put("AccountAuthorizedDepositorEntry", AccountAuthorizedDepositorEntrySubstate.class); + mappings.put("AccountFieldState", AccountFieldStateSubstate.class); + mappings.put("AccountLockerAccountClaimsEntry", AccountLockerAccountClaimsEntrySubstate.class); + mappings.put("AccountResourcePreferenceEntry", AccountResourcePreferenceEntrySubstate.class); + mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); + mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); + mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); + mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); + mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); + mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); + mappings.put("ConsensusManagerFieldCurrentTime", ConsensusManagerFieldCurrentTimeSubstate.class); + mappings.put("ConsensusManagerFieldCurrentTimeRoundedToMinutes", ConsensusManagerFieldCurrentTimeRoundedToMinutesSubstate.class); + mappings.put("ConsensusManagerFieldCurrentValidatorSet", ConsensusManagerFieldCurrentValidatorSetSubstate.class); + mappings.put("ConsensusManagerFieldState", ConsensusManagerFieldStateSubstate.class); + mappings.put("ConsensusManagerFieldValidatorRewards", ConsensusManagerFieldValidatorRewardsSubstate.class); + mappings.put("ConsensusManagerRegisteredValidatorsByStakeIndexEntry", ConsensusManagerRegisteredValidatorsByStakeIndexEntrySubstate.class); + mappings.put("FungibleResourceManagerFieldDivisibility", FungibleResourceManagerFieldDivisibilitySubstate.class); + mappings.put("FungibleResourceManagerFieldTotalSupply", FungibleResourceManagerFieldTotalSupplySubstate.class); + mappings.put("FungibleVaultFieldBalance", FungibleVaultFieldBalanceSubstate.class); + mappings.put("FungibleVaultFieldFrozenStatus", FungibleVaultFieldFrozenStatusSubstate.class); + mappings.put("GenericKeyValueStoreEntry", GenericKeyValueStoreEntrySubstate.class); + mappings.put("GenericScryptoComponentFieldState", GenericScryptoComponentFieldStateSubstate.class); + mappings.put("MetadataModuleEntry", MetadataModuleEntrySubstate.class); + mappings.put("MultiResourcePoolFieldState", MultiResourcePoolFieldStateSubstate.class); + mappings.put("NonFungibleResourceManagerDataEntry", NonFungibleResourceManagerDataEntrySubstate.class); + mappings.put("NonFungibleResourceManagerFieldIdType", NonFungibleResourceManagerFieldIdTypeSubstate.class); + mappings.put("NonFungibleResourceManagerFieldMutableFields", NonFungibleResourceManagerFieldMutableFieldsSubstate.class); + mappings.put("NonFungibleResourceManagerFieldTotalSupply", NonFungibleResourceManagerFieldTotalSupplySubstate.class); + mappings.put("NonFungibleVaultContentsIndexEntry", NonFungibleVaultContentsIndexEntrySubstate.class); + mappings.put("NonFungibleVaultFieldBalance", NonFungibleVaultFieldBalanceSubstate.class); + mappings.put("NonFungibleVaultFieldFrozenStatus", NonFungibleVaultFieldFrozenStatusSubstate.class); + mappings.put("OneResourcePoolFieldState", OneResourcePoolFieldStateSubstate.class); + mappings.put("PackageBlueprintAuthTemplateEntry", PackageBlueprintAuthTemplateEntrySubstate.class); + mappings.put("PackageBlueprintDefinitionEntry", PackageBlueprintDefinitionEntrySubstate.class); + mappings.put("PackageBlueprintDependenciesEntry", PackageBlueprintDependenciesEntrySubstate.class); + mappings.put("PackageBlueprintRoyaltyEntry", PackageBlueprintRoyaltyEntrySubstate.class); + mappings.put("PackageCodeInstrumentedCodeEntry", PackageCodeInstrumentedCodeEntrySubstate.class); + mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); + mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); + mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); + mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); + mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); + mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); + mappings.put("RoyaltyModuleMethodRoyaltyEntry", RoyaltyModuleMethodRoyaltyEntrySubstate.class); + mappings.put("SchemaEntry", SchemaEntrySubstate.class); + mappings.put("TransactionTrackerCollectionEntry", TransactionTrackerCollectionEntrySubstate.class); + mappings.put("TransactionTrackerFieldState", TransactionTrackerFieldStateSubstate.class); + mappings.put("TwoResourcePoolFieldState", TwoResourcePoolFieldStateSubstate.class); + mappings.put("TypeInfoModuleFieldTypeInfo", TypeInfoModuleFieldTypeInfoSubstate.class); + mappings.put("ValidatorFieldProtocolUpdateReadinessSignal", ValidatorFieldProtocolUpdateReadinessSignalSubstate.class); + mappings.put("ValidatorFieldState", ValidatorFieldStateSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummarySubstate", ProtocolUpdateStatusModuleFieldSummarySubstate.class); + JSON.registerDiscriminator(ProtocolUpdateStatusModuleFieldSummarySubstate.class, "substate_type", mappings); +} +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoleAssignmentModuleFieldOwnerRoleSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoleAssignmentModuleFieldOwnerRoleSubstate.java index 9c9f9dcb98..6efa3472cd 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoleAssignmentModuleFieldOwnerRoleSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoleAssignmentModuleFieldOwnerRoleSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -66,6 +67,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstateAllOf; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleValue; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoleAssignmentModuleRuleEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoleAssignmentModuleRuleEntrySubstate.java index a5cd22bc18..b0fc929f06 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoleAssignmentModuleRuleEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoleAssignmentModuleRuleEntrySubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -67,6 +68,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstateAllOf; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoundUpdateLedgerTransaction.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoundUpdateLedgerTransaction.java index 4a067778b9..08696bafff 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoundUpdateLedgerTransaction.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoundUpdateLedgerTransaction.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.RoundUpdateLedgerTransactionAllOf; import com.radixdlt.api.core.generated.models.RoundUpdateTransaction; import com.radixdlt.api.core.generated.models.UserLedgerTransaction; +import com.radixdlt.api.core.generated.models.UserLedgerTransactionV2; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -56,6 +57,7 @@ @JsonSubTypes.Type(value = GenesisLedgerTransaction.class, name = "Genesis"), @JsonSubTypes.Type(value = RoundUpdateLedgerTransaction.class, name = "RoundUpdate"), @JsonSubTypes.Type(value = UserLedgerTransaction.class, name = "User"), + @JsonSubTypes.Type(value = UserLedgerTransactionV2.class, name = "UserV2"), }) public class RoundUpdateLedgerTransaction extends LedgerTransaction { @@ -140,6 +142,7 @@ private String toIndentedString(Object o) { mappings.put("Genesis", GenesisLedgerTransaction.class); mappings.put("RoundUpdate", RoundUpdateLedgerTransaction.class); mappings.put("User", UserLedgerTransaction.class); + mappings.put("UserV2", UserLedgerTransactionV2.class); mappings.put("RoundUpdateLedgerTransaction", RoundUpdateLedgerTransaction.class); JSON.registerDiscriminator(RoundUpdateLedgerTransaction.class, "type", mappings); } diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoyaltyModuleFieldStateSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoyaltyModuleFieldStateSubstate.java index 3e3b0d3e6a..b599e810f1 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoyaltyModuleFieldStateSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoyaltyModuleFieldStateSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -66,6 +67,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoyaltyModuleMethodRoyaltyEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoyaltyModuleMethodRoyaltyEntrySubstate.java index ffbd78e66b..65d9163976 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoyaltyModuleMethodRoyaltyEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/RoyaltyModuleMethodRoyaltyEntrySubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -67,6 +68,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/SchemaEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/SchemaEntrySubstate.java index 8b5b9c8701..3922ba5a51 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/SchemaEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/SchemaEntrySubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -66,6 +67,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/Substate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/Substate.java index 8927d3ae0a..a924ba43d9 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/Substate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/Substate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -66,6 +67,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -114,6 +116,8 @@ @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBootSubstate"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBootSubstate"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfigurationSubstate"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBootSubstate"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @@ -180,6 +184,8 @@ @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntrySubstate"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulatorSubstate"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummarySubstate"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRoleSubstate"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @@ -327,6 +333,8 @@ private String toIndentedString(Object o) { mappings.put("BootLoaderModuleFieldKernelBootSubstate", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBootSubstate", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfigurationSubstate", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("BootLoaderModuleFieldVmBootSubstate", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); @@ -393,6 +401,8 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeVmTypeEntrySubstate", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); mappings.put("PackageFieldRoyaltyAccumulatorSubstate", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummarySubstate", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRoleSubstate", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/SubstateType.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/SubstateType.java index cba8a38f3c..2861c31ef3 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/SubstateType.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/SubstateType.java @@ -134,7 +134,11 @@ public enum SubstateType { BOOTLOADERMODULEFIELDSYSTEMBOOT("BootLoaderModuleFieldSystemBoot"), - BOOTLOADERMODULEFIELDKERNELBOOT("BootLoaderModuleFieldKernelBoot"); + BOOTLOADERMODULEFIELDKERNELBOOT("BootLoaderModuleFieldKernelBoot"), + + BOOTLOADERMODULEFIELDTRANSACTIONVALIDATIONCONFIGURATION("BootLoaderModuleFieldTransactionValidationConfiguration"), + + PROTOCOLUPDATESTATUSMODULEFIELDSUMMARY("ProtocolUpdateStatusModuleFieldSummary"); private String value; diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/SystemFieldKind.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/SystemFieldKind.java index 7df19debc6..48a7ec7fd6 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/SystemFieldKind.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/SystemFieldKind.java @@ -34,7 +34,11 @@ public enum SystemFieldKind { SYSTEMBOOT("SystemBoot"), - KERNELBOOT("KernelBoot"); + KERNELBOOT("KernelBoot"), + + TRANSACTIONVALIDATIONCONFIGURATION("TransactionValidationConfiguration"), + + PROTOCOLUPDATESTATUSSUMMARY("ProtocolUpdateStatusSummary"); private String value; diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/SystemVersion.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/SystemVersion.java new file mode 100644 index 0000000000..ee387f8742 --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/SystemVersion.java @@ -0,0 +1,62 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import io.swagger.annotations.ApiModel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The SystemVersion was added at Cuttlefish. Before that it can be assumed to be V1. + */ +public enum SystemVersion { + + V1("V1"), + + V2("V2"); + + private String value; + + SystemVersion(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SystemVersion fromValue(String value) { + for (SystemVersion b : SystemVersion.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionTrackerCollectionEntrySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionTrackerCollectionEntrySubstate.java index 44ef40d7db..0156efe125 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionTrackerCollectionEntrySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionTrackerCollectionEntrySubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -66,6 +67,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -110,6 +112,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -143,6 +146,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -273,6 +277,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -306,6 +311,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionTrackerFieldStateSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionTrackerFieldStateSubstate.java index 7c7517cf17..a65770a05a 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionTrackerFieldStateSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionTrackerFieldStateSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -66,6 +67,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TwoResourcePoolFieldStateSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TwoResourcePoolFieldStateSubstate.java index 71aab697fe..a1a9b27b75 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TwoResourcePoolFieldStateSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TwoResourcePoolFieldStateSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -66,6 +67,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TypeInfoModuleFieldTypeInfoSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TypeInfoModuleFieldTypeInfoSubstate.java index 610bfc8875..35f07195ff 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TypeInfoModuleFieldTypeInfoSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TypeInfoModuleFieldTypeInfoSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -66,6 +67,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/UserLedgerTransaction.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/UserLedgerTransaction.java index 577f0c2606..b7601908a8 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/UserLedgerTransaction.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/UserLedgerTransaction.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.RoundUpdateLedgerTransaction; import com.radixdlt.api.core.generated.models.UserLedgerTransaction; import com.radixdlt.api.core.generated.models.UserLedgerTransactionAllOf; +import com.radixdlt.api.core.generated.models.UserLedgerTransactionV2; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -56,6 +57,7 @@ @JsonSubTypes.Type(value = GenesisLedgerTransaction.class, name = "Genesis"), @JsonSubTypes.Type(value = RoundUpdateLedgerTransaction.class, name = "RoundUpdate"), @JsonSubTypes.Type(value = UserLedgerTransaction.class, name = "User"), + @JsonSubTypes.Type(value = UserLedgerTransactionV2.class, name = "UserV2"), }) public class UserLedgerTransaction extends LedgerTransaction { @@ -140,6 +142,7 @@ private String toIndentedString(Object o) { mappings.put("Genesis", GenesisLedgerTransaction.class); mappings.put("RoundUpdate", RoundUpdateLedgerTransaction.class); mappings.put("User", UserLedgerTransaction.class); + mappings.put("UserV2", UserLedgerTransactionV2.class); mappings.put("UserLedgerTransaction", UserLedgerTransaction.class); JSON.registerDiscriminator(UserLedgerTransaction.class, "type", mappings); } diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/UserLedgerTransactionV2.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/UserLedgerTransactionV2.java new file mode 100644 index 0000000000..67cb6f89fa --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/UserLedgerTransactionV2.java @@ -0,0 +1,150 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.FlashLedgerTransaction; +import com.radixdlt.api.core.generated.models.GenesisLedgerTransaction; +import com.radixdlt.api.core.generated.models.LedgerTransaction; +import com.radixdlt.api.core.generated.models.LedgerTransactionType; +import com.radixdlt.api.core.generated.models.NotarizedTransactionV2; +import com.radixdlt.api.core.generated.models.RoundUpdateLedgerTransaction; +import com.radixdlt.api.core.generated.models.UserLedgerTransaction; +import com.radixdlt.api.core.generated.models.UserLedgerTransactionV2; +import com.radixdlt.api.core.generated.models.UserLedgerTransactionV2AllOf; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.radixdlt.api.core.generated.client.JSON; +/** + * UserLedgerTransactionV2 + */ +@JsonPropertyOrder({ + UserLedgerTransactionV2.JSON_PROPERTY_NOTARIZED_TRANSACTION +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = FlashLedgerTransaction.class, name = "Flash"), + @JsonSubTypes.Type(value = GenesisLedgerTransaction.class, name = "Genesis"), + @JsonSubTypes.Type(value = RoundUpdateLedgerTransaction.class, name = "RoundUpdate"), + @JsonSubTypes.Type(value = UserLedgerTransaction.class, name = "User"), + @JsonSubTypes.Type(value = UserLedgerTransactionV2.class, name = "UserV2"), +}) + +public class UserLedgerTransactionV2 extends LedgerTransaction { + public static final String JSON_PROPERTY_NOTARIZED_TRANSACTION = "notarized_transaction"; + private NotarizedTransactionV2 notarizedTransaction; + + public UserLedgerTransactionV2() { + } + + public UserLedgerTransactionV2 notarizedTransaction(NotarizedTransactionV2 notarizedTransaction) { + this.notarizedTransaction = notarizedTransaction; + return this; + } + + /** + * Get notarizedTransaction + * @return notarizedTransaction + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_NOTARIZED_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public NotarizedTransactionV2 getNotarizedTransaction() { + return notarizedTransaction; + } + + + @JsonProperty(JSON_PROPERTY_NOTARIZED_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNotarizedTransaction(NotarizedTransactionV2 notarizedTransaction) { + this.notarizedTransaction = notarizedTransaction; + } + + + /** + * Return true if this UserLedgerTransactionV2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserLedgerTransactionV2 userLedgerTransactionV2 = (UserLedgerTransactionV2) o; + return Objects.equals(this.notarizedTransaction, userLedgerTransactionV2.notarizedTransaction) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(notarizedTransaction, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserLedgerTransactionV2 {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" notarizedTransaction: ").append(toIndentedString(notarizedTransaction)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("Flash", FlashLedgerTransaction.class); + mappings.put("Genesis", GenesisLedgerTransaction.class); + mappings.put("RoundUpdate", RoundUpdateLedgerTransaction.class); + mappings.put("User", UserLedgerTransaction.class); + mappings.put("UserV2", UserLedgerTransactionV2.class); + mappings.put("UserLedgerTransactionV2", UserLedgerTransactionV2.class); + JSON.registerDiscriminator(UserLedgerTransactionV2.class, "type", mappings); +} +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/UserLedgerTransactionV2AllOf.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/UserLedgerTransactionV2AllOf.java new file mode 100644 index 0000000000..25c754af7f --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/UserLedgerTransactionV2AllOf.java @@ -0,0 +1,112 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.NotarizedTransactionV2; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UserLedgerTransactionV2AllOf + */ +@JsonPropertyOrder({ + UserLedgerTransactionV2AllOf.JSON_PROPERTY_NOTARIZED_TRANSACTION +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UserLedgerTransactionV2AllOf { + public static final String JSON_PROPERTY_NOTARIZED_TRANSACTION = "notarized_transaction"; + private NotarizedTransactionV2 notarizedTransaction; + + public UserLedgerTransactionV2AllOf() { + } + + public UserLedgerTransactionV2AllOf notarizedTransaction(NotarizedTransactionV2 notarizedTransaction) { + this.notarizedTransaction = notarizedTransaction; + return this; + } + + /** + * Get notarizedTransaction + * @return notarizedTransaction + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_NOTARIZED_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public NotarizedTransactionV2 getNotarizedTransaction() { + return notarizedTransaction; + } + + + @JsonProperty(JSON_PROPERTY_NOTARIZED_TRANSACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNotarizedTransaction(NotarizedTransactionV2 notarizedTransaction) { + this.notarizedTransaction = notarizedTransaction; + } + + + /** + * Return true if this UserLedgerTransactionV2_allOf object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UserLedgerTransactionV2AllOf userLedgerTransactionV2AllOf = (UserLedgerTransactionV2AllOf) o; + return Objects.equals(this.notarizedTransaction, userLedgerTransactionV2AllOf.notarizedTransaction); + } + + @Override + public int hashCode() { + return Objects.hash(notarizedTransaction); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UserLedgerTransactionV2AllOf {\n"); + sb.append(" notarizedTransaction: ").append(toIndentedString(notarizedTransaction)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ValidatorFieldProtocolUpdateReadinessSignalSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ValidatorFieldProtocolUpdateReadinessSignalSubstate.java index 29664cfe42..91e234bb3e 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ValidatorFieldProtocolUpdateReadinessSignalSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ValidatorFieldProtocolUpdateReadinessSignalSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -66,6 +67,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ValidatorFieldStateSubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ValidatorFieldStateSubstate.java index 64a0d289b6..923ea1dd26 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ValidatorFieldStateSubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ValidatorFieldStateSubstate.java @@ -33,6 +33,7 @@ import com.radixdlt.api.core.generated.models.AccountVaultEntrySubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldKernelBootSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldSystemBootSubstate; +import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldTransactionValidationConfigurationSubstate; import com.radixdlt.api.core.generated.models.BootLoaderModuleFieldVmBootSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldConfigSubstate; import com.radixdlt.api.core.generated.models.ConsensusManagerFieldCurrentProposalStatisticSubstate; @@ -66,6 +67,7 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -108,6 +110,7 @@ @JsonSubTypes.Type(value = AccountVaultEntrySubstate.class, name = "AccountVaultEntry"), @JsonSubTypes.Type(value = BootLoaderModuleFieldKernelBootSubstate.class, name = "BootLoaderModuleFieldKernelBoot"), @JsonSubTypes.Type(value = BootLoaderModuleFieldSystemBootSubstate.class, name = "BootLoaderModuleFieldSystemBoot"), + @JsonSubTypes.Type(value = BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class, name = "BootLoaderModuleFieldTransactionValidationConfiguration"), @JsonSubTypes.Type(value = BootLoaderModuleFieldVmBootSubstate.class, name = "BootLoaderModuleFieldVmBoot"), @JsonSubTypes.Type(value = ConsensusManagerFieldConfigSubstate.class, name = "ConsensusManagerFieldConfig"), @JsonSubTypes.Type(value = ConsensusManagerFieldCurrentProposalStatisticSubstate.class, name = "ConsensusManagerFieldCurrentProposalStatistic"), @@ -141,6 +144,7 @@ @JsonSubTypes.Type(value = PackageCodeOriginalCodeEntrySubstate.class, name = "PackageCodeOriginalCodeEntry"), @JsonSubTypes.Type(value = PackageCodeVmTypeEntrySubstate.class, name = "PackageCodeVmTypeEntry"), @JsonSubTypes.Type(value = PackageFieldRoyaltyAccumulatorSubstate.class, name = "PackageFieldRoyaltyAccumulator"), + @JsonSubTypes.Type(value = ProtocolUpdateStatusModuleFieldSummarySubstate.class, name = "ProtocolUpdateStatusModuleFieldSummary"), @JsonSubTypes.Type(value = RoleAssignmentModuleFieldOwnerRoleSubstate.class, name = "RoleAssignmentModuleFieldOwnerRole"), @JsonSubTypes.Type(value = RoleAssignmentModuleRuleEntrySubstate.class, name = "RoleAssignmentModuleRuleEntry"), @JsonSubTypes.Type(value = RoyaltyModuleFieldStateSubstate.class, name = "RoyaltyModuleFieldState"), @@ -240,6 +244,7 @@ private String toIndentedString(Object o) { mappings.put("AccountVaultEntry", AccountVaultEntrySubstate.class); mappings.put("BootLoaderModuleFieldKernelBoot", BootLoaderModuleFieldKernelBootSubstate.class); mappings.put("BootLoaderModuleFieldSystemBoot", BootLoaderModuleFieldSystemBootSubstate.class); + mappings.put("BootLoaderModuleFieldTransactionValidationConfiguration", BootLoaderModuleFieldTransactionValidationConfigurationSubstate.class); mappings.put("BootLoaderModuleFieldVmBoot", BootLoaderModuleFieldVmBootSubstate.class); mappings.put("ConsensusManagerFieldConfig", ConsensusManagerFieldConfigSubstate.class); mappings.put("ConsensusManagerFieldCurrentProposalStatistic", ConsensusManagerFieldCurrentProposalStatisticSubstate.class); @@ -273,6 +278,7 @@ private String toIndentedString(Object o) { mappings.put("PackageCodeOriginalCodeEntry", PackageCodeOriginalCodeEntrySubstate.class); mappings.put("PackageCodeVmTypeEntry", PackageCodeVmTypeEntrySubstate.class); mappings.put("PackageFieldRoyaltyAccumulator", PackageFieldRoyaltyAccumulatorSubstate.class); + mappings.put("ProtocolUpdateStatusModuleFieldSummary", ProtocolUpdateStatusModuleFieldSummarySubstate.class); mappings.put("RoleAssignmentModuleFieldOwnerRole", RoleAssignmentModuleFieldOwnerRoleSubstate.class); mappings.put("RoleAssignmentModuleRuleEntry", RoleAssignmentModuleRuleEntrySubstate.class); mappings.put("RoyaltyModuleFieldState", RoyaltyModuleFieldStateSubstate.class); diff --git a/sdk/typescript/lib/generated/.openapi-generator/FILES b/sdk/typescript/lib/generated/.openapi-generator/FILES index 109c99f0de..9cec5b722f 100644 --- a/sdk/typescript/lib/generated/.openapi-generator/FILES +++ b/sdk/typescript/lib/generated/.openapi-generator/FILES @@ -42,6 +42,7 @@ models/AllOfProofRule.ts models/AllOfProofRuleAllOf.ts models/AllowAllAccessRule.ts models/AllowAllAccessRuleAllOf.ts +models/AlwaysVisibleGlobalNodesVersion.ts models/AmountOfProofRule.ts models/AmountOfProofRuleAllOf.ts models/AnyOfAccessRuleNode.ts @@ -83,9 +84,12 @@ models/BlueprintTypeReferenceKind.ts models/BlueprintVersionKey.ts models/BootLoaderModuleFieldKernelBootSubstate.ts models/BootLoaderModuleFieldKernelBootSubstateAllOf.ts +models/BootLoaderModuleFieldKernelBootValue.ts models/BootLoaderModuleFieldSystemBootSubstate.ts models/BootLoaderModuleFieldSystemBootSubstateAllOf.ts models/BootLoaderModuleFieldSystemBootValue.ts +models/BootLoaderModuleFieldTransactionValidationConfigurationSubstate.ts +models/BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOf.ts models/BootLoaderModuleFieldVmBootSubstate.ts models/BootLoaderModuleFieldVmBootSubstateAllOf.ts models/BootLoaderModuleFieldVmBootValue.ts @@ -362,6 +366,7 @@ models/NonFungibleVaultFieldFrozenStatusSubstate.ts models/NonFungibleVaultFieldFrozenStatusSubstateAllOf.ts models/NonFungibleVaultFieldFrozenStatusValue.ts models/NotarizedTransaction.ts +models/NotarizedTransactionV2.ts models/ObjectFieldStructure.ts models/ObjectFieldStructureAllOf.ts models/ObjectHook.ts @@ -424,6 +429,8 @@ models/ParsedNotarizedTransaction.ts models/ParsedNotarizedTransactionAllOf.ts models/ParsedNotarizedTransactionAllOfValidationError.ts models/ParsedNotarizedTransactionIdentifiers.ts +models/ParsedNotarizedTransactionV2.ts +models/ParsedNotarizedTransactionV2AllOf.ts models/ParsedSignedTransactionIntent.ts models/ParsedSignedTransactionIntentAllOf.ts models/ParsedSignedTransactionIntentIdentifiers.ts @@ -460,6 +467,8 @@ models/ProtectedAccessRule.ts models/ProtectedAccessRuleAllOf.ts models/ProtocolUpdateLedgerProofOrigin.ts models/ProtocolUpdateLedgerProofOriginAllOf.ts +models/ProtocolUpdateStatusModuleFieldSummarySubstate.ts +models/ProtocolUpdateStatusModuleFieldSummarySubstateAllOf.ts models/ProtocolVersionReadiness.ts models/PublicKey.ts models/PublicKeyBase.ts @@ -612,6 +621,7 @@ models/SystemParameters.ts models/SystemSchemaStructure.ts models/SystemSchemaStructureAllOf.ts models/SystemTransaction.ts +models/SystemVersion.ts models/TargetIdentifier.ts models/TargetIdentifierBase.ts models/TargetIdentifierType.ts @@ -671,6 +681,8 @@ models/TypeInfoType.ts models/UpdatedSubstate.ts models/UserLedgerTransaction.ts models/UserLedgerTransactionAllOf.ts +models/UserLedgerTransactionV2.ts +models/UserLedgerTransactionV2AllOf.ts models/ValidatorFeeChangeRequest.ts models/ValidatorFieldProtocolUpdateReadinessSignalSubstate.ts models/ValidatorFieldProtocolUpdateReadinessSignalSubstateAllOf.ts diff --git a/sdk/typescript/lib/generated/models/AlwaysVisibleGlobalNodesVersion.ts b/sdk/typescript/lib/generated/models/AlwaysVisibleGlobalNodesVersion.ts new file mode 100644 index 0000000000..11f936668a --- /dev/null +++ b/sdk/typescript/lib/generated/models/AlwaysVisibleGlobalNodesVersion.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * This was added in Cuttlefish. Before that, this value was missing, but can be assumed to be V1. + * @export + */ +export const AlwaysVisibleGlobalNodesVersion = { + V1: 'V1', + V2: 'V2' +} as const; +export type AlwaysVisibleGlobalNodesVersion = typeof AlwaysVisibleGlobalNodesVersion[keyof typeof AlwaysVisibleGlobalNodesVersion]; + + +export function AlwaysVisibleGlobalNodesVersionFromJSON(json: any): AlwaysVisibleGlobalNodesVersion { + return AlwaysVisibleGlobalNodesVersionFromJSONTyped(json, false); +} + +export function AlwaysVisibleGlobalNodesVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlwaysVisibleGlobalNodesVersion { + return json as AlwaysVisibleGlobalNodesVersion; +} + +export function AlwaysVisibleGlobalNodesVersionToJSON(value?: AlwaysVisibleGlobalNodesVersion | null): any { + return value as any; +} + diff --git a/sdk/typescript/lib/generated/models/BootLoaderModuleFieldKernelBootSubstate.ts b/sdk/typescript/lib/generated/models/BootLoaderModuleFieldKernelBootSubstate.ts index 88d9840111..c718034bf2 100644 --- a/sdk/typescript/lib/generated/models/BootLoaderModuleFieldKernelBootSubstate.ts +++ b/sdk/typescript/lib/generated/models/BootLoaderModuleFieldKernelBootSubstate.ts @@ -13,6 +13,13 @@ */ import { exists, mapValues } from '../runtime'; +import type { BootLoaderModuleFieldKernelBootValue } from './BootLoaderModuleFieldKernelBootValue'; +import { + BootLoaderModuleFieldKernelBootValueFromJSON, + BootLoaderModuleFieldKernelBootValueFromJSONTyped, + BootLoaderModuleFieldKernelBootValueToJSON, +} from './BootLoaderModuleFieldKernelBootValue'; + /** * * @export @@ -33,10 +40,10 @@ export interface BootLoaderModuleFieldKernelBootSubstate { is_locked: boolean; /** * - * @type {object} + * @type {BootLoaderModuleFieldKernelBootValue} * @memberof BootLoaderModuleFieldKernelBootSubstate */ - value: object; + value: BootLoaderModuleFieldKernelBootValue; } @@ -73,7 +80,7 @@ export function BootLoaderModuleFieldKernelBootSubstateFromJSONTyped(json: any, 'substate_type': json['substate_type'], 'is_locked': json['is_locked'], - 'value': json['value'], + 'value': BootLoaderModuleFieldKernelBootValueFromJSON(json['value']), }; } @@ -88,7 +95,7 @@ export function BootLoaderModuleFieldKernelBootSubstateToJSON(value?: BootLoader 'substate_type': value.substate_type, 'is_locked': value.is_locked, - 'value': value.value, + 'value': BootLoaderModuleFieldKernelBootValueToJSON(value.value), }; } diff --git a/sdk/typescript/lib/generated/models/BootLoaderModuleFieldKernelBootSubstateAllOf.ts b/sdk/typescript/lib/generated/models/BootLoaderModuleFieldKernelBootSubstateAllOf.ts index 5294096424..706b2f647d 100644 --- a/sdk/typescript/lib/generated/models/BootLoaderModuleFieldKernelBootSubstateAllOf.ts +++ b/sdk/typescript/lib/generated/models/BootLoaderModuleFieldKernelBootSubstateAllOf.ts @@ -13,6 +13,13 @@ */ import { exists, mapValues } from '../runtime'; +import type { BootLoaderModuleFieldKernelBootValue } from './BootLoaderModuleFieldKernelBootValue'; +import { + BootLoaderModuleFieldKernelBootValueFromJSON, + BootLoaderModuleFieldKernelBootValueFromJSONTyped, + BootLoaderModuleFieldKernelBootValueToJSON, +} from './BootLoaderModuleFieldKernelBootValue'; + /** * * @export @@ -21,10 +28,10 @@ import { exists, mapValues } from '../runtime'; export interface BootLoaderModuleFieldKernelBootSubstateAllOf { /** * - * @type {object} + * @type {BootLoaderModuleFieldKernelBootValue} * @memberof BootLoaderModuleFieldKernelBootSubstateAllOf */ - value: object; + value: BootLoaderModuleFieldKernelBootValue; /** * * @type {string} @@ -63,7 +70,7 @@ export function BootLoaderModuleFieldKernelBootSubstateAllOfFromJSONTyped(json: } return { - 'value': json['value'], + 'value': BootLoaderModuleFieldKernelBootValueFromJSON(json['value']), 'substate_type': !exists(json, 'substate_type') ? undefined : json['substate_type'], }; } @@ -77,7 +84,7 @@ export function BootLoaderModuleFieldKernelBootSubstateAllOfToJSON(value?: BootL } return { - 'value': value.value, + 'value': BootLoaderModuleFieldKernelBootValueToJSON(value.value), 'substate_type': value.substate_type, }; } diff --git a/sdk/typescript/lib/generated/models/BootLoaderModuleFieldKernelBootValue.ts b/sdk/typescript/lib/generated/models/BootLoaderModuleFieldKernelBootValue.ts new file mode 100644 index 0000000000..068d0d795a --- /dev/null +++ b/sdk/typescript/lib/generated/models/BootLoaderModuleFieldKernelBootValue.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { AlwaysVisibleGlobalNodesVersion } from './AlwaysVisibleGlobalNodesVersion'; +import { + AlwaysVisibleGlobalNodesVersionFromJSON, + AlwaysVisibleGlobalNodesVersionFromJSONTyped, + AlwaysVisibleGlobalNodesVersionToJSON, +} from './AlwaysVisibleGlobalNodesVersion'; + +/** + * + * @export + * @interface BootLoaderModuleFieldKernelBootValue + */ +export interface BootLoaderModuleFieldKernelBootValue { + /** + * + * @type {AlwaysVisibleGlobalNodesVersion} + * @memberof BootLoaderModuleFieldKernelBootValue + */ + always_visible_nodes_version?: AlwaysVisibleGlobalNodesVersion; +} + +/** + * Check if a given object implements the BootLoaderModuleFieldKernelBootValue interface. + */ +export function instanceOfBootLoaderModuleFieldKernelBootValue(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function BootLoaderModuleFieldKernelBootValueFromJSON(json: any): BootLoaderModuleFieldKernelBootValue { + return BootLoaderModuleFieldKernelBootValueFromJSONTyped(json, false); +} + +export function BootLoaderModuleFieldKernelBootValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): BootLoaderModuleFieldKernelBootValue { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'always_visible_nodes_version': !exists(json, 'always_visible_nodes_version') ? undefined : AlwaysVisibleGlobalNodesVersionFromJSON(json['always_visible_nodes_version']), + }; +} + +export function BootLoaderModuleFieldKernelBootValueToJSON(value?: BootLoaderModuleFieldKernelBootValue | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'always_visible_nodes_version': AlwaysVisibleGlobalNodesVersionToJSON(value.always_visible_nodes_version), + }; +} + diff --git a/sdk/typescript/lib/generated/models/BootLoaderModuleFieldSystemBootValue.ts b/sdk/typescript/lib/generated/models/BootLoaderModuleFieldSystemBootValue.ts index 9105bbf58e..027b3fa8ed 100644 --- a/sdk/typescript/lib/generated/models/BootLoaderModuleFieldSystemBootValue.ts +++ b/sdk/typescript/lib/generated/models/BootLoaderModuleFieldSystemBootValue.ts @@ -19,6 +19,12 @@ import { SystemParametersFromJSONTyped, SystemParametersToJSON, } from './SystemParameters'; +import type { SystemVersion } from './SystemVersion'; +import { + SystemVersionFromJSON, + SystemVersionFromJSONTyped, + SystemVersionToJSON, +} from './SystemVersion'; /** * @@ -26,6 +32,12 @@ import { * @interface BootLoaderModuleFieldSystemBootValue */ export interface BootLoaderModuleFieldSystemBootValue { + /** + * + * @type {SystemVersion} + * @memberof BootLoaderModuleFieldSystemBootValue + */ + system_version?: SystemVersion; /** * * @type {SystemParameters} @@ -54,6 +66,7 @@ export function BootLoaderModuleFieldSystemBootValueFromJSONTyped(json: any, ign } return { + 'system_version': !exists(json, 'system_version') ? undefined : SystemVersionFromJSON(json['system_version']), 'system_parameters': SystemParametersFromJSON(json['system_parameters']), }; } @@ -67,6 +80,7 @@ export function BootLoaderModuleFieldSystemBootValueToJSON(value?: BootLoaderMod } return { + 'system_version': SystemVersionToJSON(value.system_version), 'system_parameters': SystemParametersToJSON(value.system_parameters), }; } diff --git a/sdk/typescript/lib/generated/models/BootLoaderModuleFieldTransactionValidationConfigurationSubstate.ts b/sdk/typescript/lib/generated/models/BootLoaderModuleFieldTransactionValidationConfigurationSubstate.ts new file mode 100644 index 0000000000..b99ca074ee --- /dev/null +++ b/sdk/typescript/lib/generated/models/BootLoaderModuleFieldTransactionValidationConfigurationSubstate.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface BootLoaderModuleFieldTransactionValidationConfigurationSubstate + */ +export interface BootLoaderModuleFieldTransactionValidationConfigurationSubstate { + /** + * + * @type {string} + * @memberof BootLoaderModuleFieldTransactionValidationConfigurationSubstate + */ + substate_type: BootLoaderModuleFieldTransactionValidationConfigurationSubstateSubstateTypeEnum; + /** + * + * @type {boolean} + * @memberof BootLoaderModuleFieldTransactionValidationConfigurationSubstate + */ + is_locked: boolean; +} + + +/** + * @export + */ +export const BootLoaderModuleFieldTransactionValidationConfigurationSubstateSubstateTypeEnum = { + BootLoaderModuleFieldTransactionValidationConfiguration: 'BootLoaderModuleFieldTransactionValidationConfiguration' +} as const; +export type BootLoaderModuleFieldTransactionValidationConfigurationSubstateSubstateTypeEnum = typeof BootLoaderModuleFieldTransactionValidationConfigurationSubstateSubstateTypeEnum[keyof typeof BootLoaderModuleFieldTransactionValidationConfigurationSubstateSubstateTypeEnum]; + + +/** + * Check if a given object implements the BootLoaderModuleFieldTransactionValidationConfigurationSubstate interface. + */ +export function instanceOfBootLoaderModuleFieldTransactionValidationConfigurationSubstate(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "substate_type" in value; + isInstance = isInstance && "is_locked" in value; + + return isInstance; +} + +export function BootLoaderModuleFieldTransactionValidationConfigurationSubstateFromJSON(json: any): BootLoaderModuleFieldTransactionValidationConfigurationSubstate { + return BootLoaderModuleFieldTransactionValidationConfigurationSubstateFromJSONTyped(json, false); +} + +export function BootLoaderModuleFieldTransactionValidationConfigurationSubstateFromJSONTyped(json: any, ignoreDiscriminator: boolean): BootLoaderModuleFieldTransactionValidationConfigurationSubstate { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'substate_type': json['substate_type'], + 'is_locked': json['is_locked'], + }; +} + +export function BootLoaderModuleFieldTransactionValidationConfigurationSubstateToJSON(value?: BootLoaderModuleFieldTransactionValidationConfigurationSubstate | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'substate_type': value.substate_type, + 'is_locked': value.is_locked, + }; +} + diff --git a/sdk/typescript/lib/generated/models/BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOf.ts b/sdk/typescript/lib/generated/models/BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOf.ts new file mode 100644 index 0000000000..ce68ea6aff --- /dev/null +++ b/sdk/typescript/lib/generated/models/BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOf.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOf + */ +export interface BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOf { + /** + * + * @type {string} + * @memberof BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOf + */ + substate_type?: BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOfSubstateTypeEnum; +} + + +/** + * @export + */ +export const BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOfSubstateTypeEnum = { + BootLoaderModuleFieldTransactionValidationConfiguration: 'BootLoaderModuleFieldTransactionValidationConfiguration' +} as const; +export type BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOfSubstateTypeEnum = typeof BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOfSubstateTypeEnum[keyof typeof BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOfSubstateTypeEnum]; + + +/** + * Check if a given object implements the BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOf interface. + */ +export function instanceOfBootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOf(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOfFromJSON(json: any): BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOf { + return BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOfFromJSONTyped(json, false); +} + +export function BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOf { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'substate_type': !exists(json, 'substate_type') ? undefined : json['substate_type'], + }; +} + +export function BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOfToJSON(value?: BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOf | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'substate_type': value.substate_type, + }; +} + diff --git a/sdk/typescript/lib/generated/models/EntityModule.ts b/sdk/typescript/lib/generated/models/EntityModule.ts index a59dbaddf3..a73b9b8a1c 100644 --- a/sdk/typescript/lib/generated/models/EntityModule.ts +++ b/sdk/typescript/lib/generated/models/EntityModule.ts @@ -24,7 +24,8 @@ export const EntityModule = { Royalty: 'Royalty', Main: 'Main', Schema: 'Schema', - BootLoader: 'BootLoader' + BootLoader: 'BootLoader', + ProtocolUpdateStatus: 'ProtocolUpdateStatus' } as const; export type EntityModule = typeof EntityModule[keyof typeof EntityModule]; diff --git a/sdk/typescript/lib/generated/models/LedgerTransaction.ts b/sdk/typescript/lib/generated/models/LedgerTransaction.ts index cb09c60785..56a5e74129 100644 --- a/sdk/typescript/lib/generated/models/LedgerTransaction.ts +++ b/sdk/typescript/lib/generated/models/LedgerTransaction.ts @@ -40,13 +40,20 @@ import { UserLedgerTransactionFromJSONTyped, UserLedgerTransactionToJSON, } from './UserLedgerTransaction'; +import { + UserLedgerTransactionV2, + instanceOfUserLedgerTransactionV2, + UserLedgerTransactionV2FromJSON, + UserLedgerTransactionV2FromJSONTyped, + UserLedgerTransactionV2ToJSON, +} from './UserLedgerTransactionV2'; /** * @type LedgerTransaction * * @export */ -export type LedgerTransaction = { type: 'Flash' } & FlashLedgerTransaction | { type: 'Genesis' } & GenesisLedgerTransaction | { type: 'RoundUpdate' } & RoundUpdateLedgerTransaction | { type: 'User' } & UserLedgerTransaction; +export type LedgerTransaction = { type: 'Flash' } & FlashLedgerTransaction | { type: 'Genesis' } & GenesisLedgerTransaction | { type: 'RoundUpdate' } & RoundUpdateLedgerTransaction | { type: 'User' } & UserLedgerTransaction | { type: 'UserV2' } & UserLedgerTransactionV2; export function LedgerTransactionFromJSON(json: any): LedgerTransaction { return LedgerTransactionFromJSONTyped(json, false); @@ -65,6 +72,8 @@ export function LedgerTransactionFromJSONTyped(json: any, ignoreDiscriminator: b return {...RoundUpdateLedgerTransactionFromJSONTyped(json, true), type: 'RoundUpdate'}; case 'User': return {...UserLedgerTransactionFromJSONTyped(json, true), type: 'User'}; + case 'UserV2': + return {...UserLedgerTransactionV2FromJSONTyped(json, true), type: 'UserV2'}; default: throw new Error(`No variant of LedgerTransaction exists with 'type=${json['type']}'`); } @@ -86,6 +95,8 @@ export function LedgerTransactionToJSON(value?: LedgerTransaction | null): any { return RoundUpdateLedgerTransactionToJSON(value); case 'User': return UserLedgerTransactionToJSON(value); + case 'UserV2': + return UserLedgerTransactionV2ToJSON(value); default: throw new Error(`No variant of LedgerTransaction exists with 'type=${value['type']}'`); } diff --git a/sdk/typescript/lib/generated/models/NotarizedTransactionV2.ts b/sdk/typescript/lib/generated/models/NotarizedTransactionV2.ts new file mode 100644 index 0000000000..562c8fa4db --- /dev/null +++ b/sdk/typescript/lib/generated/models/NotarizedTransactionV2.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface NotarizedTransactionV2 + */ +export interface NotarizedTransactionV2 { + /** + * + * @type {string} + * @memberof NotarizedTransactionV2 + */ + todo?: string; +} + +/** + * Check if a given object implements the NotarizedTransactionV2 interface. + */ +export function instanceOfNotarizedTransactionV2(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function NotarizedTransactionV2FromJSON(json: any): NotarizedTransactionV2 { + return NotarizedTransactionV2FromJSONTyped(json, false); +} + +export function NotarizedTransactionV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): NotarizedTransactionV2 { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'todo': !exists(json, 'todo') ? undefined : json['todo'], + }; +} + +export function NotarizedTransactionV2ToJSON(value?: NotarizedTransactionV2 | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'todo': value.todo, + }; +} + diff --git a/sdk/typescript/lib/generated/models/ParsedNotarizedTransactionAllOfValidationError.ts b/sdk/typescript/lib/generated/models/ParsedNotarizedTransactionAllOfValidationError.ts index d75cee933e..ad94ab2d43 100644 --- a/sdk/typescript/lib/generated/models/ParsedNotarizedTransactionAllOfValidationError.ts +++ b/sdk/typescript/lib/generated/models/ParsedNotarizedTransactionAllOfValidationError.ts @@ -17,7 +17,7 @@ import { exists, mapValues } from '../runtime'; * If the transaction is known to not be valid, this gives a reason. * Different levels of validation are performed, dependent on the validation mode. * Note that, even if validation mode is Static or Full, the transaction may - * still be rejected or fail due to issues at runtime (eg if the loan cannot be repaid). + * still be rejected or fail due to issues at runtime (e.g. if the loan cannot be repaid). * @export * @interface ParsedNotarizedTransactionAllOfValidationError */ diff --git a/sdk/typescript/lib/generated/models/ParsedNotarizedTransactionV2.ts b/sdk/typescript/lib/generated/models/ParsedNotarizedTransactionV2.ts new file mode 100644 index 0000000000..5737450e46 --- /dev/null +++ b/sdk/typescript/lib/generated/models/ParsedNotarizedTransactionV2.ts @@ -0,0 +1,120 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { NotarizedTransactionV2 } from './NotarizedTransactionV2'; +import { + NotarizedTransactionV2FromJSON, + NotarizedTransactionV2FromJSONTyped, + NotarizedTransactionV2ToJSON, +} from './NotarizedTransactionV2'; +import type { ParsedNotarizedTransactionAllOfValidationError } from './ParsedNotarizedTransactionAllOfValidationError'; +import { + ParsedNotarizedTransactionAllOfValidationErrorFromJSON, + ParsedNotarizedTransactionAllOfValidationErrorFromJSONTyped, + ParsedNotarizedTransactionAllOfValidationErrorToJSON, +} from './ParsedNotarizedTransactionAllOfValidationError'; +import type { ParsedNotarizedTransactionIdentifiers } from './ParsedNotarizedTransactionIdentifiers'; +import { + ParsedNotarizedTransactionIdentifiersFromJSON, + ParsedNotarizedTransactionIdentifiersFromJSONTyped, + ParsedNotarizedTransactionIdentifiersToJSON, +} from './ParsedNotarizedTransactionIdentifiers'; + +/** + * + * @export + * @interface ParsedNotarizedTransactionV2 + */ +export interface ParsedNotarizedTransactionV2 { + /** + * + * @type {string} + * @memberof ParsedNotarizedTransactionV2 + */ + type: ParsedNotarizedTransactionV2TypeEnum; + /** + * + * @type {NotarizedTransactionV2} + * @memberof ParsedNotarizedTransactionV2 + */ + notarized_transaction?: NotarizedTransactionV2; + /** + * + * @type {ParsedNotarizedTransactionIdentifiers} + * @memberof ParsedNotarizedTransactionV2 + */ + identifiers: ParsedNotarizedTransactionIdentifiers; + /** + * + * @type {ParsedNotarizedTransactionAllOfValidationError} + * @memberof ParsedNotarizedTransactionV2 + */ + validation_error?: ParsedNotarizedTransactionAllOfValidationError; +} + + +/** + * @export + */ +export const ParsedNotarizedTransactionV2TypeEnum = { + NotarizedTransactionV2: 'NotarizedTransactionV2' +} as const; +export type ParsedNotarizedTransactionV2TypeEnum = typeof ParsedNotarizedTransactionV2TypeEnum[keyof typeof ParsedNotarizedTransactionV2TypeEnum]; + + +/** + * Check if a given object implements the ParsedNotarizedTransactionV2 interface. + */ +export function instanceOfParsedNotarizedTransactionV2(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "type" in value; + isInstance = isInstance && "identifiers" in value; + + return isInstance; +} + +export function ParsedNotarizedTransactionV2FromJSON(json: any): ParsedNotarizedTransactionV2 { + return ParsedNotarizedTransactionV2FromJSONTyped(json, false); +} + +export function ParsedNotarizedTransactionV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): ParsedNotarizedTransactionV2 { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'notarized_transaction': !exists(json, 'notarized_transaction') ? undefined : NotarizedTransactionV2FromJSON(json['notarized_transaction']), + 'identifiers': ParsedNotarizedTransactionIdentifiersFromJSON(json['identifiers']), + 'validation_error': !exists(json, 'validation_error') ? undefined : ParsedNotarizedTransactionAllOfValidationErrorFromJSON(json['validation_error']), + }; +} + +export function ParsedNotarizedTransactionV2ToJSON(value?: ParsedNotarizedTransactionV2 | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'notarized_transaction': NotarizedTransactionV2ToJSON(value.notarized_transaction), + 'identifiers': ParsedNotarizedTransactionIdentifiersToJSON(value.identifiers), + 'validation_error': ParsedNotarizedTransactionAllOfValidationErrorToJSON(value.validation_error), + }; +} + diff --git a/sdk/typescript/lib/generated/models/ParsedNotarizedTransactionV2AllOf.ts b/sdk/typescript/lib/generated/models/ParsedNotarizedTransactionV2AllOf.ts new file mode 100644 index 0000000000..65fd138103 --- /dev/null +++ b/sdk/typescript/lib/generated/models/ParsedNotarizedTransactionV2AllOf.ts @@ -0,0 +1,119 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { NotarizedTransactionV2 } from './NotarizedTransactionV2'; +import { + NotarizedTransactionV2FromJSON, + NotarizedTransactionV2FromJSONTyped, + NotarizedTransactionV2ToJSON, +} from './NotarizedTransactionV2'; +import type { ParsedNotarizedTransactionAllOfValidationError } from './ParsedNotarizedTransactionAllOfValidationError'; +import { + ParsedNotarizedTransactionAllOfValidationErrorFromJSON, + ParsedNotarizedTransactionAllOfValidationErrorFromJSONTyped, + ParsedNotarizedTransactionAllOfValidationErrorToJSON, +} from './ParsedNotarizedTransactionAllOfValidationError'; +import type { ParsedNotarizedTransactionIdentifiers } from './ParsedNotarizedTransactionIdentifiers'; +import { + ParsedNotarizedTransactionIdentifiersFromJSON, + ParsedNotarizedTransactionIdentifiersFromJSONTyped, + ParsedNotarizedTransactionIdentifiersToJSON, +} from './ParsedNotarizedTransactionIdentifiers'; + +/** + * + * @export + * @interface ParsedNotarizedTransactionV2AllOf + */ +export interface ParsedNotarizedTransactionV2AllOf { + /** + * + * @type {NotarizedTransactionV2} + * @memberof ParsedNotarizedTransactionV2AllOf + */ + notarized_transaction?: NotarizedTransactionV2; + /** + * + * @type {ParsedNotarizedTransactionIdentifiers} + * @memberof ParsedNotarizedTransactionV2AllOf + */ + identifiers: ParsedNotarizedTransactionIdentifiers; + /** + * + * @type {ParsedNotarizedTransactionAllOfValidationError} + * @memberof ParsedNotarizedTransactionV2AllOf + */ + validation_error?: ParsedNotarizedTransactionAllOfValidationError; + /** + * + * @type {string} + * @memberof ParsedNotarizedTransactionV2AllOf + */ + type?: ParsedNotarizedTransactionV2AllOfTypeEnum; +} + + +/** + * @export + */ +export const ParsedNotarizedTransactionV2AllOfTypeEnum = { + NotarizedTransactionV2: 'NotarizedTransactionV2' +} as const; +export type ParsedNotarizedTransactionV2AllOfTypeEnum = typeof ParsedNotarizedTransactionV2AllOfTypeEnum[keyof typeof ParsedNotarizedTransactionV2AllOfTypeEnum]; + + +/** + * Check if a given object implements the ParsedNotarizedTransactionV2AllOf interface. + */ +export function instanceOfParsedNotarizedTransactionV2AllOf(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "identifiers" in value; + + return isInstance; +} + +export function ParsedNotarizedTransactionV2AllOfFromJSON(json: any): ParsedNotarizedTransactionV2AllOf { + return ParsedNotarizedTransactionV2AllOfFromJSONTyped(json, false); +} + +export function ParsedNotarizedTransactionV2AllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): ParsedNotarizedTransactionV2AllOf { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'notarized_transaction': !exists(json, 'notarized_transaction') ? undefined : NotarizedTransactionV2FromJSON(json['notarized_transaction']), + 'identifiers': ParsedNotarizedTransactionIdentifiersFromJSON(json['identifiers']), + 'validation_error': !exists(json, 'validation_error') ? undefined : ParsedNotarizedTransactionAllOfValidationErrorFromJSON(json['validation_error']), + 'type': !exists(json, 'type') ? undefined : json['type'], + }; +} + +export function ParsedNotarizedTransactionV2AllOfToJSON(value?: ParsedNotarizedTransactionV2AllOf | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'notarized_transaction': NotarizedTransactionV2ToJSON(value.notarized_transaction), + 'identifiers': ParsedNotarizedTransactionIdentifiersToJSON(value.identifiers), + 'validation_error': ParsedNotarizedTransactionAllOfValidationErrorToJSON(value.validation_error), + 'type': value.type, + }; +} + diff --git a/sdk/typescript/lib/generated/models/ParsedTransaction.ts b/sdk/typescript/lib/generated/models/ParsedTransaction.ts index 04a0909205..5b9f4ab49c 100644 --- a/sdk/typescript/lib/generated/models/ParsedTransaction.ts +++ b/sdk/typescript/lib/generated/models/ParsedTransaction.ts @@ -26,6 +26,13 @@ import { ParsedNotarizedTransactionFromJSONTyped, ParsedNotarizedTransactionToJSON, } from './ParsedNotarizedTransaction'; +import { + ParsedNotarizedTransactionV2, + instanceOfParsedNotarizedTransactionV2, + ParsedNotarizedTransactionV2FromJSON, + ParsedNotarizedTransactionV2FromJSONTyped, + ParsedNotarizedTransactionV2ToJSON, +} from './ParsedNotarizedTransactionV2'; import { ParsedSignedTransactionIntent, instanceOfParsedSignedTransactionIntent, @@ -46,7 +53,7 @@ import { * * @export */ -export type ParsedTransaction = { type: 'LedgerTransaction' } & ParsedLedgerTransaction | { type: 'NotarizedTransaction' } & ParsedNotarizedTransaction | { type: 'SignedTransactionIntent' } & ParsedSignedTransactionIntent | { type: 'TransactionIntent' } & ParsedTransactionIntent; +export type ParsedTransaction = { type: 'LedgerTransaction' } & ParsedLedgerTransaction | { type: 'NotarizedTransaction' } & ParsedNotarizedTransaction | { type: 'NotarizedTransactionV2' } & ParsedNotarizedTransactionV2 | { type: 'SignedTransactionIntent' } & ParsedSignedTransactionIntent | { type: 'TransactionIntent' } & ParsedTransactionIntent; export function ParsedTransactionFromJSON(json: any): ParsedTransaction { return ParsedTransactionFromJSONTyped(json, false); @@ -61,6 +68,8 @@ export function ParsedTransactionFromJSONTyped(json: any, ignoreDiscriminator: b return {...ParsedLedgerTransactionFromJSONTyped(json, true), type: 'LedgerTransaction'}; case 'NotarizedTransaction': return {...ParsedNotarizedTransactionFromJSONTyped(json, true), type: 'NotarizedTransaction'}; + case 'NotarizedTransactionV2': + return {...ParsedNotarizedTransactionV2FromJSONTyped(json, true), type: 'NotarizedTransactionV2'}; case 'SignedTransactionIntent': return {...ParsedSignedTransactionIntentFromJSONTyped(json, true), type: 'SignedTransactionIntent'}; case 'TransactionIntent': @@ -82,6 +91,8 @@ export function ParsedTransactionToJSON(value?: ParsedTransaction | null): any { return ParsedLedgerTransactionToJSON(value); case 'NotarizedTransaction': return ParsedNotarizedTransactionToJSON(value); + case 'NotarizedTransactionV2': + return ParsedNotarizedTransactionV2ToJSON(value); case 'SignedTransactionIntent': return ParsedSignedTransactionIntentToJSON(value); case 'TransactionIntent': diff --git a/sdk/typescript/lib/generated/models/ParsedTransactionType.ts b/sdk/typescript/lib/generated/models/ParsedTransactionType.ts index a4774315cd..58c0fbed51 100644 --- a/sdk/typescript/lib/generated/models/ParsedTransactionType.ts +++ b/sdk/typescript/lib/generated/models/ParsedTransactionType.ts @@ -21,7 +21,8 @@ export const ParsedTransactionType = { NotarizedTransaction: 'NotarizedTransaction', SignedTransactionIntent: 'SignedTransactionIntent', TransactionIntent: 'TransactionIntent', - LedgerTransaction: 'LedgerTransaction' + LedgerTransaction: 'LedgerTransaction', + NotarizedTransactionV2: 'NotarizedTransactionV2' } as const; export type ParsedTransactionType = typeof ParsedTransactionType[keyof typeof ParsedTransactionType]; diff --git a/sdk/typescript/lib/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstate.ts b/sdk/typescript/lib/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstate.ts new file mode 100644 index 0000000000..2738ad7596 --- /dev/null +++ b/sdk/typescript/lib/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstate.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ProtocolUpdateStatusModuleFieldSummarySubstate + */ +export interface ProtocolUpdateStatusModuleFieldSummarySubstate { + /** + * + * @type {string} + * @memberof ProtocolUpdateStatusModuleFieldSummarySubstate + */ + substate_type: ProtocolUpdateStatusModuleFieldSummarySubstateSubstateTypeEnum; + /** + * + * @type {boolean} + * @memberof ProtocolUpdateStatusModuleFieldSummarySubstate + */ + is_locked: boolean; +} + + +/** + * @export + */ +export const ProtocolUpdateStatusModuleFieldSummarySubstateSubstateTypeEnum = { + ProtocolUpdateStatusModuleFieldSummary: 'ProtocolUpdateStatusModuleFieldSummary' +} as const; +export type ProtocolUpdateStatusModuleFieldSummarySubstateSubstateTypeEnum = typeof ProtocolUpdateStatusModuleFieldSummarySubstateSubstateTypeEnum[keyof typeof ProtocolUpdateStatusModuleFieldSummarySubstateSubstateTypeEnum]; + + +/** + * Check if a given object implements the ProtocolUpdateStatusModuleFieldSummarySubstate interface. + */ +export function instanceOfProtocolUpdateStatusModuleFieldSummarySubstate(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "substate_type" in value; + isInstance = isInstance && "is_locked" in value; + + return isInstance; +} + +export function ProtocolUpdateStatusModuleFieldSummarySubstateFromJSON(json: any): ProtocolUpdateStatusModuleFieldSummarySubstate { + return ProtocolUpdateStatusModuleFieldSummarySubstateFromJSONTyped(json, false); +} + +export function ProtocolUpdateStatusModuleFieldSummarySubstateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProtocolUpdateStatusModuleFieldSummarySubstate { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'substate_type': json['substate_type'], + 'is_locked': json['is_locked'], + }; +} + +export function ProtocolUpdateStatusModuleFieldSummarySubstateToJSON(value?: ProtocolUpdateStatusModuleFieldSummarySubstate | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'substate_type': value.substate_type, + 'is_locked': value.is_locked, + }; +} + diff --git a/sdk/typescript/lib/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstateAllOf.ts b/sdk/typescript/lib/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstateAllOf.ts new file mode 100644 index 0000000000..458a53e663 --- /dev/null +++ b/sdk/typescript/lib/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstateAllOf.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ProtocolUpdateStatusModuleFieldSummarySubstateAllOf + */ +export interface ProtocolUpdateStatusModuleFieldSummarySubstateAllOf { + /** + * + * @type {string} + * @memberof ProtocolUpdateStatusModuleFieldSummarySubstateAllOf + */ + substate_type?: ProtocolUpdateStatusModuleFieldSummarySubstateAllOfSubstateTypeEnum; +} + + +/** + * @export + */ +export const ProtocolUpdateStatusModuleFieldSummarySubstateAllOfSubstateTypeEnum = { + ProtocolUpdateStatusModuleFieldSummary: 'ProtocolUpdateStatusModuleFieldSummary' +} as const; +export type ProtocolUpdateStatusModuleFieldSummarySubstateAllOfSubstateTypeEnum = typeof ProtocolUpdateStatusModuleFieldSummarySubstateAllOfSubstateTypeEnum[keyof typeof ProtocolUpdateStatusModuleFieldSummarySubstateAllOfSubstateTypeEnum]; + + +/** + * Check if a given object implements the ProtocolUpdateStatusModuleFieldSummarySubstateAllOf interface. + */ +export function instanceOfProtocolUpdateStatusModuleFieldSummarySubstateAllOf(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function ProtocolUpdateStatusModuleFieldSummarySubstateAllOfFromJSON(json: any): ProtocolUpdateStatusModuleFieldSummarySubstateAllOf { + return ProtocolUpdateStatusModuleFieldSummarySubstateAllOfFromJSONTyped(json, false); +} + +export function ProtocolUpdateStatusModuleFieldSummarySubstateAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProtocolUpdateStatusModuleFieldSummarySubstateAllOf { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'substate_type': !exists(json, 'substate_type') ? undefined : json['substate_type'], + }; +} + +export function ProtocolUpdateStatusModuleFieldSummarySubstateAllOfToJSON(value?: ProtocolUpdateStatusModuleFieldSummarySubstateAllOf | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'substate_type': value.substate_type, + }; +} + diff --git a/sdk/typescript/lib/generated/models/Substate.ts b/sdk/typescript/lib/generated/models/Substate.ts index b5256e989f..4cc6259fd3 100644 --- a/sdk/typescript/lib/generated/models/Substate.ts +++ b/sdk/typescript/lib/generated/models/Substate.ts @@ -68,6 +68,13 @@ import { BootLoaderModuleFieldSystemBootSubstateFromJSONTyped, BootLoaderModuleFieldSystemBootSubstateToJSON, } from './BootLoaderModuleFieldSystemBootSubstate'; +import { + BootLoaderModuleFieldTransactionValidationConfigurationSubstate, + instanceOfBootLoaderModuleFieldTransactionValidationConfigurationSubstate, + BootLoaderModuleFieldTransactionValidationConfigurationSubstateFromJSON, + BootLoaderModuleFieldTransactionValidationConfigurationSubstateFromJSONTyped, + BootLoaderModuleFieldTransactionValidationConfigurationSubstateToJSON, +} from './BootLoaderModuleFieldTransactionValidationConfigurationSubstate'; import { BootLoaderModuleFieldVmBootSubstate, instanceOfBootLoaderModuleFieldVmBootSubstate, @@ -299,6 +306,13 @@ import { PackageFieldRoyaltyAccumulatorSubstateFromJSONTyped, PackageFieldRoyaltyAccumulatorSubstateToJSON, } from './PackageFieldRoyaltyAccumulatorSubstate'; +import { + ProtocolUpdateStatusModuleFieldSummarySubstate, + instanceOfProtocolUpdateStatusModuleFieldSummarySubstate, + ProtocolUpdateStatusModuleFieldSummarySubstateFromJSON, + ProtocolUpdateStatusModuleFieldSummarySubstateFromJSONTyped, + ProtocolUpdateStatusModuleFieldSummarySubstateToJSON, +} from './ProtocolUpdateStatusModuleFieldSummarySubstate'; import { RoleAssignmentModuleFieldOwnerRoleSubstate, instanceOfRoleAssignmentModuleFieldOwnerRoleSubstate, @@ -382,7 +396,7 @@ import { * * @export */ -export type Substate = { substate_type: 'AccessControllerFieldState' } & AccessControllerFieldStateSubstate | { substate_type: 'AccountAuthorizedDepositorEntry' } & AccountAuthorizedDepositorEntrySubstate | { substate_type: 'AccountFieldState' } & AccountFieldStateSubstate | { substate_type: 'AccountLockerAccountClaimsEntry' } & AccountLockerAccountClaimsEntrySubstate | { substate_type: 'AccountResourcePreferenceEntry' } & AccountResourcePreferenceEntrySubstate | { substate_type: 'AccountVaultEntry' } & AccountVaultEntrySubstate | { substate_type: 'BootLoaderModuleFieldKernelBoot' } & BootLoaderModuleFieldKernelBootSubstate | { substate_type: 'BootLoaderModuleFieldSystemBoot' } & BootLoaderModuleFieldSystemBootSubstate | { substate_type: 'BootLoaderModuleFieldVmBoot' } & BootLoaderModuleFieldVmBootSubstate | { substate_type: 'ConsensusManagerFieldConfig' } & ConsensusManagerFieldConfigSubstate | { substate_type: 'ConsensusManagerFieldCurrentProposalStatistic' } & ConsensusManagerFieldCurrentProposalStatisticSubstate | { substate_type: 'ConsensusManagerFieldCurrentTime' } & ConsensusManagerFieldCurrentTimeSubstate | { substate_type: 'ConsensusManagerFieldCurrentTimeRoundedToMinutes' } & ConsensusManagerFieldCurrentTimeRoundedToMinutesSubstate | { substate_type: 'ConsensusManagerFieldCurrentValidatorSet' } & ConsensusManagerFieldCurrentValidatorSetSubstate | { substate_type: 'ConsensusManagerFieldState' } & ConsensusManagerFieldStateSubstate | { substate_type: 'ConsensusManagerFieldValidatorRewards' } & ConsensusManagerFieldValidatorRewardsSubstate | { substate_type: 'ConsensusManagerRegisteredValidatorsByStakeIndexEntry' } & ConsensusManagerRegisteredValidatorsByStakeIndexEntrySubstate | { substate_type: 'FungibleResourceManagerFieldDivisibility' } & FungibleResourceManagerFieldDivisibilitySubstate | { substate_type: 'FungibleResourceManagerFieldTotalSupply' } & FungibleResourceManagerFieldTotalSupplySubstate | { substate_type: 'FungibleVaultFieldBalance' } & FungibleVaultFieldBalanceSubstate | { substate_type: 'FungibleVaultFieldFrozenStatus' } & FungibleVaultFieldFrozenStatusSubstate | { substate_type: 'GenericKeyValueStoreEntry' } & GenericKeyValueStoreEntrySubstate | { substate_type: 'GenericScryptoComponentFieldState' } & GenericScryptoComponentFieldStateSubstate | { substate_type: 'MetadataModuleEntry' } & MetadataModuleEntrySubstate | { substate_type: 'MultiResourcePoolFieldState' } & MultiResourcePoolFieldStateSubstate | { substate_type: 'NonFungibleResourceManagerDataEntry' } & NonFungibleResourceManagerDataEntrySubstate | { substate_type: 'NonFungibleResourceManagerFieldIdType' } & NonFungibleResourceManagerFieldIdTypeSubstate | { substate_type: 'NonFungibleResourceManagerFieldMutableFields' } & NonFungibleResourceManagerFieldMutableFieldsSubstate | { substate_type: 'NonFungibleResourceManagerFieldTotalSupply' } & NonFungibleResourceManagerFieldTotalSupplySubstate | { substate_type: 'NonFungibleVaultContentsIndexEntry' } & NonFungibleVaultContentsIndexEntrySubstate | { substate_type: 'NonFungibleVaultFieldBalance' } & NonFungibleVaultFieldBalanceSubstate | { substate_type: 'NonFungibleVaultFieldFrozenStatus' } & NonFungibleVaultFieldFrozenStatusSubstate | { substate_type: 'OneResourcePoolFieldState' } & OneResourcePoolFieldStateSubstate | { substate_type: 'PackageBlueprintAuthTemplateEntry' } & PackageBlueprintAuthTemplateEntrySubstate | { substate_type: 'PackageBlueprintDefinitionEntry' } & PackageBlueprintDefinitionEntrySubstate | { substate_type: 'PackageBlueprintDependenciesEntry' } & PackageBlueprintDependenciesEntrySubstate | { substate_type: 'PackageBlueprintRoyaltyEntry' } & PackageBlueprintRoyaltyEntrySubstate | { substate_type: 'PackageCodeInstrumentedCodeEntry' } & PackageCodeInstrumentedCodeEntrySubstate | { substate_type: 'PackageCodeOriginalCodeEntry' } & PackageCodeOriginalCodeEntrySubstate | { substate_type: 'PackageCodeVmTypeEntry' } & PackageCodeVmTypeEntrySubstate | { substate_type: 'PackageFieldRoyaltyAccumulator' } & PackageFieldRoyaltyAccumulatorSubstate | { substate_type: 'RoleAssignmentModuleFieldOwnerRole' } & RoleAssignmentModuleFieldOwnerRoleSubstate | { substate_type: 'RoleAssignmentModuleRuleEntry' } & RoleAssignmentModuleRuleEntrySubstate | { substate_type: 'RoyaltyModuleFieldState' } & RoyaltyModuleFieldStateSubstate | { substate_type: 'RoyaltyModuleMethodRoyaltyEntry' } & RoyaltyModuleMethodRoyaltyEntrySubstate | { substate_type: 'SchemaEntry' } & SchemaEntrySubstate | { substate_type: 'TransactionTrackerCollectionEntry' } & TransactionTrackerCollectionEntrySubstate | { substate_type: 'TransactionTrackerFieldState' } & TransactionTrackerFieldStateSubstate | { substate_type: 'TwoResourcePoolFieldState' } & TwoResourcePoolFieldStateSubstate | { substate_type: 'TypeInfoModuleFieldTypeInfo' } & TypeInfoModuleFieldTypeInfoSubstate | { substate_type: 'ValidatorFieldProtocolUpdateReadinessSignal' } & ValidatorFieldProtocolUpdateReadinessSignalSubstate | { substate_type: 'ValidatorFieldState' } & ValidatorFieldStateSubstate; +export type Substate = { substate_type: 'AccessControllerFieldState' } & AccessControllerFieldStateSubstate | { substate_type: 'AccountAuthorizedDepositorEntry' } & AccountAuthorizedDepositorEntrySubstate | { substate_type: 'AccountFieldState' } & AccountFieldStateSubstate | { substate_type: 'AccountLockerAccountClaimsEntry' } & AccountLockerAccountClaimsEntrySubstate | { substate_type: 'AccountResourcePreferenceEntry' } & AccountResourcePreferenceEntrySubstate | { substate_type: 'AccountVaultEntry' } & AccountVaultEntrySubstate | { substate_type: 'BootLoaderModuleFieldKernelBoot' } & BootLoaderModuleFieldKernelBootSubstate | { substate_type: 'BootLoaderModuleFieldSystemBoot' } & BootLoaderModuleFieldSystemBootSubstate | { substate_type: 'BootLoaderModuleFieldTransactionValidationConfiguration' } & BootLoaderModuleFieldTransactionValidationConfigurationSubstate | { substate_type: 'BootLoaderModuleFieldVmBoot' } & BootLoaderModuleFieldVmBootSubstate | { substate_type: 'ConsensusManagerFieldConfig' } & ConsensusManagerFieldConfigSubstate | { substate_type: 'ConsensusManagerFieldCurrentProposalStatistic' } & ConsensusManagerFieldCurrentProposalStatisticSubstate | { substate_type: 'ConsensusManagerFieldCurrentTime' } & ConsensusManagerFieldCurrentTimeSubstate | { substate_type: 'ConsensusManagerFieldCurrentTimeRoundedToMinutes' } & ConsensusManagerFieldCurrentTimeRoundedToMinutesSubstate | { substate_type: 'ConsensusManagerFieldCurrentValidatorSet' } & ConsensusManagerFieldCurrentValidatorSetSubstate | { substate_type: 'ConsensusManagerFieldState' } & ConsensusManagerFieldStateSubstate | { substate_type: 'ConsensusManagerFieldValidatorRewards' } & ConsensusManagerFieldValidatorRewardsSubstate | { substate_type: 'ConsensusManagerRegisteredValidatorsByStakeIndexEntry' } & ConsensusManagerRegisteredValidatorsByStakeIndexEntrySubstate | { substate_type: 'FungibleResourceManagerFieldDivisibility' } & FungibleResourceManagerFieldDivisibilitySubstate | { substate_type: 'FungibleResourceManagerFieldTotalSupply' } & FungibleResourceManagerFieldTotalSupplySubstate | { substate_type: 'FungibleVaultFieldBalance' } & FungibleVaultFieldBalanceSubstate | { substate_type: 'FungibleVaultFieldFrozenStatus' } & FungibleVaultFieldFrozenStatusSubstate | { substate_type: 'GenericKeyValueStoreEntry' } & GenericKeyValueStoreEntrySubstate | { substate_type: 'GenericScryptoComponentFieldState' } & GenericScryptoComponentFieldStateSubstate | { substate_type: 'MetadataModuleEntry' } & MetadataModuleEntrySubstate | { substate_type: 'MultiResourcePoolFieldState' } & MultiResourcePoolFieldStateSubstate | { substate_type: 'NonFungibleResourceManagerDataEntry' } & NonFungibleResourceManagerDataEntrySubstate | { substate_type: 'NonFungibleResourceManagerFieldIdType' } & NonFungibleResourceManagerFieldIdTypeSubstate | { substate_type: 'NonFungibleResourceManagerFieldMutableFields' } & NonFungibleResourceManagerFieldMutableFieldsSubstate | { substate_type: 'NonFungibleResourceManagerFieldTotalSupply' } & NonFungibleResourceManagerFieldTotalSupplySubstate | { substate_type: 'NonFungibleVaultContentsIndexEntry' } & NonFungibleVaultContentsIndexEntrySubstate | { substate_type: 'NonFungibleVaultFieldBalance' } & NonFungibleVaultFieldBalanceSubstate | { substate_type: 'NonFungibleVaultFieldFrozenStatus' } & NonFungibleVaultFieldFrozenStatusSubstate | { substate_type: 'OneResourcePoolFieldState' } & OneResourcePoolFieldStateSubstate | { substate_type: 'PackageBlueprintAuthTemplateEntry' } & PackageBlueprintAuthTemplateEntrySubstate | { substate_type: 'PackageBlueprintDefinitionEntry' } & PackageBlueprintDefinitionEntrySubstate | { substate_type: 'PackageBlueprintDependenciesEntry' } & PackageBlueprintDependenciesEntrySubstate | { substate_type: 'PackageBlueprintRoyaltyEntry' } & PackageBlueprintRoyaltyEntrySubstate | { substate_type: 'PackageCodeInstrumentedCodeEntry' } & PackageCodeInstrumentedCodeEntrySubstate | { substate_type: 'PackageCodeOriginalCodeEntry' } & PackageCodeOriginalCodeEntrySubstate | { substate_type: 'PackageCodeVmTypeEntry' } & PackageCodeVmTypeEntrySubstate | { substate_type: 'PackageFieldRoyaltyAccumulator' } & PackageFieldRoyaltyAccumulatorSubstate | { substate_type: 'ProtocolUpdateStatusModuleFieldSummary' } & ProtocolUpdateStatusModuleFieldSummarySubstate | { substate_type: 'RoleAssignmentModuleFieldOwnerRole' } & RoleAssignmentModuleFieldOwnerRoleSubstate | { substate_type: 'RoleAssignmentModuleRuleEntry' } & RoleAssignmentModuleRuleEntrySubstate | { substate_type: 'RoyaltyModuleFieldState' } & RoyaltyModuleFieldStateSubstate | { substate_type: 'RoyaltyModuleMethodRoyaltyEntry' } & RoyaltyModuleMethodRoyaltyEntrySubstate | { substate_type: 'SchemaEntry' } & SchemaEntrySubstate | { substate_type: 'TransactionTrackerCollectionEntry' } & TransactionTrackerCollectionEntrySubstate | { substate_type: 'TransactionTrackerFieldState' } & TransactionTrackerFieldStateSubstate | { substate_type: 'TwoResourcePoolFieldState' } & TwoResourcePoolFieldStateSubstate | { substate_type: 'TypeInfoModuleFieldTypeInfo' } & TypeInfoModuleFieldTypeInfoSubstate | { substate_type: 'ValidatorFieldProtocolUpdateReadinessSignal' } & ValidatorFieldProtocolUpdateReadinessSignalSubstate | { substate_type: 'ValidatorFieldState' } & ValidatorFieldStateSubstate; export function SubstateFromJSON(json: any): Substate { return SubstateFromJSONTyped(json, false); @@ -409,6 +423,8 @@ export function SubstateFromJSONTyped(json: any, ignoreDiscriminator: boolean): return {...BootLoaderModuleFieldKernelBootSubstateFromJSONTyped(json, true), substate_type: 'BootLoaderModuleFieldKernelBoot'}; case 'BootLoaderModuleFieldSystemBoot': return {...BootLoaderModuleFieldSystemBootSubstateFromJSONTyped(json, true), substate_type: 'BootLoaderModuleFieldSystemBoot'}; + case 'BootLoaderModuleFieldTransactionValidationConfiguration': + return {...BootLoaderModuleFieldTransactionValidationConfigurationSubstateFromJSONTyped(json, true), substate_type: 'BootLoaderModuleFieldTransactionValidationConfiguration'}; case 'BootLoaderModuleFieldVmBoot': return {...BootLoaderModuleFieldVmBootSubstateFromJSONTyped(json, true), substate_type: 'BootLoaderModuleFieldVmBoot'}; case 'ConsensusManagerFieldConfig': @@ -475,6 +491,8 @@ export function SubstateFromJSONTyped(json: any, ignoreDiscriminator: boolean): return {...PackageCodeVmTypeEntrySubstateFromJSONTyped(json, true), substate_type: 'PackageCodeVmTypeEntry'}; case 'PackageFieldRoyaltyAccumulator': return {...PackageFieldRoyaltyAccumulatorSubstateFromJSONTyped(json, true), substate_type: 'PackageFieldRoyaltyAccumulator'}; + case 'ProtocolUpdateStatusModuleFieldSummary': + return {...ProtocolUpdateStatusModuleFieldSummarySubstateFromJSONTyped(json, true), substate_type: 'ProtocolUpdateStatusModuleFieldSummary'}; case 'RoleAssignmentModuleFieldOwnerRole': return {...RoleAssignmentModuleFieldOwnerRoleSubstateFromJSONTyped(json, true), substate_type: 'RoleAssignmentModuleFieldOwnerRole'}; case 'RoleAssignmentModuleRuleEntry': @@ -526,6 +544,8 @@ export function SubstateToJSON(value?: Substate | null): any { return BootLoaderModuleFieldKernelBootSubstateToJSON(value); case 'BootLoaderModuleFieldSystemBoot': return BootLoaderModuleFieldSystemBootSubstateToJSON(value); + case 'BootLoaderModuleFieldTransactionValidationConfiguration': + return BootLoaderModuleFieldTransactionValidationConfigurationSubstateToJSON(value); case 'BootLoaderModuleFieldVmBoot': return BootLoaderModuleFieldVmBootSubstateToJSON(value); case 'ConsensusManagerFieldConfig': @@ -592,6 +612,8 @@ export function SubstateToJSON(value?: Substate | null): any { return PackageCodeVmTypeEntrySubstateToJSON(value); case 'PackageFieldRoyaltyAccumulator': return PackageFieldRoyaltyAccumulatorSubstateToJSON(value); + case 'ProtocolUpdateStatusModuleFieldSummary': + return ProtocolUpdateStatusModuleFieldSummarySubstateToJSON(value); case 'RoleAssignmentModuleFieldOwnerRole': return RoleAssignmentModuleFieldOwnerRoleSubstateToJSON(value); case 'RoleAssignmentModuleRuleEntry': diff --git a/sdk/typescript/lib/generated/models/SubstateType.ts b/sdk/typescript/lib/generated/models/SubstateType.ts index 0f7192b406..c706280669 100644 --- a/sdk/typescript/lib/generated/models/SubstateType.ts +++ b/sdk/typescript/lib/generated/models/SubstateType.ts @@ -71,7 +71,9 @@ export const SubstateType = { TransactionTrackerCollectionEntry: 'TransactionTrackerCollectionEntry', AccountLockerAccountClaimsEntry: 'AccountLockerAccountClaimsEntry', BootLoaderModuleFieldSystemBoot: 'BootLoaderModuleFieldSystemBoot', - BootLoaderModuleFieldKernelBoot: 'BootLoaderModuleFieldKernelBoot' + BootLoaderModuleFieldKernelBoot: 'BootLoaderModuleFieldKernelBoot', + BootLoaderModuleFieldTransactionValidationConfiguration: 'BootLoaderModuleFieldTransactionValidationConfiguration', + ProtocolUpdateStatusModuleFieldSummary: 'ProtocolUpdateStatusModuleFieldSummary' } as const; export type SubstateType = typeof SubstateType[keyof typeof SubstateType]; diff --git a/sdk/typescript/lib/generated/models/SystemFieldKind.ts b/sdk/typescript/lib/generated/models/SystemFieldKind.ts index 1470b276a3..00dc1e9f59 100644 --- a/sdk/typescript/lib/generated/models/SystemFieldKind.ts +++ b/sdk/typescript/lib/generated/models/SystemFieldKind.ts @@ -21,7 +21,9 @@ export const SystemFieldKind = { VmBoot: 'VmBoot', TypeInfo: 'TypeInfo', SystemBoot: 'SystemBoot', - KernelBoot: 'KernelBoot' + KernelBoot: 'KernelBoot', + TransactionValidationConfiguration: 'TransactionValidationConfiguration', + ProtocolUpdateStatusSummary: 'ProtocolUpdateStatusSummary' } as const; export type SystemFieldKind = typeof SystemFieldKind[keyof typeof SystemFieldKind]; diff --git a/sdk/typescript/lib/generated/models/SystemVersion.ts b/sdk/typescript/lib/generated/models/SystemVersion.ts new file mode 100644 index 0000000000..bfb209efc3 --- /dev/null +++ b/sdk/typescript/lib/generated/models/SystemVersion.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * The SystemVersion was added at Cuttlefish. Before that it can be assumed to be V1. + * @export + */ +export const SystemVersion = { + V1: 'V1', + V2: 'V2' +} as const; +export type SystemVersion = typeof SystemVersion[keyof typeof SystemVersion]; + + +export function SystemVersionFromJSON(json: any): SystemVersion { + return SystemVersionFromJSONTyped(json, false); +} + +export function SystemVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemVersion { + return json as SystemVersion; +} + +export function SystemVersionToJSON(value?: SystemVersion | null): any { + return value as any; +} + diff --git a/sdk/typescript/lib/generated/models/UserLedgerTransactionV2.ts b/sdk/typescript/lib/generated/models/UserLedgerTransactionV2.ts new file mode 100644 index 0000000000..8ff2a04756 --- /dev/null +++ b/sdk/typescript/lib/generated/models/UserLedgerTransactionV2.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { NotarizedTransactionV2 } from './NotarizedTransactionV2'; +import { + NotarizedTransactionV2FromJSON, + NotarizedTransactionV2FromJSONTyped, + NotarizedTransactionV2ToJSON, +} from './NotarizedTransactionV2'; + +/** + * + * @export + * @interface UserLedgerTransactionV2 + */ +export interface UserLedgerTransactionV2 { + /** + * + * @type {string} + * @memberof UserLedgerTransactionV2 + */ + type: UserLedgerTransactionV2TypeEnum; + /** + * The hex-encoded full ledger transaction payload. Only returned if enabled in TransactionFormatOptions on your request. + * @type {string} + * @memberof UserLedgerTransactionV2 + */ + payload_hex?: string; + /** + * + * @type {NotarizedTransactionV2} + * @memberof UserLedgerTransactionV2 + */ + notarized_transaction: NotarizedTransactionV2; +} + + +/** + * @export + */ +export const UserLedgerTransactionV2TypeEnum = { + UserV2: 'UserV2' +} as const; +export type UserLedgerTransactionV2TypeEnum = typeof UserLedgerTransactionV2TypeEnum[keyof typeof UserLedgerTransactionV2TypeEnum]; + + +/** + * Check if a given object implements the UserLedgerTransactionV2 interface. + */ +export function instanceOfUserLedgerTransactionV2(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "type" in value; + isInstance = isInstance && "notarized_transaction" in value; + + return isInstance; +} + +export function UserLedgerTransactionV2FromJSON(json: any): UserLedgerTransactionV2 { + return UserLedgerTransactionV2FromJSONTyped(json, false); +} + +export function UserLedgerTransactionV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): UserLedgerTransactionV2 { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'payload_hex': !exists(json, 'payload_hex') ? undefined : json['payload_hex'], + 'notarized_transaction': NotarizedTransactionV2FromJSON(json['notarized_transaction']), + }; +} + +export function UserLedgerTransactionV2ToJSON(value?: UserLedgerTransactionV2 | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'payload_hex': value.payload_hex, + 'notarized_transaction': NotarizedTransactionV2ToJSON(value.notarized_transaction), + }; +} + diff --git a/sdk/typescript/lib/generated/models/UserLedgerTransactionV2AllOf.ts b/sdk/typescript/lib/generated/models/UserLedgerTransactionV2AllOf.ts new file mode 100644 index 0000000000..fdf2636ac0 --- /dev/null +++ b/sdk/typescript/lib/generated/models/UserLedgerTransactionV2AllOf.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { NotarizedTransactionV2 } from './NotarizedTransactionV2'; +import { + NotarizedTransactionV2FromJSON, + NotarizedTransactionV2FromJSONTyped, + NotarizedTransactionV2ToJSON, +} from './NotarizedTransactionV2'; + +/** + * + * @export + * @interface UserLedgerTransactionV2AllOf + */ +export interface UserLedgerTransactionV2AllOf { + /** + * + * @type {NotarizedTransactionV2} + * @memberof UserLedgerTransactionV2AllOf + */ + notarized_transaction: NotarizedTransactionV2; + /** + * + * @type {string} + * @memberof UserLedgerTransactionV2AllOf + */ + type?: UserLedgerTransactionV2AllOfTypeEnum; +} + + +/** + * @export + */ +export const UserLedgerTransactionV2AllOfTypeEnum = { + UserV2: 'UserV2' +} as const; +export type UserLedgerTransactionV2AllOfTypeEnum = typeof UserLedgerTransactionV2AllOfTypeEnum[keyof typeof UserLedgerTransactionV2AllOfTypeEnum]; + + +/** + * Check if a given object implements the UserLedgerTransactionV2AllOf interface. + */ +export function instanceOfUserLedgerTransactionV2AllOf(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "notarized_transaction" in value; + + return isInstance; +} + +export function UserLedgerTransactionV2AllOfFromJSON(json: any): UserLedgerTransactionV2AllOf { + return UserLedgerTransactionV2AllOfFromJSONTyped(json, false); +} + +export function UserLedgerTransactionV2AllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserLedgerTransactionV2AllOf { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'notarized_transaction': NotarizedTransactionV2FromJSON(json['notarized_transaction']), + 'type': !exists(json, 'type') ? undefined : json['type'], + }; +} + +export function UserLedgerTransactionV2AllOfToJSON(value?: UserLedgerTransactionV2AllOf | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'notarized_transaction': NotarizedTransactionV2ToJSON(value.notarized_transaction), + 'type': value.type, + }; +} + diff --git a/sdk/typescript/lib/generated/models/index.ts b/sdk/typescript/lib/generated/models/index.ts index 7d8d1d9c31..3fef99fadc 100644 --- a/sdk/typescript/lib/generated/models/index.ts +++ b/sdk/typescript/lib/generated/models/index.ts @@ -35,6 +35,7 @@ export * from './AllOfProofRule'; export * from './AllOfProofRuleAllOf'; export * from './AllowAllAccessRule'; export * from './AllowAllAccessRuleAllOf'; +export * from './AlwaysVisibleGlobalNodesVersion'; export * from './AmountOfProofRule'; export * from './AmountOfProofRuleAllOf'; export * from './AnyOfAccessRuleNode'; @@ -76,9 +77,12 @@ export * from './BlueprintTypeReferenceKind'; export * from './BlueprintVersionKey'; export * from './BootLoaderModuleFieldKernelBootSubstate'; export * from './BootLoaderModuleFieldKernelBootSubstateAllOf'; +export * from './BootLoaderModuleFieldKernelBootValue'; export * from './BootLoaderModuleFieldSystemBootSubstate'; export * from './BootLoaderModuleFieldSystemBootSubstateAllOf'; export * from './BootLoaderModuleFieldSystemBootValue'; +export * from './BootLoaderModuleFieldTransactionValidationConfigurationSubstate'; +export * from './BootLoaderModuleFieldTransactionValidationConfigurationSubstateAllOf'; export * from './BootLoaderModuleFieldVmBootSubstate'; export * from './BootLoaderModuleFieldVmBootSubstateAllOf'; export * from './BootLoaderModuleFieldVmBootValue'; @@ -355,6 +359,7 @@ export * from './NonFungibleVaultFieldFrozenStatusSubstate'; export * from './NonFungibleVaultFieldFrozenStatusSubstateAllOf'; export * from './NonFungibleVaultFieldFrozenStatusValue'; export * from './NotarizedTransaction'; +export * from './NotarizedTransactionV2'; export * from './ObjectFieldStructure'; export * from './ObjectFieldStructureAllOf'; export * from './ObjectHook'; @@ -417,6 +422,8 @@ export * from './ParsedNotarizedTransaction'; export * from './ParsedNotarizedTransactionAllOf'; export * from './ParsedNotarizedTransactionAllOfValidationError'; export * from './ParsedNotarizedTransactionIdentifiers'; +export * from './ParsedNotarizedTransactionV2'; +export * from './ParsedNotarizedTransactionV2AllOf'; export * from './ParsedSignedTransactionIntent'; export * from './ParsedSignedTransactionIntentAllOf'; export * from './ParsedSignedTransactionIntentIdentifiers'; @@ -453,6 +460,8 @@ export * from './ProtectedAccessRule'; export * from './ProtectedAccessRuleAllOf'; export * from './ProtocolUpdateLedgerProofOrigin'; export * from './ProtocolUpdateLedgerProofOriginAllOf'; +export * from './ProtocolUpdateStatusModuleFieldSummarySubstate'; +export * from './ProtocolUpdateStatusModuleFieldSummarySubstateAllOf'; export * from './ProtocolVersionReadiness'; export * from './PublicKey'; export * from './PublicKeyBase'; @@ -605,6 +614,7 @@ export * from './SystemParameters'; export * from './SystemSchemaStructure'; export * from './SystemSchemaStructureAllOf'; export * from './SystemTransaction'; +export * from './SystemVersion'; export * from './TargetIdentifier'; export * from './TargetIdentifierBase'; export * from './TargetIdentifierType'; @@ -664,6 +674,8 @@ export * from './TypeInfoType'; export * from './UpdatedSubstate'; export * from './UserLedgerTransaction'; export * from './UserLedgerTransactionAllOf'; +export * from './UserLedgerTransactionV2'; +export * from './UserLedgerTransactionV2AllOf'; export * from './ValidatorFeeChangeRequest'; export * from './ValidatorFieldProtocolUpdateReadinessSignalSubstate'; export * from './ValidatorFieldProtocolUpdateReadinessSignalSubstateAllOf'; From 5773bf6e1e75dd3c228d2a96df1effba97c9837c Mon Sep 17 00:00:00 2001 From: David Edey Date: Tue, 22 Oct 2024 02:19:38 +0100 Subject: [PATCH 02/12] tests: Add test that Transaction v2 can be submitted --- .../radixdlt/transactions/PreparedIntent.java | 10 +- .../PreparedNotarizedTransaction.java | 6 +- .../transactions/PreparedSignedIntent.java | 8 +- .../PreparedTransactionIntentV2.java | 111 ++++++++++ .../{IntentHash.java => SubintentHash.java} | 9 +- .../transactions/TransactionIntentHash.java | 96 +++++++++ .../com/radixdlt/sbor/NodeSborCodecs.java | 5 +- .../commit/CommittableTransaction.java | 2 +- .../commit/RejectedTransaction.java | 4 +- .../PrepareTransactionIntentV2Request.java | 81 ++++++++ .../transaction/TransactionPreparer.java | 53 ++++- .../src/core_api/conversions/addressing.rs | 8 +- .../src/core_api/conversions/receipt.rs | 8 +- .../substates/boot_loader_module.rs | 47 +++-- .../protocol_update_status_module.rs | 9 +- .../conversions/substates/substate.rs | 12 +- .../core_api/handlers/stream_transactions.rs | 12 +- .../core_api/handlers/transaction_parse.rs | 38 ++-- .../src/jni/transaction_preparer.rs | 156 +++++++++++++++ .../protocol_configs/config_printer.rs | 22 +- .../src/protocol/protocol_state.rs | 17 +- core-rust/state-manager/src/state_manager.rs | 10 +- .../com/radixdlt/addressing/Addressing.java | 4 +- .../com/radixdlt/rev2/TransactionBuilder.java | 5 +- .../radixdlt/rev2/TransactionV2Builder.java | 189 ++++++++++++++++++ .../java/com/radixdlt/api/CoreApiHelper.java | 20 +- .../api/DeterministicCoreApiTestBase.java | 3 +- .../api/core/LtsTransactionOutcomesTest.java | 28 +-- .../api/core/MempoolEndpointTest.java | 2 +- ...onTest.java => TransactionSubmitTest.java} | 57 +++++- .../engine_state/KeyValueStoreEntryTest.java | 6 +- .../KeyValueStoreIteratorTest.java | 2 +- .../rev2/REv2TransactionCreationTest.java | 2 +- 33 files changed, 919 insertions(+), 123 deletions(-) create mode 100644 common/src/main/java/com/radixdlt/transactions/PreparedTransactionIntentV2.java rename common/src/main/java/com/radixdlt/transactions/{IntentHash.java => SubintentHash.java} (95%) create mode 100644 common/src/main/java/com/radixdlt/transactions/TransactionIntentHash.java create mode 100644 core-rust-bridge/src/main/java/com/radixdlt/transaction/PrepareTransactionIntentV2Request.java create mode 100644 core/src/test-core/java/com/radixdlt/rev2/TransactionV2Builder.java rename core/src/test/java/com/radixdlt/api/core/{NetworkSubmitTransactionTest.java => TransactionSubmitTest.java} (87%) diff --git a/common/src/main/java/com/radixdlt/transactions/PreparedIntent.java b/common/src/main/java/com/radixdlt/transactions/PreparedIntent.java index acc25b6501..43bede07e1 100644 --- a/common/src/main/java/com/radixdlt/transactions/PreparedIntent.java +++ b/common/src/main/java/com/radixdlt/transactions/PreparedIntent.java @@ -68,10 +68,10 @@ import com.radixdlt.sbor.codec.StructCodec; import java.util.Objects; -public record PreparedIntent(byte[] intentBytes, IntentHash intentHash) { +public record PreparedIntent(byte[] intentBytes, TransactionIntentHash transactionIntentHash) { public PreparedIntent { Objects.requireNonNull(intentBytes); - Objects.requireNonNull(intentHash); + Objects.requireNonNull(transactionIntentHash); } public static void registerCodec(CodecMap codecMap) { @@ -82,7 +82,7 @@ public static void registerCodec(CodecMap codecMap) { @Override public int hashCode() { - return Objects.hashCode(intentHash); + return Objects.hashCode(transactionIntentHash); } @Override @@ -91,11 +91,11 @@ public boolean equals(Object o) { return false; } - return Objects.equals(this.intentHash, other.intentHash); + return Objects.equals(this.transactionIntentHash, other.transactionIntentHash); } public String hexIntentHash() { - return this.intentHash.hex(); + return this.transactionIntentHash.hex(); } @Override diff --git a/common/src/main/java/com/radixdlt/transactions/PreparedNotarizedTransaction.java b/common/src/main/java/com/radixdlt/transactions/PreparedNotarizedTransaction.java index 8a9a52c9ab..c992a396c6 100644 --- a/common/src/main/java/com/radixdlt/transactions/PreparedNotarizedTransaction.java +++ b/common/src/main/java/com/radixdlt/transactions/PreparedNotarizedTransaction.java @@ -70,12 +70,12 @@ public record PreparedNotarizedTransaction( RawNotarizedTransaction raw, - IntentHash intentHash, + TransactionIntentHash transactionIntentHash, SignedIntentHash signedIntentHash, NotarizedTransactionHash notarizedTransactionHash) { public PreparedNotarizedTransaction { Objects.requireNonNull(raw); - Objects.requireNonNull(intentHash); + Objects.requireNonNull(transactionIntentHash); Objects.requireNonNull(signedIntentHash); Objects.requireNonNull(notarizedTransactionHash); } @@ -108,7 +108,7 @@ public String toString() { } public String hexIntentHash() { - return this.intentHash.hex(); + return this.transactionIntentHash.hex(); } public String hexNotarizedTransactionHash() { diff --git a/common/src/main/java/com/radixdlt/transactions/PreparedSignedIntent.java b/common/src/main/java/com/radixdlt/transactions/PreparedSignedIntent.java index c8cf8d9455..e2a3977230 100644 --- a/common/src/main/java/com/radixdlt/transactions/PreparedSignedIntent.java +++ b/common/src/main/java/com/radixdlt/transactions/PreparedSignedIntent.java @@ -69,10 +69,12 @@ import java.util.Objects; public record PreparedSignedIntent( - byte[] signedIntentBytes, IntentHash intentHash, SignedIntentHash signedIntentHash) { + byte[] signedIntentBytes, + TransactionIntentHash transactionIntentHash, + SignedIntentHash signedIntentHash) { public PreparedSignedIntent { Objects.requireNonNull(signedIntentBytes); - Objects.requireNonNull(intentHash); + Objects.requireNonNull(transactionIntentHash); Objects.requireNonNull(signedIntentHash); } @@ -83,7 +85,7 @@ public static void registerCodec(CodecMap codecMap) { } public String hexIntentHash() { - return this.intentHash.hex(); + return this.transactionIntentHash.hex(); } public String hexSignedIntentHash() { diff --git a/common/src/main/java/com/radixdlt/transactions/PreparedTransactionIntentV2.java b/common/src/main/java/com/radixdlt/transactions/PreparedTransactionIntentV2.java new file mode 100644 index 0000000000..9a80d0cdd1 --- /dev/null +++ b/common/src/main/java/com/radixdlt/transactions/PreparedTransactionIntentV2.java @@ -0,0 +1,111 @@ +/* Copyright 2021 Radix Publishing Ltd incorporated in Jersey (Channel Islands). + * + * Licensed under the Radix License, Version 1.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at: + * + * radixfoundation.org/licenses/LICENSE-v1 + * + * The Licensor hereby grants permission for the Canonical version of the Work to be + * published, distributed and used under or by reference to the Licensor’s trademark + * Radix ® and use of any unregistered trade names, logos or get-up. + * + * The Licensor provides the Work (and each Contributor provides its Contributions) on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, + * including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, + * MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. + * + * Whilst the Work is capable of being deployed, used and adopted (instantiated) to create + * a distributed ledger it is your responsibility to test and validate the code, together + * with all logic and performance of that code under all foreseeable scenarios. + * + * The Licensor does not make or purport to make and hereby excludes liability for all + * and any representation, warranty or undertaking in any form whatsoever, whether express + * or implied, to any entity or person, including any representation, warranty or + * undertaking, as to the functionality security use, value or other characteristics of + * any distributed ledger nor in respect the functioning or value of any tokens which may + * be created stored or transferred using the Work. The Licensor does not warrant that the + * Work or any use of the Work complies with any law or regulation in any territory where + * it may be implemented or used or that it will be appropriate for any specific purpose. + * + * Neither the licensor nor any current or former employees, officers, directors, partners, + * trustees, representatives, agents, advisors, contractors, or volunteers of the Licensor + * shall be liable for any direct or indirect, special, incidental, consequential or other + * losses of any kind, in tort, contract or otherwise (including but not limited to loss + * of revenue, income or profits, or loss of use or data, or loss of reputation, or loss + * of any economic or other opportunity of whatsoever nature or howsoever arising), arising + * out of or in connection with (without limitation of any use, misuse, of any ledger system + * or use made or its functionality or any performance or operation of any code or protocol + * caused by bugs or programming or logic errors or otherwise); + * + * A. any offer, purchase, holding, use, sale, exchange or transmission of any + * cryptographic keys, tokens or assets created, exchanged, stored or arising from any + * interaction with the Work; + * + * B. any failure in a transmission or loss of any token or assets keys or other digital + * artefacts due to errors in transmission; + * + * C. bugs, hacks, logic errors or faults in the Work or any communication; + * + * D. system software or apparatus including but not limited to losses caused by errors + * in holding or transmitting tokens by any third-party; + * + * E. breaches or failure of security including hacker attacks, loss or disclosure of + * password, loss of private key, unauthorised use or misuse of such passwords or keys; + * + * F. any losses including loss of anticipated savings or other benefits resulting from + * use of the Work or any changes to the Work (however implemented). + * + * You are solely responsible for; testing, validating and evaluation of all operation + * logic, functionality, security and appropriateness of using the Work for any commercial + * or non-commercial purpose and for any reproduction or redistribution by You of the + * Work. You assume all risks associated with Your use of the Work and the exercise of + * permissions under this License. + */ + +package com.radixdlt.transactions; + +import com.google.common.collect.ImmutableList; +import com.radixdlt.sbor.codec.CodecMap; +import com.radixdlt.sbor.codec.StructCodec; +import java.util.Objects; + +public record PreparedTransactionIntentV2( + byte[] transactionIntentBytes, + TransactionIntentHash transactionIntentHash, + ImmutableList subintentHashes) { + public PreparedTransactionIntentV2 { + Objects.requireNonNull(transactionIntentBytes); + Objects.requireNonNull(transactionIntentHash); + Objects.requireNonNull(subintentHashes); + } + + public static void registerCodec(CodecMap codecMap) { + codecMap.register( + PreparedTransactionIntentV2.class, + codecs -> StructCodec.fromRecordComponents(PreparedTransactionIntentV2.class, codecs)); + } + + @Override + public int hashCode() { + return Objects.hashCode(transactionIntentHash); + } + + @Override + public boolean equals(Object o) { + if (!(o instanceof PreparedTransactionIntentV2 other)) { + return false; + } + + return Objects.equals(this.transactionIntentHash, other.transactionIntentHash); + } + + public String hexIntentHash() { + return this.transactionIntentHash.hex(); + } + + @Override + public String toString() { + return String.format( + "%s{intentHash=%s}", this.getClass().getSimpleName(), this.hexIntentHash()); + } +} diff --git a/common/src/main/java/com/radixdlt/transactions/IntentHash.java b/common/src/main/java/com/radixdlt/transactions/SubintentHash.java similarity index 95% rename from common/src/main/java/com/radixdlt/transactions/IntentHash.java rename to common/src/main/java/com/radixdlt/transactions/SubintentHash.java index 5af9eaf355..5368a03145 100644 --- a/common/src/main/java/com/radixdlt/transactions/IntentHash.java +++ b/common/src/main/java/com/radixdlt/transactions/SubintentHash.java @@ -70,16 +70,17 @@ import com.radixdlt.utils.Bytes; import java.util.Objects; -public record IntentHash(HashCode inner) { - public IntentHash { +public record SubintentHash(HashCode inner) { + public SubintentHash { Objects.requireNonNull(inner); } public static void registerCodec(CodecMap codecMap) { codecMap.register( - IntentHash.class, + SubintentHash.class, codecs -> - StructCodec.transparent(IntentHash::new, codecs.of(HashCode.class), IntentHash::inner)); + StructCodec.transparent( + SubintentHash::new, codecs.of(HashCode.class), SubintentHash::inner)); } public String hex() { diff --git a/common/src/main/java/com/radixdlt/transactions/TransactionIntentHash.java b/common/src/main/java/com/radixdlt/transactions/TransactionIntentHash.java new file mode 100644 index 0000000000..c3614be70b --- /dev/null +++ b/common/src/main/java/com/radixdlt/transactions/TransactionIntentHash.java @@ -0,0 +1,96 @@ +/* Copyright 2021 Radix Publishing Ltd incorporated in Jersey (Channel Islands). + * + * Licensed under the Radix License, Version 1.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at: + * + * radixfoundation.org/licenses/LICENSE-v1 + * + * The Licensor hereby grants permission for the Canonical version of the Work to be + * published, distributed and used under or by reference to the Licensor’s trademark + * Radix ® and use of any unregistered trade names, logos or get-up. + * + * The Licensor provides the Work (and each Contributor provides its Contributions) on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, + * including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, + * MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. + * + * Whilst the Work is capable of being deployed, used and adopted (instantiated) to create + * a distributed ledger it is your responsibility to test and validate the code, together + * with all logic and performance of that code under all foreseeable scenarios. + * + * The Licensor does not make or purport to make and hereby excludes liability for all + * and any representation, warranty or undertaking in any form whatsoever, whether express + * or implied, to any entity or person, including any representation, warranty or + * undertaking, as to the functionality security use, value or other characteristics of + * any distributed ledger nor in respect the functioning or value of any tokens which may + * be created stored or transferred using the Work. The Licensor does not warrant that the + * Work or any use of the Work complies with any law or regulation in any territory where + * it may be implemented or used or that it will be appropriate for any specific purpose. + * + * Neither the licensor nor any current or former employees, officers, directors, partners, + * trustees, representatives, agents, advisors, contractors, or volunteers of the Licensor + * shall be liable for any direct or indirect, special, incidental, consequential or other + * losses of any kind, in tort, contract or otherwise (including but not limited to loss + * of revenue, income or profits, or loss of use or data, or loss of reputation, or loss + * of any economic or other opportunity of whatsoever nature or howsoever arising), arising + * out of or in connection with (without limitation of any use, misuse, of any ledger system + * or use made or its functionality or any performance or operation of any code or protocol + * caused by bugs or programming or logic errors or otherwise); + * + * A. any offer, purchase, holding, use, sale, exchange or transmission of any + * cryptographic keys, tokens or assets created, exchanged, stored or arising from any + * interaction with the Work; + * + * B. any failure in a transmission or loss of any token or assets keys or other digital + * artefacts due to errors in transmission; + * + * C. bugs, hacks, logic errors or faults in the Work or any communication; + * + * D. system software or apparatus including but not limited to losses caused by errors + * in holding or transmitting tokens by any third-party; + * + * E. breaches or failure of security including hacker attacks, loss or disclosure of + * password, loss of private key, unauthorised use or misuse of such passwords or keys; + * + * F. any losses including loss of anticipated savings or other benefits resulting from + * use of the Work or any changes to the Work (however implemented). + * + * You are solely responsible for; testing, validating and evaluation of all operation + * logic, functionality, security and appropriateness of using the Work for any commercial + * or non-commercial purpose and for any reproduction or redistribution by You of the + * Work. You assume all risks associated with Your use of the Work and the exercise of + * permissions under this License. + */ + +package com.radixdlt.transactions; + +import com.google.common.hash.HashCode; +import com.radixdlt.sbor.codec.CodecMap; +import com.radixdlt.sbor.codec.StructCodec; +import com.radixdlt.utils.Bytes; +import java.util.Objects; + +public record TransactionIntentHash(HashCode inner) { + public TransactionIntentHash { + Objects.requireNonNull(inner); + } + + public static void registerCodec(CodecMap codecMap) { + codecMap.register( + TransactionIntentHash.class, + codecs -> + StructCodec.transparent( + TransactionIntentHash::new, + codecs.of(HashCode.class), + TransactionIntentHash::inner)); + } + + public String hex() { + return Bytes.toHexString(this.inner.asBytes()); + } + + @Override + public String toString() { + return this.hex(); + } +} diff --git a/core-rust-bridge/src/main/java/com/radixdlt/sbor/NodeSborCodecs.java b/core-rust-bridge/src/main/java/com/radixdlt/sbor/NodeSborCodecs.java index 91b170000f..424138c8ed 100644 --- a/core-rust-bridge/src/main/java/com/radixdlt/sbor/NodeSborCodecs.java +++ b/core-rust-bridge/src/main/java/com/radixdlt/sbor/NodeSborCodecs.java @@ -139,9 +139,11 @@ public static void registerCodecsWithCodecMap(CodecMap codecMap) { RawLedgerTransaction.registerCodec(codecMap); RawNotarizedTransaction.registerCodec(codecMap); PreparedIntent.registerCodec(codecMap); + PreparedTransactionIntentV2.registerCodec(codecMap); PreparedSignedIntent.registerCodec(codecMap); PreparedNotarizedTransaction.registerCodec(codecMap); - IntentHash.registerCodec(codecMap); + TransactionIntentHash.registerCodec(codecMap); + SubintentHash.registerCodec(codecMap); SignedIntentHash.registerCodec(codecMap); NotarizedTransactionHash.registerCodec(codecMap); LedgerTransactionHash.registerCodec(codecMap); @@ -205,6 +207,7 @@ public static void registerCodecsWithCodecMap(CodecMap codecMap) { NonFungibleGlobalId.registerCodec(codecMap); InternalAddress.registerCodec(codecMap); PrepareIntentRequest.registerCodec(codecMap); + PrepareTransactionIntentV2Request.registerCodec(codecMap); TransactionMessage.registerCodec(codecMap); PlaintextTransactionMessage.registerCodec(codecMap); EncryptedTransactionMessage.registerCodec(codecMap); diff --git a/core-rust-bridge/src/main/java/com/radixdlt/statecomputer/commit/CommittableTransaction.java b/core-rust-bridge/src/main/java/com/radixdlt/statecomputer/commit/CommittableTransaction.java index 9cc760c00d..33109c2202 100644 --- a/core-rust-bridge/src/main/java/com/radixdlt/statecomputer/commit/CommittableTransaction.java +++ b/core-rust-bridge/src/main/java/com/radixdlt/statecomputer/commit/CommittableTransaction.java @@ -73,7 +73,7 @@ public record CommittableTransaction( Option index, RawLedgerTransaction raw, - Option intentHash, + Option intentHash, Option notarizedTransactionHash, LedgerTransactionHash ledgerTransactionHash) { public static void registerCodec(CodecMap codecMap) { diff --git a/core-rust-bridge/src/main/java/com/radixdlt/statecomputer/commit/RejectedTransaction.java b/core-rust-bridge/src/main/java/com/radixdlt/statecomputer/commit/RejectedTransaction.java index 9c08a25e6d..38b844d8d7 100644 --- a/core-rust-bridge/src/main/java/com/radixdlt/statecomputer/commit/RejectedTransaction.java +++ b/core-rust-bridge/src/main/java/com/radixdlt/statecomputer/commit/RejectedTransaction.java @@ -67,14 +67,14 @@ import com.radixdlt.lang.Option; import com.radixdlt.sbor.codec.CodecMap; import com.radixdlt.sbor.codec.StructCodec; -import com.radixdlt.transactions.IntentHash; import com.radixdlt.transactions.LedgerTransactionHash; import com.radixdlt.transactions.NotarizedTransactionHash; +import com.radixdlt.transactions.TransactionIntentHash; import com.radixdlt.utils.UInt32; public record RejectedTransaction( UInt32 index, - Option intentHash, + Option intentHash, Option notarizedTransactionHash, Option ledgerTransactionHash, String error) { diff --git a/core-rust-bridge/src/main/java/com/radixdlt/transaction/PrepareTransactionIntentV2Request.java b/core-rust-bridge/src/main/java/com/radixdlt/transaction/PrepareTransactionIntentV2Request.java new file mode 100644 index 0000000000..8770343f88 --- /dev/null +++ b/core-rust-bridge/src/main/java/com/radixdlt/transaction/PrepareTransactionIntentV2Request.java @@ -0,0 +1,81 @@ +/* Copyright 2021 Radix Publishing Ltd incorporated in Jersey (Channel Islands). + * + * Licensed under the Radix License, Version 1.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at: + * + * radixfoundation.org/licenses/LICENSE-v1 + * + * The Licensor hereby grants permission for the Canonical version of the Work to be + * published, distributed and used under or by reference to the Licensor’s trademark + * Radix ® and use of any unregistered trade names, logos or get-up. + * + * The Licensor provides the Work (and each Contributor provides its Contributions) on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, + * including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, + * MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. + * + * Whilst the Work is capable of being deployed, used and adopted (instantiated) to create + * a distributed ledger it is your responsibility to test and validate the code, together + * with all logic and performance of that code under all foreseeable scenarios. + * + * The Licensor does not make or purport to make and hereby excludes liability for all + * and any representation, warranty or undertaking in any form whatsoever, whether express + * or implied, to any entity or person, including any representation, warranty or + * undertaking, as to the functionality security use, value or other characteristics of + * any distributed ledger nor in respect the functioning or value of any tokens which may + * be created stored or transferred using the Work. The Licensor does not warrant that the + * Work or any use of the Work complies with any law or regulation in any territory where + * it may be implemented or used or that it will be appropriate for any specific purpose. + * + * Neither the licensor nor any current or former employees, officers, directors, partners, + * trustees, representatives, agents, advisors, contractors, or volunteers of the Licensor + * shall be liable for any direct or indirect, special, incidental, consequential or other + * losses of any kind, in tort, contract or otherwise (including but not limited to loss + * of revenue, income or profits, or loss of use or data, or loss of reputation, or loss + * of any economic or other opportunity of whatsoever nature or howsoever arising), arising + * out of or in connection with (without limitation of any use, misuse, of any ledger system + * or use made or its functionality or any performance or operation of any code or protocol + * caused by bugs or programming or logic errors or otherwise); + * + * A. any offer, purchase, holding, use, sale, exchange or transmission of any + * cryptographic keys, tokens or assets created, exchanged, stored or arising from any + * interaction with the Work; + * + * B. any failure in a transmission or loss of any token or assets keys or other digital + * artefacts due to errors in transmission; + * + * C. bugs, hacks, logic errors or faults in the Work or any communication; + * + * D. system software or apparatus including but not limited to losses caused by errors + * in holding or transmitting tokens by any third-party; + * + * E. breaches or failure of security including hacker attacks, loss or disclosure of + * password, loss of private key, unauthorised use or misuse of such passwords or keys; + * + * F. any losses including loss of anticipated savings or other benefits resulting from + * use of the Work or any changes to the Work (however implemented). + * + * You are solely responsible for; testing, validating and evaluation of all operation + * logic, functionality, security and appropriateness of using the Work for any commercial + * or non-commercial purpose and for any reproduction or redistribution by You of the + * Work. You assume all risks associated with Your use of the Work and the exercise of + * permissions under this License. + */ + +package com.radixdlt.transaction; + +import com.radixdlt.rev2.NetworkDefinition; +import com.radixdlt.rev2.TransactionHeader; +import com.radixdlt.sbor.codec.CodecMap; +import com.radixdlt.sbor.codec.StructCodec; +import com.radixdlt.utils.UInt64; + +public record PrepareTransactionIntentV2Request( + NetworkDefinition network, TransactionHeader header, UInt64 subintentCount) { + public static void registerCodec(CodecMap codecMap) { + codecMap.register( + PrepareTransactionIntentV2Request.class, + codecs -> + StructCodec.fromRecordComponents(PrepareTransactionIntentV2Request.class, codecs)); + } +} diff --git a/core-rust-bridge/src/main/java/com/radixdlt/transaction/TransactionPreparer.java b/core-rust-bridge/src/main/java/com/radixdlt/transaction/TransactionPreparer.java index 3797fd04a9..b9a8b62488 100644 --- a/core-rust-bridge/src/main/java/com/radixdlt/transaction/TransactionPreparer.java +++ b/core-rust-bridge/src/main/java/com/radixdlt/transaction/TransactionPreparer.java @@ -77,6 +77,7 @@ import com.radixdlt.rev2.TransactionHeader; import com.radixdlt.sbor.Natives; import com.radixdlt.transactions.*; +import com.radixdlt.utils.UInt64; import java.util.List; import java.util.Optional; @@ -101,19 +102,48 @@ public static PreparedIntent prepareIntent( prepareIntentFunc = Natives.builder(TransactionPreparer::prepareIntent).build(new TypeToken<>() {}); + public static PreparedTransactionIntentV2 prepareTransactionIntentV2( + NetworkDefinition network, TransactionHeader header, long subintentCount) { + return prepareTransactionIntentV2Func + .call( + new PrepareTransactionIntentV2Request( + network, header, UInt64.fromNonNegativeLong(subintentCount))) + .unwrap(TransactionPreparationException::new); + } + + private static final Natives.Call1< + PrepareTransactionIntentV2Request, Result> + prepareTransactionIntentV2Func = + Natives.builder(TransactionPreparer::prepareTransactionIntentV2) + .build(new TypeToken<>() {}); + public static PreparedSignedIntent prepareSignedIntent( byte[] intent, List signatures) { - return prepareSignedIntentBytesFunc + return prepareSignedIntentFunc .call(tuple(intent, signatures)) .unwrap(TransactionPreparationException::new); } private static final Natives.Call1< Tuple.Tuple2>, Result> - prepareSignedIntentBytesFunc = + prepareSignedIntentFunc = Natives.builder(TransactionPreparer::prepareSignedIntent).build(new TypeToken<>() {}); + public static PreparedSignedIntent prepareSignedIntentV2( + byte[] transactionIntent, List signatures) { + + return prepareSignedTransactionIntentV2Func + .call(tuple(transactionIntent, signatures)) + .unwrap(TransactionPreparationException::new); + } + + private static final Natives.Call1< + Tuple.Tuple2>, Result> + prepareSignedTransactionIntentV2Func = + Natives.builder(TransactionPreparer::prepareSignedTransactionIntentV2) + .build(new TypeToken<>() {}); + public static PreparedNotarizedTransaction prepareNotarizedTransaction( byte[] signedIntent, Signature signature) { return prepareNotarizedTransactionFunc @@ -127,6 +157,19 @@ public static PreparedNotarizedTransaction prepareNotarizedTransaction( Natives.builder(TransactionPreparer::prepareNotarizedTransaction) .build(new TypeToken<>() {}); + public static PreparedNotarizedTransaction prepareNotarizedTransactionV2( + byte[] signedIntent, Signature signature) { + return prepareNotarizedTransactionV2Func + .call(tuple(signedIntent, signature)) + .unwrap(TransactionPreparationException::new); + } + + private static final Natives.Call1< + Tuple.Tuple2, Result> + prepareNotarizedTransactionV2Func = + Natives.builder(TransactionPreparer::prepareNotarizedTransactionV2) + .build(new TypeToken<>() {}); + public static RawLedgerTransaction rawNotarizedTransactionToRawLedgerTransaction( RawNotarizedTransaction notarized) { return userTransactionToLedger.call(notarized).unwrap(TransactionPreparationException::new); @@ -138,9 +181,15 @@ public static RawLedgerTransaction rawNotarizedTransactionToRawLedgerTransaction private static native byte[] prepareIntent(byte[] requestPayload); + private static native byte[] prepareTransactionIntentV2(byte[] requestPayload); + private static native byte[] prepareSignedIntent(byte[] requestPayload); + private static native byte[] prepareSignedTransactionIntentV2(byte[] requestPayload); + private static native byte[] prepareNotarizedTransaction(byte[] requestPayload); + private static native byte[] prepareNotarizedTransactionV2(byte[] requestPayload); + private static native byte[] userTransactionToLedger(byte[] requestPayload); } diff --git a/core-rust/core-api-server/src/core_api/conversions/addressing.rs b/core-rust/core-api-server/src/core_api/conversions/addressing.rs index 7fd061d168..f019bcbaeb 100644 --- a/core-rust/core-api-server/src/core_api/conversions/addressing.rs +++ b/core-rust/core-api-server/src/core_api/conversions/addressing.rs @@ -146,9 +146,11 @@ pub fn to_api_substate_id( SubstateType::BootLoaderModuleFieldTransactionValidationConfiguration, models::PartitionKind::Field, ), - TypedSubstateKey::ProtocolUpdateStatus(TypedProtocolUpdateStatusSubstateKey::ProtocolUpdateStatusField( - ProtocolUpdateStatusField::Summary - )) => ( + TypedSubstateKey::ProtocolUpdateStatus( + TypedProtocolUpdateStatusSubstateKey::ProtocolUpdateStatusField( + ProtocolUpdateStatusField::Summary, + ), + ) => ( SubstateType::ProtocolUpdateStatusModuleFieldSummary, models::PartitionKind::Field, ), diff --git a/core-rust/core-api-server/src/core_api/conversions/receipt.rs b/core-rust/core-api-server/src/core_api/conversions/receipt.rs index 1530a03f7e..abdad87d65 100644 --- a/core-rust/core-api-server/src/core_api/conversions/receipt.rs +++ b/core-rust/core-api-server/src/core_api/conversions/receipt.rs @@ -148,8 +148,12 @@ pub fn to_api_substate_system_structure( SystemFieldKind::VmBoot => models::SystemFieldKind::VmBoot, SystemFieldKind::SystemBoot => models::SystemFieldKind::SystemBoot, SystemFieldKind::KernelBoot => models::SystemFieldKind::KernelBoot, - SystemFieldKind::TransactionValidationConfiguration => models::SystemFieldKind::TransactionValidationConfiguration, - SystemFieldKind::ProtocolUpdateStatusSummary => models::SystemFieldKind::ProtocolUpdateStatusSummary, + SystemFieldKind::TransactionValidationConfiguration => { + models::SystemFieldKind::TransactionValidationConfiguration + } + SystemFieldKind::ProtocolUpdateStatusSummary => { + models::SystemFieldKind::ProtocolUpdateStatusSummary + } }, } } diff --git a/core-rust/core-api-server/src/core_api/conversions/substates/boot_loader_module.rs b/core-rust/core-api-server/src/core_api/conversions/substates/boot_loader_module.rs index 1bc4ee042a..0e17d5a111 100644 --- a/core-rust/core-api-server/src/core_api/conversions/substates/boot_loader_module.rs +++ b/core-rust/core-api-server/src/core_api/conversions/substates/boot_loader_module.rs @@ -9,18 +9,16 @@ pub fn to_api_system_boot_substate( substate: &SystemBoot, ) -> Result { let value = match substate { - SystemBoot::V1(system_parameters) => { - models::BootLoaderModuleFieldSystemBootValue { - system_version: None, - system_parameters: Box::new(to_api_system_parameters(context, system_parameters)?), - } + SystemBoot::V1(system_parameters) => models::BootLoaderModuleFieldSystemBootValue { + system_version: None, + system_parameters: Box::new(to_api_system_parameters(context, system_parameters)?), }, SystemBoot::V2(system_version, system_parameters) => { models::BootLoaderModuleFieldSystemBootValue { system_version: Some(to_api_system_version(system_version)), system_parameters: Box::new(to_api_system_parameters(context, system_parameters)?), } - }, + } }; Ok(models::Substate::BootLoaderModuleFieldSystemBootSubstate { @@ -29,9 +27,7 @@ pub fn to_api_system_boot_substate( }) } -fn to_api_system_version( - system_version: &SystemVersion -) -> models::SystemVersion { +fn to_api_system_version(system_version: &SystemVersion) -> models::SystemVersion { match system_version { SystemVersion::V1 => models::SystemVersion::V1, SystemVersion::V2 => models::SystemVersion::V2, @@ -62,18 +58,16 @@ pub fn to_api_kernel_boot_substate( ) -> Result { let value = match substate { // Note: this is how OpenAPI generator represents an empty object type, even when named: - KernelBoot::V1 => { - models::BootLoaderModuleFieldKernelBootValue { - always_visible_nodes_version: None, - } + KernelBoot::V1 => models::BootLoaderModuleFieldKernelBootValue { + always_visible_nodes_version: None, }, - KernelBoot::V2 { global_nodes_version } => { - models::BootLoaderModuleFieldKernelBootValue { - always_visible_nodes_version: Some(match global_nodes_version { - AlwaysVisibleGlobalNodesVersion::V1 => models::AlwaysVisibleGlobalNodesVersion::V1, - AlwaysVisibleGlobalNodesVersion::V2 => models::AlwaysVisibleGlobalNodesVersion::V2, - }), - } + KernelBoot::V2 { + global_nodes_version, + } => models::BootLoaderModuleFieldKernelBootValue { + always_visible_nodes_version: Some(match global_nodes_version { + AlwaysVisibleGlobalNodesVersion::V1 => models::AlwaysVisibleGlobalNodesVersion::V1, + AlwaysVisibleGlobalNodesVersion::V2 => models::AlwaysVisibleGlobalNodesVersion::V2, + }), }, }; @@ -201,7 +195,8 @@ pub fn to_api_transaction_validator_configuration_substate( _context: &MappingContext, substate: &TransactionValidationConfigurationSubstate, ) -> Result { - let value = match substate.as_versions() { + #[allow(unused)] // TODO:CUTTLEFISH + match substate.as_versions() { TransactionValidationConfigurationVersions::V1(config) => { let TransactionValidationConfigV1 { max_signer_signatures_per_intent, @@ -223,8 +218,12 @@ pub fn to_api_transaction_validator_configuration_substate( } = config; // TODO: Add this to the substate. - }, + } }; - Ok(models::Substate::BootLoaderModuleFieldTransactionValidationConfigurationSubstate { is_locked: false }) -} \ No newline at end of file + Ok( + models::Substate::BootLoaderModuleFieldTransactionValidationConfigurationSubstate { + is_locked: false, + }, + ) +} diff --git a/core-rust/core-api-server/src/core_api/conversions/substates/protocol_update_status_module.rs b/core-rust/core-api-server/src/core_api/conversions/substates/protocol_update_status_module.rs index c3ff377880..d76ec0e082 100644 --- a/core-rust/core-api-server/src/core_api/conversions/substates/protocol_update_status_module.rs +++ b/core-rust/core-api-server/src/core_api/conversions/substates/protocol_update_status_module.rs @@ -6,13 +6,14 @@ use crate::core_api::models; use crate::prelude::*; pub fn to_api_protocol_update_status_substate( - context: &MappingContext, + _context: &MappingContext, substate: &ProtocolUpdateStatusSummarySubstate, ) -> Result { + // TODO:CUTTLEFISH let ProtocolUpdateStatusSummary { - protocol_version, - update_status, + protocol_version: _, + update_status: _, } = substate.as_unique_version(); Ok(models::Substate::ProtocolUpdateStatusModuleFieldSummarySubstate { is_locked: false }) -} \ No newline at end of file +} diff --git a/core-rust/core-api-server/src/core_api/conversions/substates/substate.rs b/core-rust/core-api-server/src/core_api/conversions/substates/substate.rs index 92cbf0c6f2..5a3ab38922 100644 --- a/core-rust/core-api-server/src/core_api/conversions/substates/substate.rs +++ b/core-rust/core-api-server/src/core_api/conversions/substates/substate.rs @@ -20,12 +20,12 @@ pub fn to_api_substate( TypedSubstateValue::BootLoader(BootLoaderSubstateValue::Kernel(kernel_boot_substate)) => { to_api_kernel_boot_substate(context, state_mapping_lookups, kernel_boot_substate)? } - TypedSubstateValue::BootLoader(BootLoaderSubstateValue::TransactionValidation(substate)) => { - to_api_transaction_validator_configuration_substate(context, substate)? - } - TypedSubstateValue::ProtocolUpdateStatus(ProtocolUpdateStatusSubstateValue::Summary(substate)) => { - to_api_protocol_update_status_substate(context, substate)? - }, + TypedSubstateValue::BootLoader(BootLoaderSubstateValue::TransactionValidation( + substate, + )) => to_api_transaction_validator_configuration_substate(context, substate)?, + TypedSubstateValue::ProtocolUpdateStatus(ProtocolUpdateStatusSubstateValue::Summary( + substate, + )) => to_api_protocol_update_status_substate(context, substate)?, TypedSubstateValue::TypeInfoModule(TypedTypeInfoModuleSubstateValue::TypeInfo( type_info_substate, )) => to_api_type_info_substate(context, state_mapping_lookups, type_info_substate)?, diff --git a/core-rust/core-api-server/src/core_api/handlers/stream_transactions.rs b/core-rust/core-api-server/src/core_api/handlers/stream_transactions.rs index 6b9cd72300..f6ccd14d6c 100644 --- a/core-rust/core-api-server/src/core_api/handlers/stream_transactions.rs +++ b/core-rust/core-api-server/src/core_api/handlers/stream_transactions.rs @@ -357,7 +357,11 @@ pub fn to_api_ledger_transaction( })?; models::LedgerTransaction::UserLedgerTransactionV2 { payload_hex, - notarized_transaction: Box::new(to_api_notarized_transaction_v2(context, tx, &user_hashes)?), + notarized_transaction: Box::new(to_api_notarized_transaction_v2( + context, + tx, + &user_hashes, + )?), } } LedgerTransaction::RoundUpdateV1(tx) => { @@ -426,9 +430,9 @@ pub fn to_api_notarized_transaction_v1( } pub fn to_api_notarized_transaction_v2( - context: &MappingContext, - notarized: &NotarizedTransactionV2, - user_hashes: &UserTransactionHashes, + _context: &MappingContext, + _notarized: &NotarizedTransactionV2, + _user_hashes: &UserTransactionHashes, ) -> Result { Ok(models::NotarizedTransactionV2 { todo: Some("TODO:CUTTLEFISH".to_string()), diff --git a/core-rust/core-api-server/src/core_api/handlers/transaction_parse.rs b/core-rust/core-api-server/src/core_api/handlers/transaction_parse.rs index f155734883..9a7ffca6be 100644 --- a/core-rust/core-api-server/src/core_api/handlers/transaction_parse.rs +++ b/core-rust/core-api-server/src/core_api/handlers/transaction_parse.rs @@ -4,7 +4,8 @@ use models::transaction_parse_request::{ParseMode, ResponseMode, ValidationMode} use models::transaction_parse_response::TransactionParseResponse; use super::{ - to_api_intent_v1, to_api_ledger_transaction, to_api_notarized_transaction_v1, to_api_notarized_transaction_v2, to_api_signed_intent + to_api_intent_v1, to_api_ledger_transaction, to_api_notarized_transaction_v1, + to_api_notarized_transaction_v2, to_api_signed_intent, }; pub struct ParseContext<'a> { @@ -176,7 +177,7 @@ fn attempt_parsing_as_notarized_transaction( fn to_api_parsed_notarized_transaction( context: &ParseContext, parsed: ParsedNotarizedTransaction, -) -> Result> { +) -> Result> { let validation_error = parsed .validation .and_then(|result| result.err()) @@ -197,18 +198,21 @@ fn to_api_parsed_notarized_transaction( &parsed.hashes, )?)), }; - + let ledger_hash = PreparedLedgerTransactionInner::User(PreparedUserTransaction::V1(prepared)) .get_ledger_hash(); - + Ok(models::ParsedTransaction::ParsedNotarizedTransaction { notarized_transaction: model, - identifiers: Box::new(to_api_parsed_notarized_transaction_identifiers(context, &parsed.hashes, ledger_hash)?), + identifiers: Box::new(to_api_parsed_notarized_transaction_identifiers( + context, + &parsed.hashes, + ledger_hash, + )?), validation_error, }) - - }, + } (UserTransaction::V2(model), PreparedUserTransaction::V2(prepared)) => { let model = match context.response_mode { ResponseMode::Basic => None, @@ -218,18 +222,24 @@ fn to_api_parsed_notarized_transaction( &parsed.hashes, )?)), }; - + let ledger_hash = PreparedLedgerTransactionInner::User(PreparedUserTransaction::V2(prepared)) .get_ledger_hash(); - + Ok(models::ParsedTransaction::ParsedNotarizedTransactionV2 { notarized_transaction: model, - identifiers: Box::new(to_api_parsed_notarized_transaction_identifiers(context, &parsed.hashes, ledger_hash)?), + identifiers: Box::new(to_api_parsed_notarized_transaction_identifiers( + context, + &parsed.hashes, + ledger_hash, + )?), validation_error, }) - }, - (UserTransaction::V1(_), _) | (UserTransaction::V2(_), _) => panic!("Unexpected combination"), + } + (UserTransaction::V1(_), _) | (UserTransaction::V2(_), _) => { + panic!("Unexpected combination") + } } } @@ -251,9 +261,7 @@ fn to_api_parsed_notarized_transaction_identifiers( &context.mapping_context, &hashes.signed_transaction_intent_hash, )?, - payload_hash: to_api_notarized_transaction_hash( - &hashes.notarized_transaction_hash, - ), + payload_hash: to_api_notarized_transaction_hash(&hashes.notarized_transaction_hash), payload_hash_bech32m: to_api_hash_bech32m( &context.mapping_context, &hashes.notarized_transaction_hash, diff --git a/core-rust/state-manager/src/jni/transaction_preparer.rs b/core-rust/state-manager/src/jni/transaction_preparer.rs index 37c7612702..c5c5cf1c69 100644 --- a/core-rust/state-manager/src/jni/transaction_preparer.rs +++ b/core-rust/state-manager/src/jni/transaction_preparer.rs @@ -116,6 +116,102 @@ extern "system" fn Java_com_radixdlt_transaction_TransactionPreparer_prepareInte ) } +// Yes, this isn't a full transaction specification, but it's good enough for now. +#[derive(Debug, Clone, PartialEq, Eq, ScryptoSbor)] +struct PrepareTransactionIntentV2Request { + network_definition: NetworkDefinition, + header: TransactionHeaderJava, + subintent_count: usize, +} + +#[derive(Debug, Clone, PartialEq, Eq, ScryptoSbor)] +struct PrepareTransactionIntentV2Response { + raw_transaction_intent: RawTransactionIntent, + transaction_intent_hash: TransactionIntentHash, + subintent_hashes: Vec, +} + +#[no_mangle] +extern "system" fn Java_com_radixdlt_transaction_TransactionPreparer_prepareTransactionIntentV2( + env: JNIEnv, + _class: JClass, + request_payload: jbyteArray, +) -> jbyteArray { + jni_sbor_coded_call( + &env, + request_payload, + |request: PrepareTransactionIntentV2Request| -> Result { + let PrepareTransactionIntentV2Request { + network_definition, + header, + subintent_count, + } = request; + + let mut subintent_hashes = vec![]; + let mut subintent_names = vec![]; + + let mut transaction_builder = TransactionV2Builder::new() + .transaction_header(TransactionHeaderV2 { + notary_public_key: header.notary_public_key, + notary_is_signatory: header.notary_is_signatory, + tip_basis_points: (header.tip_percentage as u32) * 100, + }) + .intent_header(IntentHeaderV2 { + network_id: network_definition.id, + start_epoch_inclusive: Epoch::of(header.start_epoch_inclusive), + end_epoch_exclusive: Epoch::of(header.end_epoch_exclusive), + min_proposer_timestamp_inclusive: None, + max_proposer_timestamp_exclusive: None, + intent_discriminator: header.nonce as u64, + }); + + for i in 0..subintent_count { + let mut subintent_builder: PartialTransactionV2Builder = PartialTransactionV2Builder::new() + .intent_header(IntentHeaderV2 { + network_id: network_definition.id, + start_epoch_inclusive: Epoch::of(header.start_epoch_inclusive), + end_epoch_exclusive: Epoch::of(header.end_epoch_exclusive), + min_proposer_timestamp_inclusive: None, + max_proposer_timestamp_exclusive: None, + intent_discriminator: (header.nonce as u64) * 1000 + (i as u64), + }) + .manifest_builder(|builder| { + builder + .yield_to_parent(()) + }); + subintent_hashes.push(subintent_builder.subintent_hash()); + subintent_names.push(format!("child-{i}")); + transaction_builder = transaction_builder.add_signed_child( + format!("child-{i}"), + subintent_builder.build(), + ); + } + + transaction_builder = transaction_builder + .manifest_builder(move |builder| { + let mut builder = builder.lock_fee_from_faucet(); + + for child in subintent_names { + builder = builder.yield_to_child(child, ()); + } + + builder + }); + + let raw_transaction_intent = transaction_builder.create_intent_and_subintent_info() + .to_raw() + .unwrap(); + let transaction_intent_hash = transaction_builder.intent_hash(); + + Ok(PrepareTransactionIntentV2Response { + raw_transaction_intent, + transaction_intent_hash, + subintent_hashes, + }) + }, + ) +} + // We use a separate model to ensure that any change to // TransactionHeader is picked up as a compile error, not an SBOR error #[derive(Debug, Clone, PartialEq, Eq, ScryptoSbor)] @@ -276,6 +372,41 @@ extern "system" fn Java_com_radixdlt_transaction_TransactionPreparer_prepareSign ) } +#[no_mangle] +extern "system" fn Java_com_radixdlt_transaction_TransactionPreparer_prepareSignedTransactionIntentV2( + env: JNIEnv, + _class: JClass, + request_payload: jbyteArray, +) -> jbyteArray { + jni_sbor_coded_call( + &env, + request_payload, + |request: PrepareSignedIntentRequest| -> Result { + let signed_intent = SignedTransactionIntentV2 { + transaction_intent: TransactionIntentV2::from_raw(&request.intent_bytes)?, + transaction_intent_signatures: IntentSignaturesV2 { + signatures: request + .signatures + .into_iter() + .map(IntentSignatureV1) + .collect(), + }, + non_root_subintent_signatures: NonRootSubintentSignaturesV2 { + by_subintent: vec![], + }, + }; + + let prepared_signed_intent = signed_intent.prepare(&PreparationSettings::latest())?; + + Ok(PrepareSignedIntentResponse { + signed_intent_bytes: signed_intent.to_raw()?, + intent_hash: prepared_signed_intent.transaction_intent_hash(), + signed_intent_hash: prepared_signed_intent.signed_transaction_intent_hash(), + }) + }, + ) +} + #[derive(Debug, Clone, PartialEq, Eq, ScryptoSbor)] struct PrepareNotarizedTransactionRequest { signed_intent_bytes: RawSignedTransactionIntent, @@ -316,6 +447,31 @@ extern "system" fn Java_com_radixdlt_transaction_TransactionPreparer_prepareNota }) } +#[no_mangle] +extern "system" fn Java_com_radixdlt_transaction_TransactionPreparer_prepareNotarizedTransactionV2( + env: JNIEnv, + _class: JClass, + request_payload: jbyteArray, +) -> jbyteArray { + jni_sbor_coded_call(&env, request_payload, |request: PrepareNotarizedTransactionRequest| -> Result { + let signed_transaction_intent = SignedTransactionIntentV2::from_raw(&request.signed_intent_bytes)?; + + let notarized_transaction = NotarizedTransactionV2 { + signed_transaction_intent, + notary_signature: NotarySignatureV2(request.notary_signature), + }; + + let prepared = notarized_transaction.prepare(&PreparationSettings::latest())?; + + Ok(JavaPreparedNotarizedTransaction { + notarized_transaction_bytes: notarized_transaction.to_raw()?, + intent_hash: prepared.transaction_intent_hash(), + signed_intent_hash: prepared.signed_transaction_intent_hash(), + notarized_transaction_hash: prepared.notarized_transaction_hash(), + }) + }) +} + #[no_mangle] extern "system" fn Java_com_radixdlt_transaction_TransactionPreparer_userTransactionToLedger( env: JNIEnv, diff --git a/core-rust/state-manager/src/protocol/protocol_configs/config_printer.rs b/core-rust/state-manager/src/protocol/protocol_configs/config_printer.rs index ec137b0efc..1e6a406f5c 100644 --- a/core-rust/state-manager/src/protocol/protocol_configs/config_printer.rs +++ b/core-rust/state-manager/src/protocol/protocol_configs/config_printer.rs @@ -21,12 +21,10 @@ fn print_fixed_config_code() { let version = ProtocolVersionName::cuttlefish(); let start_epoch = Epoch::of(1); let end_epoch = Epoch::of(10000000); - let thresholds = vec![ - SignalledReadinessThreshold { - required_ratio_of_stake_supported: dec!(0.8), - required_consecutive_completed_epochs_of_support: 10, - } - ]; + let thresholds = vec![SignalledReadinessThreshold { + required_ratio_of_stake_supported: dec!(0.8), + required_consecutive_completed_epochs_of_support: 10, + }]; output(version, start_epoch, end_epoch, thresholds, None) } @@ -64,7 +62,13 @@ fn print_calculated_protocol_config_code() { }) .collect::>(); - output(version, start_epoch, end_epoch, thresholds, Some(calculator)) + output( + version, + start_epoch, + end_epoch, + thresholds, + Some(calculator), + ) } fn output( @@ -88,7 +92,9 @@ fn output( .expect("Generated protocol update trigger should be valid"); let base_indent = " "; - println!("{base_indent}ProtocolVersionName::{version}() => EnactAtStartOfEpochIfValidatorsReady {{"); + println!( + "{base_indent}ProtocolVersionName::{version}() => EnactAtStartOfEpochIfValidatorsReady {{" + ); println!( "{base_indent} // =================================================================" ); diff --git a/core-rust/state-manager/src/protocol/protocol_state.rs b/core-rust/state-manager/src/protocol/protocol_state.rs index 1b288f057a..f8fea8683d 100644 --- a/core-rust/state-manager/src/protocol/protocol_state.rs +++ b/core-rust/state-manager/src/protocol/protocol_state.rs @@ -4,11 +4,12 @@ use crate::prelude::*; // node. pub struct NodeProtocolUpdateExecutor { - network: NetworkDefinition, + network_definition: NetworkDefinition, protocol_update_content_overrides: RawProtocolUpdateContentOverrides, scenarios_execution_config: ScenariosExecutionConfig, database: Arc>, system_executor: Arc, + transaction_validator: Arc>, genesis_data_resolver: Arc, } @@ -19,14 +20,16 @@ impl NodeProtocolUpdateExecutor { scenarios_execution_config: ScenariosExecutionConfig, database: Arc>, system_executor: Arc, + transaction_validator: Arc>, genesis_data_resolver: Arc, ) -> Self { Self { - network, + network_definition: network, protocol_update_content_overrides, scenarios_execution_config, database, system_executor, + transaction_validator, genesis_data_resolver, } } @@ -89,7 +92,7 @@ impl NodeProtocolUpdateExecutor { let protocol_update_definition = resolved.definition(); let update_generator = protocol_update_definition.create_update_generator_raw( ProtocolUpdateContext { - network: &self.network, + network: &self.network_definition, database: &self.database, genesis_data_resolver: &self.genesis_data_resolver, scenario_config: &self.scenarios_execution_config, @@ -148,6 +151,14 @@ impl NodeProtocolUpdateExecutor { }, batch, ); + { + // Update the transaction validator in case any of its configuration was updated. + // This ensures that scenarios will execute correctly. + *self.transaction_validator.write() = TransactionValidator::new( + self.database.lock().deref(), + &self.network_definition, + ); + } } } info!("Protocol update to {protocol_version:?} is complete"); diff --git a/core-rust/state-manager/src/state_manager.rs b/core-rust/state-manager/src/state_manager.rs index 9871f0bc45..b722e3b551 100644 --- a/core-rust/state-manager/src/state_manager.rs +++ b/core-rust/state-manager/src/state_manager.rs @@ -164,6 +164,7 @@ impl StateManagerConfig { #[derive(Clone)] pub struct StateManager { + pub network_definition: NetworkDefinition, pub database: Arc>, pub mempool: Arc>, pub mempool_manager: Arc, @@ -338,6 +339,7 @@ impl StateManager { scenarios_execution_config, database.clone(), system_executor.clone(), + transaction_validator.clone(), genesis_data_resolver, )); @@ -370,6 +372,7 @@ impl StateManager { ); let state_manager = Self { + network_definition, database, mempool, mempool_manager, @@ -422,8 +425,13 @@ impl StateManager { self.protocol_manager .set_current_protocol_version(&resultant_version); - // Protocol update might change transaction execution rules, so we need to clear the cache + // Protocol update might change transaction execution rules, so we need to update our + // validator and clear our tree-based execution caches + *self.transaction_validator.write() = + TransactionValidator::new(self.database.lock().deref(), &self.network_definition); self.execution_cache_manager.clear(); + // We could also clear the mempool and the pending tranasction result cache here + // ... but that doesn't guarantee it's still accurate, so it's not required. ProtocolUpdateResult { post_update_proof: self diff --git a/core/src/main/java/com/radixdlt/addressing/Addressing.java b/core/src/main/java/com/radixdlt/addressing/Addressing.java index c2756535b5..f454d1febb 100644 --- a/core/src/main/java/com/radixdlt/addressing/Addressing.java +++ b/core/src/main/java/com/radixdlt/addressing/Addressing.java @@ -72,8 +72,8 @@ import com.radixdlt.rev2.*; import com.radixdlt.serialization.DeserializeException; import com.radixdlt.testutil.InternalAddress; -import com.radixdlt.transactions.IntentHash; import com.radixdlt.transactions.NotarizedTransactionHash; +import com.radixdlt.transactions.TransactionIntentHash; import com.radixdlt.utils.Pair; /** Performs Bech32m encoding/decoding. */ @@ -110,7 +110,7 @@ public String encode(ResourceAddress address) { return address.encode(this.networkDefinition); } - public String encode(IntentHash hash) { + public String encode(TransactionIntentHash hash) { return Bech32mCoder.encode(network.getIntentHashHrp(), hash.inner().asBytes()); } diff --git a/core/src/test-core/java/com/radixdlt/rev2/TransactionBuilder.java b/core/src/test-core/java/com/radixdlt/rev2/TransactionBuilder.java index 4938b53925..603fafcd35 100644 --- a/core/src/test-core/java/com/radixdlt/rev2/TransactionBuilder.java +++ b/core/src/test-core/java/com/radixdlt/rev2/TransactionBuilder.java @@ -193,7 +193,10 @@ public PreparedNotarizedTransaction prepare() { var intentSignatures = this.signatories.stream() .map( - ecKeyPair -> ecKeyPair.sign(intent.intentHash().inner()).toSignatureWithPublicKey()) + ecKeyPair -> + ecKeyPair + .sign(intent.transactionIntentHash().inner()) + .toSignatureWithPublicKey()) .toList(); var signedIntent = TransactionPreparer.prepareSignedIntent(intent.intentBytes(), intentSignatures); diff --git a/core/src/test-core/java/com/radixdlt/rev2/TransactionV2Builder.java b/core/src/test-core/java/com/radixdlt/rev2/TransactionV2Builder.java new file mode 100644 index 0000000000..b6071b5538 --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/rev2/TransactionV2Builder.java @@ -0,0 +1,189 @@ +/* Copyright 2021 Radix Publishing Ltd incorporated in Jersey (Channel Islands). + * + * Licensed under the Radix License, Version 1.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at: + * + * radixfoundation.org/licenses/LICENSE-v1 + * + * The Licensor hereby grants permission for the Canonical version of the Work to be + * published, distributed and used under or by reference to the Licensor’s trademark + * Radix ® and use of any unregistered trade names, logos or get-up. + * + * The Licensor provides the Work (and each Contributor provides its Contributions) on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, + * including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, + * MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. + * + * Whilst the Work is capable of being deployed, used and adopted (instantiated) to create + * a distributed ledger it is your responsibility to test and validate the code, together + * with all logic and performance of that code under all foreseeable scenarios. + * + * The Licensor does not make or purport to make and hereby excludes liability for all + * and any representation, warranty or undertaking in any form whatsoever, whether express + * or implied, to any entity or person, including any representation, warranty or + * undertaking, as to the functionality security use, value or other characteristics of + * any distributed ledger nor in respect the functioning or value of any tokens which may + * be created stored or transferred using the Work. The Licensor does not warrant that the + * Work or any use of the Work complies with any law or regulation in any territory where + * it may be implemented or used or that it will be appropriate for any specific purpose. + * + * Neither the licensor nor any current or former employees, officers, directors, partners, + * trustees, representatives, agents, advisors, contractors, or volunteers of the Licensor + * shall be liable for any direct or indirect, special, incidental, consequential or other + * losses of any kind, in tort, contract or otherwise (including but not limited to loss + * of revenue, income or profits, or loss of use or data, or loss of reputation, or loss + * of any economic or other opportunity of whatsoever nature or howsoever arising), arising + * out of or in connection with (without limitation of any use, misuse, of any ledger system + * or use made or its functionality or any performance or operation of any code or protocol + * caused by bugs or programming or logic errors or otherwise); + * + * A. any offer, purchase, holding, use, sale, exchange or transmission of any + * cryptographic keys, tokens or assets created, exchanged, stored or arising from any + * interaction with the Work; + * + * B. any failure in a transmission or loss of any token or assets keys or other digital + * artefacts due to errors in transmission; + * + * C. bugs, hacks, logic errors or faults in the Work or any communication; + * + * D. system software or apparatus including but not limited to losses caused by errors + * in holding or transmitting tokens by any third-party; + * + * E. breaches or failure of security including hacker attacks, loss or disclosure of + * password, loss of private key, unauthorised use or misuse of such passwords or keys; + * + * F. any losses including loss of anticipated savings or other benefits resulting from + * use of the Work or any changes to the Work (however implemented). + * + * You are solely responsible for; testing, validating and evaluation of all operation + * logic, functionality, security and appropriateness of using the Work for any commercial + * or non-commercial purpose and for any reproduction or redistribution by You of the + * Work. You assume all risks associated with Your use of the Work and the exercise of + * permissions under this License. + */ + +package com.radixdlt.rev2; + +import com.radixdlt.crypto.ECKeyPair; +import com.radixdlt.transaction.TransactionPreparer; +import com.radixdlt.transactions.PreparedNotarizedTransaction; +import com.radixdlt.utils.PrivateKeys; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.IntStream; + +/** + * The TransactionBuilder is designed to create transactions for tests. By default, it will create a + * minimal valid transaction, but this can be re-configured using the builder pattern. Note - this + * builder is stateful, not immutable + */ +public class TransactionV2Builder { + public static final ECKeyPair DEFAULT_NOTARY = generateKeyPair(1); + + public static final AtomicInteger NONCE = new AtomicInteger(0); + + // Currently this is missing lots of settings... + // But it's good enough to get Cuttlefish out. + private final NetworkDefinition networkDefinition; + private long fromEpoch; + private int numEpochsValidFor; + private int nonce; + private ECKeyPair notary; + private boolean notaryIsSignatory; + private long subintentCount; + private List signatories; + + public TransactionV2Builder(NetworkDefinition networkDefinition) { + this.networkDefinition = networkDefinition; + this.fromEpoch = 0; + this.numEpochsValidFor = 100; + this.nonce = NONCE.getAndIncrement(); + this.notary = DEFAULT_NOTARY; + this.notaryIsSignatory = false; + this.subintentCount = 0; + this.signatories = List.of(); + } + + public static TransactionV2Builder forTests() { + return new TransactionV2Builder(NetworkDefinition.INT_TEST_NET); + } + + public static TransactionV2Builder forNetwork(NetworkDefinition networkDefinition) { + return new TransactionV2Builder(networkDefinition); + } + + public static ECKeyPair generateKeyPair(int keySource) { + return PrivateKeys.numeric(keySource).findFirst().orElseThrow(); + } + + public TransactionV2Builder fromEpoch(long fromEpoch) { + this.fromEpoch = fromEpoch; + return this; + } + + public TransactionV2Builder numEpochsValidFor(int numEpochsValidFor) { + this.numEpochsValidFor = numEpochsValidFor; + return this; + } + + public TransactionV2Builder nonce(int nonce) { + this.nonce = nonce; + return this; + } + + public TransactionV2Builder notary(ECKeyPair notary) { + this.notary = notary; + return this; + } + + public TransactionV2Builder notaryIsSignatory(boolean notaryIsSignatory) { + this.notaryIsSignatory = notaryIsSignatory; + return this; + } + + public TransactionV2Builder subintentCount(long subintentCount) { + this.subintentCount = subintentCount; + return this; + } + + public TransactionV2Builder signatories(List signatories) { + this.signatories = signatories; + return this; + } + + public TransactionV2Builder signatories(int number) { + this.signatories = createNumericSignatories(number); + return this; + } + + public PreparedNotarizedTransaction prepare() { + var header = + TransactionHeader.defaults( + this.networkDefinition, + this.fromEpoch, + this.numEpochsValidFor, + this.nonce, + this.notary.getPublicKey().toPublicKey(), + this.notaryIsSignatory); + var intent = + TransactionPreparer.prepareTransactionIntentV2(networkDefinition, header, subintentCount); + var intentSignatures = + this.signatories.stream() + .map( + ecKeyPair -> + ecKeyPair + .sign(intent.transactionIntentHash().inner()) + .toSignatureWithPublicKey()) + .toList(); + var signedIntent = + TransactionPreparer.prepareSignedIntentV2( + intent.transactionIntentBytes(), intentSignatures); + var notarySignature = this.notary.sign(signedIntent.signedIntentHash().inner()).toSignature(); + return TransactionPreparer.prepareNotarizedTransactionV2( + signedIntent.signedIntentBytes(), notarySignature); + } + + public static List createNumericSignatories(int num) { + return IntStream.rangeClosed(1, num).mapToObj(PrivateKeys::ofNumeric).toList(); + } +} diff --git a/core/src/test/java/com/radixdlt/api/CoreApiHelper.java b/core/src/test/java/com/radixdlt/api/CoreApiHelper.java index e541ca9b86..cfc9d385de 100644 --- a/core/src/test/java/com/radixdlt/api/CoreApiHelper.java +++ b/core/src/test/java/com/radixdlt/api/CoreApiHelper.java @@ -75,7 +75,7 @@ import com.radixdlt.lang.Functions; import com.radixdlt.rev2.*; import com.radixdlt.rev2.NetworkDefinition; // for disambiguation with models.* only -import com.radixdlt.transactions.IntentHash; +import com.radixdlt.transactions.TransactionIntentHash; import java.net.http.HttpClient; import java.util.List; import java.util.Objects; @@ -114,7 +114,7 @@ public T submitAndWait( DeterministicTest test, Functions.Func1 manifest, List signatories, - Functions.Func3 + Functions.Func3 outcomeMapper) throws Exception { var metadata = @@ -152,15 +152,21 @@ public T submitAndWait( switch (statusResponse.getIntentStatus()) { case COMMITTEDSUCCESS -> { return outcomeMapper.apply( - transaction.intentHash(), TransactionOutcome.CommittedSuccess, statusResponse); + transaction.transactionIntentHash(), + TransactionOutcome.CommittedSuccess, + statusResponse); } case COMMITTEDFAILURE -> { return outcomeMapper.apply( - transaction.intentHash(), TransactionOutcome.CommittedFailure, statusResponse); + transaction.transactionIntentHash(), + TransactionOutcome.CommittedFailure, + statusResponse); } case PERMANENTREJECTION -> { return outcomeMapper.apply( - transaction.intentHash(), TransactionOutcome.PermanentRejection, statusResponse); + transaction.transactionIntentHash(), + TransactionOutcome.PermanentRejection, + statusResponse); } default -> test.runForCount(messagesProcessedPerAttempt); } @@ -236,5 +242,7 @@ public CommittedResult submitAndWaitForCommittedFailure( } public record CommittedResult( - IntentHash intentHash, long stateVersion, Optional errorMessage) {} + TransactionIntentHash transactionIntentHash, + long stateVersion, + Optional errorMessage) {} } diff --git a/core/src/test/java/com/radixdlt/api/DeterministicCoreApiTestBase.java b/core/src/test/java/com/radixdlt/api/DeterministicCoreApiTestBase.java index a51ad9c23d..5a98f1ed1d 100644 --- a/core/src/test/java/com/radixdlt/api/DeterministicCoreApiTestBase.java +++ b/core/src/test/java/com/radixdlt/api/DeterministicCoreApiTestBase.java @@ -76,7 +76,6 @@ import com.radixdlt.api.core.generated.client.ApiClient; import com.radixdlt.api.core.generated.client.ApiException; import com.radixdlt.api.core.generated.models.*; -import com.radixdlt.environment.*; import com.radixdlt.environment.CoreApiServerFlags; import com.radixdlt.environment.StartProcessorOnRunner; import com.radixdlt.genesis.GenesisBuilder; @@ -237,7 +236,7 @@ public ResourceAddress createFreeMintBurnNonFungibleResource(DeterministicTest t .transactionReceiptPost( new TransactionReceiptRequest() .network(networkLogicalName) - .intentHash(committedNewResourceTxn.intentHash().hex())); + .intentHash(committedNewResourceTxn.transactionIntentHash().hex())); final var newResourceAddressStr = receipt diff --git a/core/src/test/java/com/radixdlt/api/core/LtsTransactionOutcomesTest.java b/core/src/test/java/com/radixdlt/api/core/LtsTransactionOutcomesTest.java index 82ae5fee65..0bae07f473 100644 --- a/core/src/test/java/com/radixdlt/api/core/LtsTransactionOutcomesTest.java +++ b/core/src/test/java/com/radixdlt/api/core/LtsTransactionOutcomesTest.java @@ -77,7 +77,7 @@ import com.radixdlt.identifiers.Address; import com.radixdlt.lang.Option; import com.radixdlt.rev2.*; -import com.radixdlt.transactions.IntentHash; +import com.radixdlt.transactions.TransactionIntentHash; import java.math.BigDecimal; import java.util.List; import java.util.Optional; @@ -343,18 +343,18 @@ public void test_multiple_transactions_have_correct_outcomes() throws Exception validateAccountTransactions( account1Address, List.of( - account1FaucetClaim.intentHash(), - account1SelfXrdTransfer.intentHash(), - account1ToAccount2XrdTransferWithFeeFromAccount1.intentHash(), - account1ToAccount2XrdTransferWithFeeFromAccount2.intentHash(), - account1ToAccount2XrdTransferWithFeeFromFaucet.intentHash())); + account1FaucetClaim.transactionIntentHash(), + account1SelfXrdTransfer.transactionIntentHash(), + account1ToAccount2XrdTransferWithFeeFromAccount1.transactionIntentHash(), + account1ToAccount2XrdTransferWithFeeFromAccount2.transactionIntentHash(), + account1ToAccount2XrdTransferWithFeeFromFaucet.transactionIntentHash())); validateAccountTransactions( account2Address, List.of( - account2FaucetClaim.intentHash(), - account1ToAccount2XrdTransferWithFeeFromAccount1.intentHash(), - account1ToAccount2XrdTransferWithFeeFromAccount2.intentHash(), - account1ToAccount2XrdTransferWithFeeFromFaucet.intentHash())); + account2FaucetClaim.transactionIntentHash(), + account1ToAccount2XrdTransferWithFeeFromAccount1.transactionIntentHash(), + account1ToAccount2XrdTransferWithFeeFromAccount2.transactionIntentHash(), + account1ToAccount2XrdTransferWithFeeFromFaucet.transactionIntentHash())); var faucetFreeXrdAmount = 10000L; assertNonFeeXrdBalanceChange( @@ -473,7 +473,8 @@ private Optional getTransactionOutcomeNonFeeBa } private void validateAccountTransactions( - ComponentAddress accountAddress, List intentHashes) throws Exception { + ComponentAddress accountAddress, List transactionIntentHashes) + throws Exception { var accountOutcomesResponse = getLtsApi() .ltsStreamAccountTransactionOutcomesPost( @@ -483,7 +484,7 @@ private void validateAccountTransactions( .limit(1000) .accountAddress(addressing.encode(accountAddress))); var outcomes = accountOutcomesResponse.getCommittedTransactionOutcomes(); - assertThat(outcomes.size()).isEqualTo(intentHashes.size()); + assertThat(outcomes.size()).isEqualTo(transactionIntentHashes.size()); for (var i = 0; i < outcomes.size(); i++) { var outcome = outcomes.get(i); if (outcome.getStatus() != LtsCommittedTransactionStatus.SUCCESS) { @@ -491,7 +492,8 @@ private void validateAccountTransactions( } var transactionIdentifiers = outcome.getUserTransactionIdentifiers(); assertThat(transactionIdentifiers).isNotNull(); - assertThat(transactionIdentifiers.getIntentHash()).isEqualTo(intentHashes.get(i).hex()); + assertThat(transactionIdentifiers.getIntentHash()) + .isEqualTo(transactionIntentHashes.get(i).hex()); } } } diff --git a/core/src/test/java/com/radixdlt/api/core/MempoolEndpointTest.java b/core/src/test/java/com/radixdlt/api/core/MempoolEndpointTest.java index 734197e01f..3efc20a243 100644 --- a/core/src/test/java/com/radixdlt/api/core/MempoolEndpointTest.java +++ b/core/src/test/java/com/radixdlt/api/core/MempoolEndpointTest.java @@ -104,7 +104,7 @@ public void test_mempool_queries() throws Exception { .payloadHash(transaction.hexNotarizedTransactionHash()) .payloadHashBech32m(addressing.encode(transaction.notarizedTransactionHash())) .intentHash(transaction.hexIntentHash()) - .intentHashBech32m(addressing.encode(transaction.intentHash()))); + .intentHashBech32m(addressing.encode(transaction.transactionIntentHash()))); var mempoolTransactionByHex = getMempoolApi() diff --git a/core/src/test/java/com/radixdlt/api/core/NetworkSubmitTransactionTest.java b/core/src/test/java/com/radixdlt/api/core/TransactionSubmitTest.java similarity index 87% rename from core/src/test/java/com/radixdlt/api/core/NetworkSubmitTransactionTest.java rename to core/src/test/java/com/radixdlt/api/core/TransactionSubmitTest.java index 29f8725b3c..5f886c068f 100644 --- a/core/src/test/java/com/radixdlt/api/core/NetworkSubmitTransactionTest.java +++ b/core/src/test/java/com/radixdlt/api/core/TransactionSubmitTest.java @@ -76,9 +76,10 @@ import com.radixdlt.rev2.Decimal; import com.radixdlt.rev2.Manifest; import com.radixdlt.rev2.TransactionBuilder; +import com.radixdlt.rev2.TransactionV2Builder; import org.junit.Test; -public class NetworkSubmitTransactionTest extends DeterministicCoreApiTestBase { +public class TransactionSubmitTest extends DeterministicCoreApiTestBase { @Test public void test_core_api_can_submit_and_commit_transaction() throws Exception { try (var test = buildRunningServerTest(defaultConfig())) { @@ -304,10 +305,62 @@ public void test_valid_but_rejected_transaction_should_be_rejected() throws Exce .transactionStatusPost( new TransactionStatusRequest() .network(networkLogicalName) - .intentHash(addressing.encode(transaction.intentHash()))); + .intentHash(addressing.encode(transaction.transactionIntentHash()))); assertThat(statusResponse2.getIntentStatus()) .isEqualTo(TransactionIntentStatus.COMMITTEDSUCCESS); } } + + @Test + public void test_core_api_can_submit_and_commit_transaction_v2_after_cuttlefish() + throws Exception { + try (var test = buildRunningServerTest(defaultConfig())) { + // By default we're already at cuttlefish + test.suppressUnusedWarning(); + + var transaction = TransactionV2Builder.forTests().prepare(); + + // Submit transaction + var response = + getTransactionApi() + .transactionSubmitPost( + new TransactionSubmitRequest() + .network(networkLogicalName) + .notarizedTransactionHex(transaction.hexPayloadBytes())); + + assertThat(response.getDuplicate()).isFalse(); + + // Check that it's in mempool + var statusResponse1 = + getTransactionApi() + .transactionStatusPost( + new TransactionStatusRequest() + .network(networkLogicalName) + .intentHash(transaction.hexIntentHash())); + + assertThat(statusResponse1.getIntentStatus()).isEqualTo(TransactionIntentStatus.INMEMPOOL); + + // Now we run consensus + test.runUntilState(allCommittedTransactionSuccess(transaction.raw()), 1000); + + // Check the status response again + var statusResponse2 = + getTransactionApi() + .transactionStatusPost( + new TransactionStatusRequest() + .network(networkLogicalName) + .intentHash(transaction.hexIntentHash())); + + assertThat(statusResponse2.getIntentStatus()) + .isEqualTo(TransactionIntentStatus.COMMITTEDSUCCESS); + assertThat( + statusResponse2.getKnownPayloads().stream() + .filter( + payload -> payload.getStatus() == TransactionPayloadStatus.COMMITTEDSUCCESS) + .collect(MoreCollectors.onlyElement()) + .getStateVersion()) + .isNotNull(); + } + } } diff --git a/core/src/test/java/com/radixdlt/api/engine_state/KeyValueStoreEntryTest.java b/core/src/test/java/com/radixdlt/api/engine_state/KeyValueStoreEntryTest.java index 64db27fc75..e9936711b9 100644 --- a/core/src/test/java/com/radixdlt/api/engine_state/KeyValueStoreEntryTest.java +++ b/core/src/test/java/com/radixdlt/api/engine_state/KeyValueStoreEntryTest.java @@ -71,7 +71,7 @@ import com.radixdlt.api.engine_state.generated.models.*; import com.radixdlt.rev2.Manifest; import com.radixdlt.testutil.TestStateReader; -import com.radixdlt.transactions.IntentHash; +import com.radixdlt.transactions.TransactionIntentHash; import java.util.List; import java.util.Map; import org.junit.Test; @@ -87,7 +87,7 @@ public void engine_state_api_returns_kv_store_entry() throws Exception { final var intentHash = getCoreApiHelper() .submitAndWaitForSuccess(test, Manifest.newRandomAccount(), List.of()) - .intentHash(); + .transactionIntentHash(); final var epoch = test.getInstance(0, TestStateReader.class).getEpoch(); // fetch the value by SBOR-encoded transaction hash in programmatic JSON format: @@ -136,7 +136,7 @@ public void engine_state_api_returns_not_found_for_unknown_key() throws Exceptio "type_name", "Hash", "kind", "Bytes", "element_kind", "U8", - "hex", new IntentHash(HashCode.fromBytes(new byte[32])).hex())); + "hex", new TransactionIntentHash(HashCode.fromBytes(new byte[32])).hex())); final var errorResponse = assertErrorResponse( () -> diff --git a/core/src/test/java/com/radixdlt/api/engine_state/KeyValueStoreIteratorTest.java b/core/src/test/java/com/radixdlt/api/engine_state/KeyValueStoreIteratorTest.java index ca2390f9f1..c941b005cc 100644 --- a/core/src/test/java/com/radixdlt/api/engine_state/KeyValueStoreIteratorTest.java +++ b/core/src/test/java/com/radixdlt/api/engine_state/KeyValueStoreIteratorTest.java @@ -137,7 +137,7 @@ public void engine_state_api_kv_store_iterator_returns_actual_kv_store_keys() th final var intentHash = getCoreApiHelper() .submitAndWaitForSuccess(test, Manifest.newRandomAccount(), List.of()) - .intentHash(); + .transactionIntentHash(); // iterate over the only key in that KV-Store final var allKeys = diff --git a/core/src/test/java/com/radixdlt/rev2/REv2TransactionCreationTest.java b/core/src/test/java/com/radixdlt/rev2/REv2TransactionCreationTest.java index 1ec1a1be08..94c4c0997c 100644 --- a/core/src/test/java/com/radixdlt/rev2/REv2TransactionCreationTest.java +++ b/core/src/test/java/com/radixdlt/rev2/REv2TransactionCreationTest.java @@ -139,7 +139,7 @@ public void can_create_some_test_transactions() { private static void logTransaction(String description, PreparedNotarizedTransaction transaction) { log.info(description + ":"); - log.info("Intent Hash: " + transaction.intentHash().hex()); + log.info("Intent Hash: " + transaction.transactionIntentHash().hex()); log.info("User Payload Hash: " + transaction.notarizedTransactionHash().hex()); log.info("Notarized Payload: " + transaction.raw().hex()); log.info("============================="); From fa3099d1d4b76191ca2a574ff5eb2236f876ec7e Mon Sep 17 00:00:00 2001 From: David Edey Date: Tue, 22 Oct 2024 02:19:46 +0100 Subject: [PATCH 03/12] fix: Update Dockerfile version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8decdb5ed9..13ec5ad3e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,7 +56,7 @@ RUN apt-get update \ wget=${WGET_VERSION} \ software-properties-common=0.99.30-4.1~deb12u1 \ && apt-get install -y --no-install-recommends \ - openjdk-17-jdk=17.0.12+7-2~deb12u1 \ + openjdk-17-jdk=17.0.13+11-2~deb12u1 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* From 8cb06a92dffa7471f9cc5e46cde3e6acaf0d51bb Mon Sep 17 00:00:00 2001 From: David Edey Date: Tue, 22 Oct 2024 12:11:43 +0100 Subject: [PATCH 04/12] fix: Minor test fixes --- .../api/core/TransactionPreviewTest.java | 2 +- .../api/engine_state/ObjectFieldTest.java | 18 +++++++++++------- .../ObjectMetadataIteratorTest.java | 3 ++- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/core/src/test/java/com/radixdlt/api/core/TransactionPreviewTest.java b/core/src/test/java/com/radixdlt/api/core/TransactionPreviewTest.java index af6e7fc48d..e20de24e63 100644 --- a/core/src/test/java/com/radixdlt/api/core/TransactionPreviewTest.java +++ b/core/src/test/java/com/radixdlt/api/core/TransactionPreviewTest.java @@ -207,7 +207,7 @@ public void transaction_preview_returns_actual_or_synthetic_ledger_header() thro @Test public void transaction_preview_refuses_too_old_state_version() throws Exception { final var historyLength = 7L; - final var inspectedAtVersion = 23L; + final var inspectedAtVersion = 123L; final var oldestAvailableVersion = inspectedAtVersion - historyLength; try (var test = buildTest(true, historyLength)) { test.suppressUnusedWarning(); diff --git a/core/src/test/java/com/radixdlt/api/engine_state/ObjectFieldTest.java b/core/src/test/java/com/radixdlt/api/engine_state/ObjectFieldTest.java index 4cf0d771e8..8d91c0a2ed 100644 --- a/core/src/test/java/com/radixdlt/api/engine_state/ObjectFieldTest.java +++ b/core/src/test/java/com/radixdlt/api/engine_state/ObjectFieldTest.java @@ -194,34 +194,38 @@ public void engine_state_api_object_field_supports_history() throws Exception { .entityAddress(wellKnownAddresses.getConsensusManager()) .fieldName("state"); + final long currentStateVersion = 123; + final long olderStateVersion = 119; + final long evenOlderStateVersion = 110; + // Progress to a known version and capture Epoch and Round: - test.runUntilState(NodesPredicate.anyAtOrOverStateVersion(23)); + test.runUntilState(NodesPredicate.anyAtOrOverStateVersion(currentStateVersion)); final var epochRoundAtCurrentVersion = parseEpochRound(getObjectsApi().objectFieldPost(baseRequest).getContent()); // Assert on a slightly-older historical Epoch + Round: - final var epochRoundAtVersion19 = + final var epochRoundAtOlderStateVersion = parseEpochRound( getObjectsApi() .objectFieldPost( baseRequest.atLedgerState( new VersionLedgerStateSelector() - .stateVersion(19L) + .stateVersion(olderStateVersion) .type(LedgerStateSelectorType.BYSTATEVERSION))) .getContent()); - assertThat(epochRoundAtVersion19).isLessThan(epochRoundAtCurrentVersion); + assertThat(epochRoundAtOlderStateVersion).isLessThan(epochRoundAtCurrentVersion); // Assert on even older historical state: - final var epochRoundAtVersion10 = + final var epochRoundAtEvenOlderStateVersion = parseEpochRound( getObjectsApi() .objectFieldPost( baseRequest.atLedgerState( new VersionLedgerStateSelector() - .stateVersion(10L) + .stateVersion(evenOlderStateVersion) .type(LedgerStateSelectorType.BYSTATEVERSION))) .getContent()); - assertThat(epochRoundAtVersion10).isLessThan(epochRoundAtVersion19); + assertThat(epochRoundAtEvenOlderStateVersion).isLessThan(epochRoundAtOlderStateVersion); } } diff --git a/core/src/test/java/com/radixdlt/api/engine_state/ObjectMetadataIteratorTest.java b/core/src/test/java/com/radixdlt/api/engine_state/ObjectMetadataIteratorTest.java index b718c63b1f..e106bf499b 100644 --- a/core/src/test/java/com/radixdlt/api/engine_state/ObjectMetadataIteratorTest.java +++ b/core/src/test/java/com/radixdlt/api/engine_state/ObjectMetadataIteratorTest.java @@ -92,7 +92,8 @@ public void engine_state_api_object_metadata_iterator_returns_string_keys() thro .map(MetadataEntryKey::getKey) .toList(); - assertThat(metadataKeys).containsExactly("name", "description", "icon_url", "tags"); + assertThat(metadataKeys) + .containsExactly("info_url", "name", "description", "icon_url", "tags"); } } From 58133752fde51e943659b13575f9fd2de6f64c31 Mon Sep 17 00:00:00 2001 From: David Edey Date: Tue, 22 Oct 2024 15:43:36 +0100 Subject: [PATCH 05/12] feature: Add support for the protocol update status summary --- .../com/radixdlt/protocol/ProtocolConfig.java | 52 ++++- .../ProtocolUpdateEnactmentCondition.java | 4 + core-rust/Cargo.lock | 38 ++-- core-rust/Cargo.toml | 24 +- .../core-api-server/core-api-schema.yaml | 74 +++++- .../scripts/generate-openapi-server.py | 1 + .../protocol_update_status_module.rs | 30 ++- .../models/complete_protocol_update_status.rs | 28 +++ .../in_progress_protocol_update_status.rs | 31 +++ ..._progress_protocol_update_status_all_of.rs | 28 +++ .../models/ledger_transaction_type.rs | 3 + .../src/core_api/generated/models/mod.rs | 14 ++ .../models/parsed_transaction_type.rs | 6 +- .../models/protocol_update_status.rs | 28 +++ .../protocol_update_status_latest_commit.rs | 37 +++ ...te_status_module_field_summary_substate.rs | 8 +- ...us_module_field_summary_substate_all_of.rs | 31 +++ .../models/protocol_update_status_type.rs | 39 ++++ .../src/core_api/generated/models/substate.rs | 4 + .../generated/models/substate_type.rs | 26 +-- core-rust/state-manager/src/protocol/mod.rs | 2 + .../src/protocol/protocol_state.rs | 198 ---------------- .../src/protocol/protocol_update_executor.rs | 213 ++++++++++++++++++ .../definitions/custom_definition.rs | 4 + .../protocol_updates/protocol_updaters.rs | 12 + .../state-manager/src/system_executor.rs | 63 ++++-- .../src/transaction/preparation.rs | 119 ++++++---- .../models/CompleteProtocolUpdateStatus.java | 106 +++++++++ .../InProgressProtocolUpdateStatus.java | 141 ++++++++++++ .../InProgressProtocolUpdateStatusAllOf.java | 112 +++++++++ .../models/LedgerTransactionType.java | 2 + .../models/ParsedTransactionType.java | 6 +- .../models/ProtocolUpdateStatus.java | 140 ++++++++++++ .../ProtocolUpdateStatusLatestCommit.java | 207 +++++++++++++++++ ...pdateStatusModuleFieldSummarySubstate.java | 71 +++++- ...StatusModuleFieldSummarySubstateAllOf.java | 144 ++++++++++++ .../models/ProtocolUpdateStatusType.java | 61 +++++ .../core/generated/models/SubstateType.java | 18 +- .../protocol/AnemoneProtocolUpdateTest.java | 2 +- .../BottlenoseProtocolUpdateTest.java | 4 +- .../CuttlefishProtocolUpdateTest.java | 210 +++++++++++++++++ .../protocol/ProtocolUpdateTestUtils.java | 74 +++++- .../lib/generated/.openapi-generator/FILES | 8 + .../models/CompleteProtocolUpdateStatus.ts | 76 +++++++ .../CompleteProtocolUpdateStatusAllOf.ts | 75 ++++++ .../models/InProgressProtocolUpdateStatus.ts | 92 ++++++++ .../InProgressProtocolUpdateStatusAllOf.ts | 91 ++++++++ .../generated/models/LedgerTransactionType.ts | 1 + .../generated/models/ParsedTransactionType.ts | 4 +- .../generated/models/ProtocolUpdateStatus.ts | 72 ++++++ .../models/ProtocolUpdateStatusBase.ts | 73 ++++++ .../ProtocolUpdateStatusLatestCommit.ts | 93 ++++++++ ...lUpdateStatusModuleFieldSummarySubstate.ts | 25 ++ ...teStatusModuleFieldSummarySubstateAllOf.ts | 25 ++ .../models/ProtocolUpdateStatusType.ts | 38 ++++ .../lib/generated/models/SubstateType.ts | 10 +- sdk/typescript/lib/generated/models/index.ts | 8 + 57 files changed, 2753 insertions(+), 353 deletions(-) create mode 100644 core-rust/core-api-server/src/core_api/generated/models/complete_protocol_update_status.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/in_progress_protocol_update_status.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/in_progress_protocol_update_status_all_of.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/protocol_update_status.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_latest_commit.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_module_field_summary_substate_all_of.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_type.rs create mode 100644 core-rust/state-manager/src/protocol/protocol_update_executor.rs create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/CompleteProtocolUpdateStatus.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/InProgressProtocolUpdateStatus.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/InProgressProtocolUpdateStatusAllOf.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatus.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusLatestCommit.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstateAllOf.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusType.java create mode 100644 core/src/test/java/com/radixdlt/rev2/protocol/CuttlefishProtocolUpdateTest.java create mode 100644 sdk/typescript/lib/generated/models/CompleteProtocolUpdateStatus.ts create mode 100644 sdk/typescript/lib/generated/models/CompleteProtocolUpdateStatusAllOf.ts create mode 100644 sdk/typescript/lib/generated/models/InProgressProtocolUpdateStatus.ts create mode 100644 sdk/typescript/lib/generated/models/InProgressProtocolUpdateStatusAllOf.ts create mode 100644 sdk/typescript/lib/generated/models/ProtocolUpdateStatus.ts create mode 100644 sdk/typescript/lib/generated/models/ProtocolUpdateStatusBase.ts create mode 100644 sdk/typescript/lib/generated/models/ProtocolUpdateStatusLatestCommit.ts create mode 100644 sdk/typescript/lib/generated/models/ProtocolUpdateStatusType.ts diff --git a/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolConfig.java b/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolConfig.java index 661ef79730..ff00fb1b0a 100644 --- a/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolConfig.java +++ b/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolConfig.java @@ -64,6 +64,9 @@ package com.radixdlt.protocol; +import static com.radixdlt.protocol.ProtocolUpdateEnactmentCondition.immediatelyAfter; +import static com.radixdlt.protocol.ProtocolUpdateEnactmentCondition.unconditionallyAtEpoch; + import com.google.common.collect.ImmutableList; import com.google.common.reflect.TypeToken; import com.radixdlt.rev2.NetworkDefinition; @@ -71,6 +74,8 @@ import com.radixdlt.sbor.codec.CodecMap; import com.radixdlt.sbor.codec.StructCodec; import com.radixdlt.sbor.exceptions.SborDecodeException; +import java.util.ArrayList; +import java.util.List; import java.util.Map; public record ProtocolConfig( @@ -82,7 +87,15 @@ public record ProtocolConfig( public static final String BOTTLENOSE_PROTOCOL_VERSION_NAME = "bottlenose"; public static final String CUTTLEFISH_PROTOCOL_VERSION_NAME = "cuttlefish"; - public static final String LATEST_PROTOCOL_VERSION_NAME = CUTTLEFISH_PROTOCOL_VERSION_NAME; + public static ImmutableList VERSION_NAMES = + ImmutableList.of( + GENESIS_PROTOCOL_VERSION_NAME, + ANEMONE_PROTOCOL_VERSION_NAME, + BOTTLENOSE_PROTOCOL_VERSION_NAME, + CUTTLEFISH_PROTOCOL_VERSION_NAME); + + public static final String LATEST_PROTOCOL_VERSION_NAME = + VERSION_NAMES.get(VERSION_NAMES.size() - 1); public ProtocolConfig(ImmutableList protocolUpdateTriggers) { this(protocolUpdateTriggers, Map.of()); @@ -106,6 +119,43 @@ public static ProtocolConfig onlyGenesis() { return new ProtocolConfig(ImmutableList.of()); } + public static ProtocolConfig launchAt(String upToProtocolVersionName) { + String newVersion = null; + List protocolUpdateTriggers = new ArrayList<>(); + for (String version : VERSION_NAMES) { + var lastVersion = newVersion; + newVersion = version; + if (lastVersion != null) { + protocolUpdateTriggers.add( + new ProtocolUpdateTrigger(newVersion, immediatelyAfter(lastVersion))); + } + if (newVersion.equals(upToProtocolVersionName)) { + break; + } + } + return new ProtocolConfig(ImmutableList.copyOf(protocolUpdateTriggers)); + } + + public static ProtocolConfig enactAtEpoch(String upToProtocolVersionName, long epoch) { + String newVersion = null; + List protocolUpdateTriggers = new ArrayList<>(); + for (String version : VERSION_NAMES) { + var lastVersion = newVersion; + newVersion = version; + if (lastVersion != null) { + if (newVersion.equals(upToProtocolVersionName)) { + protocolUpdateTriggers.add( + new ProtocolUpdateTrigger(newVersion, unconditionallyAtEpoch(epoch))); + break; + } else { + protocolUpdateTriggers.add( + new ProtocolUpdateTrigger(newVersion, immediatelyAfter(lastVersion))); + } + } + } + return new ProtocolConfig(ImmutableList.copyOf(protocolUpdateTriggers)); + } + public static ProtocolConfig testingDefault() { return RustProtocolUpdate.resolveForNetwork(NetworkDefinition.INT_TEST_NET); } diff --git a/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolUpdateEnactmentCondition.java b/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolUpdateEnactmentCondition.java index 876019b056..7c86316daf 100644 --- a/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolUpdateEnactmentCondition.java +++ b/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolUpdateEnactmentCondition.java @@ -112,6 +112,10 @@ static ProtocolUpdateEnactmentCondition unconditionallyAtEpoch(long epoch) { return new EnactAtStartOfEpochUnconditionally(UInt64.fromNonNegativeLong(epoch)); } + static ProtocolUpdateEnactmentCondition immediatelyAfter(String protocolVersionName) { + return new EnactImmediatelyAfterEndOfProtocolUpdate(protocolVersionName); + } + record EnactAtStartOfEpochIfValidatorsReady( UInt64 lowerBoundInclusive, UInt64 upperBoundExclusive, diff --git a/core-rust/Cargo.lock b/core-rust/Cargo.lock index a979ef93f7..a52b4221f8 100644 --- a/core-rust/Cargo.lock +++ b/core-rust/Cargo.lock @@ -1764,7 +1764,7 @@ dependencies = [ [[package]] name = "radix-blueprint-schema-init" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "bitflags 1.3.2", "radix-common", @@ -1775,7 +1775,7 @@ dependencies = [ [[package]] name = "radix-common" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "bech32", "blake2", @@ -1801,7 +1801,7 @@ dependencies = [ [[package]] name = "radix-common-derive" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "paste", "proc-macro2", @@ -1813,7 +1813,7 @@ dependencies = [ [[package]] name = "radix-engine" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "bitflags 1.3.2", "colored", @@ -1844,7 +1844,7 @@ dependencies = [ [[package]] name = "radix-engine-interface" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "bitflags 1.3.2", "const-sha1", @@ -1865,7 +1865,7 @@ dependencies = [ [[package]] name = "radix-engine-profiling" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "fixedstr", ] @@ -1873,7 +1873,7 @@ dependencies = [ [[package]] name = "radix-engine-profiling-derive" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "proc-macro2", "quote", @@ -1884,7 +1884,7 @@ dependencies = [ [[package]] name = "radix-engine-toolkit-common" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "radix-common", "radix-engine", @@ -1898,7 +1898,7 @@ dependencies = [ [[package]] name = "radix-native-sdk" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "radix-common", "radix-engine-interface", @@ -1909,7 +1909,7 @@ dependencies = [ [[package]] name = "radix-rust" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "indexmap 2.2.6", "serde", @@ -1918,7 +1918,7 @@ dependencies = [ [[package]] name = "radix-sbor-derive" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "proc-macro2", "quote", @@ -1929,7 +1929,7 @@ dependencies = [ [[package]] name = "radix-substate-store-impls" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "hex", "itertools", @@ -1943,7 +1943,7 @@ dependencies = [ [[package]] name = "radix-substate-store-interface" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "hex", "itertools", @@ -1955,7 +1955,7 @@ dependencies = [ [[package]] name = "radix-substate-store-queries" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "hex", "itertools", @@ -1972,7 +1972,7 @@ dependencies = [ [[package]] name = "radix-transaction-scenarios" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "hex", "itertools", @@ -1992,7 +1992,7 @@ dependencies = [ [[package]] name = "radix-transactions" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "annotate-snippets", "bech32", @@ -2165,7 +2165,7 @@ dependencies = [ [[package]] name = "sbor" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "const-sha1", "hex", @@ -2179,7 +2179,7 @@ dependencies = [ [[package]] name = "sbor-derive" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "proc-macro2", "sbor-derive-common", @@ -2189,7 +2189,7 @@ dependencies = [ [[package]] name = "sbor-derive-common" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-3c36a88d#3c36a88d1d4eaec5354f1d022b50efa748e4fa69" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" dependencies = [ "const-sha1", "indexmap 2.2.6", diff --git a/core-rust/Cargo.toml b/core-rust/Cargo.toml index d7f3e5e10c..75fc0135cf 100644 --- a/core-rust/Cargo.toml +++ b/core-rust/Cargo.toml @@ -26,18 +26,18 @@ resolver = "2" # Then use tag="release_name-BLAH" in the below dependencies. # ================================================================= -sbor = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d", features = ["serde"] } -radix-transactions = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d" } -radix-transaction-scenarios = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d" } -radix-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d", features = ["serde"] } -radix-engine-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d" } -radix-engine = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d" } -radix-substate-store-impls = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d" } -radix-substate-store-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d" } -radix-substate-store-queries = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d" } -radix-rust = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d", features = ["serde"] } -radix-blueprint-schema-init = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d", features = ["serde"] } -radix-engine-toolkit-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-3c36a88d" } +sbor = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff", features = ["serde"] } +radix-transactions = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff" } +radix-transaction-scenarios = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff" } +radix-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff", features = ["serde"] } +radix-engine-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff" } +radix-engine = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff" } +radix-substate-store-impls = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff" } +radix-substate-store-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff" } +radix-substate-store-queries = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff" } +radix-rust = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff", features = ["serde"] } +radix-blueprint-schema-init = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff", features = ["serde"] } +radix-engine-toolkit-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff" } itertools = { version = "=0.10.5" } jni = { version = "=0.19.0" } diff --git a/core-rust/core-api-server/core-api-schema.yaml b/core-rust/core-api-server/core-api-schema.yaml index 555fad8e41..8744b0f7c5 100644 --- a/core-rust/core-api-server/core-api-schema.yaml +++ b/core-rust/core-api-server/core-api-schema.yaml @@ -3818,9 +3818,9 @@ components: # - value - which references the type [SubstateValue] # - key (if it's in a collection partition) - which references a substate key type [X]Key for some X. # - is_locked - this is added to all substates via inclusion on the `Substate` object + BootLoaderModuleFieldKernelBoot: '#/components/schemas/BootLoaderModuleFieldKernelBootSubstate' BootLoaderModuleFieldSystemBoot: '#/components/schemas/BootLoaderModuleFieldSystemBootSubstate' BootLoaderModuleFieldVmBoot: '#/components/schemas/BootLoaderModuleFieldVmBootSubstate' - BootLoaderModuleFieldKernelBoot: '#/components/schemas/BootLoaderModuleFieldKernelBootSubstate' BootLoaderModuleFieldTransactionValidationConfiguration: '#/components/schemas/BootLoaderModuleFieldTransactionValidationConfigurationSubstate' ProtocolUpdateStatusModuleFieldSummary: '#/components/schemas/ProtocolUpdateStatusModuleFieldSummarySubstate' TypeInfoModuleFieldTypeInfo: '#/components/schemas/TypeInfoModuleFieldTypeInfoSubstate' @@ -3875,7 +3875,11 @@ components: SubstateType: type: string enum: + - BootLoaderModuleFieldSystemBoot + - BootLoaderModuleFieldKernelBoot - BootLoaderModuleFieldVmBoot + - BootLoaderModuleFieldTransactionValidationConfiguration + - ProtocolUpdateStatusModuleFieldSummary - TypeInfoModuleFieldTypeInfo - RoleAssignmentModuleFieldOwnerRole - RoleAssignmentModuleRuleEntry @@ -3927,10 +3931,6 @@ components: - TransactionTrackerFieldState - TransactionTrackerCollectionEntry - AccountLockerAccountClaimsEntry - - BootLoaderModuleFieldSystemBoot - - BootLoaderModuleFieldKernelBoot - - BootLoaderModuleFieldTransactionValidationConfiguration - - ProtocolUpdateStatusModuleFieldSummary ################################################ # GENERAL / SHARED MODELS - substate key types # ################################################ @@ -4331,10 +4331,63 @@ components: allOf: - $ref: '#/components/schemas/Substate' - type: object - description: | - This substate is only used in resim to track protocol update status. - It isn't expected to be seen in the node, which uses proofs to track protocol update status. - # TODO:CUTTLEFISH + required: + - protocol_version + - update_status + properties: + protocol_version: + type: string + update_status: + $ref: '#/components/schemas/ProtocolUpdateStatus' + ProtocolUpdateStatusType: + type: string + enum: + - InProgress + - Complete + ProtocolUpdateStatus: + type: object + required: + - type + properties: + type: + $ref: '#/components/schemas/ProtocolUpdateStatusType' + discriminator: + propertyName: type + mapping: + # NOTE: These need to match ProtocolUpdateStatusType options above + InProgress: '#/components/schemas/InProgressProtocolUpdateStatus' + Complete: '#/components/schemas/CompleteProtocolUpdateStatus' + InProgressProtocolUpdateStatus: + allOf: + - $ref: '#/components/schemas/ProtocolUpdateStatus' + - type: object + required: + - latest_commit + properties: + latest_commit: + $ref: '#/components/schemas/ProtocolUpdateStatusLatestCommit' + ProtocolUpdateStatusLatestCommit: + type: object + required: + - batch_group_index + - batch_group_name + - batch_index + - batch_name + properties: + batch_group_index: + type: integer + format: int64 + batch_group_name: + type: string + batch_index: + type: integer + format: int64 + batch_name: + type: string + CompleteProtocolUpdateStatus: + allOf: + - $ref: '#/components/schemas/ProtocolUpdateStatus' + - type: object TypeInfoModuleFieldTypeInfoSubstate: allOf: - $ref: '#/components/schemas/Substate' @@ -6936,10 +6989,10 @@ components: description: The type of the parsed (partial) transaction payload enum: - NotarizedTransaction + - NotarizedTransactionV2 - SignedTransactionIntent - TransactionIntent - LedgerTransaction - - NotarizedTransactionV2 ParsedTransaction: type: object required: @@ -8169,6 +8222,7 @@ components: enum: - Genesis - User + - UserV2 - RoundUpdate - Flash LedgerTransaction: diff --git a/core-rust/core-api-server/scripts/generate-openapi-server.py b/core-rust/core-api-server/scripts/generate-openapi-server.py index 8b43a9bde2..beb2d83336 100755 --- a/core-rust/core-api-server/scripts/generate-openapi-server.py +++ b/core-rust/core-api-server/scripts/generate-openapi-server.py @@ -151,6 +151,7 @@ def fix_for_enum_not_implementing_default(file_path, type_name): fix_for_enum_not_implementing_default(file_path, "StreamProofsErrorDetails") fix_for_enum_not_implementing_default(file_path, "StreamProofsFilter") fix_for_enum_not_implementing_default(file_path, "LedgerStateSelector") + fix_for_enum_not_implementing_default(file_path, "ProtocolUpdateStatus") logging.info("Successfully fixed up rust models.") diff --git a/core-rust/core-api-server/src/core_api/conversions/substates/protocol_update_status_module.rs b/core-rust/core-api-server/src/core_api/conversions/substates/protocol_update_status_module.rs index d76ec0e082..9ab08ee26d 100644 --- a/core-rust/core-api-server/src/core_api/conversions/substates/protocol_update_status_module.rs +++ b/core-rust/core-api-server/src/core_api/conversions/substates/protocol_update_status_module.rs @@ -1,4 +1,4 @@ -use radix_engine::updates::{ProtocolUpdateStatusSummary, ProtocolUpdateStatusSummarySubstate}; +use radix_engine::updates::*; use super::super::*; @@ -11,9 +11,31 @@ pub fn to_api_protocol_update_status_substate( ) -> Result { // TODO:CUTTLEFISH let ProtocolUpdateStatusSummary { - protocol_version: _, - update_status: _, + protocol_version, + update_status, } = substate.as_unique_version(); - Ok(models::Substate::ProtocolUpdateStatusModuleFieldSummarySubstate { is_locked: false }) + let update_status = match update_status { + ProtocolUpdateStatus::Complete => { + models::ProtocolUpdateStatus::CompleteProtocolUpdateStatus {} + } + ProtocolUpdateStatus::InProgress { latest_commit } => { + models::ProtocolUpdateStatus::InProgressProtocolUpdateStatus { + latest_commit: Box::new(models::ProtocolUpdateStatusLatestCommit { + batch_group_index: to_api_index_as_i64(latest_commit.batch_group_index)?, + batch_group_name: latest_commit.batch_group_name.to_string(), + batch_index: to_api_index_as_i64(latest_commit.batch_index)?, + batch_name: latest_commit.batch_name.to_string(), + }), + } + } + }; + + Ok( + models::Substate::ProtocolUpdateStatusModuleFieldSummarySubstate { + is_locked: false, + update_status: Box::new(update_status), + protocol_version: ProtocolVersionName::for_engine(*protocol_version).to_string(), + }, + ) } diff --git a/core-rust/core-api-server/src/core_api/generated/models/complete_protocol_update_status.rs b/core-rust/core-api-server/src/core_api/generated/models/complete_protocol_update_status.rs new file mode 100644 index 0000000000..7b1654517b --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/complete_protocol_update_status.rs @@ -0,0 +1,28 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct CompleteProtocolUpdateStatus { + #[serde(rename = "type")] + pub _type: crate::core_api::generated::models::ProtocolUpdateStatusType, +} + +impl CompleteProtocolUpdateStatus { + pub fn new(_type: crate::core_api::generated::models::ProtocolUpdateStatusType) -> CompleteProtocolUpdateStatus { + CompleteProtocolUpdateStatus { + _type, + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/in_progress_protocol_update_status.rs b/core-rust/core-api-server/src/core_api/generated/models/in_progress_protocol_update_status.rs new file mode 100644 index 0000000000..e3ab3b2e82 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/in_progress_protocol_update_status.rs @@ -0,0 +1,31 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct InProgressProtocolUpdateStatus { + #[serde(rename = "type")] + pub _type: crate::core_api::generated::models::ProtocolUpdateStatusType, + #[serde(rename = "latest_commit")] + pub latest_commit: Box, +} + +impl InProgressProtocolUpdateStatus { + pub fn new(_type: crate::core_api::generated::models::ProtocolUpdateStatusType, latest_commit: crate::core_api::generated::models::ProtocolUpdateStatusLatestCommit) -> InProgressProtocolUpdateStatus { + InProgressProtocolUpdateStatus { + _type, + latest_commit: Box::new(latest_commit), + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/in_progress_protocol_update_status_all_of.rs b/core-rust/core-api-server/src/core_api/generated/models/in_progress_protocol_update_status_all_of.rs new file mode 100644 index 0000000000..b57e4fa0c6 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/in_progress_protocol_update_status_all_of.rs @@ -0,0 +1,28 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct InProgressProtocolUpdateStatusAllOf { + #[serde(rename = "latest_commit")] + pub latest_commit: Box, +} + +impl InProgressProtocolUpdateStatusAllOf { + pub fn new(latest_commit: crate::core_api::generated::models::ProtocolUpdateStatusLatestCommit) -> InProgressProtocolUpdateStatusAllOf { + InProgressProtocolUpdateStatusAllOf { + latest_commit: Box::new(latest_commit), + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/ledger_transaction_type.rs b/core-rust/core-api-server/src/core_api/generated/models/ledger_transaction_type.rs index f0d04d08e6..9b73aad493 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/ledger_transaction_type.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/ledger_transaction_type.rs @@ -17,6 +17,8 @@ pub enum LedgerTransactionType { Genesis, #[serde(rename = "User")] User, + #[serde(rename = "UserV2")] + UserV2, #[serde(rename = "RoundUpdate")] RoundUpdate, #[serde(rename = "Flash")] @@ -29,6 +31,7 @@ impl ToString for LedgerTransactionType { match self { Self::Genesis => String::from("Genesis"), Self::User => String::from("User"), + Self::UserV2 => String::from("UserV2"), Self::RoundUpdate => String::from("RoundUpdate"), Self::Flash => String::from("Flash"), } diff --git a/core-rust/core-api-server/src/core_api/generated/models/mod.rs b/core-rust/core-api-server/src/core_api/generated/models/mod.rs index f932be6659..1f39c6f5dd 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/mod.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/mod.rs @@ -156,6 +156,8 @@ pub mod committed_transaction; pub use self::committed_transaction::CommittedTransaction; pub mod committed_transaction_balance_changes; pub use self::committed_transaction_balance_changes::CommittedTransactionBalanceChanges; +pub mod complete_protocol_update_status; +pub use self::complete_protocol_update_status::CompleteProtocolUpdateStatus; pub mod component_method_target_identifier; pub use self::component_method_target_identifier::ComponentMethodTargetIdentifier; pub mod component_method_target_identifier_all_of; @@ -398,6 +400,10 @@ pub mod genesis_ledger_transaction_all_of; pub use self::genesis_ledger_transaction_all_of::GenesisLedgerTransactionAllOf; pub mod hook_export; pub use self::hook_export::HookExport; +pub mod in_progress_protocol_update_status; +pub use self::in_progress_protocol_update_status::InProgressProtocolUpdateStatus; +pub mod in_progress_protocol_update_status_all_of; +pub use self::in_progress_protocol_update_status_all_of::InProgressProtocolUpdateStatusAllOf; pub mod index_blueprint_collection_schema; pub use self::index_blueprint_collection_schema::IndexBlueprintCollectionSchema; pub mod index_blueprint_collection_schema_all_of; @@ -848,8 +854,16 @@ pub mod protocol_update_ledger_proof_origin; pub use self::protocol_update_ledger_proof_origin::ProtocolUpdateLedgerProofOrigin; pub mod protocol_update_ledger_proof_origin_all_of; pub use self::protocol_update_ledger_proof_origin_all_of::ProtocolUpdateLedgerProofOriginAllOf; +pub mod protocol_update_status; +pub use self::protocol_update_status::ProtocolUpdateStatus; +pub mod protocol_update_status_latest_commit; +pub use self::protocol_update_status_latest_commit::ProtocolUpdateStatusLatestCommit; pub mod protocol_update_status_module_field_summary_substate; pub use self::protocol_update_status_module_field_summary_substate::ProtocolUpdateStatusModuleFieldSummarySubstate; +pub mod protocol_update_status_module_field_summary_substate_all_of; +pub use self::protocol_update_status_module_field_summary_substate_all_of::ProtocolUpdateStatusModuleFieldSummarySubstateAllOf; +pub mod protocol_update_status_type; +pub use self::protocol_update_status_type::ProtocolUpdateStatusType; pub mod protocol_version_readiness; pub use self::protocol_version_readiness::ProtocolVersionReadiness; pub mod public_key; diff --git a/core-rust/core-api-server/src/core_api/generated/models/parsed_transaction_type.rs b/core-rust/core-api-server/src/core_api/generated/models/parsed_transaction_type.rs index 64e50a02cd..6e928e63f0 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/parsed_transaction_type.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/parsed_transaction_type.rs @@ -15,14 +15,14 @@ pub enum ParsedTransactionType { #[serde(rename = "NotarizedTransaction")] NotarizedTransaction, + #[serde(rename = "NotarizedTransactionV2")] + NotarizedTransactionV2, #[serde(rename = "SignedTransactionIntent")] SignedTransactionIntent, #[serde(rename = "TransactionIntent")] TransactionIntent, #[serde(rename = "LedgerTransaction")] LedgerTransaction, - #[serde(rename = "NotarizedTransactionV2")] - NotarizedTransactionV2, } @@ -30,10 +30,10 @@ impl ToString for ParsedTransactionType { fn to_string(&self) -> String { match self { Self::NotarizedTransaction => String::from("NotarizedTransaction"), + Self::NotarizedTransactionV2 => String::from("NotarizedTransactionV2"), Self::SignedTransactionIntent => String::from("SignedTransactionIntent"), Self::TransactionIntent => String::from("TransactionIntent"), Self::LedgerTransaction => String::from("LedgerTransaction"), - Self::NotarizedTransactionV2 => String::from("NotarizedTransactionV2"), } } } diff --git a/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status.rs b/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status.rs new file mode 100644 index 0000000000..b7e6d63f06 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status.rs @@ -0,0 +1,28 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + +#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize)] +#[serde(tag = "type")] +pub enum ProtocolUpdateStatus { + #[serde(rename="Complete")] + CompleteProtocolUpdateStatus { + }, + #[serde(rename="InProgress")] + InProgressProtocolUpdateStatus { + #[serde(rename = "latest_commit")] + latest_commit: Box, + }, +} + + + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_latest_commit.rs b/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_latest_commit.rs new file mode 100644 index 0000000000..0e05d579e2 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_latest_commit.rs @@ -0,0 +1,37 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct ProtocolUpdateStatusLatestCommit { + #[serde(rename = "batch_group_index")] + pub batch_group_index: i64, + #[serde(rename = "batch_group_name")] + pub batch_group_name: String, + #[serde(rename = "batch_index")] + pub batch_index: i64, + #[serde(rename = "batch_name")] + pub batch_name: String, +} + +impl ProtocolUpdateStatusLatestCommit { + pub fn new(batch_group_index: i64, batch_group_name: String, batch_index: i64, batch_name: String) -> ProtocolUpdateStatusLatestCommit { + ProtocolUpdateStatusLatestCommit { + batch_group_index, + batch_group_name, + batch_index, + batch_name, + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_module_field_summary_substate.rs b/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_module_field_summary_substate.rs index 20827f1ba4..8f528d2c78 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_module_field_summary_substate.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_module_field_summary_substate.rs @@ -17,13 +17,19 @@ pub struct ProtocolUpdateStatusModuleFieldSummarySubstate { pub substate_type: crate::core_api::generated::models::SubstateType, #[serde(rename = "is_locked")] pub is_locked: bool, + #[serde(rename = "protocol_version")] + pub protocol_version: String, + #[serde(rename = "update_status")] + pub update_status: Option, // Using Option permits Default trait; Will always be Some in normal use } impl ProtocolUpdateStatusModuleFieldSummarySubstate { - pub fn new(substate_type: crate::core_api::generated::models::SubstateType, is_locked: bool) -> ProtocolUpdateStatusModuleFieldSummarySubstate { + pub fn new(substate_type: crate::core_api::generated::models::SubstateType, is_locked: bool, protocol_version: String, update_status: crate::core_api::generated::models::ProtocolUpdateStatus) -> ProtocolUpdateStatusModuleFieldSummarySubstate { ProtocolUpdateStatusModuleFieldSummarySubstate { substate_type, is_locked, + protocol_version, + update_status: Option::Some(update_status), } } } diff --git a/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_module_field_summary_substate_all_of.rs b/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_module_field_summary_substate_all_of.rs new file mode 100644 index 0000000000..da9ed6007a --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_module_field_summary_substate_all_of.rs @@ -0,0 +1,31 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct ProtocolUpdateStatusModuleFieldSummarySubstateAllOf { + #[serde(rename = "protocol_version")] + pub protocol_version: String, + #[serde(rename = "update_status")] + pub update_status: Option, // Using Option permits Default trait; Will always be Some in normal use +} + +impl ProtocolUpdateStatusModuleFieldSummarySubstateAllOf { + pub fn new(protocol_version: String, update_status: crate::core_api::generated::models::ProtocolUpdateStatus) -> ProtocolUpdateStatusModuleFieldSummarySubstateAllOf { + ProtocolUpdateStatusModuleFieldSummarySubstateAllOf { + protocol_version, + update_status: Option::Some(update_status), + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_type.rs b/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_type.rs new file mode 100644 index 0000000000..811ff5087a --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/protocol_update_status_type.rs @@ -0,0 +1,39 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, serde::Serialize, serde::Deserialize)] +pub enum ProtocolUpdateStatusType { + #[serde(rename = "InProgress")] + InProgress, + #[serde(rename = "Complete")] + Complete, + +} + +impl ToString for ProtocolUpdateStatusType { + fn to_string(&self) -> String { + match self { + Self::InProgress => String::from("InProgress"), + Self::Complete => String::from("Complete"), + } + } +} + +impl Default for ProtocolUpdateStatusType { + fn default() -> ProtocolUpdateStatusType { + Self::InProgress + } +} + + + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/substate.rs b/core-rust/core-api-server/src/core_api/generated/models/substate.rs index ea82f542e9..42b9027d07 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/substate.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/substate.rs @@ -341,6 +341,10 @@ pub enum Substate { ProtocolUpdateStatusModuleFieldSummarySubstate { #[serde(rename = "is_locked")] is_locked: bool, + #[serde(rename = "protocol_version")] + protocol_version: String, + #[serde(rename = "update_status")] + update_status: Box, }, #[serde(rename="RoleAssignmentModuleFieldOwnerRole")] RoleAssignmentModuleFieldOwnerRoleSubstate { diff --git a/core-rust/core-api-server/src/core_api/generated/models/substate_type.rs b/core-rust/core-api-server/src/core_api/generated/models/substate_type.rs index 37e376ce27..c9d7a8d06b 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/substate_type.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/substate_type.rs @@ -12,8 +12,16 @@ /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, serde::Serialize, serde::Deserialize)] pub enum SubstateType { + #[serde(rename = "BootLoaderModuleFieldSystemBoot")] + BootLoaderModuleFieldSystemBoot, + #[serde(rename = "BootLoaderModuleFieldKernelBoot")] + BootLoaderModuleFieldKernelBoot, #[serde(rename = "BootLoaderModuleFieldVmBoot")] BootLoaderModuleFieldVmBoot, + #[serde(rename = "BootLoaderModuleFieldTransactionValidationConfiguration")] + BootLoaderModuleFieldTransactionValidationConfiguration, + #[serde(rename = "ProtocolUpdateStatusModuleFieldSummary")] + ProtocolUpdateStatusModuleFieldSummary, #[serde(rename = "TypeInfoModuleFieldTypeInfo")] TypeInfoModuleFieldTypeInfo, #[serde(rename = "RoleAssignmentModuleFieldOwnerRole")] @@ -116,21 +124,17 @@ pub enum SubstateType { TransactionTrackerCollectionEntry, #[serde(rename = "AccountLockerAccountClaimsEntry")] AccountLockerAccountClaimsEntry, - #[serde(rename = "BootLoaderModuleFieldSystemBoot")] - BootLoaderModuleFieldSystemBoot, - #[serde(rename = "BootLoaderModuleFieldKernelBoot")] - BootLoaderModuleFieldKernelBoot, - #[serde(rename = "BootLoaderModuleFieldTransactionValidationConfiguration")] - BootLoaderModuleFieldTransactionValidationConfiguration, - #[serde(rename = "ProtocolUpdateStatusModuleFieldSummary")] - ProtocolUpdateStatusModuleFieldSummary, } impl ToString for SubstateType { fn to_string(&self) -> String { match self { + Self::BootLoaderModuleFieldSystemBoot => String::from("BootLoaderModuleFieldSystemBoot"), + Self::BootLoaderModuleFieldKernelBoot => String::from("BootLoaderModuleFieldKernelBoot"), Self::BootLoaderModuleFieldVmBoot => String::from("BootLoaderModuleFieldVmBoot"), + Self::BootLoaderModuleFieldTransactionValidationConfiguration => String::from("BootLoaderModuleFieldTransactionValidationConfiguration"), + Self::ProtocolUpdateStatusModuleFieldSummary => String::from("ProtocolUpdateStatusModuleFieldSummary"), Self::TypeInfoModuleFieldTypeInfo => String::from("TypeInfoModuleFieldTypeInfo"), Self::RoleAssignmentModuleFieldOwnerRole => String::from("RoleAssignmentModuleFieldOwnerRole"), Self::RoleAssignmentModuleRuleEntry => String::from("RoleAssignmentModuleRuleEntry"), @@ -182,17 +186,13 @@ impl ToString for SubstateType { Self::TransactionTrackerFieldState => String::from("TransactionTrackerFieldState"), Self::TransactionTrackerCollectionEntry => String::from("TransactionTrackerCollectionEntry"), Self::AccountLockerAccountClaimsEntry => String::from("AccountLockerAccountClaimsEntry"), - Self::BootLoaderModuleFieldSystemBoot => String::from("BootLoaderModuleFieldSystemBoot"), - Self::BootLoaderModuleFieldKernelBoot => String::from("BootLoaderModuleFieldKernelBoot"), - Self::BootLoaderModuleFieldTransactionValidationConfiguration => String::from("BootLoaderModuleFieldTransactionValidationConfiguration"), - Self::ProtocolUpdateStatusModuleFieldSummary => String::from("ProtocolUpdateStatusModuleFieldSummary"), } } } impl Default for SubstateType { fn default() -> SubstateType { - Self::BootLoaderModuleFieldVmBoot + Self::BootLoaderModuleFieldSystemBoot } } diff --git a/core-rust/state-manager/src/protocol/mod.rs b/core-rust/state-manager/src/protocol/mod.rs index 895c8b06b6..38e30b5f8c 100644 --- a/core-rust/state-manager/src/protocol/mod.rs +++ b/core-rust/state-manager/src/protocol/mod.rs @@ -2,6 +2,7 @@ mod genesis_data_resolver; mod protocol_config; mod protocol_configs; mod protocol_state; +mod protocol_update_executor; mod protocol_updates; #[cfg(test)] @@ -11,4 +12,5 @@ pub use genesis_data_resolver::*; pub use protocol_config::*; pub use protocol_configs::*; pub use protocol_state::*; +pub use protocol_update_executor::*; pub use protocol_updates::*; diff --git a/core-rust/state-manager/src/protocol/protocol_state.rs b/core-rust/state-manager/src/protocol/protocol_state.rs index f8fea8683d..1be15a7616 100644 --- a/core-rust/state-manager/src/protocol/protocol_state.rs +++ b/core-rust/state-manager/src/protocol/protocol_state.rs @@ -3,204 +3,6 @@ use crate::prelude::*; // This file contains types and utilities for managing the (dynamic) protocol state of a running // node. -pub struct NodeProtocolUpdateExecutor { - network_definition: NetworkDefinition, - protocol_update_content_overrides: RawProtocolUpdateContentOverrides, - scenarios_execution_config: ScenariosExecutionConfig, - database: Arc>, - system_executor: Arc, - transaction_validator: Arc>, - genesis_data_resolver: Arc, -} - -impl NodeProtocolUpdateExecutor { - pub fn new( - network: NetworkDefinition, - protocol_update_content_overrides: RawProtocolUpdateContentOverrides, - scenarios_execution_config: ScenariosExecutionConfig, - database: Arc>, - system_executor: Arc, - transaction_validator: Arc>, - genesis_data_resolver: Arc, - ) -> Self { - Self { - network_definition: network, - protocol_update_content_overrides, - scenarios_execution_config, - database, - system_executor, - transaction_validator, - genesis_data_resolver, - } - } - - /// Executes any remaining parts of the currently-effective protocol update. - /// This method is meant to be called during the boot-up, to support resuming after a restart. - /// - /// Returns the resultant protocol version. - pub fn resume_protocol_update_if_any(&self) -> Option { - let mut latest_enacted: Option = None; - - // We loop because we might need to run back-to-back protocol updates. - loop { - let progress = ProtocolUpdateProgress::resolve(self.database.lock().deref()); - //=========================== Helpful Notice (to future me) ============================ - // It may look sensible to inline `progress` below, but trust me, it isn't. - // You get a deadlock because rust doesn't drop the database lock guard as soon as you'd expect. - // This notice was installed after doing this refactor twice, 6 months apart... - // And then having to play the fun "hunt for the deadlock" game. - //====================================================================================== - match progress { - ProtocolUpdateProgress::UpdateInitiatedButNothingCommitted { - protocol_version_name, - } => { - info!("[UPDATE: {protocol_version_name}] Starting protocol update"); - self.execute_protocol_update_actions(&protocol_version_name, 0, 0); - latest_enacted = Some(protocol_version_name.clone()); - } - ProtocolUpdateProgress::UpdateInProgress { - protocol_version_name, - last_batch_group_index, - last_batch_index, - } => { - info!("[UPDATE: {protocol_version_name}] Resuming protocol update"); - self.execute_protocol_update_actions( - &protocol_version_name, - last_batch_group_index, - last_batch_index.checked_add(1).unwrap(), - ); - latest_enacted = Some(protocol_version_name.clone()); - } - ProtocolUpdateProgress::NotUpdating => { - return latest_enacted; - } - } - } - } - - /// Executes the (remaining part of the) given protocol update's transactions. - fn execute_protocol_update_actions( - &self, - protocol_version: &ProtocolVersionName, - from_batch_group_index: usize, - from_batch_index: usize, - ) { - let overrides = self.protocol_update_content_overrides.get(protocol_version); - let resolved = protocol_version.validate().unwrap_or_else(|err| { - panic!("{protocol_version:?} is not a supported protocol version: {err:?}") - }); - let protocol_update_definition = resolved.definition(); - let update_generator = protocol_update_definition.create_update_generator_raw( - ProtocolUpdateContext { - network: &self.network_definition, - database: &self.database, - genesis_data_resolver: &self.genesis_data_resolver, - scenario_config: &self.scenarios_execution_config, - }, - overrides, - ); - let config_hash = update_generator.config_hash(); - - let batch_groups = update_generator.batch_groups(); - let total_batch_groups = batch_groups.len(); - let remaining_batch_groups = batch_groups - .into_iter() - .enumerate() - .skip(from_batch_group_index); - - for (batch_group_index, batch_group) in remaining_batch_groups { - let batch_group_number = batch_group_index + 1; - let batch_group_name = batch_group.batch_group_name(); - let is_final_batch_group = batch_group_index == total_batch_groups - 1; - let start_at_batch = if batch_group_index == from_batch_group_index - && from_batch_index > 0 - { - info!("[UPDATE: {protocol_version}] Continuing {batch_group_name} (batch group {batch_group_number}/{total_batch_groups})"); - from_batch_index - } else { - info!("[UPDATE: {protocol_version}] Commencing {batch_group_name} (batch group {batch_group_number}/{total_batch_groups})"); - 0 - }; - let batches = { - // In a separate block to ensure the database lock guard is dropped promptly. - batch_group.generate_batches(self.database.lock().deref()) - }; - let total_batches = batches.len(); - let remaining_batches = batches.into_iter().enumerate().skip(start_at_batch); - for (batch_index, batch_generator) in remaining_batches { - let batch_number = batch_index + 1; - let batch_name = batch_generator.batch_name().to_string(); - info!("[UPDATE: {protocol_version}] Processing {batch_name} (batch {batch_number}/{total_batches}) in {batch_group_name} (batch group {batch_group_number}/{total_batch_groups})"); - let is_final_batch = is_final_batch_group && batch_index == total_batches - 1; - let start_state_identifiers = self - .resolve_batch_ledger_state_identifiers(update_generator.genesis_start_state()); - let batch = { - // In a separate block to ensure the database lock guard is dropped promptly. - batch_generator.generate_batch(self.database.lock().deref()) - }; - self.system_executor.execute_protocol_update_action( - ProtocolUpdateBatchDetails { - protocol_version, - config_hash, - batch_group_index, - batch_group_name, - batch_index, - batch_name: &batch_name, - is_final_batch, - start_state_identifiers, - }, - batch, - ); - { - // Update the transaction validator in case any of its configuration was updated. - // This ensures that scenarios will execute correctly. - *self.transaction_validator.write() = TransactionValidator::new( - self.database.lock().deref(), - &self.network_definition, - ); - } - } - } - info!("Protocol update to {protocol_version:?} is complete"); - } - - fn resolve_batch_ledger_state_identifiers( - &self, - genesis_fallback: Option, - ) -> StartStateIdentifiers { - let db = self.database.lock(); - - match db.get_latest_epoch_proof() { - Some(latest_epoch_proof) => { - let latest_proof = db - .get_latest_proof() - .expect("If there's an epoch proof, there must be any proof"); - StartStateIdentifiers { - epoch: latest_epoch_proof.ledger_header.next_epoch.unwrap().epoch, - proposer_timestamp_ms: latest_proof.ledger_header.proposer_timestamp_ms, - state_version: latest_proof.ledger_header.state_version, - } - } - None => { - // We must be mid-genesis - let genesis_fallback = genesis_fallback - .expect("There is no epoch proof, but we're not executing genesis"); - match db.get_latest_proof() { - Some(latest_proof) => { - let latest_header = latest_proof.ledger_header; - StartStateIdentifiers { - epoch: genesis_fallback.epoch, - proposer_timestamp_ms: latest_header.proposer_timestamp_ms, - state_version: latest_header.state_version, - } - } - None => genesis_fallback, - } - } - } - } -} - pub struct ProtocolManager { protocol_metrics: ProtocolMetrics, current_protocol_version: RwLock, diff --git a/core-rust/state-manager/src/protocol/protocol_update_executor.rs b/core-rust/state-manager/src/protocol/protocol_update_executor.rs new file mode 100644 index 0000000000..655e3089bc --- /dev/null +++ b/core-rust/state-manager/src/protocol/protocol_update_executor.rs @@ -0,0 +1,213 @@ +use crate::prelude::*; + +pub struct NodeProtocolUpdateExecutor { + network_definition: NetworkDefinition, + protocol_update_content_overrides: RawProtocolUpdateContentOverrides, + scenarios_execution_config: ScenariosExecutionConfig, + database: Arc>, + system_executor: Arc, + transaction_validator: Arc>, + genesis_data_resolver: Arc, +} + +impl NodeProtocolUpdateExecutor { + pub fn new( + network: NetworkDefinition, + protocol_update_content_overrides: RawProtocolUpdateContentOverrides, + scenarios_execution_config: ScenariosExecutionConfig, + database: Arc>, + system_executor: Arc, + transaction_validator: Arc>, + genesis_data_resolver: Arc, + ) -> Self { + Self { + network_definition: network, + protocol_update_content_overrides, + scenarios_execution_config, + database, + system_executor, + transaction_validator, + genesis_data_resolver, + } + } + + /// Executes any remaining parts of the currently-effective protocol update. + /// This method is meant to be called during the boot-up, to support resuming after a restart. + /// + /// Returns the resultant protocol version. + pub fn resume_protocol_update_if_any(&self) -> Option { + let mut latest_enacted: Option = None; + + // We loop because we might need to run back-to-back protocol updates. + loop { + let progress = ProtocolUpdateProgress::resolve(self.database.lock().deref()); + //=========================== Helpful Notice (to future me) ============================ + // It may look sensible to inline `progress` below, but trust me, it isn't. + // You get a deadlock because rust doesn't drop the database lock guard as soon as you'd expect. + // This notice was installed after doing this refactor twice, 6 months apart... + // And then having to play the fun "hunt for the deadlock" game. + //====================================================================================== + match progress { + ProtocolUpdateProgress::UpdateInitiatedButNothingCommitted { + protocol_version_name, + } => { + info!("[UPDATE: {protocol_version_name}] Starting protocol update"); + self.execute_protocol_update_actions(&protocol_version_name, 0, 0); + latest_enacted = Some(protocol_version_name.clone()); + } + ProtocolUpdateProgress::UpdateInProgress { + protocol_version_name, + last_batch_group_index, + last_batch_index, + } => { + info!("[UPDATE: {protocol_version_name}] Resuming protocol update"); + self.execute_protocol_update_actions( + &protocol_version_name, + last_batch_group_index, + last_batch_index.checked_add(1).unwrap(), + ); + latest_enacted = Some(protocol_version_name.clone()); + } + ProtocolUpdateProgress::NotUpdating => { + return latest_enacted; + } + } + } + } + + /// Executes the (remaining part of the) given protocol update's transactions. + fn execute_protocol_update_actions( + &self, + protocol_version: &ProtocolVersionName, + from_batch_group_index: usize, + from_batch_index: usize, + ) { + let overrides = self.protocol_update_content_overrides.get(protocol_version); + let resolved = protocol_version.validate().unwrap_or_else(|err| { + panic!("{protocol_version:?} is not a supported protocol version: {err:?}") + }); + let protocol_update_definition = resolved.definition(); + let update_generator = protocol_update_definition.create_update_generator_raw( + ProtocolUpdateContext { + network: &self.network_definition, + database: &self.database, + genesis_data_resolver: &self.genesis_data_resolver, + scenario_config: &self.scenarios_execution_config, + }, + overrides, + ); + let config_hash = update_generator.config_hash(); + let enable_status_reporting = update_generator.insert_status_tracking_flash_transactions(); + let mut batch_groups = update_generator.batch_groups(); + + // Copies the behaviour of the engine's ProtocolUpdateExecutor. + if enable_status_reporting { + // The status update itself will get added when the batch is processed + batch_groups.push( + NodeFixedBatchGroupGenerator::named("completion") + .add_batch("record-completion", |_| { + NodeProtocolUpdateBatch::ProtocolUpdateBatch(ProtocolUpdateBatch::empty()) + }) + .build(), + ); + } + + let total_batch_groups = batch_groups.len(); + let remaining_batch_groups = batch_groups + .into_iter() + .enumerate() + .skip(from_batch_group_index); + + for (batch_group_index, batch_group) in remaining_batch_groups { + let batch_group_number = batch_group_index + 1; + let batch_group_name = batch_group.batch_group_name(); + let start_at_batch = if batch_group_index == from_batch_group_index + && from_batch_index > 0 + { + info!("[UPDATE: {protocol_version}] Continuing {batch_group_name} (batch group {batch_group_number}/{total_batch_groups})"); + from_batch_index + } else { + info!("[UPDATE: {protocol_version}] Commencing {batch_group_name} (batch group {batch_group_number}/{total_batch_groups})"); + 0 + }; + let batches = { + // In a separate block to ensure the database lock guard is dropped promptly. + batch_group.generate_batches(self.database.lock().deref()) + }; + let total_batches = batches.len(); + let remaining_batches = batches.into_iter().enumerate().skip(start_at_batch); + for (batch_index, batch_generator) in remaining_batches { + let batch_number = batch_index + 1; + let batch_name = batch_generator.batch_name().to_string(); + let batch_name = batch_name.as_str(); + info!("[UPDATE: {protocol_version}] Processing {batch_name} (batch {batch_number}/{total_batches}) in {batch_group_name} (batch group {batch_group_number}/{total_batch_groups})"); + let start_state_identifiers = self + .resolve_batch_ledger_state_identifiers(update_generator.genesis_start_state()); + let batch = { + // In a separate block to ensure the database lock guard is dropped promptly. + batch_generator.generate_batch(self.database.lock().deref()) + }; + self.system_executor.execute_protocol_update_action( + ProtocolUpdateBatchDetails { + protocol_version, + config_hash, + batch_group_index, + batch_group_name, + total_batch_groups, + batch_index, + batch_name, + total_batches, + enable_status_reporting, + start_state_identifiers, + }, + batch, + ); + { + // Update the transaction validator in case any of its configuration was updated. + // This ensures that scenarios will execute correctly. + *self.transaction_validator.write() = TransactionValidator::new( + self.database.lock().deref(), + &self.network_definition, + ); + } + } + } + info!("Protocol update to {protocol_version:?} is complete"); + } + + fn resolve_batch_ledger_state_identifiers( + &self, + genesis_fallback: Option, + ) -> StartStateIdentifiers { + let db = self.database.lock(); + + match db.get_latest_epoch_proof() { + Some(latest_epoch_proof) => { + let latest_proof = db + .get_latest_proof() + .expect("If there's an epoch proof, there must be any proof"); + StartStateIdentifiers { + epoch: latest_epoch_proof.ledger_header.next_epoch.unwrap().epoch, + proposer_timestamp_ms: latest_proof.ledger_header.proposer_timestamp_ms, + state_version: latest_proof.ledger_header.state_version, + } + } + None => { + // We must be mid-genesis + let genesis_fallback = genesis_fallback + .expect("There is no epoch proof, but we're not executing genesis"); + match db.get_latest_proof() { + Some(latest_proof) => { + let latest_header = latest_proof.ledger_header; + StartStateIdentifiers { + epoch: genesis_fallback.epoch, + proposer_timestamp_ms: latest_header.proposer_timestamp_ms, + state_version: latest_header.state_version, + } + } + None => genesis_fallback, + } + } + } + } +} diff --git a/core-rust/state-manager/src/protocol/protocol_updates/definitions/custom_definition.rs b/core-rust/state-manager/src/protocol/protocol_updates/definitions/custom_definition.rs index e852395fa2..79d615ba78 100644 --- a/core-rust/state-manager/src/protocol/protocol_updates/definitions/custom_definition.rs +++ b/core-rust/state-manager/src/protocol/protocol_updates/definitions/custom_definition.rs @@ -73,6 +73,10 @@ impl NodeProtocolUpdateGenerator for ArbitraryNodeBatchGenerator { self.config_hash } + fn insert_status_tracking_flash_transactions(&self) -> bool { + false + } + fn batch_groups(&self) -> Vec> { let mut batch_group = NodeFixedBatchGroupGenerator::named(Self::BATCH_GROUP_DESCRIPTOR); for (index, batch) in self.batches.iter().enumerate() { diff --git a/core-rust/state-manager/src/protocol/protocol_updates/protocol_updaters.rs b/core-rust/state-manager/src/protocol/protocol_updates/protocol_updaters.rs index a560537dbb..fa0acd30e6 100644 --- a/core-rust/state-manager/src/protocol/protocol_updates/protocol_updaters.rs +++ b/core-rust/state-manager/src/protocol/protocol_updates/protocol_updaters.rs @@ -27,6 +27,8 @@ pub trait NodeProtocolUpdateGenerator { /// A summary of the configuration of this protocol update, to detect divergence. fn config_hash(&self) -> Hash; + fn insert_status_tracking_flash_transactions(&self) -> bool; + fn genesis_start_state(&self) -> Option { None } @@ -100,6 +102,11 @@ impl NodeProtocolUpdateGenerator for WrappedProtocolUpdateGenerator { self.config_hash } + fn insert_status_tracking_flash_transactions(&self) -> bool { + self.engine_generator + .insert_status_tracking_flash_transactions() + } + fn batch_groups(&self) -> Vec> { self.engine_generator .batch_groups() @@ -207,6 +214,11 @@ impl NodeProtocolUpdateGenerator self.genesis_start_identifiers.clone() } + fn insert_status_tracking_flash_transactions(&self) -> bool { + self.base_batch_generator + .insert_status_tracking_flash_transactions() + } + fn config_hash(&self) -> Hash { self.fixed_config_hash.unwrap_or_else(|| { let base_hash = self.base_batch_generator.config_hash(); diff --git a/core-rust/state-manager/src/system_executor.rs b/core-rust/state-manager/src/system_executor.rs index cc6cb6eebb..a70b4859d3 100644 --- a/core-rust/state-manager/src/system_executor.rs +++ b/core-rust/state-manager/src/system_executor.rs @@ -158,21 +158,20 @@ impl SystemExecutor { output, }, }, - ) = self.preparator.prepare_scenario( - batch_details.to_batch_situation(), - scenario_name, - scenario, - ); + ) = self + .preparator + .prepare_scenario(&batch_details, scenario_name, scenario); // Note: // We want to store the information on each executed scenario in the DB (for inspection). + // // Ideally, we should write it atomically in the same batch as the `commit_system()` call - // below - however, it would require breaking some abstraction (i.e. atomicity is currently - // driven by the DB layer) or making an API exception for the Scenarios (i.e. accept some - // extra params in the commit request). Since Scenarios only exist for test purposes, we - // chose to simply write it non-atomically here, before commit. Worst case (i.e. if Node is - // restarted right after this line), we will see a duplicate entry in the informative-only - // "executed Scenarios" table. + // below - however, in the interests of time and abstraction purity, at this point we + // haven't added extra params in the commit request for this. + // + // Since Scenarios only exist for test purposes, we chose to simply write it non-atomically + // here, before commit. Worst case (i.e. if Node is restarted right after this line), + // we will see a duplicate entry in the informative-only "executed Scenarios" table. let executed_scenario = self.create_executed_scenario_entry( scenario_name, &prepare_result.committed_transactions, @@ -180,9 +179,9 @@ impl SystemExecutor { output, ); log_executed_scenario_details(&executed_scenario); - let database = self.database.lock(); - database.put_next_scenario(executed_scenario); - drop(database); + { + self.database.lock().put_next_scenario(executed_scenario); + } if prepare_result.committed_transactions.is_empty() { info!( @@ -291,13 +290,43 @@ pub struct ProtocolUpdateBatchDetails<'a> { pub config_hash: Hash, pub batch_group_index: usize, pub batch_group_name: &'a str, + pub total_batch_groups: usize, pub batch_index: usize, pub batch_name: &'a str, - pub is_final_batch: bool, + pub total_batches: usize, + pub enable_status_reporting: bool, pub start_state_identifiers: StartStateIdentifiers, } impl<'a> ProtocolUpdateBatchDetails<'a> { + fn is_final_batch_group(&self) -> bool { + self.batch_group_index == self.total_batch_groups - 1 + } + + fn is_final_batch(&self) -> bool { + self.is_final_batch_group() && self.batch_index == self.total_batches - 1 + } + + pub fn generate_update_status_flash_transaction(&self) -> Option { + if !self.enable_status_reporting { + return None; + } + let protocol_version = self + .protocol_version + .validate() + .unwrap() + .resolve_engine_version()?; + Some(generate_update_status_flash_transaction( + protocol_version, + self.batch_group_index, + self.batch_group_name, + self.total_batch_groups, + self.batch_index, + self.batch_name, + self.total_batches, + )) + } + fn create_system_commit_factory(&self) -> SystemCommitRequestFactory { SystemCommitRequestFactory { epoch: self.start_state_identifiers.epoch, @@ -316,14 +345,14 @@ impl<'a> ProtocolUpdateBatchDetails<'a> { batch_group_name: self.batch_group_name.to_string(), batch_index: self.batch_index, batch_name: self.batch_name.to_string(), - is_end_of_update: self.is_final_batch, + is_end_of_update: self.is_final_batch(), } } pub fn to_batch_situation(&self) -> BatchSituation { BatchSituation::ProtocolUpdate { update: self.protocol_version.clone(), - is_final_batch: self.is_final_batch, + is_final_batch: self.is_final_batch(), } } } diff --git a/core-rust/state-manager/src/transaction/preparation.rs b/core-rust/state-manager/src/transaction/preparation.rs index 0b1d20685e..6a82b21a63 100644 --- a/core-rust/state-manager/src/transaction/preparation.rs +++ b/core-rust/state-manager/src/transaction/preparation.rs @@ -95,59 +95,25 @@ impl Preparator { pub fn prepare_protocol_update( &self, batch_details: &ProtocolUpdateBatchDetails, - protocol_update_batch: ProtocolUpdateBatch, + mut protocol_update_batch: ProtocolUpdateBatch, ) -> SystemPrepareResult { let database = self.database.lock(); let mut series_executor = self .transaction_executor_factory .start_series_execution(database.deref()); + if let Some(transaction) = batch_details.generate_update_status_flash_transaction() { + protocol_update_batch.mut_add(transaction); + } + let mut committed_transactions = Vec::new(); for transaction in protocol_update_batch.transactions { - let ledger_transaction = match transaction { - // Ideally we'd be able to get rid of all this `LedgerTransaction::Genesis` special-casing - // and just make it a protocol update... but sadly that wouldn't be backwards compatible! - ProtocolUpdateTransaction::FlashTransactionV1(flash_transaction) => { - if batch_details.protocol_version == &ProtocolVersionName::babylon() { - LedgerTransaction::Genesis(Box::new(GenesisTransaction::Flash)) - } else { - LedgerTransaction::FlashV1(Box::new(flash_transaction)) - } - } - ProtocolUpdateTransaction::SystemTransactionV1(transaction) => { - if batch_details.protocol_version == &ProtocolVersionName::babylon() { - let genesis_transaction = - GenesisTransaction::Transaction(Box::new(transaction.transaction)); - LedgerTransaction::Genesis(Box::new(genesis_transaction)) - } else { - // This would be easy to change - we would just need to add a new variant - // LedgerTransaction::ProtocolUpdateSystemTransaction - panic!("We don't currently support non-flash non-genesis protocol update transactions") - } - } - }; - let raw = ledger_transaction - .to_raw() - .expect("Could not encode protocol update transaction"); - - let IdentifiedLedgerExecutable { executable, hashes } = raw - .create_identifiable_ledger_executable( - self.transaction_validator.read().deref(), - AcceptedLedgerTransactionKind::Any, - ) - .expect("Could not prepare and validate protocol update transaction"); - - series_executor - .execute_and_update_state(&executable, &hashes, "protocol update") - .expect("protocol update not committable") - .expect_success("protocol update"); - - committed_transactions.push(ProcessedLedgerTransaction { - raw, - executable, - hashes, - }); + committed_transactions.push(self.process_protocol_update_transaction( + &mut series_executor, + batch_details, + transaction, + )); } let end_state = series_executor.finalize_series(batch_details.to_batch_situation()); @@ -157,7 +123,7 @@ impl Preparator { pub fn prepare_scenario( &self, - batch_situation: BatchSituation, + batch_details: &ProtocolUpdateBatchDetails, scenario_name: &str, mut scenario: Box, ) -> (SystemPrepareResult, PreparedScenarioMetadata) { @@ -194,9 +160,18 @@ impl Preparator { previous_engine_receipt = Some(engine_receipt); } NextAction::Completed(end_state) => { + if let Some(transaction) = + batch_details.generate_update_status_flash_transaction() + { + committed_transactions.push(self.process_protocol_update_transaction( + &mut series_executor, + batch_details, + transaction, + )); + } let prepare_result = SystemPrepareResult::from_committed_series( committed_transactions, - series_executor.finalize_series(batch_situation), + series_executor.finalize_series(batch_details.to_batch_situation()), ); let scenario_metadata = PreparedScenarioMetadata { committed_transaction_names, @@ -208,6 +183,58 @@ impl Preparator { } } + fn process_protocol_update_transaction( + &self, + series_executor: &mut TransactionSeriesExecutor, + batch_details: &ProtocolUpdateBatchDetails, + transaction: ProtocolUpdateTransaction, + ) -> ProcessedLedgerTransaction { + let ledger_transaction = match transaction { + // Ideally we'd be able to get rid of all this `LedgerTransaction::Genesis` special-casing + // and just make it a protocol update... but sadly that wouldn't be backwards compatible! + ProtocolUpdateTransaction::FlashTransactionV1(flash_transaction) => { + if batch_details.protocol_version == &ProtocolVersionName::babylon() { + LedgerTransaction::Genesis(Box::new(GenesisTransaction::Flash)) + } else { + LedgerTransaction::FlashV1(Box::new(flash_transaction)) + } + } + ProtocolUpdateTransaction::SystemTransactionV1(transaction) => { + if batch_details.protocol_version == &ProtocolVersionName::babylon() { + let genesis_transaction = + GenesisTransaction::Transaction(Box::new(transaction.transaction)); + LedgerTransaction::Genesis(Box::new(genesis_transaction)) + } else { + // This would be easy to change - we would just need to add a new variant + // LedgerTransaction::ProtocolUpdateSystemTransaction + panic!("We don't currently support non-flash non-genesis protocol update transactions") + } + } + }; + + let raw = ledger_transaction + .to_raw() + .expect("Could not encode protocol update transaction"); + + let IdentifiedLedgerExecutable { executable, hashes } = raw + .create_identifiable_ledger_executable( + self.transaction_validator.read().deref(), + AcceptedLedgerTransactionKind::Any, + ) + .expect("Could not prepare and validate protocol update transaction"); + + series_executor + .execute_and_update_state(&executable, &hashes, "protocol update") + .expect("protocol update not committable") + .expect_success("protocol update"); + + ProcessedLedgerTransaction { + raw, + executable, + hashes, + } + } + fn prepare_scenario_transaction( &self, series_executor: &mut TransactionSeriesExecutor, diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/CompleteProtocolUpdateStatus.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/CompleteProtocolUpdateStatus.java new file mode 100644 index 0000000000..149239b4c6 --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/CompleteProtocolUpdateStatus.java @@ -0,0 +1,106 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.CompleteProtocolUpdateStatus; +import com.radixdlt.api.core.generated.models.InProgressProtocolUpdateStatus; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatus; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.radixdlt.api.core.generated.client.JSON; +/** + * CompleteProtocolUpdateStatus + */ +@JsonPropertyOrder({ +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = CompleteProtocolUpdateStatus.class, name = "Complete"), + @JsonSubTypes.Type(value = InProgressProtocolUpdateStatus.class, name = "InProgress"), +}) + +public class CompleteProtocolUpdateStatus extends ProtocolUpdateStatus { + public CompleteProtocolUpdateStatus() { + } + + /** + * Return true if this CompleteProtocolUpdateStatus object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompleteProtocolUpdateStatus {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("Complete", CompleteProtocolUpdateStatus.class); + mappings.put("InProgress", InProgressProtocolUpdateStatus.class); + mappings.put("CompleteProtocolUpdateStatus", CompleteProtocolUpdateStatus.class); + JSON.registerDiscriminator(CompleteProtocolUpdateStatus.class, "type", mappings); +} +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/InProgressProtocolUpdateStatus.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/InProgressProtocolUpdateStatus.java new file mode 100644 index 0000000000..aa0c2984f1 --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/InProgressProtocolUpdateStatus.java @@ -0,0 +1,141 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.CompleteProtocolUpdateStatus; +import com.radixdlt.api.core.generated.models.InProgressProtocolUpdateStatus; +import com.radixdlt.api.core.generated.models.InProgressProtocolUpdateStatusAllOf; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatus; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusLatestCommit; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.radixdlt.api.core.generated.client.JSON; +/** + * InProgressProtocolUpdateStatus + */ +@JsonPropertyOrder({ + InProgressProtocolUpdateStatus.JSON_PROPERTY_LATEST_COMMIT +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = CompleteProtocolUpdateStatus.class, name = "Complete"), + @JsonSubTypes.Type(value = InProgressProtocolUpdateStatus.class, name = "InProgress"), +}) + +public class InProgressProtocolUpdateStatus extends ProtocolUpdateStatus { + public static final String JSON_PROPERTY_LATEST_COMMIT = "latest_commit"; + private ProtocolUpdateStatusLatestCommit latestCommit; + + public InProgressProtocolUpdateStatus() { + } + + public InProgressProtocolUpdateStatus latestCommit(ProtocolUpdateStatusLatestCommit latestCommit) { + this.latestCommit = latestCommit; + return this; + } + + /** + * Get latestCommit + * @return latestCommit + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_LATEST_COMMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ProtocolUpdateStatusLatestCommit getLatestCommit() { + return latestCommit; + } + + + @JsonProperty(JSON_PROPERTY_LATEST_COMMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLatestCommit(ProtocolUpdateStatusLatestCommit latestCommit) { + this.latestCommit = latestCommit; + } + + + /** + * Return true if this InProgressProtocolUpdateStatus object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InProgressProtocolUpdateStatus inProgressProtocolUpdateStatus = (InProgressProtocolUpdateStatus) o; + return Objects.equals(this.latestCommit, inProgressProtocolUpdateStatus.latestCommit) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(latestCommit, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InProgressProtocolUpdateStatus {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" latestCommit: ").append(toIndentedString(latestCommit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("Complete", CompleteProtocolUpdateStatus.class); + mappings.put("InProgress", InProgressProtocolUpdateStatus.class); + mappings.put("InProgressProtocolUpdateStatus", InProgressProtocolUpdateStatus.class); + JSON.registerDiscriminator(InProgressProtocolUpdateStatus.class, "type", mappings); +} +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/InProgressProtocolUpdateStatusAllOf.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/InProgressProtocolUpdateStatusAllOf.java new file mode 100644 index 0000000000..0c6fc57e8f --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/InProgressProtocolUpdateStatusAllOf.java @@ -0,0 +1,112 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusLatestCommit; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * InProgressProtocolUpdateStatusAllOf + */ +@JsonPropertyOrder({ + InProgressProtocolUpdateStatusAllOf.JSON_PROPERTY_LATEST_COMMIT +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InProgressProtocolUpdateStatusAllOf { + public static final String JSON_PROPERTY_LATEST_COMMIT = "latest_commit"; + private ProtocolUpdateStatusLatestCommit latestCommit; + + public InProgressProtocolUpdateStatusAllOf() { + } + + public InProgressProtocolUpdateStatusAllOf latestCommit(ProtocolUpdateStatusLatestCommit latestCommit) { + this.latestCommit = latestCommit; + return this; + } + + /** + * Get latestCommit + * @return latestCommit + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_LATEST_COMMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ProtocolUpdateStatusLatestCommit getLatestCommit() { + return latestCommit; + } + + + @JsonProperty(JSON_PROPERTY_LATEST_COMMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLatestCommit(ProtocolUpdateStatusLatestCommit latestCommit) { + this.latestCommit = latestCommit; + } + + + /** + * Return true if this InProgressProtocolUpdateStatus_allOf object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InProgressProtocolUpdateStatusAllOf inProgressProtocolUpdateStatusAllOf = (InProgressProtocolUpdateStatusAllOf) o; + return Objects.equals(this.latestCommit, inProgressProtocolUpdateStatusAllOf.latestCommit); + } + + @Override + public int hashCode() { + return Objects.hash(latestCommit); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InProgressProtocolUpdateStatusAllOf {\n"); + sb.append(" latestCommit: ").append(toIndentedString(latestCommit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/LedgerTransactionType.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/LedgerTransactionType.java index 6feca3e29e..3cd07ae9bb 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/LedgerTransactionType.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/LedgerTransactionType.java @@ -33,6 +33,8 @@ public enum LedgerTransactionType { USER("User"), + USERV2("UserV2"), + ROUNDUPDATE("RoundUpdate"), FLASH("Flash"); diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransactionType.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransactionType.java index 49ff69eca7..02991f62f8 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransactionType.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransactionType.java @@ -31,13 +31,13 @@ public enum ParsedTransactionType { NOTARIZEDTRANSACTION("NotarizedTransaction"), + NOTARIZEDTRANSACTIONV2("NotarizedTransactionV2"), + SIGNEDTRANSACTIONINTENT("SignedTransactionIntent"), TRANSACTIONINTENT("TransactionIntent"), - LEDGERTRANSACTION("LedgerTransaction"), - - NOTARIZEDTRANSACTIONV2("NotarizedTransactionV2"); + LEDGERTRANSACTION("LedgerTransaction"); private String value; diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatus.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatus.java new file mode 100644 index 0000000000..e7eee0594c --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatus.java @@ -0,0 +1,140 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.CompleteProtocolUpdateStatus; +import com.radixdlt.api.core.generated.models.InProgressProtocolUpdateStatus; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.radixdlt.api.core.generated.client.JSON; +/** + * ProtocolUpdateStatus + */ +@JsonPropertyOrder({ + ProtocolUpdateStatus.JSON_PROPERTY_TYPE +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = CompleteProtocolUpdateStatus.class, name = "Complete"), + @JsonSubTypes.Type(value = CompleteProtocolUpdateStatus.class, name = "CompleteProtocolUpdateStatus"), + @JsonSubTypes.Type(value = InProgressProtocolUpdateStatus.class, name = "InProgress"), + @JsonSubTypes.Type(value = InProgressProtocolUpdateStatus.class, name = "InProgressProtocolUpdateStatus"), +}) + +public class ProtocolUpdateStatus { + public static final String JSON_PROPERTY_TYPE = "type"; + private ProtocolUpdateStatusType type; + + public ProtocolUpdateStatus() { + } + + public ProtocolUpdateStatus type(ProtocolUpdateStatusType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ProtocolUpdateStatusType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(ProtocolUpdateStatusType type) { + this.type = type; + } + + + /** + * Return true if this ProtocolUpdateStatus object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProtocolUpdateStatus protocolUpdateStatus = (ProtocolUpdateStatus) o; + return Objects.equals(this.type, protocolUpdateStatus.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProtocolUpdateStatus {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("Complete", CompleteProtocolUpdateStatus.class); + mappings.put("CompleteProtocolUpdateStatus", CompleteProtocolUpdateStatus.class); + mappings.put("InProgress", InProgressProtocolUpdateStatus.class); + mappings.put("InProgressProtocolUpdateStatus", InProgressProtocolUpdateStatus.class); + mappings.put("ProtocolUpdateStatus", ProtocolUpdateStatus.class); + JSON.registerDiscriminator(ProtocolUpdateStatus.class, "type", mappings); +} +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusLatestCommit.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusLatestCommit.java new file mode 100644 index 0000000000..365de4516b --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusLatestCommit.java @@ -0,0 +1,207 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ProtocolUpdateStatusLatestCommit + */ +@JsonPropertyOrder({ + ProtocolUpdateStatusLatestCommit.JSON_PROPERTY_BATCH_GROUP_INDEX, + ProtocolUpdateStatusLatestCommit.JSON_PROPERTY_BATCH_GROUP_NAME, + ProtocolUpdateStatusLatestCommit.JSON_PROPERTY_BATCH_INDEX, + ProtocolUpdateStatusLatestCommit.JSON_PROPERTY_BATCH_NAME +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ProtocolUpdateStatusLatestCommit { + public static final String JSON_PROPERTY_BATCH_GROUP_INDEX = "batch_group_index"; + private Long batchGroupIndex; + + public static final String JSON_PROPERTY_BATCH_GROUP_NAME = "batch_group_name"; + private String batchGroupName; + + public static final String JSON_PROPERTY_BATCH_INDEX = "batch_index"; + private Long batchIndex; + + public static final String JSON_PROPERTY_BATCH_NAME = "batch_name"; + private String batchName; + + public ProtocolUpdateStatusLatestCommit() { + } + + public ProtocolUpdateStatusLatestCommit batchGroupIndex(Long batchGroupIndex) { + this.batchGroupIndex = batchGroupIndex; + return this; + } + + /** + * Get batchGroupIndex + * @return batchGroupIndex + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_BATCH_GROUP_INDEX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getBatchGroupIndex() { + return batchGroupIndex; + } + + + @JsonProperty(JSON_PROPERTY_BATCH_GROUP_INDEX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBatchGroupIndex(Long batchGroupIndex) { + this.batchGroupIndex = batchGroupIndex; + } + + + public ProtocolUpdateStatusLatestCommit batchGroupName(String batchGroupName) { + this.batchGroupName = batchGroupName; + return this; + } + + /** + * Get batchGroupName + * @return batchGroupName + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_BATCH_GROUP_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getBatchGroupName() { + return batchGroupName; + } + + + @JsonProperty(JSON_PROPERTY_BATCH_GROUP_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBatchGroupName(String batchGroupName) { + this.batchGroupName = batchGroupName; + } + + + public ProtocolUpdateStatusLatestCommit batchIndex(Long batchIndex) { + this.batchIndex = batchIndex; + return this; + } + + /** + * Get batchIndex + * @return batchIndex + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_BATCH_INDEX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getBatchIndex() { + return batchIndex; + } + + + @JsonProperty(JSON_PROPERTY_BATCH_INDEX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBatchIndex(Long batchIndex) { + this.batchIndex = batchIndex; + } + + + public ProtocolUpdateStatusLatestCommit batchName(String batchName) { + this.batchName = batchName; + return this; + } + + /** + * Get batchName + * @return batchName + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_BATCH_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getBatchName() { + return batchName; + } + + + @JsonProperty(JSON_PROPERTY_BATCH_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBatchName(String batchName) { + this.batchName = batchName; + } + + + /** + * Return true if this ProtocolUpdateStatusLatestCommit object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProtocolUpdateStatusLatestCommit protocolUpdateStatusLatestCommit = (ProtocolUpdateStatusLatestCommit) o; + return Objects.equals(this.batchGroupIndex, protocolUpdateStatusLatestCommit.batchGroupIndex) && + Objects.equals(this.batchGroupName, protocolUpdateStatusLatestCommit.batchGroupName) && + Objects.equals(this.batchIndex, protocolUpdateStatusLatestCommit.batchIndex) && + Objects.equals(this.batchName, protocolUpdateStatusLatestCommit.batchName); + } + + @Override + public int hashCode() { + return Objects.hash(batchGroupIndex, batchGroupName, batchIndex, batchName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProtocolUpdateStatusLatestCommit {\n"); + sb.append(" batchGroupIndex: ").append(toIndentedString(batchGroupIndex)).append("\n"); + sb.append(" batchGroupName: ").append(toIndentedString(batchGroupName)).append("\n"); + sb.append(" batchIndex: ").append(toIndentedString(batchIndex)).append("\n"); + sb.append(" batchName: ").append(toIndentedString(batchName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstate.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstate.java index 8de5ffd7c9..c9c7819603 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstate.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstate.java @@ -67,7 +67,9 @@ import com.radixdlt.api.core.generated.models.PackageCodeOriginalCodeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageCodeVmTypeEntrySubstate; import com.radixdlt.api.core.generated.models.PackageFieldRoyaltyAccumulatorSubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatus; import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstate; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatusModuleFieldSummarySubstateAllOf; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleFieldOwnerRoleSubstate; import com.radixdlt.api.core.generated.models.RoleAssignmentModuleRuleEntrySubstate; import com.radixdlt.api.core.generated.models.RoyaltyModuleFieldStateSubstate; @@ -91,6 +93,8 @@ * ProtocolUpdateStatusModuleFieldSummarySubstate */ @JsonPropertyOrder({ + ProtocolUpdateStatusModuleFieldSummarySubstate.JSON_PROPERTY_PROTOCOL_VERSION, + ProtocolUpdateStatusModuleFieldSummarySubstate.JSON_PROPERTY_UPDATE_STATUS }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @JsonIgnoreProperties( @@ -156,9 +160,67 @@ }) public class ProtocolUpdateStatusModuleFieldSummarySubstate extends Substate { + public static final String JSON_PROPERTY_PROTOCOL_VERSION = "protocol_version"; + private String protocolVersion; + + public static final String JSON_PROPERTY_UPDATE_STATUS = "update_status"; + private ProtocolUpdateStatus updateStatus; + public ProtocolUpdateStatusModuleFieldSummarySubstate() { } + public ProtocolUpdateStatusModuleFieldSummarySubstate protocolVersion(String protocolVersion) { + this.protocolVersion = protocolVersion; + return this; + } + + /** + * Get protocolVersion + * @return protocolVersion + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_PROTOCOL_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getProtocolVersion() { + return protocolVersion; + } + + + @JsonProperty(JSON_PROPERTY_PROTOCOL_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProtocolVersion(String protocolVersion) { + this.protocolVersion = protocolVersion; + } + + + public ProtocolUpdateStatusModuleFieldSummarySubstate updateStatus(ProtocolUpdateStatus updateStatus) { + this.updateStatus = updateStatus; + return this; + } + + /** + * Get updateStatus + * @return updateStatus + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_UPDATE_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ProtocolUpdateStatus getUpdateStatus() { + return updateStatus; + } + + + @JsonProperty(JSON_PROPERTY_UPDATE_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdateStatus(ProtocolUpdateStatus updateStatus) { + this.updateStatus = updateStatus; + } + + /** * Return true if this ProtocolUpdateStatusModuleFieldSummarySubstate object is equal to o. */ @@ -170,12 +232,15 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - return super.equals(o); + ProtocolUpdateStatusModuleFieldSummarySubstate protocolUpdateStatusModuleFieldSummarySubstate = (ProtocolUpdateStatusModuleFieldSummarySubstate) o; + return Objects.equals(this.protocolVersion, protocolUpdateStatusModuleFieldSummarySubstate.protocolVersion) && + Objects.equals(this.updateStatus, protocolUpdateStatusModuleFieldSummarySubstate.updateStatus) && + super.equals(o); } @Override public int hashCode() { - return Objects.hash(super.hashCode()); + return Objects.hash(protocolVersion, updateStatus, super.hashCode()); } @Override @@ -183,6 +248,8 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ProtocolUpdateStatusModuleFieldSummarySubstate {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" protocolVersion: ").append(toIndentedString(protocolVersion)).append("\n"); + sb.append(" updateStatus: ").append(toIndentedString(updateStatus)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstateAllOf.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstateAllOf.java new file mode 100644 index 0000000000..8dd622ec4b --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstateAllOf.java @@ -0,0 +1,144 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.ProtocolUpdateStatus; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ProtocolUpdateStatusModuleFieldSummarySubstateAllOf + */ +@JsonPropertyOrder({ + ProtocolUpdateStatusModuleFieldSummarySubstateAllOf.JSON_PROPERTY_PROTOCOL_VERSION, + ProtocolUpdateStatusModuleFieldSummarySubstateAllOf.JSON_PROPERTY_UPDATE_STATUS +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ProtocolUpdateStatusModuleFieldSummarySubstateAllOf { + public static final String JSON_PROPERTY_PROTOCOL_VERSION = "protocol_version"; + private String protocolVersion; + + public static final String JSON_PROPERTY_UPDATE_STATUS = "update_status"; + private ProtocolUpdateStatus updateStatus; + + public ProtocolUpdateStatusModuleFieldSummarySubstateAllOf() { + } + + public ProtocolUpdateStatusModuleFieldSummarySubstateAllOf protocolVersion(String protocolVersion) { + this.protocolVersion = protocolVersion; + return this; + } + + /** + * Get protocolVersion + * @return protocolVersion + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_PROTOCOL_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getProtocolVersion() { + return protocolVersion; + } + + + @JsonProperty(JSON_PROPERTY_PROTOCOL_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProtocolVersion(String protocolVersion) { + this.protocolVersion = protocolVersion; + } + + + public ProtocolUpdateStatusModuleFieldSummarySubstateAllOf updateStatus(ProtocolUpdateStatus updateStatus) { + this.updateStatus = updateStatus; + return this; + } + + /** + * Get updateStatus + * @return updateStatus + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_UPDATE_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ProtocolUpdateStatus getUpdateStatus() { + return updateStatus; + } + + + @JsonProperty(JSON_PROPERTY_UPDATE_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdateStatus(ProtocolUpdateStatus updateStatus) { + this.updateStatus = updateStatus; + } + + + /** + * Return true if this ProtocolUpdateStatusModuleFieldSummarySubstate_allOf object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProtocolUpdateStatusModuleFieldSummarySubstateAllOf protocolUpdateStatusModuleFieldSummarySubstateAllOf = (ProtocolUpdateStatusModuleFieldSummarySubstateAllOf) o; + return Objects.equals(this.protocolVersion, protocolUpdateStatusModuleFieldSummarySubstateAllOf.protocolVersion) && + Objects.equals(this.updateStatus, protocolUpdateStatusModuleFieldSummarySubstateAllOf.updateStatus); + } + + @Override + public int hashCode() { + return Objects.hash(protocolVersion, updateStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProtocolUpdateStatusModuleFieldSummarySubstateAllOf {\n"); + sb.append(" protocolVersion: ").append(toIndentedString(protocolVersion)).append("\n"); + sb.append(" updateStatus: ").append(toIndentedString(updateStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusType.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusType.java new file mode 100644 index 0000000000..0b3c5dfc30 --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ProtocolUpdateStatusType.java @@ -0,0 +1,61 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets ProtocolUpdateStatusType + */ +public enum ProtocolUpdateStatusType { + + INPROGRESS("InProgress"), + + COMPLETE("Complete"); + + private String value; + + ProtocolUpdateStatusType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ProtocolUpdateStatusType fromValue(String value) { + for (ProtocolUpdateStatusType b : ProtocolUpdateStatusType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/SubstateType.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/SubstateType.java index 2861c31ef3..e7f19fbbe3 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/SubstateType.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/SubstateType.java @@ -28,8 +28,16 @@ */ public enum SubstateType { + BOOTLOADERMODULEFIELDSYSTEMBOOT("BootLoaderModuleFieldSystemBoot"), + + BOOTLOADERMODULEFIELDKERNELBOOT("BootLoaderModuleFieldKernelBoot"), + BOOTLOADERMODULEFIELDVMBOOT("BootLoaderModuleFieldVmBoot"), + BOOTLOADERMODULEFIELDTRANSACTIONVALIDATIONCONFIGURATION("BootLoaderModuleFieldTransactionValidationConfiguration"), + + PROTOCOLUPDATESTATUSMODULEFIELDSUMMARY("ProtocolUpdateStatusModuleFieldSummary"), + TYPEINFOMODULEFIELDTYPEINFO("TypeInfoModuleFieldTypeInfo"), ROLEASSIGNMENTMODULEFIELDOWNERROLE("RoleAssignmentModuleFieldOwnerRole"), @@ -130,15 +138,7 @@ public enum SubstateType { TRANSACTIONTRACKERCOLLECTIONENTRY("TransactionTrackerCollectionEntry"), - ACCOUNTLOCKERACCOUNTCLAIMSENTRY("AccountLockerAccountClaimsEntry"), - - BOOTLOADERMODULEFIELDSYSTEMBOOT("BootLoaderModuleFieldSystemBoot"), - - BOOTLOADERMODULEFIELDKERNELBOOT("BootLoaderModuleFieldKernelBoot"), - - BOOTLOADERMODULEFIELDTRANSACTIONVALIDATIONCONFIGURATION("BootLoaderModuleFieldTransactionValidationConfiguration"), - - PROTOCOLUPDATESTATUSMODULEFIELDSUMMARY("ProtocolUpdateStatusModuleFieldSummary"); + ACCOUNTLOCKERACCOUNTCLAIMSENTRY("AccountLockerAccountClaimsEntry"); private String value; diff --git a/core/src/test/java/com/radixdlt/rev2/protocol/AnemoneProtocolUpdateTest.java b/core/src/test/java/com/radixdlt/rev2/protocol/AnemoneProtocolUpdateTest.java index abc493d622..c3b6f7e6c5 100644 --- a/core/src/test/java/com/radixdlt/rev2/protocol/AnemoneProtocolUpdateTest.java +++ b/core/src/test/java/com/radixdlt/rev2/protocol/AnemoneProtocolUpdateTest.java @@ -196,7 +196,7 @@ public void test_get_current_time_second_precision() { @Test public void core_api_streams_anemone_flash_transactions() throws Exception { - final var coreApiHelper = new ProtocolUpdateTestUtils.CoreApiHelper(); + final var coreApiHelper = new ProtocolUpdateTestUtils.CoreApiHelper(Network.INTEGRATIONTESTNET); try (var test = createTest(coreApiHelper.module())) { // Start a single node network and run until protocol update: test.startAllNodes(); diff --git a/core/src/test/java/com/radixdlt/rev2/protocol/BottlenoseProtocolUpdateTest.java b/core/src/test/java/com/radixdlt/rev2/protocol/BottlenoseProtocolUpdateTest.java index e3b8e5c7c2..190a42f6b4 100644 --- a/core/src/test/java/com/radixdlt/rev2/protocol/BottlenoseProtocolUpdateTest.java +++ b/core/src/test/java/com/radixdlt/rev2/protocol/BottlenoseProtocolUpdateTest.java @@ -148,7 +148,7 @@ public void example_bottlenose_feature_is_available_only_after_update() throws A .type(TargetIdentifierType.FUNCTION)) .addArgumentsItem("4d0101"); // hex-encoded SBOR `true` (for `allow_recover` parameter) - final var coreApiHelper = new ProtocolUpdateTestUtils.CoreApiHelper(); + final var coreApiHelper = new ProtocolUpdateTestUtils.CoreApiHelper(Network.INTEGRATIONTESTNET); try (var test = createTest(coreApiHelper.module())) { // Arrange: Start a single node network, reach state just before Bottlenose: test.startAllNodes(); @@ -184,7 +184,7 @@ public void example_bottlenose_feature_is_available_only_after_update() throws A @Test public void core_api_streams_bottlenose_flash_transactions() throws Exception { - final var coreApiHelper = new ProtocolUpdateTestUtils.CoreApiHelper(); + final var coreApiHelper = new ProtocolUpdateTestUtils.CoreApiHelper(Network.INTEGRATIONTESTNET); try (var test = createTest(coreApiHelper.module())) { // Arrange: Start a single Node network and capture the state version right before Bottlenose: test.startAllNodes(); diff --git a/core/src/test/java/com/radixdlt/rev2/protocol/CuttlefishProtocolUpdateTest.java b/core/src/test/java/com/radixdlt/rev2/protocol/CuttlefishProtocolUpdateTest.java new file mode 100644 index 0000000000..a9c337aa5a --- /dev/null +++ b/core/src/test/java/com/radixdlt/rev2/protocol/CuttlefishProtocolUpdateTest.java @@ -0,0 +1,210 @@ +/* Copyright 2021 Radix Publishing Ltd incorporated in Jersey (Channel Islands). + * + * Licensed under the Radix License, Version 1.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at: + * + * radixfoundation.org/licenses/LICENSE-v1 + * + * The Licensor hereby grants permission for the Canonical version of the Work to be + * published, distributed and used under or by reference to the Licensor’s trademark + * Radix ® and use of any unregistered trade names, logos or get-up. + * + * The Licensor provides the Work (and each Contributor provides its Contributions) on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, + * including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, + * MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. + * + * Whilst the Work is capable of being deployed, used and adopted (instantiated) to create + * a distributed ledger it is your responsibility to test and validate the code, together + * with all logic and performance of that code under all foreseeable scenarios. + * + * The Licensor does not make or purport to make and hereby excludes liability for all + * and any representation, warranty or undertaking in any form whatsoever, whether express + * or implied, to any entity or person, including any representation, warranty or + * undertaking, as to the functionality security use, value or other characteristics of + * any distributed ledger nor in respect the functioning or value of any tokens which may + * be created stored or transferred using the Work. The Licensor does not warrant that the + * Work or any use of the Work complies with any law or regulation in any territory where + * it may be implemented or used or that it will be appropriate for any specific purpose. + * + * Neither the licensor nor any current or former employees, officers, directors, partners, + * trustees, representatives, agents, advisors, contractors, or volunteers of the Licensor + * shall be liable for any direct or indirect, special, incidental, consequential or other + * losses of any kind, in tort, contract or otherwise (including but not limited to loss + * of revenue, income or profits, or loss of use or data, or loss of reputation, or loss + * of any economic or other opportunity of whatsoever nature or howsoever arising), arising + * out of or in connection with (without limitation of any use, misuse, of any ledger system + * or use made or its functionality or any performance or operation of any code or protocol + * caused by bugs or programming or logic errors or otherwise); + * + * A. any offer, purchase, holding, use, sale, exchange or transmission of any + * cryptographic keys, tokens or assets created, exchanged, stored or arising from any + * interaction with the Work; + * + * B. any failure in a transmission or loss of any token or assets keys or other digital + * artefacts due to errors in transmission; + * + * C. bugs, hacks, logic errors or faults in the Work or any communication; + * + * D. system software or apparatus including but not limited to losses caused by errors + * in holding or transmitting tokens by any third-party; + * + * E. breaches or failure of security including hacker attacks, loss or disclosure of + * password, loss of private key, unauthorised use or misuse of such passwords or keys; + * + * F. any losses including loss of anticipated savings or other benefits resulting from + * use of the Work or any changes to the Work (however implemented). + * + * You are solely responsible for; testing, validating and evaluation of all operation + * logic, functionality, security and appropriateness of using the Work for any commercial + * or non-commercial purpose and for any reproduction or redistribution by You of the + * Work. You assume all risks associated with Your use of the Work and the exercise of + * permissions under this License. + */ + +package com.radixdlt.rev2.protocol; + +import static com.radixdlt.environment.deterministic.network.MessageSelector.firstSelector; +import static com.radixdlt.harness.predicates.NodesPredicate.*; +import static org.junit.Assert.*; + +import com.google.inject.Module; +import com.radixdlt.api.core.generated.client.ApiException; +import com.radixdlt.api.core.generated.models.*; +import com.radixdlt.environment.deterministic.network.MessageMutator; +import com.radixdlt.genesis.GenesisBuilder; +import com.radixdlt.genesis.GenesisConsensusManagerConfig; +import com.radixdlt.harness.deterministic.DeterministicTest; +import com.radixdlt.harness.deterministic.PhysicalNodeConfig; +import com.radixdlt.modules.FunctionalRadixNodeModule; +import com.radixdlt.modules.StateComputerConfig; +import com.radixdlt.networks.Network; +import com.radixdlt.protocol.ProtocolConfig; +import com.radixdlt.rev2.*; +import com.radixdlt.statecomputer.RustStateComputer; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; + +public final class CuttlefishProtocolUpdateTest { + private static final long ENACTMENT_EPOCH = 8; + private static final ProtocolConfig IMMEDIATELY_CUTTLEFISH = + ProtocolConfig.launchAt(ProtocolConfig.CUTTLEFISH_PROTOCOL_VERSION_NAME); + private static final ProtocolConfig CUTTLEFISH_AT_EPOCH = + ProtocolConfig.enactAtEpoch(ProtocolConfig.CUTTLEFISH_PROTOCOL_VERSION_NAME, ENACTMENT_EPOCH); + + @Rule public TemporaryFolder folder = new TemporaryFolder(); + + private DeterministicTest createTest(ProtocolConfig protocolConfig, Module... extraModules) { + var genesis = + GenesisBuilder.createTestGenesisWithNumValidators( + 1, Decimal.ONE, GenesisConsensusManagerConfig.Builder.testWithRoundsPerEpoch(5)); + var test = + DeterministicTest.builder() + .addPhysicalNodes(PhysicalNodeConfig.createBatch(1, true)) + .messageSelector(firstSelector()) + .messageMutator(MessageMutator.dropTimeouts()) + .addModules(extraModules) + .functionalNodeModule( + new FunctionalRadixNodeModule( + FunctionalRadixNodeModule.NodeStorageConfig.tempFolder(folder), + true, + FunctionalRadixNodeModule.SafetyRecoveryConfig.REAL, + FunctionalRadixNodeModule.ConsensusConfig.of(1000), + FunctionalRadixNodeModule.LedgerConfig.stateComputerNoSync( + StateComputerConfig.rev2() + .withGenesis(genesis) + .withProtocolConfig(protocolConfig)))); + test.startAllNodes(); + return test; + } + + @Test + public void transaction_v2_behaviour_across_cuttlefish() throws ApiException { + final var coreApiHelper = new ProtocolUpdateTestUtils.CoreApiHelper(Network.INTEGRATIONTESTNET); + try (var test = createTest(CUTTLEFISH_AT_EPOCH, coreApiHelper.module())) { + final var stateComputer = test.getInstance(0, RustStateComputer.class); + test.runUntilState(allAtOrOverEpoch(ENACTMENT_EPOCH - 1)); + + assertEquals( + ProtocolConfig.BOTTLENOSE_PROTOCOL_VERSION_NAME, + stateComputer.protocolState().currentProtocolVersion()); + assertEquals( + ProtocolConfig.BOTTLENOSE_PROTOCOL_VERSION_NAME, + coreApiHelper.getNetworkStatus().getCurrentProtocolVersion()); + + // Act: Attempt to submit a TransactionV2 against bottlenose + // ===> It rejects permanently (for now)... or at least as far as bottlenose is concerned + // ===> But the status is NOTSEEN because it didn't actually get through preparation, so we + // don't have + // a hash to assign against it even, and so can't record it in our cache + var transactionA = TransactionV2Builder.forTests().prepare(); + try { + coreApiHelper.submit(transactionA); + } catch (Exception ignored) { + } + assertEquals( + TransactionIntentStatus.NOTSEEN, coreApiHelper.getStatus(transactionA).getIntentStatus()); + + // Arrange: Run the protocol update: + test.runUntilState(allAtOrOverEpoch(ENACTMENT_EPOCH)); + assertEquals( + ProtocolConfig.CUTTLEFISH_PROTOCOL_VERSION_NAME, + stateComputer.protocolState().currentProtocolVersion()); + assertEquals( + ProtocolConfig.CUTTLEFISH_PROTOCOL_VERSION_NAME, + coreApiHelper.getNetworkStatus().getCurrentProtocolVersion()); + + // Act: Can now submit a new TransactionV2 + var transactionB = TransactionV2Builder.forTests().prepare(); + + coreApiHelper.submit(transactionB); + + assertEquals( + TransactionIntentStatus.INMEMPOOL, + coreApiHelper.getStatus(transactionB).getIntentStatus()); + test.runUntilState(allCommittedTransactionSuccess(transactionB.raw()), 1000); + assertEquals( + TransactionIntentStatus.COMMITTEDSUCCESS, + coreApiHelper.getStatus(transactionB).getIntentStatus()); + + // ... and for what it's worth, we can now resubmit the first transaction + // (it never even got to the pending transaction result cache) + assertEquals( + TransactionIntentStatus.NOTSEEN, coreApiHelper.getStatus(transactionA).getIntentStatus()); + coreApiHelper.submit(transactionA); + assertEquals( + TransactionIntentStatus.INMEMPOOL, + coreApiHelper.getStatus(transactionA).getIntentStatus()); + test.runUntilState(allCommittedTransactionSuccess(transactionA.raw()), 1000); + assertEquals( + TransactionIntentStatus.COMMITTEDSUCCESS, + coreApiHelper.getStatus(transactionA).getIntentStatus()); + } + } + + @Test + public void tracking_behaviour_across_cuttlefish() throws ApiException { + final var coreApiHelper = new ProtocolUpdateTestUtils.CoreApiHelper(Network.INTEGRATIONTESTNET); + try (var ignored = createTest(IMMEDIATELY_CUTTLEFISH, coreApiHelper.module())) { + var latestStateVersion = + coreApiHelper.getNetworkStatus().getCurrentStateIdentifier().getStateVersion(); + var lastTransaction = coreApiHelper.getTransactionFromStream(latestStateVersion); + var stateUpdates = lastTransaction.getReceipt().getStateUpdates(); + var latestStatus = + (ProtocolUpdateStatusModuleFieldSummarySubstate) + stateUpdates.getUpdatedSubstates().stream() + .filter( + updated -> + updated.getSubstateId().getEntityModule() + == EntityModule.PROTOCOLUPDATESTATUS) + .findFirst() + .get() + .getNewValue() + .getSubstateData(); + assertEquals( + ProtocolConfig.CUTTLEFISH_PROTOCOL_VERSION_NAME, latestStatus.getProtocolVersion()); + assertEquals(ProtocolUpdateStatusType.COMPLETE, latestStatus.getUpdateStatus().getType()); + } + } +} diff --git a/core/src/test/java/com/radixdlt/rev2/protocol/ProtocolUpdateTestUtils.java b/core/src/test/java/com/radixdlt/rev2/protocol/ProtocolUpdateTestUtils.java index fc3751ba4b..1f8d191ef6 100644 --- a/core/src/test/java/com/radixdlt/rev2/protocol/ProtocolUpdateTestUtils.java +++ b/core/src/test/java/com/radixdlt/rev2/protocol/ProtocolUpdateTestUtils.java @@ -75,13 +75,15 @@ import com.google.inject.Module; import com.google.inject.TypeLiteral; import com.google.inject.multibindings.ProvidesIntoSet; +import com.radixdlt.addressing.Addressing; import com.radixdlt.api.CoreApiServer; import com.radixdlt.api.CoreApiServerModule; +import com.radixdlt.api.core.generated.api.StatusApi; +import com.radixdlt.api.core.generated.api.StreamApi; +import com.radixdlt.api.core.generated.api.TransactionApi; import com.radixdlt.api.core.generated.client.ApiClient; -import com.radixdlt.api.core.generated.models.CommittedTransaction; -import com.radixdlt.api.core.generated.models.DeletedSubstate; -import com.radixdlt.api.core.generated.models.FlashLedgerTransaction; -import com.radixdlt.api.core.generated.models.FlashSetSubstate; +import com.radixdlt.api.core.generated.client.ApiException; +import com.radixdlt.api.core.generated.models.*; import com.radixdlt.consensus.BFTConfiguration; import com.radixdlt.environment.CoreApiServerFlags; import com.radixdlt.environment.EventDispatcher; @@ -90,6 +92,7 @@ import com.radixdlt.identifiers.Address; import com.radixdlt.lang.Option; import com.radixdlt.mempool.MempoolAdd; +import com.radixdlt.networks.Network; import com.radixdlt.rev2.Decimal; import com.radixdlt.rev2.Manifest; import com.radixdlt.rev2.TransactionBuilder; @@ -97,6 +100,7 @@ import com.radixdlt.statecomputer.commit.NextEpoch; import com.radixdlt.sync.TransactionsAndProofReader; import com.radixdlt.transaction.REv2TransactionAndProofStore; +import com.radixdlt.transactions.PreparedNotarizedTransaction; import com.radixdlt.utils.FreePortFinder; import com.radixdlt.utils.PrivateKeys; import java.util.List; @@ -253,9 +257,13 @@ public static void verifyFlashTransactionReceipts( public static class CoreApiHelper { private final int coreApiPort; + private final Network network; + private final Addressing addressing; - public CoreApiHelper() { + public CoreApiHelper(Network network) { this.coreApiPort = FreePortFinder.findFreeLocalPort(); + this.addressing = Addressing.ofNetwork(network); + this.network = network; } public Module module() { @@ -279,5 +287,61 @@ public ApiClient client() { apiClient.updateBaseUri("http://127.0.0.1:" + coreApiPort + "/core"); return apiClient; } + + public TransactionApi transactionApi() { + return new TransactionApi(client()); + } + + public StreamApi streamApi() { + return new StreamApi(client()); + } + + public StatusApi statusApi() { + return new StatusApi(client()); + } + + public TransactionSubmitResponse submit(PreparedNotarizedTransaction transaction) + throws ApiException { + return transactionApi() + .transactionSubmitPost( + new TransactionSubmitRequest() + .network(network.getLogicalName()) + .notarizedTransactionHex(transaction.hexPayloadBytes())); + } + + public TransactionSubmitResponse forceRecalculateSubmit( + PreparedNotarizedTransaction transaction) throws ApiException { + return transactionApi() + .transactionSubmitPost( + new TransactionSubmitRequest() + .network(network.getLogicalName()) + .forceRecalculate(true) + .notarizedTransactionHex(transaction.hexPayloadBytes())); + } + + public TransactionStatusResponse getStatus(PreparedNotarizedTransaction transaction) + throws ApiException { + return transactionApi() + .transactionStatusPost( + new TransactionStatusRequest() + .network(network.getLogicalName()) + .intentHash(addressing.encode(transaction.transactionIntentHash()))); + } + + public NetworkStatusResponse getNetworkStatus() throws ApiException { + return statusApi() + .statusNetworkStatusPost(new NetworkStatusRequest().network(network.getLogicalName())); + } + + public CommittedTransaction getTransactionFromStream(long stateVersion) throws ApiException { + return streamApi() + .streamTransactionsPost( + new StreamTransactionsRequest() + .network(network.getLogicalName()) + .fromStateVersion(stateVersion) + .limit(1)) + .getTransactions() + .get(0); + } } } diff --git a/sdk/typescript/lib/generated/.openapi-generator/FILES b/sdk/typescript/lib/generated/.openapi-generator/FILES index 9cec5b722f..658c697c9f 100644 --- a/sdk/typescript/lib/generated/.openapi-generator/FILES +++ b/sdk/typescript/lib/generated/.openapi-generator/FILES @@ -98,6 +98,8 @@ models/CommittedStateIdentifier.ts models/CommittedStateIdentifierAllOf.ts models/CommittedTransaction.ts models/CommittedTransactionBalanceChanges.ts +models/CompleteProtocolUpdateStatus.ts +models/CompleteProtocolUpdateStatusAllOf.ts models/ComponentMethodTargetIdentifier.ts models/ComponentMethodTargetIdentifierAllOf.ts models/ConsensusLedgerProofOrigin.ts @@ -226,6 +228,8 @@ models/GenesisLedgerProofOriginAllOf.ts models/GenesisLedgerTransaction.ts models/GenesisLedgerTransactionAllOf.ts models/HookExport.ts +models/InProgressProtocolUpdateStatus.ts +models/InProgressProtocolUpdateStatusAllOf.ts models/IndexBlueprintCollectionSchema.ts models/IndexBlueprintCollectionSchemaAllOf.ts models/IndexedStateSchema.ts @@ -467,8 +471,12 @@ models/ProtectedAccessRule.ts models/ProtectedAccessRuleAllOf.ts models/ProtocolUpdateLedgerProofOrigin.ts models/ProtocolUpdateLedgerProofOriginAllOf.ts +models/ProtocolUpdateStatus.ts +models/ProtocolUpdateStatusBase.ts +models/ProtocolUpdateStatusLatestCommit.ts models/ProtocolUpdateStatusModuleFieldSummarySubstate.ts models/ProtocolUpdateStatusModuleFieldSummarySubstateAllOf.ts +models/ProtocolUpdateStatusType.ts models/ProtocolVersionReadiness.ts models/PublicKey.ts models/PublicKeyBase.ts diff --git a/sdk/typescript/lib/generated/models/CompleteProtocolUpdateStatus.ts b/sdk/typescript/lib/generated/models/CompleteProtocolUpdateStatus.ts new file mode 100644 index 0000000000..39ccb38d46 --- /dev/null +++ b/sdk/typescript/lib/generated/models/CompleteProtocolUpdateStatus.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CompleteProtocolUpdateStatus + */ +export interface CompleteProtocolUpdateStatus { + /** + * + * @type {string} + * @memberof CompleteProtocolUpdateStatus + */ + type: CompleteProtocolUpdateStatusTypeEnum; +} + + +/** + * @export + */ +export const CompleteProtocolUpdateStatusTypeEnum = { + Complete: 'Complete' +} as const; +export type CompleteProtocolUpdateStatusTypeEnum = typeof CompleteProtocolUpdateStatusTypeEnum[keyof typeof CompleteProtocolUpdateStatusTypeEnum]; + + +/** + * Check if a given object implements the CompleteProtocolUpdateStatus interface. + */ +export function instanceOfCompleteProtocolUpdateStatus(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "type" in value; + + return isInstance; +} + +export function CompleteProtocolUpdateStatusFromJSON(json: any): CompleteProtocolUpdateStatus { + return CompleteProtocolUpdateStatusFromJSONTyped(json, false); +} + +export function CompleteProtocolUpdateStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompleteProtocolUpdateStatus { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + }; +} + +export function CompleteProtocolUpdateStatusToJSON(value?: CompleteProtocolUpdateStatus | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + }; +} + diff --git a/sdk/typescript/lib/generated/models/CompleteProtocolUpdateStatusAllOf.ts b/sdk/typescript/lib/generated/models/CompleteProtocolUpdateStatusAllOf.ts new file mode 100644 index 0000000000..43878a3bd5 --- /dev/null +++ b/sdk/typescript/lib/generated/models/CompleteProtocolUpdateStatusAllOf.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CompleteProtocolUpdateStatusAllOf + */ +export interface CompleteProtocolUpdateStatusAllOf { + /** + * + * @type {string} + * @memberof CompleteProtocolUpdateStatusAllOf + */ + type?: CompleteProtocolUpdateStatusAllOfTypeEnum; +} + + +/** + * @export + */ +export const CompleteProtocolUpdateStatusAllOfTypeEnum = { + Complete: 'Complete' +} as const; +export type CompleteProtocolUpdateStatusAllOfTypeEnum = typeof CompleteProtocolUpdateStatusAllOfTypeEnum[keyof typeof CompleteProtocolUpdateStatusAllOfTypeEnum]; + + +/** + * Check if a given object implements the CompleteProtocolUpdateStatusAllOf interface. + */ +export function instanceOfCompleteProtocolUpdateStatusAllOf(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function CompleteProtocolUpdateStatusAllOfFromJSON(json: any): CompleteProtocolUpdateStatusAllOf { + return CompleteProtocolUpdateStatusAllOfFromJSONTyped(json, false); +} + +export function CompleteProtocolUpdateStatusAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompleteProtocolUpdateStatusAllOf { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': !exists(json, 'type') ? undefined : json['type'], + }; +} + +export function CompleteProtocolUpdateStatusAllOfToJSON(value?: CompleteProtocolUpdateStatusAllOf | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + }; +} + diff --git a/sdk/typescript/lib/generated/models/InProgressProtocolUpdateStatus.ts b/sdk/typescript/lib/generated/models/InProgressProtocolUpdateStatus.ts new file mode 100644 index 0000000000..1ea7a0001e --- /dev/null +++ b/sdk/typescript/lib/generated/models/InProgressProtocolUpdateStatus.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ProtocolUpdateStatusLatestCommit } from './ProtocolUpdateStatusLatestCommit'; +import { + ProtocolUpdateStatusLatestCommitFromJSON, + ProtocolUpdateStatusLatestCommitFromJSONTyped, + ProtocolUpdateStatusLatestCommitToJSON, +} from './ProtocolUpdateStatusLatestCommit'; + +/** + * + * @export + * @interface InProgressProtocolUpdateStatus + */ +export interface InProgressProtocolUpdateStatus { + /** + * + * @type {string} + * @memberof InProgressProtocolUpdateStatus + */ + type: InProgressProtocolUpdateStatusTypeEnum; + /** + * + * @type {ProtocolUpdateStatusLatestCommit} + * @memberof InProgressProtocolUpdateStatus + */ + latest_commit: ProtocolUpdateStatusLatestCommit; +} + + +/** + * @export + */ +export const InProgressProtocolUpdateStatusTypeEnum = { + InProgress: 'InProgress' +} as const; +export type InProgressProtocolUpdateStatusTypeEnum = typeof InProgressProtocolUpdateStatusTypeEnum[keyof typeof InProgressProtocolUpdateStatusTypeEnum]; + + +/** + * Check if a given object implements the InProgressProtocolUpdateStatus interface. + */ +export function instanceOfInProgressProtocolUpdateStatus(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "type" in value; + isInstance = isInstance && "latest_commit" in value; + + return isInstance; +} + +export function InProgressProtocolUpdateStatusFromJSON(json: any): InProgressProtocolUpdateStatus { + return InProgressProtocolUpdateStatusFromJSONTyped(json, false); +} + +export function InProgressProtocolUpdateStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): InProgressProtocolUpdateStatus { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'latest_commit': ProtocolUpdateStatusLatestCommitFromJSON(json['latest_commit']), + }; +} + +export function InProgressProtocolUpdateStatusToJSON(value?: InProgressProtocolUpdateStatus | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'latest_commit': ProtocolUpdateStatusLatestCommitToJSON(value.latest_commit), + }; +} + diff --git a/sdk/typescript/lib/generated/models/InProgressProtocolUpdateStatusAllOf.ts b/sdk/typescript/lib/generated/models/InProgressProtocolUpdateStatusAllOf.ts new file mode 100644 index 0000000000..9f69bf8701 --- /dev/null +++ b/sdk/typescript/lib/generated/models/InProgressProtocolUpdateStatusAllOf.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ProtocolUpdateStatusLatestCommit } from './ProtocolUpdateStatusLatestCommit'; +import { + ProtocolUpdateStatusLatestCommitFromJSON, + ProtocolUpdateStatusLatestCommitFromJSONTyped, + ProtocolUpdateStatusLatestCommitToJSON, +} from './ProtocolUpdateStatusLatestCommit'; + +/** + * + * @export + * @interface InProgressProtocolUpdateStatusAllOf + */ +export interface InProgressProtocolUpdateStatusAllOf { + /** + * + * @type {ProtocolUpdateStatusLatestCommit} + * @memberof InProgressProtocolUpdateStatusAllOf + */ + latest_commit: ProtocolUpdateStatusLatestCommit; + /** + * + * @type {string} + * @memberof InProgressProtocolUpdateStatusAllOf + */ + type?: InProgressProtocolUpdateStatusAllOfTypeEnum; +} + + +/** + * @export + */ +export const InProgressProtocolUpdateStatusAllOfTypeEnum = { + InProgress: 'InProgress' +} as const; +export type InProgressProtocolUpdateStatusAllOfTypeEnum = typeof InProgressProtocolUpdateStatusAllOfTypeEnum[keyof typeof InProgressProtocolUpdateStatusAllOfTypeEnum]; + + +/** + * Check if a given object implements the InProgressProtocolUpdateStatusAllOf interface. + */ +export function instanceOfInProgressProtocolUpdateStatusAllOf(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "latest_commit" in value; + + return isInstance; +} + +export function InProgressProtocolUpdateStatusAllOfFromJSON(json: any): InProgressProtocolUpdateStatusAllOf { + return InProgressProtocolUpdateStatusAllOfFromJSONTyped(json, false); +} + +export function InProgressProtocolUpdateStatusAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): InProgressProtocolUpdateStatusAllOf { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'latest_commit': ProtocolUpdateStatusLatestCommitFromJSON(json['latest_commit']), + 'type': !exists(json, 'type') ? undefined : json['type'], + }; +} + +export function InProgressProtocolUpdateStatusAllOfToJSON(value?: InProgressProtocolUpdateStatusAllOf | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'latest_commit': ProtocolUpdateStatusLatestCommitToJSON(value.latest_commit), + 'type': value.type, + }; +} + diff --git a/sdk/typescript/lib/generated/models/LedgerTransactionType.ts b/sdk/typescript/lib/generated/models/LedgerTransactionType.ts index fe29873a0c..6ed1ea95f1 100644 --- a/sdk/typescript/lib/generated/models/LedgerTransactionType.ts +++ b/sdk/typescript/lib/generated/models/LedgerTransactionType.ts @@ -20,6 +20,7 @@ export const LedgerTransactionType = { Genesis: 'Genesis', User: 'User', + UserV2: 'UserV2', RoundUpdate: 'RoundUpdate', Flash: 'Flash' } as const; diff --git a/sdk/typescript/lib/generated/models/ParsedTransactionType.ts b/sdk/typescript/lib/generated/models/ParsedTransactionType.ts index 58c0fbed51..dc2259dafd 100644 --- a/sdk/typescript/lib/generated/models/ParsedTransactionType.ts +++ b/sdk/typescript/lib/generated/models/ParsedTransactionType.ts @@ -19,10 +19,10 @@ */ export const ParsedTransactionType = { NotarizedTransaction: 'NotarizedTransaction', + NotarizedTransactionV2: 'NotarizedTransactionV2', SignedTransactionIntent: 'SignedTransactionIntent', TransactionIntent: 'TransactionIntent', - LedgerTransaction: 'LedgerTransaction', - NotarizedTransactionV2: 'NotarizedTransactionV2' + LedgerTransaction: 'LedgerTransaction' } as const; export type ParsedTransactionType = typeof ParsedTransactionType[keyof typeof ParsedTransactionType]; diff --git a/sdk/typescript/lib/generated/models/ProtocolUpdateStatus.ts b/sdk/typescript/lib/generated/models/ProtocolUpdateStatus.ts new file mode 100644 index 0000000000..000616244e --- /dev/null +++ b/sdk/typescript/lib/generated/models/ProtocolUpdateStatus.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { + CompleteProtocolUpdateStatus, + instanceOfCompleteProtocolUpdateStatus, + CompleteProtocolUpdateStatusFromJSON, + CompleteProtocolUpdateStatusFromJSONTyped, + CompleteProtocolUpdateStatusToJSON, +} from './CompleteProtocolUpdateStatus'; +import { + InProgressProtocolUpdateStatus, + instanceOfInProgressProtocolUpdateStatus, + InProgressProtocolUpdateStatusFromJSON, + InProgressProtocolUpdateStatusFromJSONTyped, + InProgressProtocolUpdateStatusToJSON, +} from './InProgressProtocolUpdateStatus'; + +/** + * @type ProtocolUpdateStatus + * + * @export + */ +export type ProtocolUpdateStatus = { type: 'Complete' } & CompleteProtocolUpdateStatus | { type: 'InProgress' } & InProgressProtocolUpdateStatus; + +export function ProtocolUpdateStatusFromJSON(json: any): ProtocolUpdateStatus { + return ProtocolUpdateStatusFromJSONTyped(json, false); +} + +export function ProtocolUpdateStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProtocolUpdateStatus { + if ((json === undefined) || (json === null)) { + return json; + } + switch (json['type']) { + case 'Complete': + return {...CompleteProtocolUpdateStatusFromJSONTyped(json, true), type: 'Complete'}; + case 'InProgress': + return {...InProgressProtocolUpdateStatusFromJSONTyped(json, true), type: 'InProgress'}; + default: + throw new Error(`No variant of ProtocolUpdateStatus exists with 'type=${json['type']}'`); + } +} + +export function ProtocolUpdateStatusToJSON(value?: ProtocolUpdateStatus | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + switch (value['type']) { + case 'Complete': + return CompleteProtocolUpdateStatusToJSON(value); + case 'InProgress': + return InProgressProtocolUpdateStatusToJSON(value); + default: + throw new Error(`No variant of ProtocolUpdateStatus exists with 'type=${value['type']}'`); + } + +} + diff --git a/sdk/typescript/lib/generated/models/ProtocolUpdateStatusBase.ts b/sdk/typescript/lib/generated/models/ProtocolUpdateStatusBase.ts new file mode 100644 index 0000000000..a09ca89335 --- /dev/null +++ b/sdk/typescript/lib/generated/models/ProtocolUpdateStatusBase.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ProtocolUpdateStatusType } from './ProtocolUpdateStatusType'; +import { + ProtocolUpdateStatusTypeFromJSON, + ProtocolUpdateStatusTypeFromJSONTyped, + ProtocolUpdateStatusTypeToJSON, +} from './ProtocolUpdateStatusType'; + +/** + * + * @export + * @interface ProtocolUpdateStatusBase + */ +export interface ProtocolUpdateStatusBase { + /** + * + * @type {ProtocolUpdateStatusType} + * @memberof ProtocolUpdateStatusBase + */ + type: ProtocolUpdateStatusType; +} + +/** + * Check if a given object implements the ProtocolUpdateStatusBase interface. + */ +export function instanceOfProtocolUpdateStatusBase(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "type" in value; + + return isInstance; +} + +export function ProtocolUpdateStatusBaseFromJSON(json: any): ProtocolUpdateStatusBase { + return ProtocolUpdateStatusBaseFromJSONTyped(json, false); +} + +export function ProtocolUpdateStatusBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProtocolUpdateStatusBase { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': ProtocolUpdateStatusTypeFromJSON(json['type']), + }; +} + +export function ProtocolUpdateStatusBaseToJSON(value?: ProtocolUpdateStatusBase | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': ProtocolUpdateStatusTypeToJSON(value.type), + }; +} + diff --git a/sdk/typescript/lib/generated/models/ProtocolUpdateStatusLatestCommit.ts b/sdk/typescript/lib/generated/models/ProtocolUpdateStatusLatestCommit.ts new file mode 100644 index 0000000000..3a0555648f --- /dev/null +++ b/sdk/typescript/lib/generated/models/ProtocolUpdateStatusLatestCommit.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface ProtocolUpdateStatusLatestCommit + */ +export interface ProtocolUpdateStatusLatestCommit { + /** + * + * @type {number} + * @memberof ProtocolUpdateStatusLatestCommit + */ + batch_group_index: number; + /** + * + * @type {string} + * @memberof ProtocolUpdateStatusLatestCommit + */ + batch_group_name: string; + /** + * + * @type {number} + * @memberof ProtocolUpdateStatusLatestCommit + */ + batch_index: number; + /** + * + * @type {string} + * @memberof ProtocolUpdateStatusLatestCommit + */ + batch_name: string; +} + +/** + * Check if a given object implements the ProtocolUpdateStatusLatestCommit interface. + */ +export function instanceOfProtocolUpdateStatusLatestCommit(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "batch_group_index" in value; + isInstance = isInstance && "batch_group_name" in value; + isInstance = isInstance && "batch_index" in value; + isInstance = isInstance && "batch_name" in value; + + return isInstance; +} + +export function ProtocolUpdateStatusLatestCommitFromJSON(json: any): ProtocolUpdateStatusLatestCommit { + return ProtocolUpdateStatusLatestCommitFromJSONTyped(json, false); +} + +export function ProtocolUpdateStatusLatestCommitFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProtocolUpdateStatusLatestCommit { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'batch_group_index': json['batch_group_index'], + 'batch_group_name': json['batch_group_name'], + 'batch_index': json['batch_index'], + 'batch_name': json['batch_name'], + }; +} + +export function ProtocolUpdateStatusLatestCommitToJSON(value?: ProtocolUpdateStatusLatestCommit | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'batch_group_index': value.batch_group_index, + 'batch_group_name': value.batch_group_name, + 'batch_index': value.batch_index, + 'batch_name': value.batch_name, + }; +} + diff --git a/sdk/typescript/lib/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstate.ts b/sdk/typescript/lib/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstate.ts index 2738ad7596..202d8bf972 100644 --- a/sdk/typescript/lib/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstate.ts +++ b/sdk/typescript/lib/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstate.ts @@ -13,6 +13,13 @@ */ import { exists, mapValues } from '../runtime'; +import type { ProtocolUpdateStatus } from './ProtocolUpdateStatus'; +import { + ProtocolUpdateStatusFromJSON, + ProtocolUpdateStatusFromJSONTyped, + ProtocolUpdateStatusToJSON, +} from './ProtocolUpdateStatus'; + /** * * @export @@ -31,6 +38,18 @@ export interface ProtocolUpdateStatusModuleFieldSummarySubstate { * @memberof ProtocolUpdateStatusModuleFieldSummarySubstate */ is_locked: boolean; + /** + * + * @type {string} + * @memberof ProtocolUpdateStatusModuleFieldSummarySubstate + */ + protocol_version: string; + /** + * + * @type {ProtocolUpdateStatus} + * @memberof ProtocolUpdateStatusModuleFieldSummarySubstate + */ + update_status: ProtocolUpdateStatus; } @@ -50,6 +69,8 @@ export function instanceOfProtocolUpdateStatusModuleFieldSummarySubstate(value: let isInstance = true; isInstance = isInstance && "substate_type" in value; isInstance = isInstance && "is_locked" in value; + isInstance = isInstance && "protocol_version" in value; + isInstance = isInstance && "update_status" in value; return isInstance; } @@ -66,6 +87,8 @@ export function ProtocolUpdateStatusModuleFieldSummarySubstateFromJSONTyped(json 'substate_type': json['substate_type'], 'is_locked': json['is_locked'], + 'protocol_version': json['protocol_version'], + 'update_status': ProtocolUpdateStatusFromJSON(json['update_status']), }; } @@ -80,6 +103,8 @@ export function ProtocolUpdateStatusModuleFieldSummarySubstateToJSON(value?: Pro 'substate_type': value.substate_type, 'is_locked': value.is_locked, + 'protocol_version': value.protocol_version, + 'update_status': ProtocolUpdateStatusToJSON(value.update_status), }; } diff --git a/sdk/typescript/lib/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstateAllOf.ts b/sdk/typescript/lib/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstateAllOf.ts index 458a53e663..a3b2453011 100644 --- a/sdk/typescript/lib/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstateAllOf.ts +++ b/sdk/typescript/lib/generated/models/ProtocolUpdateStatusModuleFieldSummarySubstateAllOf.ts @@ -13,12 +13,31 @@ */ import { exists, mapValues } from '../runtime'; +import type { ProtocolUpdateStatus } from './ProtocolUpdateStatus'; +import { + ProtocolUpdateStatusFromJSON, + ProtocolUpdateStatusFromJSONTyped, + ProtocolUpdateStatusToJSON, +} from './ProtocolUpdateStatus'; + /** * * @export * @interface ProtocolUpdateStatusModuleFieldSummarySubstateAllOf */ export interface ProtocolUpdateStatusModuleFieldSummarySubstateAllOf { + /** + * + * @type {string} + * @memberof ProtocolUpdateStatusModuleFieldSummarySubstateAllOf + */ + protocol_version: string; + /** + * + * @type {ProtocolUpdateStatus} + * @memberof ProtocolUpdateStatusModuleFieldSummarySubstateAllOf + */ + update_status: ProtocolUpdateStatus; /** * * @type {string} @@ -42,6 +61,8 @@ export type ProtocolUpdateStatusModuleFieldSummarySubstateAllOfSubstateTypeEnum */ export function instanceOfProtocolUpdateStatusModuleFieldSummarySubstateAllOf(value: object): boolean { let isInstance = true; + isInstance = isInstance && "protocol_version" in value; + isInstance = isInstance && "update_status" in value; return isInstance; } @@ -56,6 +77,8 @@ export function ProtocolUpdateStatusModuleFieldSummarySubstateAllOfFromJSONTyped } return { + 'protocol_version': json['protocol_version'], + 'update_status': ProtocolUpdateStatusFromJSON(json['update_status']), 'substate_type': !exists(json, 'substate_type') ? undefined : json['substate_type'], }; } @@ -69,6 +92,8 @@ export function ProtocolUpdateStatusModuleFieldSummarySubstateAllOfToJSON(value? } return { + 'protocol_version': value.protocol_version, + 'update_status': ProtocolUpdateStatusToJSON(value.update_status), 'substate_type': value.substate_type, }; } diff --git a/sdk/typescript/lib/generated/models/ProtocolUpdateStatusType.ts b/sdk/typescript/lib/generated/models/ProtocolUpdateStatusType.ts new file mode 100644 index 0000000000..6ea3bf504b --- /dev/null +++ b/sdk/typescript/lib/generated/models/ProtocolUpdateStatusType.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const ProtocolUpdateStatusType = { + InProgress: 'InProgress', + Complete: 'Complete' +} as const; +export type ProtocolUpdateStatusType = typeof ProtocolUpdateStatusType[keyof typeof ProtocolUpdateStatusType]; + + +export function ProtocolUpdateStatusTypeFromJSON(json: any): ProtocolUpdateStatusType { + return ProtocolUpdateStatusTypeFromJSONTyped(json, false); +} + +export function ProtocolUpdateStatusTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProtocolUpdateStatusType { + return json as ProtocolUpdateStatusType; +} + +export function ProtocolUpdateStatusTypeToJSON(value?: ProtocolUpdateStatusType | null): any { + return value as any; +} + diff --git a/sdk/typescript/lib/generated/models/SubstateType.ts b/sdk/typescript/lib/generated/models/SubstateType.ts index c706280669..d84ef8bf1d 100644 --- a/sdk/typescript/lib/generated/models/SubstateType.ts +++ b/sdk/typescript/lib/generated/models/SubstateType.ts @@ -18,7 +18,11 @@ * @export */ export const SubstateType = { + BootLoaderModuleFieldSystemBoot: 'BootLoaderModuleFieldSystemBoot', + BootLoaderModuleFieldKernelBoot: 'BootLoaderModuleFieldKernelBoot', BootLoaderModuleFieldVmBoot: 'BootLoaderModuleFieldVmBoot', + BootLoaderModuleFieldTransactionValidationConfiguration: 'BootLoaderModuleFieldTransactionValidationConfiguration', + ProtocolUpdateStatusModuleFieldSummary: 'ProtocolUpdateStatusModuleFieldSummary', TypeInfoModuleFieldTypeInfo: 'TypeInfoModuleFieldTypeInfo', RoleAssignmentModuleFieldOwnerRole: 'RoleAssignmentModuleFieldOwnerRole', RoleAssignmentModuleRuleEntry: 'RoleAssignmentModuleRuleEntry', @@ -69,11 +73,7 @@ export const SubstateType = { MultiResourcePoolFieldState: 'MultiResourcePoolFieldState', TransactionTrackerFieldState: 'TransactionTrackerFieldState', TransactionTrackerCollectionEntry: 'TransactionTrackerCollectionEntry', - AccountLockerAccountClaimsEntry: 'AccountLockerAccountClaimsEntry', - BootLoaderModuleFieldSystemBoot: 'BootLoaderModuleFieldSystemBoot', - BootLoaderModuleFieldKernelBoot: 'BootLoaderModuleFieldKernelBoot', - BootLoaderModuleFieldTransactionValidationConfiguration: 'BootLoaderModuleFieldTransactionValidationConfiguration', - ProtocolUpdateStatusModuleFieldSummary: 'ProtocolUpdateStatusModuleFieldSummary' + AccountLockerAccountClaimsEntry: 'AccountLockerAccountClaimsEntry' } as const; export type SubstateType = typeof SubstateType[keyof typeof SubstateType]; diff --git a/sdk/typescript/lib/generated/models/index.ts b/sdk/typescript/lib/generated/models/index.ts index 3fef99fadc..1fd29091a7 100644 --- a/sdk/typescript/lib/generated/models/index.ts +++ b/sdk/typescript/lib/generated/models/index.ts @@ -91,6 +91,8 @@ export * from './CommittedStateIdentifier'; export * from './CommittedStateIdentifierAllOf'; export * from './CommittedTransaction'; export * from './CommittedTransactionBalanceChanges'; +export * from './CompleteProtocolUpdateStatus'; +export * from './CompleteProtocolUpdateStatusAllOf'; export * from './ComponentMethodTargetIdentifier'; export * from './ComponentMethodTargetIdentifierAllOf'; export * from './ConsensusLedgerProofOrigin'; @@ -219,6 +221,8 @@ export * from './GenesisLedgerProofOriginAllOf'; export * from './GenesisLedgerTransaction'; export * from './GenesisLedgerTransactionAllOf'; export * from './HookExport'; +export * from './InProgressProtocolUpdateStatus'; +export * from './InProgressProtocolUpdateStatusAllOf'; export * from './IndexBlueprintCollectionSchema'; export * from './IndexBlueprintCollectionSchemaAllOf'; export * from './IndexedStateSchema'; @@ -460,8 +464,12 @@ export * from './ProtectedAccessRule'; export * from './ProtectedAccessRuleAllOf'; export * from './ProtocolUpdateLedgerProofOrigin'; export * from './ProtocolUpdateLedgerProofOriginAllOf'; +export * from './ProtocolUpdateStatus'; +export * from './ProtocolUpdateStatusBase'; +export * from './ProtocolUpdateStatusLatestCommit'; export * from './ProtocolUpdateStatusModuleFieldSummarySubstate'; export * from './ProtocolUpdateStatusModuleFieldSummarySubstateAllOf'; +export * from './ProtocolUpdateStatusType'; export * from './ProtocolVersionReadiness'; export * from './PublicKey'; export * from './PublicKeyBase'; From 1aa6d91c36630354e04dfb04ad74813048247ea2 Mon Sep 17 00:00:00 2001 From: David Edey Date: Tue, 29 Oct 2024 18:18:14 +0000 Subject: [PATCH 06/12] feat: Add Core API models for `NotarizedTransactionV2` --- .../core-api-server/core-api-schema.yaml | 387 +++++++++--- .../scripts/generate-openapi-server.py | 13 +- .../src/core_api/conversions/common.rs | 2 +- .../src/core_api/conversions/hashes.rs | 4 + .../src/core_api/conversions/numerics.rs | 50 +- .../substates/access_controller.rs | 1 - .../substates/consensus_manager.rs | 8 +- .../models/executed_scenario_transaction.rs | 4 +- .../generated/models/intent_core_v2.rs | 42 ++ .../generated/models/intent_header_v2.rs | 49 ++ .../generated/models/intent_signatures.rs | 30 + .../models/lts_transaction_status_request.rs | 2 +- .../models/mempool_transaction_hashes.rs | 4 +- .../src/core_api/generated/models/mod.rs | 14 + .../models/notarized_transaction_v2.rs | 23 +- .../parsed_ledger_transaction_identifiers.rs | 8 +- ...arsed_notarized_transaction_identifiers.rs | 8 +- ...d_signed_transaction_intent_identifiers.rs | 8 +- .../parsed_transaction_intent_identifiers.rs | 4 +- .../models/signed_transaction_intent.rs | 4 +- .../models/signed_transaction_intent_v2.rs | 43 ++ .../core_api/generated/models/subintent_v2.rs | 36 ++ .../generated/models/transaction_header.rs | 2 +- .../generated/models/transaction_header_v2.rs | 36 ++ .../generated/models/transaction_id_key.rs | 4 +- .../models/transaction_identifiers.rs | 8 +- .../generated/models/transaction_intent.rs | 4 +- .../generated/models/transaction_intent_v2.rs | 42 ++ .../models/transaction_receipt_request.rs | 2 +- .../models/transaction_status_request.rs | 2 +- .../handlers/lts/transaction_construction.rs | 2 +- .../handlers/lts/transaction_submit.rs | 4 +- .../core_api/handlers/stream_transactions.rs | 292 ++++++++- .../core_api/handlers/transaction_submit.rs | 4 +- .../definitions/default_definition.rs | 28 + .../src/transaction/ledger_transaction.rs | 567 ++++++++++++++++++ .../transaction/round_update_transaction.rs | 260 ++++++++ .../models/ExecutedScenarioTransaction.java | 8 +- .../core/generated/models/IntentCoreV2.java | 258 ++++++++ .../core/generated/models/IntentHeaderV2.java | 279 +++++++++ .../generated/models/IntentSignatures.java | 120 ++++ .../models/LtsTransactionStatusRequest.java | 4 +- .../models/MempoolTransactionHashes.java | 8 +- .../models/NotarizedTransactionV2.java | 164 ++++- .../ParsedLedgerTransactionIdentifiers.java | 16 +- ...ParsedNotarizedTransactionIdentifiers.java | 16 +- ...sedSignedTransactionIntentIdentifiers.java | 16 +- .../ParsedTransactionIntentIdentifiers.java | 8 +- .../models/SignedTransactionIntent.java | 8 +- .../models/SignedTransactionIntentV2.java | 248 ++++++++ .../core/generated/models/SubintentV2.java | 176 ++++++ .../generated/models/TransactionHeader.java | 4 +- .../generated/models/TransactionHeaderV2.java | 178 ++++++ .../generated/models/TransactionIdKey.java | 8 +- .../models/TransactionIdentifiers.java | 16 +- .../generated/models/TransactionIntent.java | 8 +- .../generated/models/TransactionIntentV2.java | 249 ++++++++ .../models/TransactionReceiptRequest.java | 4 +- .../models/TransactionStatusRequest.java | 4 +- .../CuttlefishProtocolUpdateTest.java | 2 +- .../lib/generated/.openapi-generator/FILES | 7 + .../models/ExecutedScenarioTransaction.ts | 6 +- .../lib/generated/models/IntentCoreV2.ts | 112 ++++ .../lib/generated/models/IntentHeaderV2.ts | 125 ++++ .../lib/generated/models/IntentSignatures.ts | 73 +++ .../models/LtsTransactionStatusRequest.ts | 4 +- .../models/MempoolTransactionHashes.ts | 6 +- .../models/NotarizedTransactionV2.ts | 58 +- .../ParsedLedgerTransactionIdentifiers.ts | 10 +- .../ParsedNotarizedTransactionIdentifiers.ts | 10 +- ...arsedSignedTransactionIntentIdentifiers.ts | 10 +- .../ParsedTransactionIntentIdentifiers.ts | 6 +- .../models/SignedTransactionIntent.ts | 4 +- .../models/SignedTransactionIntentV2.ts | 118 ++++ .../lib/generated/models/SubintentV2.ts | 94 +++ .../lib/generated/models/TransactionHeader.ts | 2 + .../generated/models/TransactionHeaderV2.ts | 92 +++ .../lib/generated/models/TransactionIdKey.ts | 6 +- .../models/TransactionIdentifiers.ts | 10 +- .../lib/generated/models/TransactionIntent.ts | 6 +- .../generated/models/TransactionIntentV2.ts | 123 ++++ .../models/TransactionReceiptRequest.ts | 4 +- .../models/TransactionStatusRequest.ts | 4 +- sdk/typescript/lib/generated/models/index.ts | 7 + 84 files changed, 4386 insertions(+), 314 deletions(-) create mode 100644 core-rust/core-api-server/src/core_api/generated/models/intent_core_v2.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/intent_header_v2.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/intent_signatures.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/signed_transaction_intent_v2.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/subintent_v2.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/transaction_header_v2.rs create mode 100644 core-rust/core-api-server/src/core_api/generated/models/transaction_intent_v2.rs create mode 100644 core-rust/state-manager/src/protocol/protocol_updates/definitions/default_definition.rs create mode 100644 core-rust/state-manager/src/transaction/ledger_transaction.rs create mode 100644 core-rust/state-manager/src/transaction/round_update_transaction.rs create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/IntentCoreV2.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/IntentHeaderV2.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/IntentSignatures.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/SignedTransactionIntentV2.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/SubintentV2.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionHeaderV2.java create mode 100644 core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionIntentV2.java create mode 100644 sdk/typescript/lib/generated/models/IntentCoreV2.ts create mode 100644 sdk/typescript/lib/generated/models/IntentHeaderV2.ts create mode 100644 sdk/typescript/lib/generated/models/IntentSignatures.ts create mode 100644 sdk/typescript/lib/generated/models/SignedTransactionIntentV2.ts create mode 100644 sdk/typescript/lib/generated/models/SubintentV2.ts create mode 100644 sdk/typescript/lib/generated/models/TransactionHeaderV2.ts create mode 100644 sdk/typescript/lib/generated/models/TransactionIntentV2.ts diff --git a/core-rust/core-api-server/core-api-schema.yaml b/core-rust/core-api-server/core-api-schema.yaml index 8744b0f7c5..1d28fdce11 100644 --- a/core-rust/core-api-server/core-api-schema.yaml +++ b/core-rust/core-api-server/core-api-schema.yaml @@ -1335,53 +1335,9 @@ components: description: | A string-encoded fixed-precision decimal to 18 decimal places. A decimal is formed of some signed integer `m` of attos (`10^(-18)`) units, where `-2^(192 - 1) <= m < 2^(192 - 1)`. -########################################## -# GENERAL / SHARED MODELS - Transactions # -########################################## - TransactionStatus: - type: string - enum: - - Succeeded - - Failed - - Rejected - description: The status of the transaction - TransactionReceipt: - type: object - description: The transaction execution receipt - required: - - status - - state_updates - - fee_summary - - costing_parameters - properties: - status: - $ref: "#/components/schemas/TransactionStatus" - fee_summary: - $ref: "#/components/schemas/FeeSummary" - costing_parameters: - $ref: "#/components/schemas/CostingParameters" - fee_source: - description: Only present if the `status` is not `Rejected`. - $ref: "#/components/schemas/FeeSource" - fee_destination: - description: Only present if the `status` is not `Rejected`. - $ref: "#/components/schemas/FeeDestination" - state_updates: - $ref: "#/components/schemas/StateUpdates" - events: - type: array - items: - $ref: "#/components/schemas/Event" - next_epoch: - $ref: "#/components/schemas/NextEpoch" - output: - type: array - description: The manifest line-by-line engine return data (only present if `status` is `Succeeded`) - items: - $ref: "#/components/schemas/SborData" - error_message: - type: string - description: Error message (only present if status is `Failed` or `Rejected`) +################################################## +# GENERAL / SHARED MODELS - TransactionV1 Models # +################################################## NotarizedTransaction: type: object required: @@ -1410,9 +1366,9 @@ components: - intent_signatures properties: hash: - $ref: "#/components/schemas/SignedIntentHash" + $ref: "#/components/schemas/SignedTransactionIntentHash" hash_bech32m: - $ref: "#/components/schemas/SignedIntentHashBech32m" + $ref: "#/components/schemas/SignedTransactionIntentHashBech32m" intent: $ref: "#/components/schemas/TransactionIntent" intent_signatures: @@ -1427,9 +1383,9 @@ components: - header properties: hash: - $ref: "#/components/schemas/IntentHash" + $ref: "#/components/schemas/TransactionIntentHash" hash_bech32m: - $ref: "#/components/schemas/IntentHashBech32m" + $ref: "#/components/schemas/TransactionIntentHashBech32m" header: $ref: "#/components/schemas/TransactionHeader" instructions: @@ -1444,12 +1400,6 @@ components: message: description: The optional transaction message. Only returned if present and enabled in `TransactionFormatOptions` on your request. $ref: "#/components/schemas/TransactionMessage" - NotarizedTransactionV2: - type: object - properties: - todo: - type: string - # TODO:CUTTLEFISH TransactionMessageType: type: string enum: @@ -1574,8 +1524,11 @@ components: aes_wrapped_key_hex: type: string description: | - The hex-encoded wrapped key bytes from applying RFC 3394 (256-bit) AES-KeyWrap to the 128-bit message ephemeral public key, with the secret KEK provided by static Diffie-Helman between the decryptor public key, and the `dh_ephemeral_public_key` for that curve type. - The bytes are serialized (according to RFC 3394) as the concatenation `IV (first 8 bytes) || Cipher (wrapped 128-bit key, encoded as two 64-bit blocks)`. + The hex-encoded wrapped key bytes from applying RFC 3394 (256-bit) AES-KeyWrap to the message ephemeral public key, with the secret KEK provided by static Diffie-Helman between the decryptor public key, and the `dh_ephemeral_public_key` for that curve type. + The bytes are serialized (according to RFC 3394) as the concatenation `IV (first 8 bytes) || Cipher`. + + The message ephemeral public key is 128-bit in V1 transactions, but 256-bit in V2 transactions. + The Cipher is the wrapped ephemeral public key, and is encoded as two 64-bit blocks in V1, and four 64-bit blocks in V2. TransactionHeader: type: object required: @@ -1612,6 +1565,8 @@ components: maximum: 4294967295 description: | An integer between `0` and `2^32 - 1`, chosen to allow a unique intent to be created (to enable submitting an otherwise identical/duplicate intent). + + As of Cuttlefish and V2 transaction models, this is now referred to in documentation as the `intent_discriminator`. notary_public_key: $ref: "#/components/schemas/PublicKey" notary_is_signatory: @@ -1629,6 +1584,186 @@ components: format: int32 minimum: 0 maximum: 255 +################################################## +# GENERAL / SHARED MODELS - TransactionV2 Models # +################################################## + NotarizedTransactionV2: + type: object + required: + - hash + - hash_bech32m + - signed_transaction_intent + - notary_signature + properties: + hash: + $ref: "#/components/schemas/NotarizedTransactionHash" + hash_bech32m: + $ref: "#/components/schemas/NotarizedTransactionHashBech32m" + payload_hex: + type: string + description: The hex-encoded full notarized transaction payload. Returning this can be disabled in TransactionFormatOptions on your request (default true). + signed_transaction_intent: + $ref: "#/components/schemas/SignedTransactionIntentV2" + notary_signature: + $ref: "#/components/schemas/Signature" + SignedTransactionIntentV2: + type: object + required: + - hash + - hash_bech32m + - transaction_intent + - transaction_intent_signatures + - non_root_subintent_signatures + properties: + hash: + $ref: "#/components/schemas/SignedTransactionIntentHash" + hash_bech32m: + $ref: "#/components/schemas/SignedTransactionIntentHashBech32m" + transaction_intent: + $ref: "#/components/schemas/TransactionIntentV2" + transaction_intent_signatures: + $ref: "#/components/schemas/IntentSignatures" + non_root_subintent_signatures: + description: | + This gives the signatures for each subintent in `non_root_subintents` in `TransactionIntentV2`. + For committed transactions, these arrays are of equal length and correspond one-to-one in order. + type: array + items: + $ref: "#/components/schemas/IntentSignatures" + IntentSignatures: + type: object + description: Signatures against the given intent. + required: + - signatures + properties: + signatures: + type: array + items: + $ref: "#/components/schemas/SignatureWithPublicKey" + TransactionIntentV2: + type: object + required: + - hash + - hash_bech32m + - transaction_header + - root_intent_core + - non_root_subintents + properties: + hash: + $ref: "#/components/schemas/TransactionIntentHash" + hash_bech32m: + $ref: "#/components/schemas/TransactionIntentHashBech32m" + transaction_header: + $ref: "#/components/schemas/TransactionHeaderV2" + root_intent_core: + $ref: "#/components/schemas/IntentCoreV2" + non_root_subintents: + type: array + items: + $ref: "#/components/schemas/SubintentV2" + TransactionHeaderV2: + type: object + required: + - notary_public_key + - notary_is_signatory + - tip_basis_points + properties: + notary_public_key: + $ref: "#/components/schemas/PublicKey" + notary_is_signatory: + type: boolean + description: Specifies whether the notary public key should be included in the transaction signers list + tip_basis_points: + type: integer + format: int64 + minimum: 0 + maximum: 4294967295 + description: | + An integer between `0` and `2^32 - 1 = 4294967295`, giving the validator tip as a basis points amount. + That is, a value of `1` corresponds to an additional tip on 0.01% of the base fee. + SubintentV2: + type: object + required: + - hash + - hash_bech32m + - intent_core + properties: + hash: + $ref: "#/components/schemas/SubintentHash" + hash_bech32m: + $ref: "#/components/schemas/SubintentHashBech32m" + intent_core: + $ref: "#/components/schemas/IntentCoreV2" + IntentCoreV2: + type: object + required: + - intent_header + - children_specifiers + properties: + intent_header: + $ref: "#/components/schemas/IntentHeaderV2" + children_specifiers: + type: array + items: + $ref: "#/components/schemas/SubintentHashBech32m" + blobs_hex: + type: object + description: A map of the hex-encoded blob hash, to hex-encoded blob content. Only returned if enabled in `TransactionFormatOptions` on your request. + additionalProperties: + type: string + description: The hex-encoded blob content + message: + description: The optional transaction message. Only returned if present and enabled in `TransactionFormatOptions` on your request. + $ref: "#/components/schemas/TransactionMessage" + instructions: + type: string + description: The decompiled transaction manifest instructions. Only returned if enabled in `TransactionFormatOptions` on your request. + IntentHeaderV2: + type: object + description: | + The metadata common to both transaction intents and subintents. + + The `min_proposer_timestamp_inclusive` and `max_proposer_timestamp_exclusive` are both optional. + required: + - network_id + - start_epoch_inclusive + - end_epoch_exclusive + - intent_discriminator + properties: + network_id: + $ref: "#/components/schemas/NetworkIdentifierByte" + start_epoch_inclusive: + type: integer + format: int64 + minimum: 0 + maximum: 10000000000 + description: | + An integer between `0` and `10^10`, marking the epoch from which the transaction can be submitted. + In the case of uncommitted transactions, a value of `10^10` indicates that the epoch was >= `10^10`. + end_epoch_exclusive: + type: integer + format: int64 + minimum: 0 + maximum: 10000000000 + description: | + An integer between `0` and `10^10`, marking the epoch from which the transaction will no longer be valid, and be rejected. + In the case of uncommitted transactions, a value of `10^10` indicates that the epoch was >= `10^10`. + min_proposer_timestamp_inclusive: + $ref: "#/components/schemas/ScryptoInstant" + max_proposer_timestamp_exclusive: + $ref: "#/components/schemas/ScryptoInstant" + intent_discriminator: + type: string + description: | + The string representation of an integer between `0` and `2^64 - 1`, which can be chosen to ensure that + a unique intent can be created. It only needs to be unique for a particular intent content and epoch/timestamp, + and can be safely selected randomly to very high probability. + + This field was called `nonce` in the V1 models, but was a misleading name, as it got confused with a + cryptographic nonce or an Ethereum-style nonce, and it is neither. +##################################################### +# GENERAL / SHARED MODELS - Transaction Descriptors # +##################################################### LedgerStateSummary: type: object required: @@ -1703,46 +1838,58 @@ components: - payload_hash_bech32m properties: intent_hash: - $ref: "#/components/schemas/IntentHash" + $ref: "#/components/schemas/TransactionIntentHash" intent_hash_bech32m: - $ref: "#/components/schemas/IntentHashBech32m" + $ref: "#/components/schemas/TransactionIntentHashBech32m" signed_intent_hash: - $ref: "#/components/schemas/SignedIntentHash" + $ref: "#/components/schemas/SignedTransactionIntentHash" signed_intent_hash_bech32m: - $ref: "#/components/schemas/SignedIntentHashBech32m" + $ref: "#/components/schemas/SignedTransactionIntentHashBech32m" payload_hash: $ref: "#/components/schemas/NotarizedTransactionHash" payload_hash_bech32m: $ref: "#/components/schemas/NotarizedTransactionHashBech32m" - IntentHashInput: + TransactionIntentHashInput: type: string description: | - The intent hash for a user transaction, also known as the transaction id. - This hash identifies the core content "intent" of the transaction. Each intent can only be committed once. + The transaction intent hash for a user transaction, also known as the transaction id. + This hash identifies the core "intent" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. - IntentHash: + TransactionIntentHash: type: string minLength: 64 maxLength: 64 description: | - The hex-encoded intent hash for a user transaction, also known as the transaction id. - This hash identifies the core content "intent" of the transaction. Each intent can only be committed once. + The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. + This hash identifies the core "intent" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. - IntentHashBech32m: + TransactionIntentHashBech32m: + type: string + description: The Bech32m-encoded human readable `TransactionIntentHash`. + SubintentHash: + type: string + minLength: 64 + maxLength: 64 + description: | + The hex-encoded subintent hash for a subintent, also known as the partial transaction id. + This hash identifies the subintent. Each subintent can only be *successfully* committed once, + but unlike a transaction intent, could be committed as a failure zero or more times first. + This hash gets signed by any signatories on subintent. + SubintentHashBech32m: type: string - description: The Bech32m-encoded human readable `IntentHash`. - SignedIntentHash: + description: The Bech32m-encoded human readable `SubintentHash`. + SignedTransactionIntentHash: type: string minLength: 64 maxLength: 64 description: | The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. - This hash is signed by the notary, to create the submittable NotarizedTransaction. - SignedIntentHashBech32m: + This hash is signed by the notary, to create the submittable `NotarizedTransaction`. + SignedTransactionIntentHashBech32m: type: string - description: The Bech32m-encoded human readable `SignedIntentHash`. + description: The Bech32m-encoded human readable `SignedTransactionIntentHash`. NotarizedTransactionHashInput: type: string description: | @@ -1792,6 +1939,50 @@ components: ###################################### # GENERAL / SHARED MODELS - Receipts # ###################################### + TransactionStatus: + type: string + enum: + - Succeeded + - Failed + - Rejected + description: The status of the transaction + TransactionReceipt: + type: object + description: The transaction execution receipt + required: + - status + - state_updates + - fee_summary + - costing_parameters + properties: + status: + $ref: "#/components/schemas/TransactionStatus" + fee_summary: + $ref: "#/components/schemas/FeeSummary" + costing_parameters: + $ref: "#/components/schemas/CostingParameters" + fee_source: + description: Only present if the `status` is not `Rejected`. + $ref: "#/components/schemas/FeeSource" + fee_destination: + description: Only present if the `status` is not `Rejected`. + $ref: "#/components/schemas/FeeDestination" + state_updates: + $ref: "#/components/schemas/StateUpdates" + events: + type: array + items: + $ref: "#/components/schemas/Event" + next_epoch: + $ref: "#/components/schemas/NextEpoch" + output: + type: array + description: The manifest line-by-line engine return data (only present if `status` is `Succeeded`) + items: + $ref: "#/components/schemas/SborData" + error_message: + type: string + description: Error message (only present if status is `Failed` or `Rejected`) FeeSummary: type: object required: @@ -4064,9 +4255,9 @@ components: - intent_hash_bech32m properties: intent_hash: - $ref: "#/components/schemas/IntentHash" + $ref: "#/components/schemas/TransactionIntentHash" intent_hash_bech32m: - $ref: "#/components/schemas/IntentHashBech32m" + $ref: "#/components/schemas/TransactionIntentHashBech32m" AccountAddressKey: type: object required: @@ -5868,7 +6059,7 @@ components: network: $ref: "#/components/schemas/NetworkIdentifier" intent_hash: - $ref: "#/components/schemas/IntentHashInput" + $ref: "#/components/schemas/TransactionIntentHashInput" LtsTransactionStatusResponse: type: object required: @@ -6838,9 +7029,9 @@ components: state_version: $ref: "#/components/schemas/StateVersion" intent_hash: - $ref: "#/components/schemas/IntentHash" + $ref: "#/components/schemas/TransactionIntentHash" intent_hash_bech32m: - $ref: "#/components/schemas/IntentHashBech32m" + $ref: "#/components/schemas/TransactionIntentHashBech32m" DescribedAddress: type: string description: An arbitrary Bech32m-encoded human readable address (its type should be inferred from `logical_name`). @@ -6872,9 +7063,9 @@ components: - payload_hash_bech32m properties: intent_hash: - $ref: "#/components/schemas/IntentHash" + $ref: "#/components/schemas/TransactionIntentHash" intent_hash_bech32m: - $ref: "#/components/schemas/IntentHashBech32m" + $ref: "#/components/schemas/TransactionIntentHashBech32m" payload_hash: $ref: "#/components/schemas/NotarizedTransactionHash" payload_hash_bech32m: @@ -7084,13 +7275,13 @@ components: - ledger_hash_bech32m properties: intent_hash: - $ref: "#/components/schemas/IntentHash" + $ref: "#/components/schemas/TransactionIntentHash" intent_hash_bech32m: - $ref: "#/components/schemas/IntentHashBech32m" + $ref: "#/components/schemas/TransactionIntentHashBech32m" signed_intent_hash: - $ref: "#/components/schemas/SignedIntentHash" + $ref: "#/components/schemas/SignedTransactionIntentHash" signed_intent_hash_bech32m: - $ref: "#/components/schemas/SignedIntentHashBech32m" + $ref: "#/components/schemas/SignedTransactionIntentHashBech32m" payload_hash: $ref: "#/components/schemas/NotarizedTransactionHash" payload_hash_bech32m: @@ -7119,13 +7310,13 @@ components: - signed_intent_hash_bech32m properties: intent_hash: - $ref: "#/components/schemas/IntentHash" + $ref: "#/components/schemas/TransactionIntentHash" intent_hash_bech32m: - $ref: "#/components/schemas/IntentHashBech32m" + $ref: "#/components/schemas/TransactionIntentHashBech32m" signed_intent_hash: - $ref: "#/components/schemas/SignedIntentHash" + $ref: "#/components/schemas/SignedTransactionIntentHash" signed_intent_hash_bech32m: - $ref: "#/components/schemas/SignedIntentHashBech32m" + $ref: "#/components/schemas/SignedTransactionIntentHashBech32m" ParsedTransactionIntent: allOf: - $ref: "#/components/schemas/ParsedTransaction" @@ -7144,9 +7335,9 @@ components: - intent_hash_bech32m properties: intent_hash: - $ref: "#/components/schemas/IntentHash" + $ref: "#/components/schemas/TransactionIntentHash" intent_hash_bech32m: - $ref: "#/components/schemas/IntentHashBech32m" + $ref: "#/components/schemas/TransactionIntentHashBech32m" ParsedLedgerTransaction: allOf: - $ref: "#/components/schemas/ParsedTransaction" @@ -7165,13 +7356,13 @@ components: - ledger_hash_bech32m properties: intent_hash: - $ref: "#/components/schemas/IntentHash" + $ref: "#/components/schemas/TransactionIntentHash" intent_hash_bech32m: - $ref: "#/components/schemas/IntentHashBech32m" + $ref: "#/components/schemas/TransactionIntentHashBech32m" signed_intent_hash: - $ref: "#/components/schemas/SignedIntentHash" + $ref: "#/components/schemas/SignedTransactionIntentHash" signed_intent_hash_bech32m: - $ref: "#/components/schemas/SignedIntentHashBech32m" + $ref: "#/components/schemas/SignedTransactionIntentHashBech32m" payload_hash: $ref: "#/components/schemas/NotarizedTransactionHash" payload_hash_bech32m: @@ -7328,7 +7519,7 @@ components: network: $ref: "#/components/schemas/NetworkIdentifier" intent_hash: - $ref: "#/components/schemas/IntentHashInput" + $ref: "#/components/schemas/TransactionIntentHashInput" TransactionStatusResponse: type: object required: @@ -7412,7 +7603,7 @@ components: network: $ref: "#/components/schemas/NetworkIdentifier" intent_hash: - $ref: "#/components/schemas/IntentHashInput" + $ref: "#/components/schemas/TransactionIntentHashInput" transaction_format_options: $ref: "#/components/schemas/TransactionFormatOptions" TransactionReceiptResponse: diff --git a/core-rust/core-api-server/scripts/generate-openapi-server.py b/core-rust/core-api-server/scripts/generate-openapi-server.py index beb2d83336..2ec05172c4 100755 --- a/core-rust/core-api-server/scripts/generate-openapi-server.py +++ b/core-rust/core-api-server/scripts/generate-openapi-server.py @@ -44,12 +44,17 @@ def copy_file(source, dest): shutil.copyfile(source, dest) def run(command, cwd = '.', should_log = False): - if (should_log): logging.debug('Running cmd: %s' % command) + if (should_log): + logging.info('Running cmd: %s' % command) response = subprocess.run(' '.join(command), cwd=cwd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stderr = response.stderr.decode('utf-8') - if response.returncode != 0: raise Exception(stderr) stdout = response.stdout.decode('utf-8') - if (should_log): logging.debug('Response: %s', stdout) + if response.returncode != 0: + stderr = response.stderr.decode('utf-8') + logging.info('Output preceeding error:\n\n%s', stdout) + logging.info('Error:\n\n%s', stderr) + raise Exception("Error running command - see logs above", command) + elif should_log: + logging.info('Output:\n\n%s', stdout) return stdout def generate_rust_models(schema_file, tmp_client_folder, out_location, rust_package): diff --git a/core-rust/core-api-server/src/core_api/conversions/common.rs b/core-rust/core-api-server/src/core_api/conversions/common.rs index b6572c73cc..4c212d9b28 100644 --- a/core-rust/core-api-server/src/core_api/conversions/common.rs +++ b/core-rust/core-api-server/src/core_api/conversions/common.rs @@ -164,7 +164,7 @@ pub fn to_api_ledger_header_summary( }), proposer_timestamp: Box::new(to_api_clamped_instant_from_epoch_milli( state_summary.proposer_timestamp_ms, - )?), + )), }) } diff --git a/core-rust/core-api-server/src/core_api/conversions/hashes.rs b/core-rust/core-api-server/src/core_api/conversions/hashes.rs index d72ba03ed7..736544ad47 100644 --- a/core-rust/core-api-server/src/core_api/conversions/hashes.rs +++ b/core-rust/core-api-server/src/core_api/conversions/hashes.rs @@ -16,6 +16,10 @@ pub fn to_api_notarized_transaction_hash( to_hex(notarized_transaction_hash) } +pub fn to_api_subintent_hash(subintent_hash: &SubintentHash) -> String { + to_hex(subintent_hash) +} + pub fn to_api_ledger_hash(ledger_hash: &LedgerTransactionHash) -> String { to_hex(ledger_hash) } diff --git a/core-rust/core-api-server/src/core_api/conversions/numerics.rs b/core-rust/core-api-server/src/core_api/conversions/numerics.rs index 84517369aa..731cadefcd 100644 --- a/core-rust/core-api-server/src/core_api/conversions/numerics.rs +++ b/core-rust/core-api-server/src/core_api/conversions/numerics.rs @@ -139,6 +139,10 @@ pub fn to_api_usize_as_string(input: usize) -> String { input.to_string() } +pub fn to_api_u64_as_string(input: u64) -> String { + input.to_string() +} + pub fn to_unix_timestamp_ms(time: std::time::SystemTime) -> Result { let millis = time .duration_since(std::time::UNIX_EPOCH) @@ -157,27 +161,25 @@ pub fn to_unix_timestamp_ms(time: std::time::SystemTime) -> Result = 1583..=9999; -pub fn to_api_scrypto_instant(instant: &Instant) -> Result { +pub fn to_api_scrypto_instant(instant: &Instant) -> models::ScryptoInstant { let timestamp_seconds = instant.seconds_since_unix_epoch; let date_time = NaiveDateTime::from_timestamp_opt(timestamp_seconds, 0) .filter(|date_time| ISO_8601_YEAR_RANGE.contains(&date_time.year())); - Ok(models::ScryptoInstant { + models::ScryptoInstant { unix_timestamp_seconds: to_api_i64_as_string(timestamp_seconds), date_time: date_time.map(to_second_precision_rfc3339_string), - }) + } } -pub fn to_api_clamped_instant_from_epoch_milli( - timestamp_millis: i64, -) -> Result { +pub fn to_api_clamped_instant_from_epoch_milli(timestamp_millis: i64) -> models::InstantMs { let clamped_timestamp_millis = timestamp_millis.clamp(MIN_API_TIMESTAMP_MS, MAX_API_TIMESTAMP_MS); let date_time = NaiveDateTime::from_timestamp_millis(clamped_timestamp_millis) .expect("it just got clamped to 100% supported range above"); - Ok(models::InstantMs { + models::InstantMs { unix_timestamp_ms: clamped_timestamp_millis, date_time: to_canonical_rfc3339_string(date_time), - }) + } } fn to_canonical_rfc3339_string(date_time: NaiveDateTime) -> String { @@ -353,7 +355,7 @@ mod tests { fn api_scrypto_instant_supports_full_i64_range() { // Sanity check (epoch): assert_eq!( - to_api_scrypto_instant(&Instant::new(0)).unwrap(), + to_api_scrypto_instant(&Instant::new(0)), models::ScryptoInstant { unix_timestamp_seconds: "0".to_string(), date_time: Some("1970-01-01T00:00:00Z".to_string()), @@ -362,14 +364,14 @@ mod tests { // Slightly positive and negative: assert_eq!( - to_api_scrypto_instant(&Instant::new(1)).unwrap(), + to_api_scrypto_instant(&Instant::new(1)), models::ScryptoInstant { unix_timestamp_seconds: "1".to_string(), date_time: Some("1970-01-01T00:00:01Z".to_string()), } ); assert_eq!( - to_api_scrypto_instant(&Instant::new(-1)).unwrap(), + to_api_scrypto_instant(&Instant::new(-1)), models::ScryptoInstant { unix_timestamp_seconds: "-1".to_string(), date_time: Some("1969-12-31T23:59:59Z".to_string()), @@ -378,14 +380,14 @@ mod tests { // The extremes of ISO8601: assert_eq!( - to_api_scrypto_instant(&Instant::new(253402300799)).unwrap(), + to_api_scrypto_instant(&Instant::new(253402300799)), models::ScryptoInstant { unix_timestamp_seconds: "253402300799".to_string(), date_time: Some("9999-12-31T23:59:59Z".to_string()), } ); assert_eq!( - to_api_scrypto_instant(&Instant::new(-12212553600)).unwrap(), + to_api_scrypto_instant(&Instant::new(-12212553600)), models::ScryptoInstant { unix_timestamp_seconds: "-12212553600".to_string(), date_time: Some("1583-01-01T00:00:00Z".to_string()), @@ -394,14 +396,14 @@ mod tests { // Slightly outside the extremes of ISO8601: assert_eq!( - to_api_scrypto_instant(&Instant::new(253402300800)).unwrap(), + to_api_scrypto_instant(&Instant::new(253402300800)), models::ScryptoInstant { unix_timestamp_seconds: "253402300800".to_string(), date_time: None, } ); assert_eq!( - to_api_scrypto_instant(&Instant::new(-12212553601)).unwrap(), + to_api_scrypto_instant(&Instant::new(-12212553601)), models::ScryptoInstant { unix_timestamp_seconds: "-12212553601".to_string(), date_time: None, @@ -410,14 +412,14 @@ mod tests { // The extremes of i64: assert_eq!( - to_api_scrypto_instant(&Instant::new(i64::MAX)).unwrap(), + to_api_scrypto_instant(&Instant::new(i64::MAX)), models::ScryptoInstant { unix_timestamp_seconds: "9223372036854775807".to_string(), date_time: None, } ); assert_eq!( - to_api_scrypto_instant(&Instant::new(i64::MIN)).unwrap(), + to_api_scrypto_instant(&Instant::new(i64::MIN)), models::ScryptoInstant { unix_timestamp_seconds: "-9223372036854775808".to_string(), date_time: None, @@ -429,7 +431,7 @@ mod tests { fn to_api_clamped_instant_from_epoch_milli_supports_full_i64_range() { // Sanity check (epoch): assert_eq!( - to_api_clamped_instant_from_epoch_milli(0).unwrap(), + to_api_clamped_instant_from_epoch_milli(0), models::InstantMs { unix_timestamp_ms: 0, date_time: "1970-01-01T00:00:00.000Z".to_string(), @@ -438,14 +440,14 @@ mod tests { // Slightly positive and negative: assert_eq!( - to_api_clamped_instant_from_epoch_milli(1).unwrap(), + to_api_clamped_instant_from_epoch_milli(1), models::InstantMs { unix_timestamp_ms: 1, date_time: "1970-01-01T00:00:00.001Z".to_string(), } ); assert_eq!( - to_api_clamped_instant_from_epoch_milli(-1).unwrap(), + to_api_clamped_instant_from_epoch_milli(-1), models::InstantMs { unix_timestamp_ms: 0, // this is the reason for "clamped" in the name date_time: "1970-01-01T00:00:00.000Z".to_string(), @@ -454,14 +456,14 @@ mod tests { // Our arbitrary 10^14 maximum, and what happens above it: assert_eq!( - to_api_clamped_instant_from_epoch_milli(100000000000000).unwrap(), + to_api_clamped_instant_from_epoch_milli(100000000000000), models::InstantMs { unix_timestamp_ms: 100000000000000, date_time: "5138-11-16T09:46:40.000Z".to_string(), } ); assert_eq!( - to_api_clamped_instant_from_epoch_milli(100000000000001).unwrap(), + to_api_clamped_instant_from_epoch_milli(100000000000001), models::InstantMs { unix_timestamp_ms: 100000000000000, // clamped as expected date_time: "5138-11-16T09:46:40.000Z".to_string(), @@ -470,14 +472,14 @@ mod tests { // The extremes of i64: assert_eq!( - to_api_clamped_instant_from_epoch_milli(i64::MAX).unwrap(), + to_api_clamped_instant_from_epoch_milli(i64::MAX), models::InstantMs { unix_timestamp_ms: 100000000000000, date_time: "5138-11-16T09:46:40.000Z".to_string(), } ); assert_eq!( - to_api_clamped_instant_from_epoch_milli(i64::MIN).unwrap(), + to_api_clamped_instant_from_epoch_milli(i64::MIN), models::InstantMs { unix_timestamp_ms: 0, date_time: "1970-01-01T00:00:00.000Z".to_string(), diff --git a/core-rust/core-api-server/src/core_api/conversions/substates/access_controller.rs b/core-rust/core-api-server/src/core_api/conversions/substates/access_controller.rs index 4949d5e116..12b61ae898 100644 --- a/core-rust/core-api-server/src/core_api/conversions/substates/access_controller.rs +++ b/core-rust/core-api-server/src/core_api/conversions/substates/access_controller.rs @@ -73,7 +73,6 @@ pub fn to_api_access_controller_substate( )?), allow_timed_recovery_after: timed_recovery_allowed_after .map(to_api_scrypto_instant) - .transpose()? .map(Box::new), })) } diff --git a/core-rust/core-api-server/src/core_api/conversions/substates/consensus_manager.rs b/core-rust/core-api-server/src/core_api/conversions/substates/consensus_manager.rs index 23b1da2e2b..2097018bc2 100644 --- a/core-rust/core-api-server/src/core_api/conversions/substates/consensus_manager.rs +++ b/core-rust/core-api-server/src/core_api/conversions/substates/consensus_manager.rs @@ -243,10 +243,10 @@ pub fn to_api_consensus_manager_state_substate( is_started: *started, effective_epoch_start: Box::new(to_api_clamped_instant_from_epoch_milli( *effective_epoch_start_milli, - )?), + )), actual_epoch_start: Box::new(to_api_clamped_instant_from_epoch_milli( *actual_epoch_start_milli, - )?), + )), current_leader: current_leader .as_ref() .map(|validator_index| to_api_active_validator_index(*validator_index)) @@ -330,7 +330,7 @@ pub fn to_api_current_time_substate( ConsensusManagerFieldCurrentTime, ProposerMilliTimestampSubstate { epoch_milli }, Value { - proposer_timestamp: Box::new(to_api_clamped_instant_from_epoch_milli(*epoch_milli)?), + proposer_timestamp: Box::new(to_api_clamped_instant_from_epoch_milli(*epoch_milli)), } )) } @@ -344,7 +344,7 @@ pub fn to_api_current_time_rounded_to_minutes_substate( ProposerMinuteTimestampSubstate { epoch_minute }, Value { proposer_timestamp_rounded_down_to_minute: Box::new( - to_api_clamped_instant_from_epoch_milli(i64::from(*epoch_minute) * 60 * 1000)?, + to_api_clamped_instant_from_epoch_milli(i64::from(*epoch_minute) * 60 * 1000), ), } )) diff --git a/core-rust/core-api-server/src/core_api/generated/models/executed_scenario_transaction.rs b/core-rust/core-api-server/src/core_api/generated/models/executed_scenario_transaction.rs index 3905399651..e98f1ebca3 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/executed_scenario_transaction.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/executed_scenario_transaction.rs @@ -17,10 +17,10 @@ pub struct ExecutedScenarioTransaction { pub logical_name: String, #[serde(rename = "state_version")] pub state_version: i64, - /// The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + /// The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. #[serde(rename = "intent_hash")] pub intent_hash: String, - /// The Bech32m-encoded human readable `IntentHash`. + /// The Bech32m-encoded human readable `TransactionIntentHash`. #[serde(rename = "intent_hash_bech32m")] pub intent_hash_bech32m: String, } diff --git a/core-rust/core-api-server/src/core_api/generated/models/intent_core_v2.rs b/core-rust/core-api-server/src/core_api/generated/models/intent_core_v2.rs new file mode 100644 index 0000000000..5fe13842a7 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/intent_core_v2.rs @@ -0,0 +1,42 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct IntentCoreV2 { + #[serde(rename = "intent_header")] + pub intent_header: Box, + #[serde(rename = "children_specifiers")] + pub children_specifiers: Vec, + /// A map of the hex-encoded blob hash, to hex-encoded blob content. Only returned if enabled in `TransactionFormatOptions` on your request. + #[serde(rename = "blobs_hex", skip_serializing_if = "Option::is_none")] + pub blobs_hex: Option<::radix_rust::prelude::IndexMap>, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option>, + /// The decompiled transaction manifest instructions. Only returned if enabled in `TransactionFormatOptions` on your request. + #[serde(rename = "instructions", skip_serializing_if = "Option::is_none")] + pub instructions: Option, +} + +impl IntentCoreV2 { + pub fn new(intent_header: crate::core_api::generated::models::IntentHeaderV2, children_specifiers: Vec) -> IntentCoreV2 { + IntentCoreV2 { + intent_header: Box::new(intent_header), + children_specifiers, + blobs_hex: None, + message: None, + instructions: None, + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/intent_header_v2.rs b/core-rust/core-api-server/src/core_api/generated/models/intent_header_v2.rs new file mode 100644 index 0000000000..6f50166a0f --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/intent_header_v2.rs @@ -0,0 +1,49 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + +/// IntentHeaderV2 : The metadata common to both transaction intents and subintents. The `min_proposer_timestamp_inclusive` and `max_proposer_timestamp_exclusive` are both optional. + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct IntentHeaderV2 { + /// The logical id of the network + #[serde(rename = "network_id")] + pub network_id: i32, + /// An integer between `0` and `10^10`, marking the epoch from which the transaction can be submitted. In the case of uncommitted transactions, a value of `10^10` indicates that the epoch was >= `10^10`. + #[serde(rename = "start_epoch_inclusive")] + pub start_epoch_inclusive: i64, + /// An integer between `0` and `10^10`, marking the epoch from which the transaction will no longer be valid, and be rejected. In the case of uncommitted transactions, a value of `10^10` indicates that the epoch was >= `10^10`. + #[serde(rename = "end_epoch_exclusive")] + pub end_epoch_exclusive: i64, + #[serde(rename = "min_proposer_timestamp_inclusive", skip_serializing_if = "Option::is_none")] + pub min_proposer_timestamp_inclusive: Option>, + #[serde(rename = "max_proposer_timestamp_exclusive", skip_serializing_if = "Option::is_none")] + pub max_proposer_timestamp_exclusive: Option>, + /// The string representation of an integer between `0` and `2^64 - 1`, which can be chosen to ensure that a unique intent can be created. It only needs to be unique for a particular intent content and epoch/timestamp, and can be safely selected randomly to very high probability. This field was called `nonce` in the V1 models, but was a misleading name, as it got confused with a cryptographic nonce or an Ethereum-style nonce, and it is neither. + #[serde(rename = "intent_discriminator")] + pub intent_discriminator: String, +} + +impl IntentHeaderV2 { + /// The metadata common to both transaction intents and subintents. The `min_proposer_timestamp_inclusive` and `max_proposer_timestamp_exclusive` are both optional. + pub fn new(network_id: i32, start_epoch_inclusive: i64, end_epoch_exclusive: i64, intent_discriminator: String) -> IntentHeaderV2 { + IntentHeaderV2 { + network_id, + start_epoch_inclusive, + end_epoch_exclusive, + min_proposer_timestamp_inclusive: None, + max_proposer_timestamp_exclusive: None, + intent_discriminator, + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/intent_signatures.rs b/core-rust/core-api-server/src/core_api/generated/models/intent_signatures.rs new file mode 100644 index 0000000000..661cd65cb5 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/intent_signatures.rs @@ -0,0 +1,30 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + +/// IntentSignatures : Signatures against the given intent. + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct IntentSignatures { + #[serde(rename = "signatures")] + pub signatures: Vec, +} + +impl IntentSignatures { + /// Signatures against the given intent. + pub fn new(signatures: Vec) -> IntentSignatures { + IntentSignatures { + signatures, + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/lts_transaction_status_request.rs b/core-rust/core-api-server/src/core_api/generated/models/lts_transaction_status_request.rs index 82c1597000..9a1bab9352 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/lts_transaction_status_request.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/lts_transaction_status_request.rs @@ -16,7 +16,7 @@ pub struct LtsTransactionStatusRequest { /// The logical name of the network #[serde(rename = "network")] pub network: String, - /// The intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. + /// The transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. #[serde(rename = "intent_hash")] pub intent_hash: String, } diff --git a/core-rust/core-api-server/src/core_api/generated/models/mempool_transaction_hashes.rs b/core-rust/core-api-server/src/core_api/generated/models/mempool_transaction_hashes.rs index bf323aeea0..7d11077fd1 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/mempool_transaction_hashes.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/mempool_transaction_hashes.rs @@ -13,10 +13,10 @@ #[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] pub struct MempoolTransactionHashes { - /// The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + /// The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. #[serde(rename = "intent_hash")] pub intent_hash: String, - /// The Bech32m-encoded human readable `IntentHash`. + /// The Bech32m-encoded human readable `TransactionIntentHash`. #[serde(rename = "intent_hash_bech32m")] pub intent_hash_bech32m: String, /// The hex-encoded notarized transaction hash for a user transaction. This hash identifies the full submittable notarized transaction - ie the signed intent, plus the notary signature. diff --git a/core-rust/core-api-server/src/core_api/generated/models/mod.rs b/core-rust/core-api-server/src/core_api/generated/models/mod.rs index 1f39c6f5dd..46dfbd5760 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/mod.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/mod.rs @@ -418,6 +418,12 @@ pub mod instant_ms; pub use self::instant_ms::InstantMs; pub mod instruction_resource_changes; pub use self::instruction_resource_changes::InstructionResourceChanges; +pub mod intent_core_v2; +pub use self::intent_core_v2::IntentCoreV2; +pub mod intent_header_v2; +pub use self::intent_header_v2::IntentHeaderV2; +pub mod intent_signatures; +pub use self::intent_signatures::IntentSignatures; pub mod key_value_based_structure; pub use self::key_value_based_structure::KeyValueBasedStructure; pub mod key_value_blueprint_collection_schema; @@ -986,6 +992,8 @@ pub mod signature_with_public_key; pub use self::signature_with_public_key::SignatureWithPublicKey; pub mod signed_transaction_intent; pub use self::signed_transaction_intent::SignedTransactionIntent; +pub mod signed_transaction_intent_v2; +pub use self::signed_transaction_intent_v2::SignedTransactionIntentV2; pub mod significant_protocol_update_readiness_entry; pub use self::significant_protocol_update_readiness_entry::SignificantProtocolUpdateReadinessEntry; pub mod sorted_index_blueprint_collection_schema; @@ -1102,6 +1110,8 @@ pub mod string_plaintext_message_content; pub use self::string_plaintext_message_content::StringPlaintextMessageContent; pub mod string_plaintext_message_content_all_of; pub use self::string_plaintext_message_content_all_of::StringPlaintextMessageContentAllOf; +pub mod subintent_v2; +pub use self::subintent_v2::SubintentV2; pub mod substate; pub use self::substate::Substate; pub mod substate_format_options; @@ -1152,6 +1162,8 @@ pub mod transaction_format_options; pub use self::transaction_format_options::TransactionFormatOptions; pub mod transaction_header; pub use self::transaction_header::TransactionHeader; +pub mod transaction_header_v2; +pub use self::transaction_header_v2::TransactionHeaderV2; pub mod transaction_id_key; pub use self::transaction_id_key::TransactionIdKey; pub mod transaction_identifiers; @@ -1160,6 +1172,8 @@ pub mod transaction_intent; pub use self::transaction_intent::TransactionIntent; pub mod transaction_intent_status; pub use self::transaction_intent_status::TransactionIntentStatus; +pub mod transaction_intent_v2; +pub use self::transaction_intent_v2::TransactionIntentV2; pub mod transaction_message; pub use self::transaction_message::TransactionMessage; pub mod transaction_message_type; diff --git a/core-rust/core-api-server/src/core_api/generated/models/notarized_transaction_v2.rs b/core-rust/core-api-server/src/core_api/generated/models/notarized_transaction_v2.rs index fb03092588..540c32f70a 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/notarized_transaction_v2.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/notarized_transaction_v2.rs @@ -13,14 +13,29 @@ #[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] pub struct NotarizedTransactionV2 { - #[serde(rename = "todo", skip_serializing_if = "Option::is_none")] - pub todo: Option, + /// The hex-encoded notarized transaction hash for a user transaction. This hash identifies the full submittable notarized transaction - ie the signed intent, plus the notary signature. + #[serde(rename = "hash")] + pub hash: String, + /// The Bech32m-encoded human readable `NotarizedTransactionHash`. + #[serde(rename = "hash_bech32m")] + pub hash_bech32m: String, + /// The hex-encoded full notarized transaction payload. Returning this can be disabled in TransactionFormatOptions on your request (default true). + #[serde(rename = "payload_hex", skip_serializing_if = "Option::is_none")] + pub payload_hex: Option, + #[serde(rename = "signed_transaction_intent")] + pub signed_transaction_intent: Box, + #[serde(rename = "notary_signature")] + pub notary_signature: Option, // Using Option permits Default trait; Will always be Some in normal use } impl NotarizedTransactionV2 { - pub fn new() -> NotarizedTransactionV2 { + pub fn new(hash: String, hash_bech32m: String, signed_transaction_intent: crate::core_api::generated::models::SignedTransactionIntentV2, notary_signature: crate::core_api::generated::models::Signature) -> NotarizedTransactionV2 { NotarizedTransactionV2 { - todo: None, + hash, + hash_bech32m, + payload_hex: None, + signed_transaction_intent: Box::new(signed_transaction_intent), + notary_signature: Option::Some(notary_signature), } } } diff --git a/core-rust/core-api-server/src/core_api/generated/models/parsed_ledger_transaction_identifiers.rs b/core-rust/core-api-server/src/core_api/generated/models/parsed_ledger_transaction_identifiers.rs index 91283865ae..fd95519535 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/parsed_ledger_transaction_identifiers.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/parsed_ledger_transaction_identifiers.rs @@ -13,16 +13,16 @@ #[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] pub struct ParsedLedgerTransactionIdentifiers { - /// The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + /// The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. #[serde(rename = "intent_hash", skip_serializing_if = "Option::is_none")] pub intent_hash: Option, - /// The Bech32m-encoded human readable `IntentHash`. + /// The Bech32m-encoded human readable `TransactionIntentHash`. #[serde(rename = "intent_hash_bech32m", skip_serializing_if = "Option::is_none")] pub intent_hash_bech32m: Option, - /// The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable NotarizedTransaction. + /// The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. #[serde(rename = "signed_intent_hash", skip_serializing_if = "Option::is_none")] pub signed_intent_hash: Option, - /// The Bech32m-encoded human readable `SignedIntentHash`. + /// The Bech32m-encoded human readable `SignedTransactionIntentHash`. #[serde(rename = "signed_intent_hash_bech32m", skip_serializing_if = "Option::is_none")] pub signed_intent_hash_bech32m: Option, /// The hex-encoded notarized transaction hash for a user transaction. This hash identifies the full submittable notarized transaction - ie the signed intent, plus the notary signature. diff --git a/core-rust/core-api-server/src/core_api/generated/models/parsed_notarized_transaction_identifiers.rs b/core-rust/core-api-server/src/core_api/generated/models/parsed_notarized_transaction_identifiers.rs index 20bc7fe56d..15fb30a843 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/parsed_notarized_transaction_identifiers.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/parsed_notarized_transaction_identifiers.rs @@ -13,16 +13,16 @@ #[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] pub struct ParsedNotarizedTransactionIdentifiers { - /// The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + /// The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. #[serde(rename = "intent_hash")] pub intent_hash: String, - /// The Bech32m-encoded human readable `IntentHash`. + /// The Bech32m-encoded human readable `TransactionIntentHash`. #[serde(rename = "intent_hash_bech32m")] pub intent_hash_bech32m: String, - /// The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable NotarizedTransaction. + /// The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. #[serde(rename = "signed_intent_hash")] pub signed_intent_hash: String, - /// The Bech32m-encoded human readable `SignedIntentHash`. + /// The Bech32m-encoded human readable `SignedTransactionIntentHash`. #[serde(rename = "signed_intent_hash_bech32m")] pub signed_intent_hash_bech32m: String, /// The hex-encoded notarized transaction hash for a user transaction. This hash identifies the full submittable notarized transaction - ie the signed intent, plus the notary signature. diff --git a/core-rust/core-api-server/src/core_api/generated/models/parsed_signed_transaction_intent_identifiers.rs b/core-rust/core-api-server/src/core_api/generated/models/parsed_signed_transaction_intent_identifiers.rs index 60ed465b48..22d3690976 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/parsed_signed_transaction_intent_identifiers.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/parsed_signed_transaction_intent_identifiers.rs @@ -13,16 +13,16 @@ #[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] pub struct ParsedSignedTransactionIntentIdentifiers { - /// The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + /// The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. #[serde(rename = "intent_hash")] pub intent_hash: String, - /// The Bech32m-encoded human readable `IntentHash`. + /// The Bech32m-encoded human readable `TransactionIntentHash`. #[serde(rename = "intent_hash_bech32m")] pub intent_hash_bech32m: String, - /// The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable NotarizedTransaction. + /// The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. #[serde(rename = "signed_intent_hash")] pub signed_intent_hash: String, - /// The Bech32m-encoded human readable `SignedIntentHash`. + /// The Bech32m-encoded human readable `SignedTransactionIntentHash`. #[serde(rename = "signed_intent_hash_bech32m")] pub signed_intent_hash_bech32m: String, } diff --git a/core-rust/core-api-server/src/core_api/generated/models/parsed_transaction_intent_identifiers.rs b/core-rust/core-api-server/src/core_api/generated/models/parsed_transaction_intent_identifiers.rs index 297b521b41..20fe98cc73 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/parsed_transaction_intent_identifiers.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/parsed_transaction_intent_identifiers.rs @@ -13,10 +13,10 @@ #[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] pub struct ParsedTransactionIntentIdentifiers { - /// The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + /// The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. #[serde(rename = "intent_hash")] pub intent_hash: String, - /// The Bech32m-encoded human readable `IntentHash`. + /// The Bech32m-encoded human readable `TransactionIntentHash`. #[serde(rename = "intent_hash_bech32m")] pub intent_hash_bech32m: String, } diff --git a/core-rust/core-api-server/src/core_api/generated/models/signed_transaction_intent.rs b/core-rust/core-api-server/src/core_api/generated/models/signed_transaction_intent.rs index 17ff877c4a..a24c7496e4 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/signed_transaction_intent.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/signed_transaction_intent.rs @@ -13,10 +13,10 @@ #[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] pub struct SignedTransactionIntent { - /// The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable NotarizedTransaction. + /// The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. #[serde(rename = "hash")] pub hash: String, - /// The Bech32m-encoded human readable `SignedIntentHash`. + /// The Bech32m-encoded human readable `SignedTransactionIntentHash`. #[serde(rename = "hash_bech32m")] pub hash_bech32m: String, #[serde(rename = "intent")] diff --git a/core-rust/core-api-server/src/core_api/generated/models/signed_transaction_intent_v2.rs b/core-rust/core-api-server/src/core_api/generated/models/signed_transaction_intent_v2.rs new file mode 100644 index 0000000000..0976599f02 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/signed_transaction_intent_v2.rs @@ -0,0 +1,43 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct SignedTransactionIntentV2 { + /// The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. + #[serde(rename = "hash")] + pub hash: String, + /// The Bech32m-encoded human readable `SignedTransactionIntentHash`. + #[serde(rename = "hash_bech32m")] + pub hash_bech32m: String, + #[serde(rename = "transaction_intent")] + pub transaction_intent: Box, + #[serde(rename = "transaction_intent_signatures")] + pub transaction_intent_signatures: Box, + /// This gives the signatures for each subintent in `non_root_subintents` in `TransactionIntentV2`. For committed transactions, these arrays are of equal length and correspond one-to-one in order. + #[serde(rename = "non_root_subintent_signatures")] + pub non_root_subintent_signatures: Vec, +} + +impl SignedTransactionIntentV2 { + pub fn new(hash: String, hash_bech32m: String, transaction_intent: crate::core_api::generated::models::TransactionIntentV2, transaction_intent_signatures: crate::core_api::generated::models::IntentSignatures, non_root_subintent_signatures: Vec) -> SignedTransactionIntentV2 { + SignedTransactionIntentV2 { + hash, + hash_bech32m, + transaction_intent: Box::new(transaction_intent), + transaction_intent_signatures: Box::new(transaction_intent_signatures), + non_root_subintent_signatures, + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/subintent_v2.rs b/core-rust/core-api-server/src/core_api/generated/models/subintent_v2.rs new file mode 100644 index 0000000000..ba8717c106 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/subintent_v2.rs @@ -0,0 +1,36 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct SubintentV2 { + /// The hex-encoded subintent hash for a subintent, also known as the partial transaction id. This hash identifies the subintent. Each subintent can only be *successfully* committed once, but unlike a transaction intent, could be committed as a failure zero or more times first. This hash gets signed by any signatories on subintent. + #[serde(rename = "hash")] + pub hash: String, + /// The Bech32m-encoded human readable `SubintentHash`. + #[serde(rename = "hash_bech32m")] + pub hash_bech32m: String, + #[serde(rename = "intent_core")] + pub intent_core: Box, +} + +impl SubintentV2 { + pub fn new(hash: String, hash_bech32m: String, intent_core: crate::core_api::generated::models::IntentCoreV2) -> SubintentV2 { + SubintentV2 { + hash, + hash_bech32m, + intent_core: Box::new(intent_core), + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/transaction_header.rs b/core-rust/core-api-server/src/core_api/generated/models/transaction_header.rs index 0c202f4f48..db3b4c482c 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/transaction_header.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/transaction_header.rs @@ -22,7 +22,7 @@ pub struct TransactionHeader { /// An integer between `0` and `10^10`, marking the epoch from which the transaction will no longer be valid, and be rejected. In the case of uncommitted transactions, a value of `10^10` indicates that the epoch was >= `10^10`. #[serde(rename = "end_epoch_exclusive")] pub end_epoch_exclusive: i64, - /// An integer between `0` and `2^32 - 1`, chosen to allow a unique intent to be created (to enable submitting an otherwise identical/duplicate intent). + /// An integer between `0` and `2^32 - 1`, chosen to allow a unique intent to be created (to enable submitting an otherwise identical/duplicate intent). As of Cuttlefish and V2 transaction models, this is now referred to in documentation as the `intent_discriminator`. #[serde(rename = "nonce")] pub nonce: i64, #[serde(rename = "notary_public_key")] diff --git a/core-rust/core-api-server/src/core_api/generated/models/transaction_header_v2.rs b/core-rust/core-api-server/src/core_api/generated/models/transaction_header_v2.rs new file mode 100644 index 0000000000..4f70d71468 --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/transaction_header_v2.rs @@ -0,0 +1,36 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct TransactionHeaderV2 { + #[serde(rename = "notary_public_key")] + pub notary_public_key: Option, // Using Option permits Default trait; Will always be Some in normal use + /// Specifies whether the notary public key should be included in the transaction signers list + #[serde(rename = "notary_is_signatory")] + pub notary_is_signatory: bool, + /// An integer between `0` and `2^32 - 1 = 4294967295`, giving the validator tip as a basis points amount. That is, a value of `1` corresponds to an additional tip on 0.01% of the base fee. + #[serde(rename = "tip_basis_points")] + pub tip_basis_points: i64, +} + +impl TransactionHeaderV2 { + pub fn new(notary_public_key: crate::core_api::generated::models::PublicKey, notary_is_signatory: bool, tip_basis_points: i64) -> TransactionHeaderV2 { + TransactionHeaderV2 { + notary_public_key: Option::Some(notary_public_key), + notary_is_signatory, + tip_basis_points, + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/transaction_id_key.rs b/core-rust/core-api-server/src/core_api/generated/models/transaction_id_key.rs index ade7a58fae..eeb1f423e8 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/transaction_id_key.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/transaction_id_key.rs @@ -13,10 +13,10 @@ #[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] pub struct TransactionIdKey { - /// The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + /// The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. #[serde(rename = "intent_hash")] pub intent_hash: String, - /// The Bech32m-encoded human readable `IntentHash`. + /// The Bech32m-encoded human readable `TransactionIntentHash`. #[serde(rename = "intent_hash_bech32m")] pub intent_hash_bech32m: String, } diff --git a/core-rust/core-api-server/src/core_api/generated/models/transaction_identifiers.rs b/core-rust/core-api-server/src/core_api/generated/models/transaction_identifiers.rs index 854a23b9f0..eb9fe71cc8 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/transaction_identifiers.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/transaction_identifiers.rs @@ -13,16 +13,16 @@ #[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] pub struct TransactionIdentifiers { - /// The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + /// The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. #[serde(rename = "intent_hash")] pub intent_hash: String, - /// The Bech32m-encoded human readable `IntentHash`. + /// The Bech32m-encoded human readable `TransactionIntentHash`. #[serde(rename = "intent_hash_bech32m")] pub intent_hash_bech32m: String, - /// The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable NotarizedTransaction. + /// The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. #[serde(rename = "signed_intent_hash")] pub signed_intent_hash: String, - /// The Bech32m-encoded human readable `SignedIntentHash`. + /// The Bech32m-encoded human readable `SignedTransactionIntentHash`. #[serde(rename = "signed_intent_hash_bech32m")] pub signed_intent_hash_bech32m: String, /// The hex-encoded notarized transaction hash for a user transaction. This hash identifies the full submittable notarized transaction - ie the signed intent, plus the notary signature. diff --git a/core-rust/core-api-server/src/core_api/generated/models/transaction_intent.rs b/core-rust/core-api-server/src/core_api/generated/models/transaction_intent.rs index 6228cf5577..891ce3f720 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/transaction_intent.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/transaction_intent.rs @@ -13,10 +13,10 @@ #[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] pub struct TransactionIntent { - /// The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + /// The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. #[serde(rename = "hash")] pub hash: String, - /// The Bech32m-encoded human readable `IntentHash`. + /// The Bech32m-encoded human readable `TransactionIntentHash`. #[serde(rename = "hash_bech32m")] pub hash_bech32m: String, #[serde(rename = "header")] diff --git a/core-rust/core-api-server/src/core_api/generated/models/transaction_intent_v2.rs b/core-rust/core-api-server/src/core_api/generated/models/transaction_intent_v2.rs new file mode 100644 index 0000000000..e3d9f50eaa --- /dev/null +++ b/core-rust/core-api-server/src/core_api/generated/models/transaction_intent_v2.rs @@ -0,0 +1,42 @@ +/* + * Radix Core API + * + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, serde::Serialize, serde::Deserialize)] +pub struct TransactionIntentV2 { + /// The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + #[serde(rename = "hash")] + pub hash: String, + /// The Bech32m-encoded human readable `TransactionIntentHash`. + #[serde(rename = "hash_bech32m")] + pub hash_bech32m: String, + #[serde(rename = "transaction_header")] + pub transaction_header: Box, + #[serde(rename = "root_intent_core")] + pub root_intent_core: Box, + #[serde(rename = "non_root_subintents")] + pub non_root_subintents: Vec, +} + +impl TransactionIntentV2 { + pub fn new(hash: String, hash_bech32m: String, transaction_header: crate::core_api::generated::models::TransactionHeaderV2, root_intent_core: crate::core_api::generated::models::IntentCoreV2, non_root_subintents: Vec) -> TransactionIntentV2 { + TransactionIntentV2 { + hash, + hash_bech32m, + transaction_header: Box::new(transaction_header), + root_intent_core: Box::new(root_intent_core), + non_root_subintents, + } + } +} + + diff --git a/core-rust/core-api-server/src/core_api/generated/models/transaction_receipt_request.rs b/core-rust/core-api-server/src/core_api/generated/models/transaction_receipt_request.rs index ba7c16c161..969cebdfdf 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/transaction_receipt_request.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/transaction_receipt_request.rs @@ -16,7 +16,7 @@ pub struct TransactionReceiptRequest { /// The logical name of the network #[serde(rename = "network")] pub network: String, - /// The intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. + /// The transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. #[serde(rename = "intent_hash")] pub intent_hash: String, #[serde(rename = "transaction_format_options", skip_serializing_if = "Option::is_none")] diff --git a/core-rust/core-api-server/src/core_api/generated/models/transaction_status_request.rs b/core-rust/core-api-server/src/core_api/generated/models/transaction_status_request.rs index 9227969e4e..cad06c5598 100644 --- a/core-rust/core-api-server/src/core_api/generated/models/transaction_status_request.rs +++ b/core-rust/core-api-server/src/core_api/generated/models/transaction_status_request.rs @@ -16,7 +16,7 @@ pub struct TransactionStatusRequest { /// The logical name of the network #[serde(rename = "network")] pub network: String, - /// The intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. + /// The transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. #[serde(rename = "intent_hash")] pub intent_hash: String, } diff --git a/core-rust/core-api-server/src/core_api/handlers/lts/transaction_construction.rs b/core-rust/core-api-server/src/core_api/handlers/lts/transaction_construction.rs index 4374f5bce0..750a4065fe 100644 --- a/core-rust/core-api-server/src/core_api/handlers/lts/transaction_construction.rs +++ b/core-rust/core-api-server/src/core_api/handlers/lts/transaction_construction.rs @@ -32,6 +32,6 @@ pub(crate) async fn handle_lts_transaction_construction( current_epoch: to_api_epoch(&mapping_context, consensus_manager_substate.epoch)?, ledger_clock: Box::new(to_api_clamped_instant_from_epoch_milli( timestamp_substate.epoch_milli, - )?), + )), })) } diff --git a/core-rust/core-api-server/src/core_api/handlers/lts/transaction_submit.rs b/core-rust/core-api-server/src/core_api/handlers/lts/transaction_submit.rs index 9fa815f502..1028e3d0ca 100644 --- a/core-rust/core-api-server/src/core_api/handlers/lts/transaction_submit.rs +++ b/core-rust/core-api-server/src/core_api/handlers/lts/transaction_submit.rs @@ -65,13 +65,13 @@ pub(crate) async fn handle_lts_transaction_submit( retry_from_timestamp: match rejection.retry_from { RetryFrom::Never => None, RetryFrom::FromTime(time) => Some(Box::new( - to_api_clamped_instant_from_epoch_milli(to_unix_timestamp_ms(time)?)?, + to_api_clamped_instant_from_epoch_milli(to_unix_timestamp_ms(time)?), )), RetryFrom::FromEpoch(_) => None, RetryFrom::Whenever => { Some(Box::new(to_api_clamped_instant_from_epoch_milli( to_unix_timestamp_ms(std::time::SystemTime::now())?, - )?)) + ))) } }, retry_from_epoch: match rejection.retry_from { diff --git a/core-rust/core-api-server/src/core_api/handlers/stream_transactions.rs b/core-rust/core-api-server/src/core_api/handlers/stream_transactions.rs index f6ccd14d6c..dd35a2863a 100644 --- a/core-rust/core-api-server/src/core_api/handlers/stream_transactions.rs +++ b/core-rust/core-api-server/src/core_api/handlers/stream_transactions.rs @@ -429,16 +429,6 @@ pub fn to_api_notarized_transaction_v1( }) } -pub fn to_api_notarized_transaction_v2( - _context: &MappingContext, - _notarized: &NotarizedTransactionV2, - _user_hashes: &UserTransactionHashes, -) -> Result { - Ok(models::NotarizedTransactionV2 { - todo: Some("TODO:CUTTLEFISH".to_string()), - }) -} - #[tracing::instrument(skip_all)] pub fn to_api_signed_intent( context: &MappingContext, @@ -486,7 +476,7 @@ pub fn to_api_intent_v1( header, blobs, message, - .. + instructions: _, } = intent; let header = Box::new(models::TransactionHeader { @@ -577,6 +567,23 @@ fn to_api_encrypted_message( }) } +fn to_api_encrypted_message_v2( + context: &MappingContext, + encrypted: &EncryptedMessageV2, +) -> Result { + let EncryptedMessageV2 { + encrypted, + decryptors_by_curve, + } = encrypted; + Ok(models::TransactionMessage::EncryptedTransactionMessage { + encrypted_hex: to_hex(&encrypted.0), + curve_decryptor_sets: decryptors_by_curve + .values() + .map(|decryptor_set| to_api_decryptor_set_v2(context, decryptor_set)) + .collect::>()?, + }) +} + fn to_api_decryptor_set( context: &MappingContext, decryptor_set: &DecryptorsByCurve, @@ -602,6 +609,31 @@ fn to_api_decryptor_set( }) } +fn to_api_decryptor_set_v2( + context: &MappingContext, + decryptor_set: &DecryptorsByCurveV2, +) -> Result { + let (dh_ephemeral_public_key, decryptors) = match decryptor_set { + DecryptorsByCurveV2::Ed25519 { + dh_ephemeral_public_key, + decryptors, + } => (PublicKey::Ed25519(*dh_ephemeral_public_key), decryptors), + DecryptorsByCurveV2::Secp256k1 { + dh_ephemeral_public_key, + decryptors, + } => (PublicKey::Secp256k1(*dh_ephemeral_public_key), decryptors), + }; + Ok(models::EncryptedMessageCurveDecryptorSet { + dh_ephemeral_public_key: Some(to_api_public_key(&dh_ephemeral_public_key)), + decryptors: decryptors + .iter() + .map(|(public_key_fingerprint, aes_wrapped_key)| { + to_api_decryptor_v2(context, public_key_fingerprint, aes_wrapped_key) + }) + .collect::>()?, + }) +} + fn to_api_decryptor( _context: &MappingContext, public_key_fingerprint: &PublicKeyFingerprint, @@ -613,6 +645,17 @@ fn to_api_decryptor( }) } +fn to_api_decryptor_v2( + _context: &MappingContext, + public_key_fingerprint: &PublicKeyFingerprint, + aes_wrapped_key: &AesWrapped256BitKey, +) -> Result { + Ok(models::EncryptedMessageDecryptor { + public_key_fingerprint_hex: to_hex(public_key_fingerprint.0), + aes_wrapped_key_hex: to_hex(aes_wrapped_key.0), + }) +} + pub fn to_api_round_update_transaction( context: &MappingContext, round_update_transaction: &RoundUpdateTransactionV1, @@ -626,7 +669,7 @@ pub fn to_api_round_update_transaction( Ok(models::RoundUpdateTransaction { proposer_timestamp: Box::new(to_api_clamped_instant_from_epoch_milli( *proposer_timestamp_ms, - )?), + )), epoch: to_api_epoch(context, *epoch)?, round_in_epoch: to_api_round(*round)?, leader_proposal_history: Box::new(models::LeaderProposalHistory { @@ -798,3 +841,228 @@ fn to_api_direct_substate_id( &typed_substate_key, ) } + +pub fn to_api_notarized_transaction_v2( + context: &MappingContext, + notarized: &NotarizedTransactionV2, + user_hashes: &UserTransactionHashes, +) -> Result { + let payload_hex = if context.transaction_options.include_raw_notarized { + Some(to_hex( + notarized + .to_raw() + .map_err(|err| MappingError::SborEncodeError { + encode_error: err, + message: "Error encoding user payload sbor".to_string(), + })? + .as_slice(), + )) + } else { + None + }; + + let NotarizedTransactionV2 { + signed_transaction_intent, + notary_signature, + } = notarized; + + Ok(models::NotarizedTransactionV2 { + hash: to_api_notarized_transaction_hash(&user_hashes.notarized_transaction_hash), + hash_bech32m: to_api_hash_bech32m(context, &user_hashes.notarized_transaction_hash)?, + payload_hex, + signed_transaction_intent: Box::new(to_api_signed_transaction_intent_v2( + context, + signed_transaction_intent, + &user_hashes.transaction_intent_hash, + &user_hashes.signed_transaction_intent_hash, + )?), + notary_signature: Some(to_api_signature(¬ary_signature.0)), + }) +} + +pub fn to_api_signed_transaction_intent_v2( + context: &MappingContext, + signed: &SignedTransactionIntentV2, + transaction_intent_hash: &TransactionIntentHash, + signed_transaction_intent_hash: &SignedTransactionIntentHash, +) -> Result { + let SignedTransactionIntentV2 { + transaction_intent, + transaction_intent_signatures, + non_root_subintent_signatures, + } = signed; + Ok(models::SignedTransactionIntentV2 { + hash: to_api_signed_transaction_intent_hash(signed_transaction_intent_hash), + hash_bech32m: to_api_hash_bech32m(context, signed_transaction_intent_hash)?, + transaction_intent: Box::new(to_api_transaction_intent_v2( + context, + transaction_intent, + transaction_intent_hash, + )?), + transaction_intent_signatures: Box::new(to_api_intent_signatures_v2( + transaction_intent_signatures.signatures.as_slice(), + )), + non_root_subintent_signatures: non_root_subintent_signatures + .by_subintent + .iter() + .map(|sigs| to_api_intent_signatures_v2(&sigs.signatures)) + .collect(), + }) +} + +pub fn to_api_intent_signatures_v2( + intent_signatures: &[IntentSignatureV1], +) -> models::IntentSignatures { + models::IntentSignatures { + signatures: intent_signatures + .iter() + .map(|s| to_api_signature_with_public_key(&s.0)) + .collect(), + } +} + +pub fn to_api_transaction_intent_v2( + context: &MappingContext, + transaction_intent: &TransactionIntentV2, + transaction_intent_hash: &TransactionIntentHash, +) -> Result { + let TransactionIntentV2 { + transaction_header, + root_intent_core, + non_root_subintents, + } = transaction_intent; + Ok(models::TransactionIntentV2 { + hash: to_api_transaction_intent_hash(transaction_intent_hash), + hash_bech32m: to_api_hash_bech32m(context, transaction_intent_hash)?, + transaction_header: Box::new(to_api_transaction_header_v2(transaction_header)?), + root_intent_core: Box::new(to_api_intent_core_v2(context, root_intent_core)?), + non_root_subintents: non_root_subintents + .0 + .iter() + // TODO:CUTTLEFISH - fix the subintent hashes + .map(|subintent| { + to_api_subintent_v2(context, subintent, &SubintentHash(Hash([0; Hash::LENGTH]))) + }) + .collect::>()?, + }) +} + +pub fn to_api_transaction_header_v2( + transaction_header: &TransactionHeaderV2, +) -> Result { + let TransactionHeaderV2 { + notary_public_key, + notary_is_signatory, + tip_basis_points, + } = transaction_header; + Ok(models::TransactionHeaderV2 { + notary_public_key: Some(to_api_public_key(notary_public_key)), + notary_is_signatory: *notary_is_signatory, + tip_basis_points: to_api_u32_as_i64(*tip_basis_points), + }) +} + +pub fn to_api_subintent_v2( + context: &MappingContext, + subintent: &SubintentV2, + subintent_hash: &SubintentHash, +) -> Result { + let SubintentV2 { intent_core } = subintent; + Ok(models::SubintentV2 { + hash: to_api_subintent_hash(subintent_hash), + hash_bech32m: to_api_hash_bech32m(context, subintent_hash)?, + intent_core: Box::new(to_api_intent_core_v2(context, intent_core)?), + }) +} + +pub fn to_api_intent_core_v2( + context: &MappingContext, + intent_core: &IntentCoreV2, +) -> Result { + let instructions = if context.transaction_options.include_manifest { + let readable_manifest = TransactionManifestV2::from_intent_core(intent_core); + Some( + manifest::decompile(&readable_manifest, &context.network_definition).map_err( + |err| MappingError::InvalidManifest { + message: format!("Failed to decompile a transaction manifest: {err:?}"), + }, + )?, + ) + } else { + None + }; + + let IntentCoreV2 { + header, + blobs, + message, + children, + instructions: _, + } = intent_core; + + let intent_header = { + let IntentHeaderV2 { + network_id, + start_epoch_inclusive, + end_epoch_exclusive, + min_proposer_timestamp_inclusive, + max_proposer_timestamp_exclusive, + intent_discriminator, + } = header; + + models::IntentHeaderV2 { + network_id: (*network_id).into(), + start_epoch_inclusive: to_api_epoch(context, *start_epoch_inclusive)?, + end_epoch_exclusive: to_api_epoch(context, *end_epoch_exclusive)?, + min_proposer_timestamp_inclusive: min_proposer_timestamp_inclusive + .as_ref() + .map(|instant| Box::new(to_api_scrypto_instant(instant))), + max_proposer_timestamp_exclusive: max_proposer_timestamp_exclusive + .as_ref() + .map(|instant| Box::new(to_api_scrypto_instant(instant))), + intent_discriminator: to_api_u64_as_string(*intent_discriminator), + } + }; + + let children_specifiers = { + let ChildSubintentSpecifiersV2 { children } = children; + children + .iter() + .map(|child_specifier| to_api_hash_bech32m(context, &child_specifier.hash)) + .collect::>()? + }; + + let blobs_hex = if context.transaction_options.include_blobs { + Some( + blobs + .blobs + .iter() + .map(|blob| (to_hex(hash(&blob.0)), to_hex(&blob.0))) + .collect(), + ) + } else { + None + }; + + let message = if context.transaction_options.include_message { + match message { + MessageV2::None => None, + MessageV2::Plaintext(plaintext) => { + Some(Box::new(to_api_plaintext_message(context, plaintext)?)) + } + MessageV2::Encrypted(encrypted) => { + Some(Box::new(to_api_encrypted_message_v2(context, encrypted)?)) + } + } + } else { + None + }; + + Ok(models::IntentCoreV2 { + intent_header: Box::new(intent_header), + children_specifiers, + instructions, + blobs_hex, + message, + }) +} diff --git a/core-rust/core-api-server/src/core_api/handlers/transaction_submit.rs b/core-rust/core-api-server/src/core_api/handlers/transaction_submit.rs index c6859d0d32..67992a37f1 100644 --- a/core-rust/core-api-server/src/core_api/handlers/transaction_submit.rs +++ b/core-rust/core-api-server/src/core_api/handlers/transaction_submit.rs @@ -60,13 +60,13 @@ pub(crate) async fn handle_transaction_submit( retry_from_timestamp: match rejection.retry_from { RetryFrom::Never => None, RetryFrom::FromTime(time) => Some(Box::new( - to_api_clamped_instant_from_epoch_milli(to_unix_timestamp_ms(time)?)?, + to_api_clamped_instant_from_epoch_milli(to_unix_timestamp_ms(time)?), )), RetryFrom::FromEpoch(_) => None, RetryFrom::Whenever => { Some(Box::new(to_api_clamped_instant_from_epoch_milli( to_unix_timestamp_ms(std::time::SystemTime::now())?, - )?)) + ))) } }, retry_from_epoch: match rejection.retry_from { diff --git a/core-rust/state-manager/src/protocol/protocol_updates/definitions/default_definition.rs b/core-rust/state-manager/src/protocol/protocol_updates/definitions/default_definition.rs new file mode 100644 index 0000000000..1ec4cadefb --- /dev/null +++ b/core-rust/state-manager/src/protocol/protocol_updates/definitions/default_definition.rs @@ -0,0 +1,28 @@ +use crate::prelude::*; + +pub struct NoOpProtocolDefinition; + +impl ProtocolUpdateDefinition for NoOpProtocolDefinition { + type Overrides = (); + + fn create_batch_generator( + &self, + _context: ProtocolUpdateContext, + _overrides_hash: Option, + _overrides: Option, + ) -> Box { + Box::new(EmptyNodeBatchGenerator) + } +} + +struct EmptyNodeBatchGenerator; + +impl NodeProtocolUpdateGenerator for EmptyNodeBatchGenerator { + fn config_hash(&self) -> Hash { + Hash([0; Hash::LENGTH]) + } + + fn batch_groups(&self) -> Vec> { + vec![] + } +} diff --git a/core-rust/state-manager/src/transaction/ledger_transaction.rs b/core-rust/state-manager/src/transaction/ledger_transaction.rs new file mode 100644 index 0000000000..4684fcaf99 --- /dev/null +++ b/core-rust/state-manager/src/transaction/ledger_transaction.rs @@ -0,0 +1,567 @@ +use crate::engine_prelude::*; + +use crate::transaction::{ConfigType, ConfiguredExecutable}; + +use super::{ + HasRoundUpdateTransactionHash, PreparedRoundUpdateTransactionV1, RoundUpdateTransactionHash, + RoundUpdateTransactionV1, +}; + +#[derive(Debug, Clone, PartialEq, Eq, Sbor)] +pub struct PayloadIdentifiers { + pub ledger_transaction_hash: LedgerTransactionHash, + pub typed: TypedTransactionIdentifiers, +} + +#[derive(Debug, Clone, PartialEq, Eq, Sbor)] +pub enum TypedTransactionIdentifiers { + Genesis { + system_transaction_hash: SystemTransactionHash, + }, + User { + intent_hash: IntentHash, + signed_intent_hash: SignedIntentHash, + notarized_transaction_hash: NotarizedTransactionHash, + }, + RoundUpdateV1 { + round_update_hash: RoundUpdateTransactionHash, + }, + FlashV1 { + flash_transaction_hash: FlashTransactionHash, + }, +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct UserTransactionIdentifiers<'a> { + pub intent_hash: &'a IntentHash, + pub signed_intent_hash: &'a SignedIntentHash, + pub notarized_transaction_hash: &'a NotarizedTransactionHash, +} + +impl TypedTransactionIdentifiers { + pub fn user(&self) -> Option { + match self { + TypedTransactionIdentifiers::User { + intent_hash, + signed_intent_hash, + notarized_transaction_hash, + } => Some(UserTransactionIdentifiers { + intent_hash, + signed_intent_hash, + notarized_transaction_hash, + }), + _ => None, + } + } +} + +#[derive(Debug, Clone, PartialEq, Eq, ManifestCategorize, ManifestEncode, ManifestDecode)] +pub enum LedgerTransaction { + #[sbor(discriminator(GENESIS_LEDGER_TRANSACTION_DISCRIMINATOR))] + Genesis(Box), + #[sbor(discriminator(USER_V1_LEDGER_TRANSACTION_DISCRIMINATOR))] + UserV1(Box), + #[sbor(discriminator(ROUND_UPDATE_V1_LEDGER_TRANSACTION_DISCRIMINATOR))] + RoundUpdateV1(Box), + #[sbor(discriminator(FLASH_V1_LEDGER_TRANSACTION_DISCRIMINATOR))] + FlashV1(Box), +} + +const GENESIS_LEDGER_TRANSACTION_DISCRIMINATOR: u8 = 0; +const USER_V1_LEDGER_TRANSACTION_DISCRIMINATOR: u8 = 1; +const ROUND_UPDATE_V1_LEDGER_TRANSACTION_DISCRIMINATOR: u8 = 2; +const FLASH_V1_LEDGER_TRANSACTION_DISCRIMINATOR: u8 = 3; + +define_raw_transaction_payload!(RawLedgerTransaction); + +// We basically implement TransactionPayload manually for LedgerTransaction because it's not a struct +impl LedgerTransaction { + pub fn to_raw(&self) -> Result { + Ok(self.to_payload_bytes()?.into()) + } + + pub fn to_payload_bytes(&self) -> Result, EncodeError> { + manifest_encode(&FixedEnumVariant::< + { TransactionDiscriminator::V1Ledger as u8 }, + (&LedgerTransaction,), + >::new((self,))) + } + + pub fn from_raw(raw: &RawLedgerTransaction) -> Result { + Self::from_payload_bytes(&raw.0) + } + + pub fn from_raw_user(raw: &RawNotarizedTransaction) -> Result { + Ok(LedgerTransaction::UserV1(Box::new( + NotarizedTransactionV1::from_raw(raw)?, + ))) + } + + pub fn from_payload_bytes(payload_bytes: &[u8]) -> Result { + Ok(manifest_decode::< + FixedEnumVariant<{ TransactionDiscriminator::V1Ledger as u8 }, (LedgerTransaction,)>, + >(payload_bytes)? + .into_fields() + .0) + } + + pub fn prepare(&self) -> Result { + PreparedLedgerTransaction::prepare_from_payload(&self.to_payload_bytes()?) + } +} + +#[derive(Debug, Clone, PartialEq, Eq, ManifestCategorize, ManifestEncode, ManifestDecode)] +pub enum GenesisTransaction { + #[sbor(discriminator(GENESIS_TRANSACTION_FLASH_DISCRIMINATOR))] + Flash, + #[sbor(discriminator(GENESIS_TRANSACTION_SYSTEM_TRANSACTION_DISCRIMINATOR))] + Transaction(Box), +} + +const GENESIS_TRANSACTION_FLASH_DISCRIMINATOR: u8 = 0; +const GENESIS_TRANSACTION_SYSTEM_TRANSACTION_DISCRIMINATOR: u8 = 1; + +#[derive(Debug, Clone, PartialEq, Eq, Sbor)] +pub struct FlashTransactionV1 { + pub name: String, + pub state_updates: StateUpdates, +} + +pub struct PreparedLedgerTransaction { + pub inner: PreparedLedgerTransactionInner, + pub summary: Summary, +} + +impl PreparedLedgerTransaction { + pub fn into_user(self) -> Option> { + match self.inner { + PreparedLedgerTransactionInner::UserV1(t) => Some(t), + _ => None, + } + } + + pub fn as_user(&self) -> Option<&PreparedNotarizedTransactionV1> { + match &self.inner { + PreparedLedgerTransactionInner::UserV1(t) => Some(t.as_ref()), + _ => None, + } + } + + pub fn create_identifiers(&self) -> PayloadIdentifiers { + PayloadIdentifiers { + ledger_transaction_hash: self.ledger_transaction_hash(), + typed: match &self.inner { + PreparedLedgerTransactionInner::Genesis(t) => { + TypedTransactionIdentifiers::Genesis { + system_transaction_hash: t.system_transaction_hash(), + } + } + PreparedLedgerTransactionInner::UserV1(t) => TypedTransactionIdentifiers::User { + intent_hash: t.intent_hash(), + signed_intent_hash: t.signed_intent_hash(), + notarized_transaction_hash: t.notarized_transaction_hash(), + }, + PreparedLedgerTransactionInner::RoundUpdateV1(t) => { + TypedTransactionIdentifiers::RoundUpdateV1 { + round_update_hash: t.round_update_transaction_hash(), + } + } + PreparedLedgerTransactionInner::FlashV1(t) => { + TypedTransactionIdentifiers::FlashV1 { + flash_transaction_hash: t.flash_transaction_hash(), + } + } + }, + } + } +} + +impl HasSummary for PreparedLedgerTransaction { + fn get_summary(&self) -> &Summary { + &self.summary + } +} + +#[derive(BasicCategorize)] +pub enum PreparedLedgerTransactionInner { + #[sbor(discriminator(GENESIS_LEDGER_TRANSACTION_DISCRIMINATOR))] + Genesis(Box), + #[sbor(discriminator(USER_V1_LEDGER_TRANSACTION_DISCRIMINATOR))] + UserV1(Box), + #[sbor(discriminator(ROUND_UPDATE_V1_LEDGER_TRANSACTION_DISCRIMINATOR))] + RoundUpdateV1(Box), + #[sbor(discriminator(FLASH_V1_LEDGER_TRANSACTION_DISCRIMINATOR))] + FlashV1(Box), +} + +impl PreparedLedgerTransactionInner { + pub fn get_ledger_hash(&self) -> LedgerTransactionHash { + LedgerTransactionHash::for_kind(self.get_discriminator(), &self.get_summary().hash) + } +} + +impl HasSummary for PreparedLedgerTransactionInner { + fn get_summary(&self) -> &Summary { + match self { + Self::Genesis(t) => t.get_summary(), + Self::UserV1(t) => t.get_summary(), + Self::RoundUpdateV1(t) => t.get_summary(), + Self::FlashV1(t) => t.get_summary(), + } + } +} + +impl TransactionFullChildPreparable for PreparedLedgerTransactionInner { + fn prepare_as_full_body_child(decoder: &mut TransactionDecoder) -> Result { + decoder.track_stack_depth_increase()?; + let (discriminator, length) = decoder.read_enum_header()?; + let prepared_inner = match discriminator { + GENESIS_LEDGER_TRANSACTION_DISCRIMINATOR => { + check_length(length, 1)?; + let (discriminator, length) = decoder.read_enum_header()?; + let genesis_transaction = match discriminator { + GENESIS_TRANSACTION_FLASH_DISCRIMINATOR => { + check_length(length, 0)?; + PreparedGenesisTransaction::Flash(Summary { + effective_length: 0, + total_bytes_hashed: 0, + hash: hash("Genesis Flash"), + }) + } + GENESIS_TRANSACTION_SYSTEM_TRANSACTION_DISCRIMINATOR => { + check_length(length, 1)?; + let prepared = + PreparedSystemTransactionV1::prepare_as_full_body_child(decoder)?; + PreparedGenesisTransaction::Transaction(Box::new(prepared)) + } + _ => return Err(unknown_discriminator(discriminator)), + }; + PreparedLedgerTransactionInner::Genesis(Box::new(genesis_transaction)) + } + USER_V1_LEDGER_TRANSACTION_DISCRIMINATOR => { + check_length(length, 1)?; + let prepared = PreparedNotarizedTransactionV1::prepare_as_full_body_child(decoder)?; + PreparedLedgerTransactionInner::UserV1(Box::new(prepared)) + } + ROUND_UPDATE_V1_LEDGER_TRANSACTION_DISCRIMINATOR => { + check_length(length, 1)?; + let prepared = + PreparedRoundUpdateTransactionV1::prepare_as_full_body_child(decoder)?; + PreparedLedgerTransactionInner::RoundUpdateV1(Box::new(prepared)) + } + FLASH_V1_LEDGER_TRANSACTION_DISCRIMINATOR => { + check_length(length, 1)?; + let prepared = PreparedFlashTransactionV1::prepare_as_full_body_child(decoder)?; + PreparedLedgerTransactionInner::FlashV1(Box::new(prepared)) + } + _ => return Err(unknown_discriminator(discriminator)), + }; + decoder.track_stack_depth_decrease()?; + + Ok(prepared_inner) + } +} + +fn check_length(actual: usize, expected: usize) -> Result<(), PrepareError> { + if actual != expected { + return Err(PrepareError::DecodeError(DecodeError::UnexpectedSize { + expected, + actual, + })); + } + Ok(()) +} + +fn unknown_discriminator(discriminator: u8) -> PrepareError { + PrepareError::DecodeError(DecodeError::UnknownDiscriminator(discriminator)) +} + +pub enum PreparedGenesisTransaction { + Flash(Summary), + Transaction(Box), +} + +impl HasSummary for PreparedGenesisTransaction { + fn get_summary(&self) -> &Summary { + match self { + PreparedGenesisTransaction::Flash(summary) => summary, + PreparedGenesisTransaction::Transaction(system_transaction) => { + system_transaction.get_summary() + } + } + } +} + +impl HasSystemTransactionHash for PreparedGenesisTransaction { + fn system_transaction_hash(&self) -> SystemTransactionHash { + match self { + PreparedGenesisTransaction::Flash(summary) => SystemTransactionHash(summary.hash), + PreparedGenesisTransaction::Transaction(transaction) => { + transaction.system_transaction_hash() + } + } + } +} + +pub struct PreparedFlashTransactionV1 { + pub name: String, + pub state_updates: StateUpdates, + pub summary: Summary, +} + +impl HasSummary for PreparedFlashTransactionV1 { + fn get_summary(&self) -> &Summary { + &self.summary + } +} + +impl HasFlashTransactionHash for PreparedFlashTransactionV1 { + fn flash_transaction_hash(&self) -> FlashTransactionHash { + FlashTransactionHash(self.summary.hash) + } +} + +impl TransactionFullChildPreparable for PreparedFlashTransactionV1 { + fn prepare_as_full_body_child(decoder: &mut TransactionDecoder) -> Result { + let ((name, state_updates), summary) = + ConcatenatedDigest::prepare_from_transaction_child_struct::<( + SummarizedRawFullBody, + SummarizedRawFullBody, + )>(decoder, TransactionDiscriminator::V1Flash)?; + Ok(Self { + name: name.inner, + state_updates: state_updates.inner, + summary, + }) + } +} + +impl TransactionPayloadPreparable for PreparedLedgerTransaction { + type Raw = RawLedgerTransaction; + + fn prepare_for_payload(decoder: &mut TransactionDecoder) -> Result { + decoder.track_stack_depth_increase()?; + decoder.read_expected_enum_variant_header(TransactionDiscriminator::V1Ledger as u8, 1)?; + let inner = PreparedLedgerTransactionInner::prepare_as_full_body_child(decoder)?; + decoder.track_stack_depth_decrease()?; + + let summary = Summary { + effective_length: inner.get_summary().effective_length, + total_bytes_hashed: inner.get_summary().total_bytes_hashed, + hash: inner.get_ledger_hash().0, + }; + Ok(Self { inner, summary }) + } +} + +pub struct ValidatedLedgerTransaction { + pub inner: ValidatedLedgerTransactionInner, + pub summary: Summary, +} + +#[derive(BasicCategorize)] +pub enum ValidatedLedgerTransactionInner { + #[sbor(discriminator(GENESIS_LEDGER_TRANSACTION_DISCRIMINATOR))] + Genesis(Box), + #[sbor(discriminator(USER_V1_LEDGER_TRANSACTION_DISCRIMINATOR))] + UserV1(Box), + #[sbor(discriminator(ROUND_UPDATE_V1_LEDGER_TRANSACTION_DISCRIMINATOR))] + RoundUpdateV1(Box), + #[sbor(discriminator(FLASH_V1_LEDGER_TRANSACTION_DISCRIMINATOR))] + FlashV1(Box), +} + +impl ValidatedLedgerTransaction { + pub fn intent_hash_if_user(&self) -> Option { + match &self.inner { + ValidatedLedgerTransactionInner::Genesis(_) => None, + ValidatedLedgerTransactionInner::UserV1(t) => Some(t.intent_hash()), + ValidatedLedgerTransactionInner::RoundUpdateV1(_) => None, + ValidatedLedgerTransactionInner::FlashV1(_) => None, + } + } + + pub fn as_flash(&self) -> Option { + match &self.inner { + ValidatedLedgerTransactionInner::Genesis(genesis) => match genesis.as_ref() { + PreparedGenesisTransaction::Flash(..) => Some(ConfiguredExecutable::GenesisFlash { + flash_receipt: create_substate_flash_for_genesis(), + }), + PreparedGenesisTransaction::Transaction(_) => None, + }, + ValidatedLedgerTransactionInner::FlashV1(system_flash) => { + Some(ConfiguredExecutable::SystemFlash { + state_updates: system_flash.state_updates.clone(), + }) + } + _ => None, + } + } + + /// Note - panics if it's a genesis flash + pub fn get_executable(&self) -> Executable<'_> { + match &self.inner { + ValidatedLedgerTransactionInner::Genesis(genesis) => match genesis.as_ref() { + PreparedGenesisTransaction::Flash(_) => { + panic!("Should not call get_executable on a genesis flash") + } + PreparedGenesisTransaction::Transaction(t) => { + t.get_executable(btreeset!(AuthAddresses::system_role())) + } + }, + ValidatedLedgerTransactionInner::UserV1(t) => t.get_executable(), + ValidatedLedgerTransactionInner::RoundUpdateV1(t) => t.get_executable(), + ValidatedLedgerTransactionInner::FlashV1(_) => { + panic!("Should not call get_executable on a flash transaction") + } + } + } + + /// Gets a [`ConfigType`] to be used during regular execution (i.e. not preview, not in-mempool + /// committability check). + pub fn config_type(&self) -> ConfigType { + match &self.inner { + ValidatedLedgerTransactionInner::Genesis(_) => ConfigType::Genesis, + ValidatedLedgerTransactionInner::UserV1(_) => ConfigType::Regular, + ValidatedLedgerTransactionInner::RoundUpdateV1(_) => ConfigType::Regular, + ValidatedLedgerTransactionInner::FlashV1(_) => ConfigType::Regular, + } + } + + pub fn create_identifiers(&self) -> PayloadIdentifiers { + PayloadIdentifiers { + ledger_transaction_hash: self.ledger_transaction_hash(), + typed: match &self.inner { + ValidatedLedgerTransactionInner::Genesis(t) => { + TypedTransactionIdentifiers::Genesis { + system_transaction_hash: t.system_transaction_hash(), + } + } + ValidatedLedgerTransactionInner::UserV1(t) => TypedTransactionIdentifiers::User { + intent_hash: t.intent_hash(), + signed_intent_hash: t.signed_intent_hash(), + notarized_transaction_hash: t.notarized_transaction_hash(), + }, + ValidatedLedgerTransactionInner::RoundUpdateV1(t) => { + TypedTransactionIdentifiers::RoundUpdateV1 { + round_update_hash: t.round_update_transaction_hash(), + } + } + ValidatedLedgerTransactionInner::FlashV1(t) => { + TypedTransactionIdentifiers::FlashV1 { + flash_transaction_hash: t.flash_transaction_hash(), + } + } + }, + } + } +} + +impl HasLedgerTransactionHash for ValidatedLedgerTransaction { + fn ledger_transaction_hash(&self) -> LedgerTransactionHash { + LedgerTransactionHash::from_hash(self.summary.hash) + } +} + +define_wrapped_hash!(LedgerTransactionHash); + +impl LedgerTransactionHash { + pub fn for_genesis(hash: &SystemTransactionHash) -> Self { + Self::for_kind(GENESIS_LEDGER_TRANSACTION_DISCRIMINATOR, &hash.0) + } + + pub fn for_user_v1(hash: &NotarizedTransactionHash) -> Self { + Self::for_kind(USER_V1_LEDGER_TRANSACTION_DISCRIMINATOR, &hash.0) + } + + pub fn for_round_update_v1(hash: &RoundUpdateTransactionHash) -> Self { + Self::for_kind(ROUND_UPDATE_V1_LEDGER_TRANSACTION_DISCRIMINATOR, &hash.0) + } + + fn for_kind(discriminator: u8, inner: &Hash) -> Self { + Self( + HashAccumulator::new() + .update([ + TRANSACTION_HASHABLE_PAYLOAD_PREFIX, + TransactionDiscriminator::V1Ledger as u8, + discriminator, + ]) + .update(inner.as_slice()) + .finalize(), + ) + } +} + +impl HashHasHrp for LedgerTransactionHash { + fn hrp(hrp_set: &HrpSet) -> &str { + &hrp_set.ledger_transaction + } +} + +pub trait HasLedgerTransactionHash { + fn ledger_transaction_hash(&self) -> LedgerTransactionHash; +} + +impl HasLedgerTransactionHash for PreparedLedgerTransaction { + fn ledger_transaction_hash(&self) -> LedgerTransactionHash { + LedgerTransactionHash::from_hash(self.summary.hash) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + pub fn v1_ledger_transaction_structure() { + let sig_1_private_key = Secp256k1PrivateKey::from_u64(1).unwrap(); + let sig_2_private_key = Ed25519PrivateKey::from_u64(2).unwrap(); + let notary_private_key = Ed25519PrivateKey::from_u64(3).unwrap(); + + let notarized = TransactionBuilder::new() + .header(TransactionHeaderV1 { + network_id: 21, + start_epoch_inclusive: Epoch::of(0), + end_epoch_exclusive: Epoch::of(100), + nonce: 0, + notary_public_key: notary_private_key.public_key().into(), + notary_is_signatory: true, + tip_percentage: 0, + }) + .manifest(ManifestBuilder::new().drop_all_proofs().build()) + .sign(&sig_1_private_key) + .sign(&sig_2_private_key) + .notarize(¬ary_private_key) + .build(); + + let prepared_notarized = notarized.prepare().expect("Notarized can be prepared"); + + let ledger = LedgerTransaction::UserV1(Box::new(notarized)); + let ledger_transaction_bytes = ledger.to_payload_bytes().expect("Can be encoded"); + LedgerTransaction::from_payload_bytes(&ledger_transaction_bytes).expect("Can be decoded"); + let prepared_ledger_transaction = + PreparedLedgerTransaction::prepare_from_payload(&ledger_transaction_bytes) + .expect("Can be prepared"); + + let expected_intent_hash = LedgerTransactionHash::from_hash(hash( + [ + [ + TRANSACTION_HASHABLE_PAYLOAD_PREFIX, + TransactionDiscriminator::V1Ledger as u8, + USER_V1_LEDGER_TRANSACTION_DISCRIMINATOR, + ] + .as_slice(), + prepared_notarized.notarized_transaction_hash().0.as_slice(), + ] + .concat(), + )); + assert_eq!( + prepared_ledger_transaction.ledger_transaction_hash(), + expected_intent_hash + ); + assert_eq!( + LedgerTransactionHash::for_user_v1(&prepared_notarized.notarized_transaction_hash()), + expected_intent_hash + ); + } +} diff --git a/core-rust/state-manager/src/transaction/round_update_transaction.rs b/core-rust/state-manager/src/transaction/round_update_transaction.rs new file mode 100644 index 0000000000..4038902a6e --- /dev/null +++ b/core-rust/state-manager/src/transaction/round_update_transaction.rs @@ -0,0 +1,260 @@ +use crate::prelude::*; + +#[derive(Debug, Clone, Categorize, Encode, Decode, PartialEq, Eq)] +pub struct RoundUpdateTransactionV1 { + pub proposer_timestamp_ms: i64, + pub epoch: Epoch, + pub round: Round, + pub leader_proposal_history: LeaderProposalHistory, +} + +impl RoundUpdateTransactionV1 { + pub fn new(epoch_header: Option<&LedgerHeader>, round_history: &RoundHistory) -> Self { + let validator_index_by_address = iterate_validators(epoch_header) + .enumerate() + .map(|(validator_index, validator_id)| { + ( + validator_id.component_address, + ValidatorIndex::try_from(validator_index) + .expect("validator set size limit guarantees this"), + ) + }) + .collect::>(); + RoundUpdateTransactionV1 { + proposer_timestamp_ms: round_history.proposer_timestamp_ms, + epoch: round_history.epoch, + round: round_history.round, + leader_proposal_history: LeaderProposalHistory { + gap_round_leaders: round_history + .gap_round_leader_addresses + .iter() + .map(|leader_address| { + *validator_index_by_address + .get(leader_address) + .expect("gap round leader must belong to the validator set") + }) + .collect::>(), + current_leader: *validator_index_by_address + .get(&round_history.proposer_address) + .expect("proposer must belong to the validator set"), + is_fallback: round_history.is_fallback, + }, + } + } + + /// Note - we purposefully restrict what the content of a Round Update transaction can do + /// so we convert it to instructions at run-time. + pub fn create_instructions(&self) -> Vec { + vec![InstructionV1::CallMethod { + address: CONSENSUS_MANAGER.into(), + method_name: CONSENSUS_MANAGER_NEXT_ROUND_IDENT.to_string(), + args: to_manifest_value(&ConsensusManagerNextRoundInput { + round: self.round, + proposer_timestamp_ms: self.proposer_timestamp_ms, + leader_proposal_history: self.leader_proposal_history.clone(), + }) + .expect("round update input encoding should succeed"), + }] + } + + pub fn prepare(&self) -> Result { + let prepared_instructions = InstructionsV1(self.create_instructions()).prepare_partial()?; + let encoded_source = manifest_encode(&self)?; + // Minor TODO - for a slight performance improvement, change this to be read from the decoder + // As per the other hashes, don't include the prefix byte + let source_hash = hash(&encoded_source[1..]); + let instructions_hash = prepared_instructions.summary.hash; + let round_update_hash = HashAccumulator::new() + .update([ + TRANSACTION_HASHABLE_PAYLOAD_PREFIX, + TransactionDiscriminator::V1RoundUpdate as u8, + ]) + // We include the full source transaction contents + .update(source_hash) + // We also include the instructions hash, so the exact instructions can be proven + .update(instructions_hash) + .finalize(); + Ok(PreparedRoundUpdateTransactionV1 { + encoded_instructions: manifest_encode(&prepared_instructions.inner.0)?, + references: prepared_instructions.references, + blobs: index_map_new(), + summary: Summary { + effective_length: prepared_instructions.summary.effective_length, + total_bytes_hashed: prepared_instructions.summary.total_bytes_hashed, + hash: round_update_hash, + }, + }) + } +} + +impl TransactionPayload for RoundUpdateTransactionV1 { + type Versioned = FixedEnumVariant<{ TransactionDiscriminator::V1RoundUpdate as u8 }, Self>; + type Prepared = PreparedRoundUpdateTransactionV1; + type Raw = RawRoundUpdateTransactionV1; +} + +pub struct PreparedRoundUpdateTransactionV1 { + pub encoded_instructions: Vec, + pub references: IndexSet, + pub blobs: IndexMap>, + pub summary: Summary, +} + +impl HasSummary for PreparedRoundUpdateTransactionV1 { + fn get_summary(&self) -> &Summary { + &self.summary + } +} + +define_raw_transaction_payload!(RawRoundUpdateTransactionV1); + +impl TransactionPayloadPreparable for PreparedRoundUpdateTransactionV1 { + type Raw = RawRoundUpdateTransactionV1; + + fn prepare_for_payload(decoder: &mut TransactionDecoder) -> Result { + let decoded = decoder + .decode::<::Versioned>()? + .fields; + decoded.prepare() + } +} + +impl TransactionFullChildPreparable for PreparedRoundUpdateTransactionV1 { + fn prepare_as_full_body_child(decoder: &mut TransactionDecoder) -> Result { + let decoded = decoder.decode::()?; + decoded.prepare() + } +} + +impl PreparedRoundUpdateTransactionV1 { + pub fn get_executable(&self) -> Executable<'_> { + Executable::new( + &self.encoded_instructions, + &self.references, + &self.blobs, + ExecutionContext { + intent_hash: TransactionIntentHash::NotToCheck { + intent_hash: self.summary.hash, + }, + epoch_range: None, + payload_size: 0, + num_of_signature_validations: 0, + auth_zone_params: AuthZoneParams { + initial_proofs: btreeset!(AuthAddresses::validator_role()), + virtual_resources: BTreeSet::new(), + }, + costing_parameters: TransactionCostingParameters { + tip_percentage: 0, + free_credit_in_xrd: Decimal::ZERO, + abort_when_loan_repaid: false, + }, + pre_allocated_addresses: vec![], + }, + true, + ) + } +} + +define_wrapped_hash!(RoundUpdateTransactionHash); + +impl HasRoundUpdateTransactionHash for PreparedRoundUpdateTransactionV1 { + fn round_update_transaction_hash(&self) -> RoundUpdateTransactionHash { + RoundUpdateTransactionHash::from_hash(self.summary.hash) + } +} + +pub trait HasRoundUpdateTransactionHash { + fn round_update_transaction_hash(&self) -> RoundUpdateTransactionHash; +} + +/// A builder of "successful/timeout/gap rounds by leader" counter update, for metrics purposes. +#[derive(Default)] +pub struct LeaderRoundCountersBuilder { + /// Counters per validator (of the corresponding [`ValidatorIndex`]). + /// Implementation note: + /// This structure starts as an empty one (on the builder's initialization via `default()`). + /// Then, it is lazily-initialized by any larger-than-previously-observed [`ValidatorIndex`] + /// (within `update()`; see `get_counter_mut()`). The size of this vector is thus effectively + /// bounded by `u8::MAX` (even if validator indices found in proposal history were invalid). + counters_by_index: Vec, +} + +impl LeaderRoundCountersBuilder { + /// Increments the counters according to the information from proposal history. + /// This will at least update the current round leader's entry (either being successful or + /// fallback), and potentially many gap rounds (that were missed by validators since the + /// previously reported round change). + pub fn update(&mut self, leader_proposal_history: &LeaderProposalHistory) { + let current_leader_counter = self.get_counter_mut(&leader_proposal_history.current_leader); + if leader_proposal_history.is_fallback { + current_leader_counter.missed_by_fallback += 1; + } else { + current_leader_counter.successful += 1; + } + for gap_round_leader_index in leader_proposal_history.gap_round_leaders.iter() { + let gap_round_leader_counter = self.get_counter_mut(gap_round_leader_index); + gap_round_leader_counter.missed_by_gap += 1; + } + } + + /// Finalizes the build of the counters per validator. + /// Resolves the validator [`ComponentAddress`]es from the given epoch header. + /// Returns only the entries of validators for which some counts have changed. + pub fn build( + self, + epoch_header: Option<&LedgerHeader>, + ) -> Vec<(ValidatorId, LeaderRoundCounter)> { + self.counters_by_index + .into_iter() + .zip(iterate_validators(epoch_header)) + .filter(|(counter, _)| counter.is_non_zero()) + .map(|(counter, validator_id)| (validator_id, counter)) + .collect() + } + + fn get_counter_mut(&mut self, validator_index: &ValidatorIndex) -> &mut LeaderRoundCounter { + let index = *validator_index as usize; + if self.counters_by_index.len() <= index { + self.counters_by_index + .resize_with(index + 1, LeaderRoundCounter::default); + } + self.counters_by_index + .get_mut(index) + .expect("ensured by the branch above") + } +} + +/// A set of counters of rounds led by a concrete leader. +#[derive(Default, Clone, Debug, ScryptoSbor)] +pub struct LeaderRoundCounter { + pub successful: usize, + pub missed_by_fallback: usize, + pub missed_by_gap: usize, +} + +impl LeaderRoundCounter { + /// Returns a sum of both kinds of missed rounds. + pub fn missed(&self) -> usize { + self.missed_by_fallback + self.missed_by_gap + } + + /// Returns true if *any* of the counters is non-zero. + pub fn is_non_zero(&self) -> bool { + self.successful != 0 || self.missed_by_fallback != 0 || self.missed_by_gap != 0 + } +} + +/// Extracts an iterator of validator IDs (in their [`ValidatorIndex`] order) from +/// the given epoch header (i.e. assumes that it was found and contains the "next epoch"). +fn iterate_validators( + epoch_header: Option<&LedgerHeader>, +) -> impl Iterator + '_ { + epoch_header + .expect("at least genesis epoch is expected") + .next_epoch + .as_ref() + .expect("epoch header must contain next epoch information") + .validator_set + .iter() + .map(ValidatorId::from) +} diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ExecutedScenarioTransaction.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ExecutedScenarioTransaction.java index c49026f8e6..d4b50ab25b 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ExecutedScenarioTransaction.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ExecutedScenarioTransaction.java @@ -113,11 +113,11 @@ public ExecutedScenarioTransaction intentHash(String intentHash) { } /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. * @return intentHash **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") + @ApiModelProperty(required = true, value = "The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") @JsonProperty(JSON_PROPERTY_INTENT_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -139,11 +139,11 @@ public ExecutedScenarioTransaction intentHashBech32m(String intentHashBech32m) { } /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @return intentHashBech32m **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `IntentHash`.") + @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `TransactionIntentHash`.") @JsonProperty(JSON_PROPERTY_INTENT_HASH_BECH32M) @JsonInclude(value = JsonInclude.Include.ALWAYS) diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/IntentCoreV2.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/IntentCoreV2.java new file mode 100644 index 0000000000..deb62200cb --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/IntentCoreV2.java @@ -0,0 +1,258 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.IntentHeaderV2; +import com.radixdlt.api.core.generated.models.TransactionMessage; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * IntentCoreV2 + */ +@JsonPropertyOrder({ + IntentCoreV2.JSON_PROPERTY_INTENT_HEADER, + IntentCoreV2.JSON_PROPERTY_CHILDREN_SPECIFIERS, + IntentCoreV2.JSON_PROPERTY_BLOBS_HEX, + IntentCoreV2.JSON_PROPERTY_MESSAGE, + IntentCoreV2.JSON_PROPERTY_INSTRUCTIONS +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IntentCoreV2 { + public static final String JSON_PROPERTY_INTENT_HEADER = "intent_header"; + private IntentHeaderV2 intentHeader; + + public static final String JSON_PROPERTY_CHILDREN_SPECIFIERS = "children_specifiers"; + private List childrenSpecifiers = new ArrayList<>(); + + public static final String JSON_PROPERTY_BLOBS_HEX = "blobs_hex"; + private Map blobsHex = null; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private TransactionMessage message; + + public static final String JSON_PROPERTY_INSTRUCTIONS = "instructions"; + private String instructions; + + public IntentCoreV2() { + } + + public IntentCoreV2 intentHeader(IntentHeaderV2 intentHeader) { + this.intentHeader = intentHeader; + return this; + } + + /** + * Get intentHeader + * @return intentHeader + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_INTENT_HEADER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public IntentHeaderV2 getIntentHeader() { + return intentHeader; + } + + + @JsonProperty(JSON_PROPERTY_INTENT_HEADER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIntentHeader(IntentHeaderV2 intentHeader) { + this.intentHeader = intentHeader; + } + + + public IntentCoreV2 childrenSpecifiers(List childrenSpecifiers) { + this.childrenSpecifiers = childrenSpecifiers; + return this; + } + + public IntentCoreV2 addChildrenSpecifiersItem(String childrenSpecifiersItem) { + this.childrenSpecifiers.add(childrenSpecifiersItem); + return this; + } + + /** + * Get childrenSpecifiers + * @return childrenSpecifiers + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_CHILDREN_SPECIFIERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getChildrenSpecifiers() { + return childrenSpecifiers; + } + + + @JsonProperty(JSON_PROPERTY_CHILDREN_SPECIFIERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChildrenSpecifiers(List childrenSpecifiers) { + this.childrenSpecifiers = childrenSpecifiers; + } + + + public IntentCoreV2 blobsHex(Map blobsHex) { + this.blobsHex = blobsHex; + return this; + } + + public IntentCoreV2 putBlobsHexItem(String key, String blobsHexItem) { + if (this.blobsHex == null) { + this.blobsHex = new HashMap<>(); + } + this.blobsHex.put(key, blobsHexItem); + return this; + } + + /** + * A map of the hex-encoded blob hash, to hex-encoded blob content. Only returned if enabled in `TransactionFormatOptions` on your request. + * @return blobsHex + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "A map of the hex-encoded blob hash, to hex-encoded blob content. Only returned if enabled in `TransactionFormatOptions` on your request.") + @JsonProperty(JSON_PROPERTY_BLOBS_HEX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Map getBlobsHex() { + return blobsHex; + } + + + @JsonProperty(JSON_PROPERTY_BLOBS_HEX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBlobsHex(Map blobsHex) { + this.blobsHex = blobsHex; + } + + + public IntentCoreV2 message(TransactionMessage message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TransactionMessage getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(TransactionMessage message) { + this.message = message; + } + + + public IntentCoreV2 instructions(String instructions) { + this.instructions = instructions; + return this; + } + + /** + * The decompiled transaction manifest instructions. Only returned if enabled in `TransactionFormatOptions` on your request. + * @return instructions + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The decompiled transaction manifest instructions. Only returned if enabled in `TransactionFormatOptions` on your request.") + @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getInstructions() { + return instructions; + } + + + @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + + /** + * Return true if this IntentCoreV2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntentCoreV2 intentCoreV2 = (IntentCoreV2) o; + return Objects.equals(this.intentHeader, intentCoreV2.intentHeader) && + Objects.equals(this.childrenSpecifiers, intentCoreV2.childrenSpecifiers) && + Objects.equals(this.blobsHex, intentCoreV2.blobsHex) && + Objects.equals(this.message, intentCoreV2.message) && + Objects.equals(this.instructions, intentCoreV2.instructions); + } + + @Override + public int hashCode() { + return Objects.hash(intentHeader, childrenSpecifiers, blobsHex, message, instructions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IntentCoreV2 {\n"); + sb.append(" intentHeader: ").append(toIndentedString(intentHeader)).append("\n"); + sb.append(" childrenSpecifiers: ").append(toIndentedString(childrenSpecifiers)).append("\n"); + sb.append(" blobsHex: ").append(toIndentedString(blobsHex)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/IntentHeaderV2.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/IntentHeaderV2.java new file mode 100644 index 0000000000..6d890ff3f2 --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/IntentHeaderV2.java @@ -0,0 +1,279 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.ScryptoInstant; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * The metadata common to both transaction intents and subintents. The `min_proposer_timestamp_inclusive` and `max_proposer_timestamp_exclusive` are both optional. + */ +@ApiModel(description = "The metadata common to both transaction intents and subintents. The `min_proposer_timestamp_inclusive` and `max_proposer_timestamp_exclusive` are both optional. ") +@JsonPropertyOrder({ + IntentHeaderV2.JSON_PROPERTY_NETWORK_ID, + IntentHeaderV2.JSON_PROPERTY_START_EPOCH_INCLUSIVE, + IntentHeaderV2.JSON_PROPERTY_END_EPOCH_EXCLUSIVE, + IntentHeaderV2.JSON_PROPERTY_MIN_PROPOSER_TIMESTAMP_INCLUSIVE, + IntentHeaderV2.JSON_PROPERTY_MAX_PROPOSER_TIMESTAMP_EXCLUSIVE, + IntentHeaderV2.JSON_PROPERTY_INTENT_DISCRIMINATOR +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IntentHeaderV2 { + public static final String JSON_PROPERTY_NETWORK_ID = "network_id"; + private Integer networkId; + + public static final String JSON_PROPERTY_START_EPOCH_INCLUSIVE = "start_epoch_inclusive"; + private Long startEpochInclusive; + + public static final String JSON_PROPERTY_END_EPOCH_EXCLUSIVE = "end_epoch_exclusive"; + private Long endEpochExclusive; + + public static final String JSON_PROPERTY_MIN_PROPOSER_TIMESTAMP_INCLUSIVE = "min_proposer_timestamp_inclusive"; + private ScryptoInstant minProposerTimestampInclusive; + + public static final String JSON_PROPERTY_MAX_PROPOSER_TIMESTAMP_EXCLUSIVE = "max_proposer_timestamp_exclusive"; + private ScryptoInstant maxProposerTimestampExclusive; + + public static final String JSON_PROPERTY_INTENT_DISCRIMINATOR = "intent_discriminator"; + private String intentDiscriminator; + + public IntentHeaderV2() { + } + + public IntentHeaderV2 networkId(Integer networkId) { + this.networkId = networkId; + return this; + } + + /** + * The logical id of the network + * minimum: 0 + * maximum: 255 + * @return networkId + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The logical id of the network") + @JsonProperty(JSON_PROPERTY_NETWORK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Integer getNetworkId() { + return networkId; + } + + + @JsonProperty(JSON_PROPERTY_NETWORK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNetworkId(Integer networkId) { + this.networkId = networkId; + } + + + public IntentHeaderV2 startEpochInclusive(Long startEpochInclusive) { + this.startEpochInclusive = startEpochInclusive; + return this; + } + + /** + * An integer between `0` and `10^10`, marking the epoch from which the transaction can be submitted. In the case of uncommitted transactions, a value of `10^10` indicates that the epoch was >= `10^10`. + * minimum: 0 + * maximum: 10000000000 + * @return startEpochInclusive + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "An integer between `0` and `10^10`, marking the epoch from which the transaction can be submitted. In the case of uncommitted transactions, a value of `10^10` indicates that the epoch was >= `10^10`. ") + @JsonProperty(JSON_PROPERTY_START_EPOCH_INCLUSIVE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getStartEpochInclusive() { + return startEpochInclusive; + } + + + @JsonProperty(JSON_PROPERTY_START_EPOCH_INCLUSIVE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStartEpochInclusive(Long startEpochInclusive) { + this.startEpochInclusive = startEpochInclusive; + } + + + public IntentHeaderV2 endEpochExclusive(Long endEpochExclusive) { + this.endEpochExclusive = endEpochExclusive; + return this; + } + + /** + * An integer between `0` and `10^10`, marking the epoch from which the transaction will no longer be valid, and be rejected. In the case of uncommitted transactions, a value of `10^10` indicates that the epoch was >= `10^10`. + * minimum: 0 + * maximum: 10000000000 + * @return endEpochExclusive + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "An integer between `0` and `10^10`, marking the epoch from which the transaction will no longer be valid, and be rejected. In the case of uncommitted transactions, a value of `10^10` indicates that the epoch was >= `10^10`. ") + @JsonProperty(JSON_PROPERTY_END_EPOCH_EXCLUSIVE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getEndEpochExclusive() { + return endEpochExclusive; + } + + + @JsonProperty(JSON_PROPERTY_END_EPOCH_EXCLUSIVE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEndEpochExclusive(Long endEpochExclusive) { + this.endEpochExclusive = endEpochExclusive; + } + + + public IntentHeaderV2 minProposerTimestampInclusive(ScryptoInstant minProposerTimestampInclusive) { + this.minProposerTimestampInclusive = minProposerTimestampInclusive; + return this; + } + + /** + * Get minProposerTimestampInclusive + * @return minProposerTimestampInclusive + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MIN_PROPOSER_TIMESTAMP_INCLUSIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ScryptoInstant getMinProposerTimestampInclusive() { + return minProposerTimestampInclusive; + } + + + @JsonProperty(JSON_PROPERTY_MIN_PROPOSER_TIMESTAMP_INCLUSIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMinProposerTimestampInclusive(ScryptoInstant minProposerTimestampInclusive) { + this.minProposerTimestampInclusive = minProposerTimestampInclusive; + } + + + public IntentHeaderV2 maxProposerTimestampExclusive(ScryptoInstant maxProposerTimestampExclusive) { + this.maxProposerTimestampExclusive = maxProposerTimestampExclusive; + return this; + } + + /** + * Get maxProposerTimestampExclusive + * @return maxProposerTimestampExclusive + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_MAX_PROPOSER_TIMESTAMP_EXCLUSIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public ScryptoInstant getMaxProposerTimestampExclusive() { + return maxProposerTimestampExclusive; + } + + + @JsonProperty(JSON_PROPERTY_MAX_PROPOSER_TIMESTAMP_EXCLUSIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxProposerTimestampExclusive(ScryptoInstant maxProposerTimestampExclusive) { + this.maxProposerTimestampExclusive = maxProposerTimestampExclusive; + } + + + public IntentHeaderV2 intentDiscriminator(String intentDiscriminator) { + this.intentDiscriminator = intentDiscriminator; + return this; + } + + /** + * The string representation of an integer between `0` and `2^64 - 1`, which can be chosen to ensure that a unique intent can be created. It only needs to be unique for a particular intent content and epoch/timestamp, and can be safely selected randomly to very high probability. This field was called `nonce` in the V1 models, but was a misleading name, as it got confused with a cryptographic nonce or an Ethereum-style nonce, and it is neither. + * @return intentDiscriminator + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The string representation of an integer between `0` and `2^64 - 1`, which can be chosen to ensure that a unique intent can be created. It only needs to be unique for a particular intent content and epoch/timestamp, and can be safely selected randomly to very high probability. This field was called `nonce` in the V1 models, but was a misleading name, as it got confused with a cryptographic nonce or an Ethereum-style nonce, and it is neither. ") + @JsonProperty(JSON_PROPERTY_INTENT_DISCRIMINATOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getIntentDiscriminator() { + return intentDiscriminator; + } + + + @JsonProperty(JSON_PROPERTY_INTENT_DISCRIMINATOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIntentDiscriminator(String intentDiscriminator) { + this.intentDiscriminator = intentDiscriminator; + } + + + /** + * Return true if this IntentHeaderV2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntentHeaderV2 intentHeaderV2 = (IntentHeaderV2) o; + return Objects.equals(this.networkId, intentHeaderV2.networkId) && + Objects.equals(this.startEpochInclusive, intentHeaderV2.startEpochInclusive) && + Objects.equals(this.endEpochExclusive, intentHeaderV2.endEpochExclusive) && + Objects.equals(this.minProposerTimestampInclusive, intentHeaderV2.minProposerTimestampInclusive) && + Objects.equals(this.maxProposerTimestampExclusive, intentHeaderV2.maxProposerTimestampExclusive) && + Objects.equals(this.intentDiscriminator, intentHeaderV2.intentDiscriminator); + } + + @Override + public int hashCode() { + return Objects.hash(networkId, startEpochInclusive, endEpochExclusive, minProposerTimestampInclusive, maxProposerTimestampExclusive, intentDiscriminator); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IntentHeaderV2 {\n"); + sb.append(" networkId: ").append(toIndentedString(networkId)).append("\n"); + sb.append(" startEpochInclusive: ").append(toIndentedString(startEpochInclusive)).append("\n"); + sb.append(" endEpochExclusive: ").append(toIndentedString(endEpochExclusive)).append("\n"); + sb.append(" minProposerTimestampInclusive: ").append(toIndentedString(minProposerTimestampInclusive)).append("\n"); + sb.append(" maxProposerTimestampExclusive: ").append(toIndentedString(maxProposerTimestampExclusive)).append("\n"); + sb.append(" intentDiscriminator: ").append(toIndentedString(intentDiscriminator)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/IntentSignatures.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/IntentSignatures.java new file mode 100644 index 0000000000..746d8e02b9 --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/IntentSignatures.java @@ -0,0 +1,120 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.SignatureWithPublicKey; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Signatures against the given intent. + */ +@ApiModel(description = "Signatures against the given intent.") +@JsonPropertyOrder({ + IntentSignatures.JSON_PROPERTY_SIGNATURES +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class IntentSignatures { + public static final String JSON_PROPERTY_SIGNATURES = "signatures"; + private List signatures = new ArrayList<>(); + + public IntentSignatures() { + } + + public IntentSignatures signatures(List signatures) { + this.signatures = signatures; + return this; + } + + public IntentSignatures addSignaturesItem(SignatureWithPublicKey signaturesItem) { + this.signatures.add(signaturesItem); + return this; + } + + /** + * Get signatures + * @return signatures + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_SIGNATURES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getSignatures() { + return signatures; + } + + + @JsonProperty(JSON_PROPERTY_SIGNATURES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSignatures(List signatures) { + this.signatures = signatures; + } + + + /** + * Return true if this IntentSignatures object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntentSignatures intentSignatures = (IntentSignatures) o; + return Objects.equals(this.signatures, intentSignatures.signatures); + } + + @Override + public int hashCode() { + return Objects.hash(signatures); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IntentSignatures {\n"); + sb.append(" signatures: ").append(toIndentedString(signatures)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/LtsTransactionStatusRequest.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/LtsTransactionStatusRequest.java index 5ccf961d6e..34f4b8d8cc 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/LtsTransactionStatusRequest.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/LtsTransactionStatusRequest.java @@ -77,11 +77,11 @@ public LtsTransactionStatusRequest intentHash(String intentHash) { } /** - * The intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. + * The transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. * @return intentHash **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. ") + @ApiModelProperty(required = true, value = "The transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. ") @JsonProperty(JSON_PROPERTY_INTENT_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/MempoolTransactionHashes.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/MempoolTransactionHashes.java index e9d55fb366..45463155bb 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/MempoolTransactionHashes.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/MempoolTransactionHashes.java @@ -59,11 +59,11 @@ public MempoolTransactionHashes intentHash(String intentHash) { } /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. * @return intentHash **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") + @ApiModelProperty(required = true, value = "The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") @JsonProperty(JSON_PROPERTY_INTENT_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -85,11 +85,11 @@ public MempoolTransactionHashes intentHashBech32m(String intentHashBech32m) { } /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @return intentHashBech32m **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `IntentHash`.") + @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `TransactionIntentHash`.") @JsonProperty(JSON_PROPERTY_INTENT_HASH_BECH32M) @JsonInclude(value = JsonInclude.Include.ALWAYS) diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NotarizedTransactionV2.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NotarizedTransactionV2.java index 8c46fec7ad..d3ec4916d0 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/NotarizedTransactionV2.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/NotarizedTransactionV2.java @@ -22,6 +22,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.Signature; +import com.radixdlt.api.core.generated.models.SignedTransactionIntentV2; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -31,39 +33,159 @@ * NotarizedTransactionV2 */ @JsonPropertyOrder({ - NotarizedTransactionV2.JSON_PROPERTY_TODO + NotarizedTransactionV2.JSON_PROPERTY_HASH, + NotarizedTransactionV2.JSON_PROPERTY_HASH_BECH32M, + NotarizedTransactionV2.JSON_PROPERTY_PAYLOAD_HEX, + NotarizedTransactionV2.JSON_PROPERTY_SIGNED_TRANSACTION_INTENT, + NotarizedTransactionV2.JSON_PROPERTY_NOTARY_SIGNATURE }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class NotarizedTransactionV2 { - public static final String JSON_PROPERTY_TODO = "todo"; - private String todo; + public static final String JSON_PROPERTY_HASH = "hash"; + private String hash; + + public static final String JSON_PROPERTY_HASH_BECH32M = "hash_bech32m"; + private String hashBech32m; + + public static final String JSON_PROPERTY_PAYLOAD_HEX = "payload_hex"; + private String payloadHex; + + public static final String JSON_PROPERTY_SIGNED_TRANSACTION_INTENT = "signed_transaction_intent"; + private SignedTransactionIntentV2 signedTransactionIntent; + + public static final String JSON_PROPERTY_NOTARY_SIGNATURE = "notary_signature"; + private Signature notarySignature; public NotarizedTransactionV2() { } - public NotarizedTransactionV2 todo(String todo) { - this.todo = todo; + public NotarizedTransactionV2 hash(String hash) { + this.hash = hash; + return this; + } + + /** + * The hex-encoded notarized transaction hash for a user transaction. This hash identifies the full submittable notarized transaction - ie the signed intent, plus the notary signature. + * @return hash + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The hex-encoded notarized transaction hash for a user transaction. This hash identifies the full submittable notarized transaction - ie the signed intent, plus the notary signature. ") + @JsonProperty(JSON_PROPERTY_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getHash() { + return hash; + } + + + @JsonProperty(JSON_PROPERTY_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHash(String hash) { + this.hash = hash; + } + + + public NotarizedTransactionV2 hashBech32m(String hashBech32m) { + this.hashBech32m = hashBech32m; + return this; + } + + /** + * The Bech32m-encoded human readable `NotarizedTransactionHash`. + * @return hashBech32m + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `NotarizedTransactionHash`.") + @JsonProperty(JSON_PROPERTY_HASH_BECH32M) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getHashBech32m() { + return hashBech32m; + } + + + @JsonProperty(JSON_PROPERTY_HASH_BECH32M) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHashBech32m(String hashBech32m) { + this.hashBech32m = hashBech32m; + } + + + public NotarizedTransactionV2 payloadHex(String payloadHex) { + this.payloadHex = payloadHex; return this; } /** - * Get todo - * @return todo + * The hex-encoded full notarized transaction payload. Returning this can be disabled in TransactionFormatOptions on your request (default true). + * @return payloadHex **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_TODO) + @ApiModelProperty(value = "The hex-encoded full notarized transaction payload. Returning this can be disabled in TransactionFormatOptions on your request (default true).") + @JsonProperty(JSON_PROPERTY_PAYLOAD_HEX) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTodo() { - return todo; + public String getPayloadHex() { + return payloadHex; } - @JsonProperty(JSON_PROPERTY_TODO) + @JsonProperty(JSON_PROPERTY_PAYLOAD_HEX) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTodo(String todo) { - this.todo = todo; + public void setPayloadHex(String payloadHex) { + this.payloadHex = payloadHex; + } + + + public NotarizedTransactionV2 signedTransactionIntent(SignedTransactionIntentV2 signedTransactionIntent) { + this.signedTransactionIntent = signedTransactionIntent; + return this; + } + + /** + * Get signedTransactionIntent + * @return signedTransactionIntent + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_SIGNED_TRANSACTION_INTENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public SignedTransactionIntentV2 getSignedTransactionIntent() { + return signedTransactionIntent; + } + + + @JsonProperty(JSON_PROPERTY_SIGNED_TRANSACTION_INTENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSignedTransactionIntent(SignedTransactionIntentV2 signedTransactionIntent) { + this.signedTransactionIntent = signedTransactionIntent; + } + + + public NotarizedTransactionV2 notarySignature(Signature notarySignature) { + this.notarySignature = notarySignature; + return this; + } + + /** + * Get notarySignature + * @return notarySignature + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_NOTARY_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Signature getNotarySignature() { + return notarySignature; + } + + + @JsonProperty(JSON_PROPERTY_NOTARY_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNotarySignature(Signature notarySignature) { + this.notarySignature = notarySignature; } @@ -79,19 +201,27 @@ public boolean equals(Object o) { return false; } NotarizedTransactionV2 notarizedTransactionV2 = (NotarizedTransactionV2) o; - return Objects.equals(this.todo, notarizedTransactionV2.todo); + return Objects.equals(this.hash, notarizedTransactionV2.hash) && + Objects.equals(this.hashBech32m, notarizedTransactionV2.hashBech32m) && + Objects.equals(this.payloadHex, notarizedTransactionV2.payloadHex) && + Objects.equals(this.signedTransactionIntent, notarizedTransactionV2.signedTransactionIntent) && + Objects.equals(this.notarySignature, notarizedTransactionV2.notarySignature); } @Override public int hashCode() { - return Objects.hash(todo); + return Objects.hash(hash, hashBech32m, payloadHex, signedTransactionIntent, notarySignature); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NotarizedTransactionV2 {\n"); - sb.append(" todo: ").append(toIndentedString(todo)).append("\n"); + sb.append(" hash: ").append(toIndentedString(hash)).append("\n"); + sb.append(" hashBech32m: ").append(toIndentedString(hashBech32m)).append("\n"); + sb.append(" payloadHex: ").append(toIndentedString(payloadHex)).append("\n"); + sb.append(" signedTransactionIntent: ").append(toIndentedString(signedTransactionIntent)).append("\n"); + sb.append(" notarySignature: ").append(toIndentedString(notarySignature)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedLedgerTransactionIdentifiers.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedLedgerTransactionIdentifiers.java index fd428715b4..b6e03d414f 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedLedgerTransactionIdentifiers.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedLedgerTransactionIdentifiers.java @@ -75,11 +75,11 @@ public ParsedLedgerTransactionIdentifiers intentHash(String intentHash) { } /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. * @return intentHash **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") + @ApiModelProperty(value = "The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") @JsonProperty(JSON_PROPERTY_INTENT_HASH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -101,11 +101,11 @@ public ParsedLedgerTransactionIdentifiers intentHashBech32m(String intentHashBec } /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @return intentHashBech32m **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The Bech32m-encoded human readable `IntentHash`.") + @ApiModelProperty(value = "The Bech32m-encoded human readable `TransactionIntentHash`.") @JsonProperty(JSON_PROPERTY_INTENT_HASH_BECH32M) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -127,11 +127,11 @@ public ParsedLedgerTransactionIdentifiers signedIntentHash(String signedIntentHa } /** - * The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable NotarizedTransaction. + * The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. * @return signedIntentHash **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable NotarizedTransaction. ") + @ApiModelProperty(value = "The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. ") @JsonProperty(JSON_PROPERTY_SIGNED_INTENT_HASH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -153,11 +153,11 @@ public ParsedLedgerTransactionIdentifiers signedIntentHashBech32m(String signedI } /** - * The Bech32m-encoded human readable `SignedIntentHash`. + * The Bech32m-encoded human readable `SignedTransactionIntentHash`. * @return signedIntentHashBech32m **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The Bech32m-encoded human readable `SignedIntentHash`.") + @ApiModelProperty(value = "The Bech32m-encoded human readable `SignedTransactionIntentHash`.") @JsonProperty(JSON_PROPERTY_SIGNED_INTENT_HASH_BECH32M) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransactionIdentifiers.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransactionIdentifiers.java index 82e5a8c151..cdecbd3753 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransactionIdentifiers.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedNotarizedTransactionIdentifiers.java @@ -75,11 +75,11 @@ public ParsedNotarizedTransactionIdentifiers intentHash(String intentHash) { } /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. * @return intentHash **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") + @ApiModelProperty(required = true, value = "The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") @JsonProperty(JSON_PROPERTY_INTENT_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -101,11 +101,11 @@ public ParsedNotarizedTransactionIdentifiers intentHashBech32m(String intentHash } /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @return intentHashBech32m **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `IntentHash`.") + @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `TransactionIntentHash`.") @JsonProperty(JSON_PROPERTY_INTENT_HASH_BECH32M) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -127,11 +127,11 @@ public ParsedNotarizedTransactionIdentifiers signedIntentHash(String signedInten } /** - * The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable NotarizedTransaction. + * The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. * @return signedIntentHash **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable NotarizedTransaction. ") + @ApiModelProperty(required = true, value = "The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. ") @JsonProperty(JSON_PROPERTY_SIGNED_INTENT_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -153,11 +153,11 @@ public ParsedNotarizedTransactionIdentifiers signedIntentHashBech32m(String sign } /** - * The Bech32m-encoded human readable `SignedIntentHash`. + * The Bech32m-encoded human readable `SignedTransactionIntentHash`. * @return signedIntentHashBech32m **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `SignedIntentHash`.") + @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `SignedTransactionIntentHash`.") @JsonProperty(JSON_PROPERTY_SIGNED_INTENT_HASH_BECH32M) @JsonInclude(value = JsonInclude.Include.ALWAYS) diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedSignedTransactionIntentIdentifiers.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedSignedTransactionIntentIdentifiers.java index 16f151970b..43b685720c 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedSignedTransactionIntentIdentifiers.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedSignedTransactionIntentIdentifiers.java @@ -59,11 +59,11 @@ public ParsedSignedTransactionIntentIdentifiers intentHash(String intentHash) { } /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. * @return intentHash **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") + @ApiModelProperty(required = true, value = "The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") @JsonProperty(JSON_PROPERTY_INTENT_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -85,11 +85,11 @@ public ParsedSignedTransactionIntentIdentifiers intentHashBech32m(String intentH } /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @return intentHashBech32m **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `IntentHash`.") + @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `TransactionIntentHash`.") @JsonProperty(JSON_PROPERTY_INTENT_HASH_BECH32M) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -111,11 +111,11 @@ public ParsedSignedTransactionIntentIdentifiers signedIntentHash(String signedIn } /** - * The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable NotarizedTransaction. + * The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. * @return signedIntentHash **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable NotarizedTransaction. ") + @ApiModelProperty(required = true, value = "The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. ") @JsonProperty(JSON_PROPERTY_SIGNED_INTENT_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -137,11 +137,11 @@ public ParsedSignedTransactionIntentIdentifiers signedIntentHashBech32m(String s } /** - * The Bech32m-encoded human readable `SignedIntentHash`. + * The Bech32m-encoded human readable `SignedTransactionIntentHash`. * @return signedIntentHashBech32m **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `SignedIntentHash`.") + @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `SignedTransactionIntentHash`.") @JsonProperty(JSON_PROPERTY_SIGNED_INTENT_HASH_BECH32M) @JsonInclude(value = JsonInclude.Include.ALWAYS) diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransactionIntentIdentifiers.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransactionIntentIdentifiers.java index 151aae685b..2748eed9b2 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransactionIntentIdentifiers.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/ParsedTransactionIntentIdentifiers.java @@ -51,11 +51,11 @@ public ParsedTransactionIntentIdentifiers intentHash(String intentHash) { } /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. * @return intentHash **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") + @ApiModelProperty(required = true, value = "The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") @JsonProperty(JSON_PROPERTY_INTENT_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -77,11 +77,11 @@ public ParsedTransactionIntentIdentifiers intentHashBech32m(String intentHashBec } /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @return intentHashBech32m **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `IntentHash`.") + @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `TransactionIntentHash`.") @JsonProperty(JSON_PROPERTY_INTENT_HASH_BECH32M) @JsonInclude(value = JsonInclude.Include.ALWAYS) diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/SignedTransactionIntent.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/SignedTransactionIntent.java index 704c968d5f..7cc2744087 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/SignedTransactionIntent.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/SignedTransactionIntent.java @@ -63,11 +63,11 @@ public SignedTransactionIntent hash(String hash) { } /** - * The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable NotarizedTransaction. + * The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. * @return hash **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable NotarizedTransaction. ") + @ApiModelProperty(required = true, value = "The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. ") @JsonProperty(JSON_PROPERTY_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -89,11 +89,11 @@ public SignedTransactionIntent hashBech32m(String hashBech32m) { } /** - * The Bech32m-encoded human readable `SignedIntentHash`. + * The Bech32m-encoded human readable `SignedTransactionIntentHash`. * @return hashBech32m **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `SignedIntentHash`.") + @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `SignedTransactionIntentHash`.") @JsonProperty(JSON_PROPERTY_HASH_BECH32M) @JsonInclude(value = JsonInclude.Include.ALWAYS) diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/SignedTransactionIntentV2.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/SignedTransactionIntentV2.java new file mode 100644 index 0000000000..fbbcb354cd --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/SignedTransactionIntentV2.java @@ -0,0 +1,248 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.IntentSignatures; +import com.radixdlt.api.core.generated.models.TransactionIntentV2; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * SignedTransactionIntentV2 + */ +@JsonPropertyOrder({ + SignedTransactionIntentV2.JSON_PROPERTY_HASH, + SignedTransactionIntentV2.JSON_PROPERTY_HASH_BECH32M, + SignedTransactionIntentV2.JSON_PROPERTY_TRANSACTION_INTENT, + SignedTransactionIntentV2.JSON_PROPERTY_TRANSACTION_INTENT_SIGNATURES, + SignedTransactionIntentV2.JSON_PROPERTY_NON_ROOT_SUBINTENT_SIGNATURES +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SignedTransactionIntentV2 { + public static final String JSON_PROPERTY_HASH = "hash"; + private String hash; + + public static final String JSON_PROPERTY_HASH_BECH32M = "hash_bech32m"; + private String hashBech32m; + + public static final String JSON_PROPERTY_TRANSACTION_INTENT = "transaction_intent"; + private TransactionIntentV2 transactionIntent; + + public static final String JSON_PROPERTY_TRANSACTION_INTENT_SIGNATURES = "transaction_intent_signatures"; + private IntentSignatures transactionIntentSignatures; + + public static final String JSON_PROPERTY_NON_ROOT_SUBINTENT_SIGNATURES = "non_root_subintent_signatures"; + private List nonRootSubintentSignatures = new ArrayList<>(); + + public SignedTransactionIntentV2() { + } + + public SignedTransactionIntentV2 hash(String hash) { + this.hash = hash; + return this; + } + + /** + * The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. + * @return hash + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. ") + @JsonProperty(JSON_PROPERTY_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getHash() { + return hash; + } + + + @JsonProperty(JSON_PROPERTY_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHash(String hash) { + this.hash = hash; + } + + + public SignedTransactionIntentV2 hashBech32m(String hashBech32m) { + this.hashBech32m = hashBech32m; + return this; + } + + /** + * The Bech32m-encoded human readable `SignedTransactionIntentHash`. + * @return hashBech32m + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `SignedTransactionIntentHash`.") + @JsonProperty(JSON_PROPERTY_HASH_BECH32M) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getHashBech32m() { + return hashBech32m; + } + + + @JsonProperty(JSON_PROPERTY_HASH_BECH32M) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHashBech32m(String hashBech32m) { + this.hashBech32m = hashBech32m; + } + + + public SignedTransactionIntentV2 transactionIntent(TransactionIntentV2 transactionIntent) { + this.transactionIntent = transactionIntent; + return this; + } + + /** + * Get transactionIntent + * @return transactionIntent + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_TRANSACTION_INTENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionIntentV2 getTransactionIntent() { + return transactionIntent; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTION_INTENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTransactionIntent(TransactionIntentV2 transactionIntent) { + this.transactionIntent = transactionIntent; + } + + + public SignedTransactionIntentV2 transactionIntentSignatures(IntentSignatures transactionIntentSignatures) { + this.transactionIntentSignatures = transactionIntentSignatures; + return this; + } + + /** + * Get transactionIntentSignatures + * @return transactionIntentSignatures + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_TRANSACTION_INTENT_SIGNATURES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public IntentSignatures getTransactionIntentSignatures() { + return transactionIntentSignatures; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTION_INTENT_SIGNATURES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTransactionIntentSignatures(IntentSignatures transactionIntentSignatures) { + this.transactionIntentSignatures = transactionIntentSignatures; + } + + + public SignedTransactionIntentV2 nonRootSubintentSignatures(List nonRootSubintentSignatures) { + this.nonRootSubintentSignatures = nonRootSubintentSignatures; + return this; + } + + public SignedTransactionIntentV2 addNonRootSubintentSignaturesItem(IntentSignatures nonRootSubintentSignaturesItem) { + this.nonRootSubintentSignatures.add(nonRootSubintentSignaturesItem); + return this; + } + + /** + * This gives the signatures for each subintent in `non_root_subintents` in `TransactionIntentV2`. For committed transactions, these arrays are of equal length and correspond one-to-one in order. + * @return nonRootSubintentSignatures + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "This gives the signatures for each subintent in `non_root_subintents` in `TransactionIntentV2`. For committed transactions, these arrays are of equal length and correspond one-to-one in order. ") + @JsonProperty(JSON_PROPERTY_NON_ROOT_SUBINTENT_SIGNATURES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getNonRootSubintentSignatures() { + return nonRootSubintentSignatures; + } + + + @JsonProperty(JSON_PROPERTY_NON_ROOT_SUBINTENT_SIGNATURES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNonRootSubintentSignatures(List nonRootSubintentSignatures) { + this.nonRootSubintentSignatures = nonRootSubintentSignatures; + } + + + /** + * Return true if this SignedTransactionIntentV2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SignedTransactionIntentV2 signedTransactionIntentV2 = (SignedTransactionIntentV2) o; + return Objects.equals(this.hash, signedTransactionIntentV2.hash) && + Objects.equals(this.hashBech32m, signedTransactionIntentV2.hashBech32m) && + Objects.equals(this.transactionIntent, signedTransactionIntentV2.transactionIntent) && + Objects.equals(this.transactionIntentSignatures, signedTransactionIntentV2.transactionIntentSignatures) && + Objects.equals(this.nonRootSubintentSignatures, signedTransactionIntentV2.nonRootSubintentSignatures); + } + + @Override + public int hashCode() { + return Objects.hash(hash, hashBech32m, transactionIntent, transactionIntentSignatures, nonRootSubintentSignatures); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SignedTransactionIntentV2 {\n"); + sb.append(" hash: ").append(toIndentedString(hash)).append("\n"); + sb.append(" hashBech32m: ").append(toIndentedString(hashBech32m)).append("\n"); + sb.append(" transactionIntent: ").append(toIndentedString(transactionIntent)).append("\n"); + sb.append(" transactionIntentSignatures: ").append(toIndentedString(transactionIntentSignatures)).append("\n"); + sb.append(" nonRootSubintentSignatures: ").append(toIndentedString(nonRootSubintentSignatures)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/SubintentV2.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/SubintentV2.java new file mode 100644 index 0000000000..327fb13355 --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/SubintentV2.java @@ -0,0 +1,176 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.IntentCoreV2; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * SubintentV2 + */ +@JsonPropertyOrder({ + SubintentV2.JSON_PROPERTY_HASH, + SubintentV2.JSON_PROPERTY_HASH_BECH32M, + SubintentV2.JSON_PROPERTY_INTENT_CORE +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SubintentV2 { + public static final String JSON_PROPERTY_HASH = "hash"; + private String hash; + + public static final String JSON_PROPERTY_HASH_BECH32M = "hash_bech32m"; + private String hashBech32m; + + public static final String JSON_PROPERTY_INTENT_CORE = "intent_core"; + private IntentCoreV2 intentCore; + + public SubintentV2() { + } + + public SubintentV2 hash(String hash) { + this.hash = hash; + return this; + } + + /** + * The hex-encoded subintent hash for a subintent, also known as the partial transaction id. This hash identifies the subintent. Each subintent can only be *successfully* committed once, but unlike a transaction intent, could be committed as a failure zero or more times first. This hash gets signed by any signatories on subintent. + * @return hash + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The hex-encoded subintent hash for a subintent, also known as the partial transaction id. This hash identifies the subintent. Each subintent can only be *successfully* committed once, but unlike a transaction intent, could be committed as a failure zero or more times first. This hash gets signed by any signatories on subintent. ") + @JsonProperty(JSON_PROPERTY_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getHash() { + return hash; + } + + + @JsonProperty(JSON_PROPERTY_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHash(String hash) { + this.hash = hash; + } + + + public SubintentV2 hashBech32m(String hashBech32m) { + this.hashBech32m = hashBech32m; + return this; + } + + /** + * The Bech32m-encoded human readable `SubintentHash`. + * @return hashBech32m + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `SubintentHash`.") + @JsonProperty(JSON_PROPERTY_HASH_BECH32M) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getHashBech32m() { + return hashBech32m; + } + + + @JsonProperty(JSON_PROPERTY_HASH_BECH32M) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHashBech32m(String hashBech32m) { + this.hashBech32m = hashBech32m; + } + + + public SubintentV2 intentCore(IntentCoreV2 intentCore) { + this.intentCore = intentCore; + return this; + } + + /** + * Get intentCore + * @return intentCore + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_INTENT_CORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public IntentCoreV2 getIntentCore() { + return intentCore; + } + + + @JsonProperty(JSON_PROPERTY_INTENT_CORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIntentCore(IntentCoreV2 intentCore) { + this.intentCore = intentCore; + } + + + /** + * Return true if this SubintentV2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubintentV2 subintentV2 = (SubintentV2) o; + return Objects.equals(this.hash, subintentV2.hash) && + Objects.equals(this.hashBech32m, subintentV2.hashBech32m) && + Objects.equals(this.intentCore, subintentV2.intentCore); + } + + @Override + public int hashCode() { + return Objects.hash(hash, hashBech32m, intentCore); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubintentV2 {\n"); + sb.append(" hash: ").append(toIndentedString(hash)).append("\n"); + sb.append(" hashBech32m: ").append(toIndentedString(hashBech32m)).append("\n"); + sb.append(" intentCore: ").append(toIndentedString(intentCore)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionHeader.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionHeader.java index e85c07846b..0b6c1993fb 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionHeader.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionHeader.java @@ -156,13 +156,13 @@ public TransactionHeader nonce(Long nonce) { } /** - * An integer between `0` and `2^32 - 1`, chosen to allow a unique intent to be created (to enable submitting an otherwise identical/duplicate intent). + * An integer between `0` and `2^32 - 1`, chosen to allow a unique intent to be created (to enable submitting an otherwise identical/duplicate intent). As of Cuttlefish and V2 transaction models, this is now referred to in documentation as the `intent_discriminator`. * minimum: 0 * maximum: 4294967295 * @return nonce **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "An integer between `0` and `2^32 - 1`, chosen to allow a unique intent to be created (to enable submitting an otherwise identical/duplicate intent). ") + @ApiModelProperty(required = true, value = "An integer between `0` and `2^32 - 1`, chosen to allow a unique intent to be created (to enable submitting an otherwise identical/duplicate intent). As of Cuttlefish and V2 transaction models, this is now referred to in documentation as the `intent_discriminator`. ") @JsonProperty(JSON_PROPERTY_NONCE) @JsonInclude(value = JsonInclude.Include.ALWAYS) diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionHeaderV2.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionHeaderV2.java new file mode 100644 index 0000000000..843a2adde2 --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionHeaderV2.java @@ -0,0 +1,178 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.PublicKey; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * TransactionHeaderV2 + */ +@JsonPropertyOrder({ + TransactionHeaderV2.JSON_PROPERTY_NOTARY_PUBLIC_KEY, + TransactionHeaderV2.JSON_PROPERTY_NOTARY_IS_SIGNATORY, + TransactionHeaderV2.JSON_PROPERTY_TIP_BASIS_POINTS +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TransactionHeaderV2 { + public static final String JSON_PROPERTY_NOTARY_PUBLIC_KEY = "notary_public_key"; + private PublicKey notaryPublicKey; + + public static final String JSON_PROPERTY_NOTARY_IS_SIGNATORY = "notary_is_signatory"; + private Boolean notaryIsSignatory; + + public static final String JSON_PROPERTY_TIP_BASIS_POINTS = "tip_basis_points"; + private Long tipBasisPoints; + + public TransactionHeaderV2() { + } + + public TransactionHeaderV2 notaryPublicKey(PublicKey notaryPublicKey) { + this.notaryPublicKey = notaryPublicKey; + return this; + } + + /** + * Get notaryPublicKey + * @return notaryPublicKey + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_NOTARY_PUBLIC_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public PublicKey getNotaryPublicKey() { + return notaryPublicKey; + } + + + @JsonProperty(JSON_PROPERTY_NOTARY_PUBLIC_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNotaryPublicKey(PublicKey notaryPublicKey) { + this.notaryPublicKey = notaryPublicKey; + } + + + public TransactionHeaderV2 notaryIsSignatory(Boolean notaryIsSignatory) { + this.notaryIsSignatory = notaryIsSignatory; + return this; + } + + /** + * Specifies whether the notary public key should be included in the transaction signers list + * @return notaryIsSignatory + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "Specifies whether the notary public key should be included in the transaction signers list") + @JsonProperty(JSON_PROPERTY_NOTARY_IS_SIGNATORY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getNotaryIsSignatory() { + return notaryIsSignatory; + } + + + @JsonProperty(JSON_PROPERTY_NOTARY_IS_SIGNATORY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNotaryIsSignatory(Boolean notaryIsSignatory) { + this.notaryIsSignatory = notaryIsSignatory; + } + + + public TransactionHeaderV2 tipBasisPoints(Long tipBasisPoints) { + this.tipBasisPoints = tipBasisPoints; + return this; + } + + /** + * An integer between `0` and `2^32 - 1 = 4294967295`, giving the validator tip as a basis points amount. That is, a value of `1` corresponds to an additional tip on 0.01% of the base fee. + * minimum: 0 + * maximum: 4294967295 + * @return tipBasisPoints + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "An integer between `0` and `2^32 - 1 = 4294967295`, giving the validator tip as a basis points amount. That is, a value of `1` corresponds to an additional tip on 0.01% of the base fee. ") + @JsonProperty(JSON_PROPERTY_TIP_BASIS_POINTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Long getTipBasisPoints() { + return tipBasisPoints; + } + + + @JsonProperty(JSON_PROPERTY_TIP_BASIS_POINTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTipBasisPoints(Long tipBasisPoints) { + this.tipBasisPoints = tipBasisPoints; + } + + + /** + * Return true if this TransactionHeaderV2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransactionHeaderV2 transactionHeaderV2 = (TransactionHeaderV2) o; + return Objects.equals(this.notaryPublicKey, transactionHeaderV2.notaryPublicKey) && + Objects.equals(this.notaryIsSignatory, transactionHeaderV2.notaryIsSignatory) && + Objects.equals(this.tipBasisPoints, transactionHeaderV2.tipBasisPoints); + } + + @Override + public int hashCode() { + return Objects.hash(notaryPublicKey, notaryIsSignatory, tipBasisPoints); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransactionHeaderV2 {\n"); + sb.append(" notaryPublicKey: ").append(toIndentedString(notaryPublicKey)).append("\n"); + sb.append(" notaryIsSignatory: ").append(toIndentedString(notaryIsSignatory)).append("\n"); + sb.append(" tipBasisPoints: ").append(toIndentedString(tipBasisPoints)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionIdKey.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionIdKey.java index a28d5492a8..bcf0af4e89 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionIdKey.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionIdKey.java @@ -51,11 +51,11 @@ public TransactionIdKey intentHash(String intentHash) { } /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. * @return intentHash **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") + @ApiModelProperty(required = true, value = "The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") @JsonProperty(JSON_PROPERTY_INTENT_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -77,11 +77,11 @@ public TransactionIdKey intentHashBech32m(String intentHashBech32m) { } /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @return intentHashBech32m **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `IntentHash`.") + @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `TransactionIntentHash`.") @JsonProperty(JSON_PROPERTY_INTENT_HASH_BECH32M) @JsonInclude(value = JsonInclude.Include.ALWAYS) diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionIdentifiers.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionIdentifiers.java index ee899099a8..b3a76b35a3 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionIdentifiers.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionIdentifiers.java @@ -67,11 +67,11 @@ public TransactionIdentifiers intentHash(String intentHash) { } /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. * @return intentHash **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") + @ApiModelProperty(required = true, value = "The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") @JsonProperty(JSON_PROPERTY_INTENT_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -93,11 +93,11 @@ public TransactionIdentifiers intentHashBech32m(String intentHashBech32m) { } /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @return intentHashBech32m **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `IntentHash`.") + @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `TransactionIntentHash`.") @JsonProperty(JSON_PROPERTY_INTENT_HASH_BECH32M) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -119,11 +119,11 @@ public TransactionIdentifiers signedIntentHash(String signedIntentHash) { } /** - * The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable NotarizedTransaction. + * The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. * @return signedIntentHash **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable NotarizedTransaction. ") + @ApiModelProperty(required = true, value = "The hex-encoded signed intent hash for a user transaction. This hash identifies the transaction intent, plus additional signatures. This hash is signed by the notary, to create the submittable `NotarizedTransaction`. ") @JsonProperty(JSON_PROPERTY_SIGNED_INTENT_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -145,11 +145,11 @@ public TransactionIdentifiers signedIntentHashBech32m(String signedIntentHashBec } /** - * The Bech32m-encoded human readable `SignedIntentHash`. + * The Bech32m-encoded human readable `SignedTransactionIntentHash`. * @return signedIntentHashBech32m **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `SignedIntentHash`.") + @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `SignedTransactionIntentHash`.") @JsonProperty(JSON_PROPERTY_SIGNED_INTENT_HASH_BECH32M) @JsonInclude(value = JsonInclude.Include.ALWAYS) diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionIntent.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionIntent.java index 5986a6d65f..e37d9ed5cb 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionIntent.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionIntent.java @@ -72,11 +72,11 @@ public TransactionIntent hash(String hash) { } /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. * @return hash **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The hex-encoded intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") + @ApiModelProperty(required = true, value = "The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") @JsonProperty(JSON_PROPERTY_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) @@ -98,11 +98,11 @@ public TransactionIntent hashBech32m(String hashBech32m) { } /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @return hashBech32m **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `IntentHash`.") + @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `TransactionIntentHash`.") @JsonProperty(JSON_PROPERTY_HASH_BECH32M) @JsonInclude(value = JsonInclude.Include.ALWAYS) diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionIntentV2.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionIntentV2.java new file mode 100644 index 0000000000..a0761e2831 --- /dev/null +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionIntentV2.java @@ -0,0 +1,249 @@ +/* + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node's function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node's current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.radixdlt.api.core.generated.models; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.radixdlt.api.core.generated.models.IntentCoreV2; +import com.radixdlt.api.core.generated.models.SubintentV2; +import com.radixdlt.api.core.generated.models.TransactionHeaderV2; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * TransactionIntentV2 + */ +@JsonPropertyOrder({ + TransactionIntentV2.JSON_PROPERTY_HASH, + TransactionIntentV2.JSON_PROPERTY_HASH_BECH32M, + TransactionIntentV2.JSON_PROPERTY_TRANSACTION_HEADER, + TransactionIntentV2.JSON_PROPERTY_ROOT_INTENT_CORE, + TransactionIntentV2.JSON_PROPERTY_NON_ROOT_SUBINTENTS +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TransactionIntentV2 { + public static final String JSON_PROPERTY_HASH = "hash"; + private String hash; + + public static final String JSON_PROPERTY_HASH_BECH32M = "hash_bech32m"; + private String hashBech32m; + + public static final String JSON_PROPERTY_TRANSACTION_HEADER = "transaction_header"; + private TransactionHeaderV2 transactionHeader; + + public static final String JSON_PROPERTY_ROOT_INTENT_CORE = "root_intent_core"; + private IntentCoreV2 rootIntentCore; + + public static final String JSON_PROPERTY_NON_ROOT_SUBINTENTS = "non_root_subintents"; + private List nonRootSubintents = new ArrayList<>(); + + public TransactionIntentV2() { + } + + public TransactionIntentV2 hash(String hash) { + this.hash = hash; + return this; + } + + /** + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. + * @return hash + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. ") + @JsonProperty(JSON_PROPERTY_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getHash() { + return hash; + } + + + @JsonProperty(JSON_PROPERTY_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHash(String hash) { + this.hash = hash; + } + + + public TransactionIntentV2 hashBech32m(String hashBech32m) { + this.hashBech32m = hashBech32m; + return this; + } + + /** + * The Bech32m-encoded human readable `TransactionIntentHash`. + * @return hashBech32m + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "The Bech32m-encoded human readable `TransactionIntentHash`.") + @JsonProperty(JSON_PROPERTY_HASH_BECH32M) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getHashBech32m() { + return hashBech32m; + } + + + @JsonProperty(JSON_PROPERTY_HASH_BECH32M) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHashBech32m(String hashBech32m) { + this.hashBech32m = hashBech32m; + } + + + public TransactionIntentV2 transactionHeader(TransactionHeaderV2 transactionHeader) { + this.transactionHeader = transactionHeader; + return this; + } + + /** + * Get transactionHeader + * @return transactionHeader + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_TRANSACTION_HEADER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public TransactionHeaderV2 getTransactionHeader() { + return transactionHeader; + } + + + @JsonProperty(JSON_PROPERTY_TRANSACTION_HEADER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTransactionHeader(TransactionHeaderV2 transactionHeader) { + this.transactionHeader = transactionHeader; + } + + + public TransactionIntentV2 rootIntentCore(IntentCoreV2 rootIntentCore) { + this.rootIntentCore = rootIntentCore; + return this; + } + + /** + * Get rootIntentCore + * @return rootIntentCore + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_ROOT_INTENT_CORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public IntentCoreV2 getRootIntentCore() { + return rootIntentCore; + } + + + @JsonProperty(JSON_PROPERTY_ROOT_INTENT_CORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRootIntentCore(IntentCoreV2 rootIntentCore) { + this.rootIntentCore = rootIntentCore; + } + + + public TransactionIntentV2 nonRootSubintents(List nonRootSubintents) { + this.nonRootSubintents = nonRootSubintents; + return this; + } + + public TransactionIntentV2 addNonRootSubintentsItem(SubintentV2 nonRootSubintentsItem) { + this.nonRootSubintents.add(nonRootSubintentsItem); + return this; + } + + /** + * Get nonRootSubintents + * @return nonRootSubintents + **/ + @javax.annotation.Nonnull + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_NON_ROOT_SUBINTENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getNonRootSubintents() { + return nonRootSubintents; + } + + + @JsonProperty(JSON_PROPERTY_NON_ROOT_SUBINTENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNonRootSubintents(List nonRootSubintents) { + this.nonRootSubintents = nonRootSubintents; + } + + + /** + * Return true if this TransactionIntentV2 object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransactionIntentV2 transactionIntentV2 = (TransactionIntentV2) o; + return Objects.equals(this.hash, transactionIntentV2.hash) && + Objects.equals(this.hashBech32m, transactionIntentV2.hashBech32m) && + Objects.equals(this.transactionHeader, transactionIntentV2.transactionHeader) && + Objects.equals(this.rootIntentCore, transactionIntentV2.rootIntentCore) && + Objects.equals(this.nonRootSubintents, transactionIntentV2.nonRootSubintents); + } + + @Override + public int hashCode() { + return Objects.hash(hash, hashBech32m, transactionHeader, rootIntentCore, nonRootSubintents); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransactionIntentV2 {\n"); + sb.append(" hash: ").append(toIndentedString(hash)).append("\n"); + sb.append(" hashBech32m: ").append(toIndentedString(hashBech32m)).append("\n"); + sb.append(" transactionHeader: ").append(toIndentedString(transactionHeader)).append("\n"); + sb.append(" rootIntentCore: ").append(toIndentedString(rootIntentCore)).append("\n"); + sb.append(" nonRootSubintents: ").append(toIndentedString(nonRootSubintents)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionReceiptRequest.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionReceiptRequest.java index 47cf731e61..b70727e124 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionReceiptRequest.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionReceiptRequest.java @@ -82,11 +82,11 @@ public TransactionReceiptRequest intentHash(String intentHash) { } /** - * The intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. + * The transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. * @return intentHash **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. ") + @ApiModelProperty(required = true, value = "The transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. ") @JsonProperty(JSON_PROPERTY_INTENT_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) diff --git a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionStatusRequest.java b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionStatusRequest.java index 4650fd792f..0cf651c727 100644 --- a/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionStatusRequest.java +++ b/core/src/test-core/java/com/radixdlt/api/core/generated/models/TransactionStatusRequest.java @@ -77,11 +77,11 @@ public TransactionStatusRequest intentHash(String intentHash) { } /** - * The intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. + * The transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. * @return intentHash **/ @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The intent hash for a user transaction, also known as the transaction id. This hash identifies the core content \"intent\" of the transaction. Each intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. ") + @ApiModelProperty(required = true, value = "The transaction intent hash for a user transaction, also known as the transaction id. This hash identifies the core \"intent\" of the transaction. Each transaction intent can only be committed once. This hash gets signed by any signatories on the transaction, to create the signed intent. Either hex or Bech32m-encoded strings are supported. ") @JsonProperty(JSON_PROPERTY_INTENT_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) diff --git a/core/src/test/java/com/radixdlt/rev2/protocol/CuttlefishProtocolUpdateTest.java b/core/src/test/java/com/radixdlt/rev2/protocol/CuttlefishProtocolUpdateTest.java index a9c337aa5a..5ab057d5b4 100644 --- a/core/src/test/java/com/radixdlt/rev2/protocol/CuttlefishProtocolUpdateTest.java +++ b/core/src/test/java/com/radixdlt/rev2/protocol/CuttlefishProtocolUpdateTest.java @@ -184,7 +184,7 @@ public void transaction_v2_behaviour_across_cuttlefish() throws ApiException { } @Test - public void tracking_behaviour_across_cuttlefish() throws ApiException { + public void protocol_update_process_updates_status_summary() throws ApiException { final var coreApiHelper = new ProtocolUpdateTestUtils.CoreApiHelper(Network.INTEGRATIONTESTNET); try (var ignored = createTest(IMMEDIATELY_CUTTLEFISH, coreApiHelper.module())) { var latestStateVersion = diff --git a/sdk/typescript/lib/generated/.openapi-generator/FILES b/sdk/typescript/lib/generated/.openapi-generator/FILES index 658c697c9f..6ef1afdff6 100644 --- a/sdk/typescript/lib/generated/.openapi-generator/FILES +++ b/sdk/typescript/lib/generated/.openapi-generator/FILES @@ -237,6 +237,9 @@ models/InstanceSchemaBlueprintTypeReference.ts models/InstanceSchemaBlueprintTypeReferenceAllOf.ts models/InstantMs.ts models/InstructionResourceChanges.ts +models/IntentCoreV2.ts +models/IntentHeaderV2.ts +models/IntentSignatures.ts models/KeyValueBasedStructure.ts models/KeyValueBlueprintCollectionSchema.ts models/KeyValueBlueprintCollectionSchemaAllOf.ts @@ -545,6 +548,7 @@ models/SignatureBase.ts models/SignatureWithPublicKey.ts models/SignatureWithPublicKeyBase.ts models/SignedTransactionIntent.ts +models/SignedTransactionIntentV2.ts models/SignificantProtocolUpdateReadinessEntry.ts models/SortedIndexBlueprintCollectionSchema.ts models/SortedIndexBlueprintCollectionSchemaAllOf.ts @@ -608,6 +612,7 @@ models/StreamTransactionsRequest.ts models/StreamTransactionsResponse.ts models/StringPlaintextMessageContent.ts models/StringPlaintextMessageContentAllOf.ts +models/SubintentV2.ts models/Substate.ts models/SubstateBase.ts models/SubstateFormatOptions.ts @@ -638,10 +643,12 @@ models/TransactionCallPreviewRequest.ts models/TransactionCallPreviewResponse.ts models/TransactionFormatOptions.ts models/TransactionHeader.ts +models/TransactionHeaderV2.ts models/TransactionIdKey.ts models/TransactionIdentifiers.ts models/TransactionIntent.ts models/TransactionIntentStatus.ts +models/TransactionIntentV2.ts models/TransactionMessage.ts models/TransactionMessageBase.ts models/TransactionMessageType.ts diff --git a/sdk/typescript/lib/generated/models/ExecutedScenarioTransaction.ts b/sdk/typescript/lib/generated/models/ExecutedScenarioTransaction.ts index 798426cd16..bc6b0737e6 100644 --- a/sdk/typescript/lib/generated/models/ExecutedScenarioTransaction.ts +++ b/sdk/typescript/lib/generated/models/ExecutedScenarioTransaction.ts @@ -32,15 +32,15 @@ export interface ExecutedScenarioTransaction { */ state_version: number; /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. - * This hash identifies the core content "intent" of the transaction. Each intent can only be committed once. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. + * This hash identifies the core "intent" of the transaction. Each transaction intent can only be committed once. * This hash gets signed by any signatories on the transaction, to create the signed intent. * @type {string} * @memberof ExecutedScenarioTransaction */ intent_hash: string; /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @type {string} * @memberof ExecutedScenarioTransaction */ diff --git a/sdk/typescript/lib/generated/models/IntentCoreV2.ts b/sdk/typescript/lib/generated/models/IntentCoreV2.ts new file mode 100644 index 0000000000..a8531b44b5 --- /dev/null +++ b/sdk/typescript/lib/generated/models/IntentCoreV2.ts @@ -0,0 +1,112 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { IntentHeaderV2 } from './IntentHeaderV2'; +import { + IntentHeaderV2FromJSON, + IntentHeaderV2FromJSONTyped, + IntentHeaderV2ToJSON, +} from './IntentHeaderV2'; +import type { TransactionMessage } from './TransactionMessage'; +import { + TransactionMessageFromJSON, + TransactionMessageFromJSONTyped, + TransactionMessageToJSON, +} from './TransactionMessage'; + +/** + * + * @export + * @interface IntentCoreV2 + */ +export interface IntentCoreV2 { + /** + * + * @type {IntentHeaderV2} + * @memberof IntentCoreV2 + */ + intent_header: IntentHeaderV2; + /** + * + * @type {Array} + * @memberof IntentCoreV2 + */ + children_specifiers: Array; + /** + * A map of the hex-encoded blob hash, to hex-encoded blob content. Only returned if enabled in `TransactionFormatOptions` on your request. + * @type {{ [key: string]: string; }} + * @memberof IntentCoreV2 + */ + blobs_hex?: { [key: string]: string; }; + /** + * + * @type {TransactionMessage} + * @memberof IntentCoreV2 + */ + message?: TransactionMessage; + /** + * The decompiled transaction manifest instructions. Only returned if enabled in `TransactionFormatOptions` on your request. + * @type {string} + * @memberof IntentCoreV2 + */ + instructions?: string; +} + +/** + * Check if a given object implements the IntentCoreV2 interface. + */ +export function instanceOfIntentCoreV2(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "intent_header" in value; + isInstance = isInstance && "children_specifiers" in value; + + return isInstance; +} + +export function IntentCoreV2FromJSON(json: any): IntentCoreV2 { + return IntentCoreV2FromJSONTyped(json, false); +} + +export function IntentCoreV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): IntentCoreV2 { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'intent_header': IntentHeaderV2FromJSON(json['intent_header']), + 'children_specifiers': json['children_specifiers'], + 'blobs_hex': !exists(json, 'blobs_hex') ? undefined : json['blobs_hex'], + 'message': !exists(json, 'message') ? undefined : TransactionMessageFromJSON(json['message']), + 'instructions': !exists(json, 'instructions') ? undefined : json['instructions'], + }; +} + +export function IntentCoreV2ToJSON(value?: IntentCoreV2 | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'intent_header': IntentHeaderV2ToJSON(value.intent_header), + 'children_specifiers': value.children_specifiers, + 'blobs_hex': value.blobs_hex, + 'message': TransactionMessageToJSON(value.message), + 'instructions': value.instructions, + }; +} + diff --git a/sdk/typescript/lib/generated/models/IntentHeaderV2.ts b/sdk/typescript/lib/generated/models/IntentHeaderV2.ts new file mode 100644 index 0000000000..12c91ba52c --- /dev/null +++ b/sdk/typescript/lib/generated/models/IntentHeaderV2.ts @@ -0,0 +1,125 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ScryptoInstant } from './ScryptoInstant'; +import { + ScryptoInstantFromJSON, + ScryptoInstantFromJSONTyped, + ScryptoInstantToJSON, +} from './ScryptoInstant'; + +/** + * The metadata common to both transaction intents and subintents. + * + * The `min_proposer_timestamp_inclusive` and `max_proposer_timestamp_exclusive` are both optional. + * @export + * @interface IntentHeaderV2 + */ +export interface IntentHeaderV2 { + /** + * The logical id of the network + * @type {number} + * @memberof IntentHeaderV2 + */ + network_id: number; + /** + * An integer between `0` and `10^10`, marking the epoch from which the transaction can be submitted. + * In the case of uncommitted transactions, a value of `10^10` indicates that the epoch was >= `10^10`. + * @type {number} + * @memberof IntentHeaderV2 + */ + start_epoch_inclusive: number; + /** + * An integer between `0` and `10^10`, marking the epoch from which the transaction will no longer be valid, and be rejected. + * In the case of uncommitted transactions, a value of `10^10` indicates that the epoch was >= `10^10`. + * @type {number} + * @memberof IntentHeaderV2 + */ + end_epoch_exclusive: number; + /** + * + * @type {ScryptoInstant} + * @memberof IntentHeaderV2 + */ + min_proposer_timestamp_inclusive?: ScryptoInstant; + /** + * + * @type {ScryptoInstant} + * @memberof IntentHeaderV2 + */ + max_proposer_timestamp_exclusive?: ScryptoInstant; + /** + * The string representation of an integer between `0` and `2^64 - 1`, which can be chosen to ensure that + * a unique intent can be created. It only needs to be unique for a particular intent content and epoch/timestamp, + * and can be safely selected randomly to very high probability. + * + * This field was called `nonce` in the V1 models, but was a misleading name, as it got confused with a + * cryptographic nonce or an Ethereum-style nonce, and it is neither. + * @type {string} + * @memberof IntentHeaderV2 + */ + intent_discriminator: string; +} + +/** + * Check if a given object implements the IntentHeaderV2 interface. + */ +export function instanceOfIntentHeaderV2(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "network_id" in value; + isInstance = isInstance && "start_epoch_inclusive" in value; + isInstance = isInstance && "end_epoch_exclusive" in value; + isInstance = isInstance && "intent_discriminator" in value; + + return isInstance; +} + +export function IntentHeaderV2FromJSON(json: any): IntentHeaderV2 { + return IntentHeaderV2FromJSONTyped(json, false); +} + +export function IntentHeaderV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): IntentHeaderV2 { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'network_id': json['network_id'], + 'start_epoch_inclusive': json['start_epoch_inclusive'], + 'end_epoch_exclusive': json['end_epoch_exclusive'], + 'min_proposer_timestamp_inclusive': !exists(json, 'min_proposer_timestamp_inclusive') ? undefined : ScryptoInstantFromJSON(json['min_proposer_timestamp_inclusive']), + 'max_proposer_timestamp_exclusive': !exists(json, 'max_proposer_timestamp_exclusive') ? undefined : ScryptoInstantFromJSON(json['max_proposer_timestamp_exclusive']), + 'intent_discriminator': json['intent_discriminator'], + }; +} + +export function IntentHeaderV2ToJSON(value?: IntentHeaderV2 | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'network_id': value.network_id, + 'start_epoch_inclusive': value.start_epoch_inclusive, + 'end_epoch_exclusive': value.end_epoch_exclusive, + 'min_proposer_timestamp_inclusive': ScryptoInstantToJSON(value.min_proposer_timestamp_inclusive), + 'max_proposer_timestamp_exclusive': ScryptoInstantToJSON(value.max_proposer_timestamp_exclusive), + 'intent_discriminator': value.intent_discriminator, + }; +} + diff --git a/sdk/typescript/lib/generated/models/IntentSignatures.ts b/sdk/typescript/lib/generated/models/IntentSignatures.ts new file mode 100644 index 0000000000..0ec4a51e01 --- /dev/null +++ b/sdk/typescript/lib/generated/models/IntentSignatures.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { SignatureWithPublicKey } from './SignatureWithPublicKey'; +import { + SignatureWithPublicKeyFromJSON, + SignatureWithPublicKeyFromJSONTyped, + SignatureWithPublicKeyToJSON, +} from './SignatureWithPublicKey'; + +/** + * Signatures against the given intent. + * @export + * @interface IntentSignatures + */ +export interface IntentSignatures { + /** + * + * @type {Array} + * @memberof IntentSignatures + */ + signatures: Array; +} + +/** + * Check if a given object implements the IntentSignatures interface. + */ +export function instanceOfIntentSignatures(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "signatures" in value; + + return isInstance; +} + +export function IntentSignaturesFromJSON(json: any): IntentSignatures { + return IntentSignaturesFromJSONTyped(json, false); +} + +export function IntentSignaturesFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntentSignatures { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'signatures': ((json['signatures'] as Array).map(SignatureWithPublicKeyFromJSON)), + }; +} + +export function IntentSignaturesToJSON(value?: IntentSignatures | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'signatures': ((value.signatures as Array).map(SignatureWithPublicKeyToJSON)), + }; +} + diff --git a/sdk/typescript/lib/generated/models/LtsTransactionStatusRequest.ts b/sdk/typescript/lib/generated/models/LtsTransactionStatusRequest.ts index ac4bdad069..7d89b1e46c 100644 --- a/sdk/typescript/lib/generated/models/LtsTransactionStatusRequest.ts +++ b/sdk/typescript/lib/generated/models/LtsTransactionStatusRequest.ts @@ -26,8 +26,8 @@ export interface LtsTransactionStatusRequest { */ network: string; /** - * The intent hash for a user transaction, also known as the transaction id. - * This hash identifies the core content "intent" of the transaction. Each intent can only be committed once. + * The transaction intent hash for a user transaction, also known as the transaction id. + * This hash identifies the core "intent" of the transaction. Each transaction intent can only be committed once. * This hash gets signed by any signatories on the transaction, to create the signed intent. * Either hex or Bech32m-encoded strings are supported. * @type {string} diff --git a/sdk/typescript/lib/generated/models/MempoolTransactionHashes.ts b/sdk/typescript/lib/generated/models/MempoolTransactionHashes.ts index c12d0c733b..20ecf3b01d 100644 --- a/sdk/typescript/lib/generated/models/MempoolTransactionHashes.ts +++ b/sdk/typescript/lib/generated/models/MempoolTransactionHashes.ts @@ -20,15 +20,15 @@ import { exists, mapValues } from '../runtime'; */ export interface MempoolTransactionHashes { /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. - * This hash identifies the core content "intent" of the transaction. Each intent can only be committed once. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. + * This hash identifies the core "intent" of the transaction. Each transaction intent can only be committed once. * This hash gets signed by any signatories on the transaction, to create the signed intent. * @type {string} * @memberof MempoolTransactionHashes */ intent_hash: string; /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @type {string} * @memberof MempoolTransactionHashes */ diff --git a/sdk/typescript/lib/generated/models/NotarizedTransactionV2.ts b/sdk/typescript/lib/generated/models/NotarizedTransactionV2.ts index 562c8fa4db..cd5c3a7af1 100644 --- a/sdk/typescript/lib/generated/models/NotarizedTransactionV2.ts +++ b/sdk/typescript/lib/generated/models/NotarizedTransactionV2.ts @@ -13,6 +13,19 @@ */ import { exists, mapValues } from '../runtime'; +import type { Signature } from './Signature'; +import { + SignatureFromJSON, + SignatureFromJSONTyped, + SignatureToJSON, +} from './Signature'; +import type { SignedTransactionIntentV2 } from './SignedTransactionIntentV2'; +import { + SignedTransactionIntentV2FromJSON, + SignedTransactionIntentV2FromJSONTyped, + SignedTransactionIntentV2ToJSON, +} from './SignedTransactionIntentV2'; + /** * * @export @@ -20,11 +33,36 @@ import { exists, mapValues } from '../runtime'; */ export interface NotarizedTransactionV2 { /** - * + * The hex-encoded notarized transaction hash for a user transaction. + * This hash identifies the full submittable notarized transaction - ie the signed intent, plus the notary signature. + * @type {string} + * @memberof NotarizedTransactionV2 + */ + hash: string; + /** + * The Bech32m-encoded human readable `NotarizedTransactionHash`. + * @type {string} + * @memberof NotarizedTransactionV2 + */ + hash_bech32m: string; + /** + * The hex-encoded full notarized transaction payload. Returning this can be disabled in TransactionFormatOptions on your request (default true). * @type {string} * @memberof NotarizedTransactionV2 */ - todo?: string; + payload_hex?: string; + /** + * + * @type {SignedTransactionIntentV2} + * @memberof NotarizedTransactionV2 + */ + signed_transaction_intent: SignedTransactionIntentV2; + /** + * + * @type {Signature} + * @memberof NotarizedTransactionV2 + */ + notary_signature: Signature; } /** @@ -32,6 +70,10 @@ export interface NotarizedTransactionV2 { */ export function instanceOfNotarizedTransactionV2(value: object): boolean { let isInstance = true; + isInstance = isInstance && "hash" in value; + isInstance = isInstance && "hash_bech32m" in value; + isInstance = isInstance && "signed_transaction_intent" in value; + isInstance = isInstance && "notary_signature" in value; return isInstance; } @@ -46,7 +88,11 @@ export function NotarizedTransactionV2FromJSONTyped(json: any, ignoreDiscriminat } return { - 'todo': !exists(json, 'todo') ? undefined : json['todo'], + 'hash': json['hash'], + 'hash_bech32m': json['hash_bech32m'], + 'payload_hex': !exists(json, 'payload_hex') ? undefined : json['payload_hex'], + 'signed_transaction_intent': SignedTransactionIntentV2FromJSON(json['signed_transaction_intent']), + 'notary_signature': SignatureFromJSON(json['notary_signature']), }; } @@ -59,7 +105,11 @@ export function NotarizedTransactionV2ToJSON(value?: NotarizedTransactionV2 | nu } return { - 'todo': value.todo, + 'hash': value.hash, + 'hash_bech32m': value.hash_bech32m, + 'payload_hex': value.payload_hex, + 'signed_transaction_intent': SignedTransactionIntentV2ToJSON(value.signed_transaction_intent), + 'notary_signature': SignatureToJSON(value.notary_signature), }; } diff --git a/sdk/typescript/lib/generated/models/ParsedLedgerTransactionIdentifiers.ts b/sdk/typescript/lib/generated/models/ParsedLedgerTransactionIdentifiers.ts index e8e196e433..ad509c2224 100644 --- a/sdk/typescript/lib/generated/models/ParsedLedgerTransactionIdentifiers.ts +++ b/sdk/typescript/lib/generated/models/ParsedLedgerTransactionIdentifiers.ts @@ -20,15 +20,15 @@ import { exists, mapValues } from '../runtime'; */ export interface ParsedLedgerTransactionIdentifiers { /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. - * This hash identifies the core content "intent" of the transaction. Each intent can only be committed once. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. + * This hash identifies the core "intent" of the transaction. Each transaction intent can only be committed once. * This hash gets signed by any signatories on the transaction, to create the signed intent. * @type {string} * @memberof ParsedLedgerTransactionIdentifiers */ intent_hash?: string; /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @type {string} * @memberof ParsedLedgerTransactionIdentifiers */ @@ -36,13 +36,13 @@ export interface ParsedLedgerTransactionIdentifiers { /** * The hex-encoded signed intent hash for a user transaction. * This hash identifies the transaction intent, plus additional signatures. - * This hash is signed by the notary, to create the submittable NotarizedTransaction. + * This hash is signed by the notary, to create the submittable `NotarizedTransaction`. * @type {string} * @memberof ParsedLedgerTransactionIdentifiers */ signed_intent_hash?: string; /** - * The Bech32m-encoded human readable `SignedIntentHash`. + * The Bech32m-encoded human readable `SignedTransactionIntentHash`. * @type {string} * @memberof ParsedLedgerTransactionIdentifiers */ diff --git a/sdk/typescript/lib/generated/models/ParsedNotarizedTransactionIdentifiers.ts b/sdk/typescript/lib/generated/models/ParsedNotarizedTransactionIdentifiers.ts index 3d9ab6723a..00b79e8b40 100644 --- a/sdk/typescript/lib/generated/models/ParsedNotarizedTransactionIdentifiers.ts +++ b/sdk/typescript/lib/generated/models/ParsedNotarizedTransactionIdentifiers.ts @@ -20,15 +20,15 @@ import { exists, mapValues } from '../runtime'; */ export interface ParsedNotarizedTransactionIdentifiers { /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. - * This hash identifies the core content "intent" of the transaction. Each intent can only be committed once. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. + * This hash identifies the core "intent" of the transaction. Each transaction intent can only be committed once. * This hash gets signed by any signatories on the transaction, to create the signed intent. * @type {string} * @memberof ParsedNotarizedTransactionIdentifiers */ intent_hash: string; /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @type {string} * @memberof ParsedNotarizedTransactionIdentifiers */ @@ -36,13 +36,13 @@ export interface ParsedNotarizedTransactionIdentifiers { /** * The hex-encoded signed intent hash for a user transaction. * This hash identifies the transaction intent, plus additional signatures. - * This hash is signed by the notary, to create the submittable NotarizedTransaction. + * This hash is signed by the notary, to create the submittable `NotarizedTransaction`. * @type {string} * @memberof ParsedNotarizedTransactionIdentifiers */ signed_intent_hash: string; /** - * The Bech32m-encoded human readable `SignedIntentHash`. + * The Bech32m-encoded human readable `SignedTransactionIntentHash`. * @type {string} * @memberof ParsedNotarizedTransactionIdentifiers */ diff --git a/sdk/typescript/lib/generated/models/ParsedSignedTransactionIntentIdentifiers.ts b/sdk/typescript/lib/generated/models/ParsedSignedTransactionIntentIdentifiers.ts index 0a1afd8892..feec59226d 100644 --- a/sdk/typescript/lib/generated/models/ParsedSignedTransactionIntentIdentifiers.ts +++ b/sdk/typescript/lib/generated/models/ParsedSignedTransactionIntentIdentifiers.ts @@ -20,15 +20,15 @@ import { exists, mapValues } from '../runtime'; */ export interface ParsedSignedTransactionIntentIdentifiers { /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. - * This hash identifies the core content "intent" of the transaction. Each intent can only be committed once. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. + * This hash identifies the core "intent" of the transaction. Each transaction intent can only be committed once. * This hash gets signed by any signatories on the transaction, to create the signed intent. * @type {string} * @memberof ParsedSignedTransactionIntentIdentifiers */ intent_hash: string; /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @type {string} * @memberof ParsedSignedTransactionIntentIdentifiers */ @@ -36,13 +36,13 @@ export interface ParsedSignedTransactionIntentIdentifiers { /** * The hex-encoded signed intent hash for a user transaction. * This hash identifies the transaction intent, plus additional signatures. - * This hash is signed by the notary, to create the submittable NotarizedTransaction. + * This hash is signed by the notary, to create the submittable `NotarizedTransaction`. * @type {string} * @memberof ParsedSignedTransactionIntentIdentifiers */ signed_intent_hash: string; /** - * The Bech32m-encoded human readable `SignedIntentHash`. + * The Bech32m-encoded human readable `SignedTransactionIntentHash`. * @type {string} * @memberof ParsedSignedTransactionIntentIdentifiers */ diff --git a/sdk/typescript/lib/generated/models/ParsedTransactionIntentIdentifiers.ts b/sdk/typescript/lib/generated/models/ParsedTransactionIntentIdentifiers.ts index b5586b46b3..37a538cbe0 100644 --- a/sdk/typescript/lib/generated/models/ParsedTransactionIntentIdentifiers.ts +++ b/sdk/typescript/lib/generated/models/ParsedTransactionIntentIdentifiers.ts @@ -20,15 +20,15 @@ import { exists, mapValues } from '../runtime'; */ export interface ParsedTransactionIntentIdentifiers { /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. - * This hash identifies the core content "intent" of the transaction. Each intent can only be committed once. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. + * This hash identifies the core "intent" of the transaction. Each transaction intent can only be committed once. * This hash gets signed by any signatories on the transaction, to create the signed intent. * @type {string} * @memberof ParsedTransactionIntentIdentifiers */ intent_hash: string; /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @type {string} * @memberof ParsedTransactionIntentIdentifiers */ diff --git a/sdk/typescript/lib/generated/models/SignedTransactionIntent.ts b/sdk/typescript/lib/generated/models/SignedTransactionIntent.ts index 7ad36bfc76..b4036de714 100644 --- a/sdk/typescript/lib/generated/models/SignedTransactionIntent.ts +++ b/sdk/typescript/lib/generated/models/SignedTransactionIntent.ts @@ -35,13 +35,13 @@ export interface SignedTransactionIntent { /** * The hex-encoded signed intent hash for a user transaction. * This hash identifies the transaction intent, plus additional signatures. - * This hash is signed by the notary, to create the submittable NotarizedTransaction. + * This hash is signed by the notary, to create the submittable `NotarizedTransaction`. * @type {string} * @memberof SignedTransactionIntent */ hash: string; /** - * The Bech32m-encoded human readable `SignedIntentHash`. + * The Bech32m-encoded human readable `SignedTransactionIntentHash`. * @type {string} * @memberof SignedTransactionIntent */ diff --git a/sdk/typescript/lib/generated/models/SignedTransactionIntentV2.ts b/sdk/typescript/lib/generated/models/SignedTransactionIntentV2.ts new file mode 100644 index 0000000000..80a327a1b3 --- /dev/null +++ b/sdk/typescript/lib/generated/models/SignedTransactionIntentV2.ts @@ -0,0 +1,118 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { IntentSignatures } from './IntentSignatures'; +import { + IntentSignaturesFromJSON, + IntentSignaturesFromJSONTyped, + IntentSignaturesToJSON, +} from './IntentSignatures'; +import type { TransactionIntentV2 } from './TransactionIntentV2'; +import { + TransactionIntentV2FromJSON, + TransactionIntentV2FromJSONTyped, + TransactionIntentV2ToJSON, +} from './TransactionIntentV2'; + +/** + * + * @export + * @interface SignedTransactionIntentV2 + */ +export interface SignedTransactionIntentV2 { + /** + * The hex-encoded signed intent hash for a user transaction. + * This hash identifies the transaction intent, plus additional signatures. + * This hash is signed by the notary, to create the submittable `NotarizedTransaction`. + * @type {string} + * @memberof SignedTransactionIntentV2 + */ + hash: string; + /** + * The Bech32m-encoded human readable `SignedTransactionIntentHash`. + * @type {string} + * @memberof SignedTransactionIntentV2 + */ + hash_bech32m: string; + /** + * + * @type {TransactionIntentV2} + * @memberof SignedTransactionIntentV2 + */ + transaction_intent: TransactionIntentV2; + /** + * + * @type {IntentSignatures} + * @memberof SignedTransactionIntentV2 + */ + transaction_intent_signatures: IntentSignatures; + /** + * This gives the signatures for each subintent in `non_root_subintents` in `TransactionIntentV2`. + * For committed transactions, these arrays are of equal length and correspond one-to-one in order. + * @type {Array} + * @memberof SignedTransactionIntentV2 + */ + non_root_subintent_signatures: Array; +} + +/** + * Check if a given object implements the SignedTransactionIntentV2 interface. + */ +export function instanceOfSignedTransactionIntentV2(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "hash" in value; + isInstance = isInstance && "hash_bech32m" in value; + isInstance = isInstance && "transaction_intent" in value; + isInstance = isInstance && "transaction_intent_signatures" in value; + isInstance = isInstance && "non_root_subintent_signatures" in value; + + return isInstance; +} + +export function SignedTransactionIntentV2FromJSON(json: any): SignedTransactionIntentV2 { + return SignedTransactionIntentV2FromJSONTyped(json, false); +} + +export function SignedTransactionIntentV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): SignedTransactionIntentV2 { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'hash': json['hash'], + 'hash_bech32m': json['hash_bech32m'], + 'transaction_intent': TransactionIntentV2FromJSON(json['transaction_intent']), + 'transaction_intent_signatures': IntentSignaturesFromJSON(json['transaction_intent_signatures']), + 'non_root_subintent_signatures': ((json['non_root_subintent_signatures'] as Array).map(IntentSignaturesFromJSON)), + }; +} + +export function SignedTransactionIntentV2ToJSON(value?: SignedTransactionIntentV2 | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'hash': value.hash, + 'hash_bech32m': value.hash_bech32m, + 'transaction_intent': TransactionIntentV2ToJSON(value.transaction_intent), + 'transaction_intent_signatures': IntentSignaturesToJSON(value.transaction_intent_signatures), + 'non_root_subintent_signatures': ((value.non_root_subintent_signatures as Array).map(IntentSignaturesToJSON)), + }; +} + diff --git a/sdk/typescript/lib/generated/models/SubintentV2.ts b/sdk/typescript/lib/generated/models/SubintentV2.ts new file mode 100644 index 0000000000..4e751dee57 --- /dev/null +++ b/sdk/typescript/lib/generated/models/SubintentV2.ts @@ -0,0 +1,94 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { IntentCoreV2 } from './IntentCoreV2'; +import { + IntentCoreV2FromJSON, + IntentCoreV2FromJSONTyped, + IntentCoreV2ToJSON, +} from './IntentCoreV2'; + +/** + * + * @export + * @interface SubintentV2 + */ +export interface SubintentV2 { + /** + * The hex-encoded subintent hash for a subintent, also known as the partial transaction id. + * This hash identifies the subintent. Each subintent can only be *successfully* committed once, + * but unlike a transaction intent, could be committed as a failure zero or more times first. + * This hash gets signed by any signatories on subintent. + * @type {string} + * @memberof SubintentV2 + */ + hash: string; + /** + * The Bech32m-encoded human readable `SubintentHash`. + * @type {string} + * @memberof SubintentV2 + */ + hash_bech32m: string; + /** + * + * @type {IntentCoreV2} + * @memberof SubintentV2 + */ + intent_core: IntentCoreV2; +} + +/** + * Check if a given object implements the SubintentV2 interface. + */ +export function instanceOfSubintentV2(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "hash" in value; + isInstance = isInstance && "hash_bech32m" in value; + isInstance = isInstance && "intent_core" in value; + + return isInstance; +} + +export function SubintentV2FromJSON(json: any): SubintentV2 { + return SubintentV2FromJSONTyped(json, false); +} + +export function SubintentV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): SubintentV2 { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'hash': json['hash'], + 'hash_bech32m': json['hash_bech32m'], + 'intent_core': IntentCoreV2FromJSON(json['intent_core']), + }; +} + +export function SubintentV2ToJSON(value?: SubintentV2 | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'hash': value.hash, + 'hash_bech32m': value.hash_bech32m, + 'intent_core': IntentCoreV2ToJSON(value.intent_core), + }; +} + diff --git a/sdk/typescript/lib/generated/models/TransactionHeader.ts b/sdk/typescript/lib/generated/models/TransactionHeader.ts index f1413a75f8..6d22dd0a33 100644 --- a/sdk/typescript/lib/generated/models/TransactionHeader.ts +++ b/sdk/typescript/lib/generated/models/TransactionHeader.ts @@ -48,6 +48,8 @@ export interface TransactionHeader { end_epoch_exclusive: number; /** * An integer between `0` and `2^32 - 1`, chosen to allow a unique intent to be created (to enable submitting an otherwise identical/duplicate intent). + * + * As of Cuttlefish and V2 transaction models, this is now referred to in documentation as the `intent_discriminator`. * @type {number} * @memberof TransactionHeader */ diff --git a/sdk/typescript/lib/generated/models/TransactionHeaderV2.ts b/sdk/typescript/lib/generated/models/TransactionHeaderV2.ts new file mode 100644 index 0000000000..a3d5d49b22 --- /dev/null +++ b/sdk/typescript/lib/generated/models/TransactionHeaderV2.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { PublicKey } from './PublicKey'; +import { + PublicKeyFromJSON, + PublicKeyFromJSONTyped, + PublicKeyToJSON, +} from './PublicKey'; + +/** + * + * @export + * @interface TransactionHeaderV2 + */ +export interface TransactionHeaderV2 { + /** + * + * @type {PublicKey} + * @memberof TransactionHeaderV2 + */ + notary_public_key: PublicKey; + /** + * Specifies whether the notary public key should be included in the transaction signers list + * @type {boolean} + * @memberof TransactionHeaderV2 + */ + notary_is_signatory: boolean; + /** + * An integer between `0` and `2^32 - 1 = 4294967295`, giving the validator tip as a basis points amount. + * That is, a value of `1` corresponds to an additional tip on 0.01% of the base fee. + * @type {number} + * @memberof TransactionHeaderV2 + */ + tip_basis_points: number; +} + +/** + * Check if a given object implements the TransactionHeaderV2 interface. + */ +export function instanceOfTransactionHeaderV2(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "notary_public_key" in value; + isInstance = isInstance && "notary_is_signatory" in value; + isInstance = isInstance && "tip_basis_points" in value; + + return isInstance; +} + +export function TransactionHeaderV2FromJSON(json: any): TransactionHeaderV2 { + return TransactionHeaderV2FromJSONTyped(json, false); +} + +export function TransactionHeaderV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionHeaderV2 { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'notary_public_key': PublicKeyFromJSON(json['notary_public_key']), + 'notary_is_signatory': json['notary_is_signatory'], + 'tip_basis_points': json['tip_basis_points'], + }; +} + +export function TransactionHeaderV2ToJSON(value?: TransactionHeaderV2 | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'notary_public_key': PublicKeyToJSON(value.notary_public_key), + 'notary_is_signatory': value.notary_is_signatory, + 'tip_basis_points': value.tip_basis_points, + }; +} + diff --git a/sdk/typescript/lib/generated/models/TransactionIdKey.ts b/sdk/typescript/lib/generated/models/TransactionIdKey.ts index 808b0cfd4d..d8fcd5895f 100644 --- a/sdk/typescript/lib/generated/models/TransactionIdKey.ts +++ b/sdk/typescript/lib/generated/models/TransactionIdKey.ts @@ -20,15 +20,15 @@ import { exists, mapValues } from '../runtime'; */ export interface TransactionIdKey { /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. - * This hash identifies the core content "intent" of the transaction. Each intent can only be committed once. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. + * This hash identifies the core "intent" of the transaction. Each transaction intent can only be committed once. * This hash gets signed by any signatories on the transaction, to create the signed intent. * @type {string} * @memberof TransactionIdKey */ intent_hash: string; /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @type {string} * @memberof TransactionIdKey */ diff --git a/sdk/typescript/lib/generated/models/TransactionIdentifiers.ts b/sdk/typescript/lib/generated/models/TransactionIdentifiers.ts index a6aed80f41..84c345a962 100644 --- a/sdk/typescript/lib/generated/models/TransactionIdentifiers.ts +++ b/sdk/typescript/lib/generated/models/TransactionIdentifiers.ts @@ -20,15 +20,15 @@ import { exists, mapValues } from '../runtime'; */ export interface TransactionIdentifiers { /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. - * This hash identifies the core content "intent" of the transaction. Each intent can only be committed once. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. + * This hash identifies the core "intent" of the transaction. Each transaction intent can only be committed once. * This hash gets signed by any signatories on the transaction, to create the signed intent. * @type {string} * @memberof TransactionIdentifiers */ intent_hash: string; /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @type {string} * @memberof TransactionIdentifiers */ @@ -36,13 +36,13 @@ export interface TransactionIdentifiers { /** * The hex-encoded signed intent hash for a user transaction. * This hash identifies the transaction intent, plus additional signatures. - * This hash is signed by the notary, to create the submittable NotarizedTransaction. + * This hash is signed by the notary, to create the submittable `NotarizedTransaction`. * @type {string} * @memberof TransactionIdentifiers */ signed_intent_hash: string; /** - * The Bech32m-encoded human readable `SignedIntentHash`. + * The Bech32m-encoded human readable `SignedTransactionIntentHash`. * @type {string} * @memberof TransactionIdentifiers */ diff --git a/sdk/typescript/lib/generated/models/TransactionIntent.ts b/sdk/typescript/lib/generated/models/TransactionIntent.ts index 7b044ce1ae..9eb2af4981 100644 --- a/sdk/typescript/lib/generated/models/TransactionIntent.ts +++ b/sdk/typescript/lib/generated/models/TransactionIntent.ts @@ -33,15 +33,15 @@ import { */ export interface TransactionIntent { /** - * The hex-encoded intent hash for a user transaction, also known as the transaction id. - * This hash identifies the core content "intent" of the transaction. Each intent can only be committed once. + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. + * This hash identifies the core "intent" of the transaction. Each transaction intent can only be committed once. * This hash gets signed by any signatories on the transaction, to create the signed intent. * @type {string} * @memberof TransactionIntent */ hash: string; /** - * The Bech32m-encoded human readable `IntentHash`. + * The Bech32m-encoded human readable `TransactionIntentHash`. * @type {string} * @memberof TransactionIntent */ diff --git a/sdk/typescript/lib/generated/models/TransactionIntentV2.ts b/sdk/typescript/lib/generated/models/TransactionIntentV2.ts new file mode 100644 index 0000000000..3d7e7b98c7 --- /dev/null +++ b/sdk/typescript/lib/generated/models/TransactionIntentV2.ts @@ -0,0 +1,123 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Radix Core API + * This API is exposed by the Babylon Radix node to give clients access to the Radix Engine, Mempool and State in the node. The default configuration is intended for use by node-runners on a private network, and is not intended to be exposed publicly. Very heavy load may impact the node\'s function. The node exposes a configuration flag which allows disabling certain endpoints which may be problematic, but monitoring is advised. This configuration parameter is `api.core.flags.enable_unbounded_endpoints` / `RADIXDLT_CORE_API_FLAGS_ENABLE_UNBOUNDED_ENDPOINTS`. This API exposes queries against the node\'s current state (see `/lts/state/` or `/state/`), and streams of transaction history (under `/lts/stream/` or `/stream`). If you require queries against snapshots of historical ledger state, you may also wish to consider using the [Gateway API](https://docs-babylon.radixdlt.com/). ## Integration and forward compatibility guarantees Integrators (such as exchanges) are recommended to use the `/lts/` endpoints - they have been designed to be clear and simple for integrators wishing to create and monitor transactions involving fungible transfers to/from accounts. All endpoints under `/lts/` have high guarantees of forward compatibility in future node versions. We may add new fields, but existing fields will not be changed. Assuming the integrating code uses a permissive JSON parser which ignores unknown fields, any additions will not affect existing code. Other endpoints may be changed with new node versions carrying protocol-updates, although any breaking changes will be flagged clearly in the corresponding release notes. All responses may have additional fields added, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. + * + * The version of the OpenAPI document: v1.2.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { IntentCoreV2 } from './IntentCoreV2'; +import { + IntentCoreV2FromJSON, + IntentCoreV2FromJSONTyped, + IntentCoreV2ToJSON, +} from './IntentCoreV2'; +import type { SubintentV2 } from './SubintentV2'; +import { + SubintentV2FromJSON, + SubintentV2FromJSONTyped, + SubintentV2ToJSON, +} from './SubintentV2'; +import type { TransactionHeaderV2 } from './TransactionHeaderV2'; +import { + TransactionHeaderV2FromJSON, + TransactionHeaderV2FromJSONTyped, + TransactionHeaderV2ToJSON, +} from './TransactionHeaderV2'; + +/** + * + * @export + * @interface TransactionIntentV2 + */ +export interface TransactionIntentV2 { + /** + * The hex-encoded transaction intent hash for a user transaction, also known as the transaction id. + * This hash identifies the core "intent" of the transaction. Each transaction intent can only be committed once. + * This hash gets signed by any signatories on the transaction, to create the signed intent. + * @type {string} + * @memberof TransactionIntentV2 + */ + hash: string; + /** + * The Bech32m-encoded human readable `TransactionIntentHash`. + * @type {string} + * @memberof TransactionIntentV2 + */ + hash_bech32m: string; + /** + * + * @type {TransactionHeaderV2} + * @memberof TransactionIntentV2 + */ + transaction_header: TransactionHeaderV2; + /** + * + * @type {IntentCoreV2} + * @memberof TransactionIntentV2 + */ + root_intent_core: IntentCoreV2; + /** + * + * @type {Array} + * @memberof TransactionIntentV2 + */ + non_root_subintents: Array; +} + +/** + * Check if a given object implements the TransactionIntentV2 interface. + */ +export function instanceOfTransactionIntentV2(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "hash" in value; + isInstance = isInstance && "hash_bech32m" in value; + isInstance = isInstance && "transaction_header" in value; + isInstance = isInstance && "root_intent_core" in value; + isInstance = isInstance && "non_root_subintents" in value; + + return isInstance; +} + +export function TransactionIntentV2FromJSON(json: any): TransactionIntentV2 { + return TransactionIntentV2FromJSONTyped(json, false); +} + +export function TransactionIntentV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionIntentV2 { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'hash': json['hash'], + 'hash_bech32m': json['hash_bech32m'], + 'transaction_header': TransactionHeaderV2FromJSON(json['transaction_header']), + 'root_intent_core': IntentCoreV2FromJSON(json['root_intent_core']), + 'non_root_subintents': ((json['non_root_subintents'] as Array).map(SubintentV2FromJSON)), + }; +} + +export function TransactionIntentV2ToJSON(value?: TransactionIntentV2 | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'hash': value.hash, + 'hash_bech32m': value.hash_bech32m, + 'transaction_header': TransactionHeaderV2ToJSON(value.transaction_header), + 'root_intent_core': IntentCoreV2ToJSON(value.root_intent_core), + 'non_root_subintents': ((value.non_root_subintents as Array).map(SubintentV2ToJSON)), + }; +} + diff --git a/sdk/typescript/lib/generated/models/TransactionReceiptRequest.ts b/sdk/typescript/lib/generated/models/TransactionReceiptRequest.ts index 80e04aca0e..cd74f7e2a7 100644 --- a/sdk/typescript/lib/generated/models/TransactionReceiptRequest.ts +++ b/sdk/typescript/lib/generated/models/TransactionReceiptRequest.ts @@ -33,8 +33,8 @@ export interface TransactionReceiptRequest { */ network: string; /** - * The intent hash for a user transaction, also known as the transaction id. - * This hash identifies the core content "intent" of the transaction. Each intent can only be committed once. + * The transaction intent hash for a user transaction, also known as the transaction id. + * This hash identifies the core "intent" of the transaction. Each transaction intent can only be committed once. * This hash gets signed by any signatories on the transaction, to create the signed intent. * Either hex or Bech32m-encoded strings are supported. * @type {string} diff --git a/sdk/typescript/lib/generated/models/TransactionStatusRequest.ts b/sdk/typescript/lib/generated/models/TransactionStatusRequest.ts index 13710a3108..c42937ca90 100644 --- a/sdk/typescript/lib/generated/models/TransactionStatusRequest.ts +++ b/sdk/typescript/lib/generated/models/TransactionStatusRequest.ts @@ -26,8 +26,8 @@ export interface TransactionStatusRequest { */ network: string; /** - * The intent hash for a user transaction, also known as the transaction id. - * This hash identifies the core content "intent" of the transaction. Each intent can only be committed once. + * The transaction intent hash for a user transaction, also known as the transaction id. + * This hash identifies the core "intent" of the transaction. Each transaction intent can only be committed once. * This hash gets signed by any signatories on the transaction, to create the signed intent. * Either hex or Bech32m-encoded strings are supported. * @type {string} diff --git a/sdk/typescript/lib/generated/models/index.ts b/sdk/typescript/lib/generated/models/index.ts index 1fd29091a7..5cbe7d0d97 100644 --- a/sdk/typescript/lib/generated/models/index.ts +++ b/sdk/typescript/lib/generated/models/index.ts @@ -230,6 +230,9 @@ export * from './InstanceSchemaBlueprintTypeReference'; export * from './InstanceSchemaBlueprintTypeReferenceAllOf'; export * from './InstantMs'; export * from './InstructionResourceChanges'; +export * from './IntentCoreV2'; +export * from './IntentHeaderV2'; +export * from './IntentSignatures'; export * from './KeyValueBasedStructure'; export * from './KeyValueBlueprintCollectionSchema'; export * from './KeyValueBlueprintCollectionSchemaAllOf'; @@ -538,6 +541,7 @@ export * from './SignatureBase'; export * from './SignatureWithPublicKey'; export * from './SignatureWithPublicKeyBase'; export * from './SignedTransactionIntent'; +export * from './SignedTransactionIntentV2'; export * from './SignificantProtocolUpdateReadinessEntry'; export * from './SortedIndexBlueprintCollectionSchema'; export * from './SortedIndexBlueprintCollectionSchemaAllOf'; @@ -601,6 +605,7 @@ export * from './StreamTransactionsRequest'; export * from './StreamTransactionsResponse'; export * from './StringPlaintextMessageContent'; export * from './StringPlaintextMessageContentAllOf'; +export * from './SubintentV2'; export * from './Substate'; export * from './SubstateBase'; export * from './SubstateFormatOptions'; @@ -631,10 +636,12 @@ export * from './TransactionCallPreviewRequest'; export * from './TransactionCallPreviewResponse'; export * from './TransactionFormatOptions'; export * from './TransactionHeader'; +export * from './TransactionHeaderV2'; export * from './TransactionIdKey'; export * from './TransactionIdentifiers'; export * from './TransactionIntent'; export * from './TransactionIntentStatus'; +export * from './TransactionIntentV2'; export * from './TransactionMessage'; export * from './TransactionMessageBase'; export * from './TransactionMessageType'; From 1818c57753d5e3ac507a57f37e20fbd4ec03564f Mon Sep 17 00:00:00 2001 From: David Edey Date: Thu, 31 Oct 2024 12:12:22 +0000 Subject: [PATCH 07/12] markups: Markups from #1008 --- .../statecomputer/commit/LedgerProof.java | 4 +- .../core-api-server/core-api-schema.yaml | 7 ++-- .../src/protocol/protocol_update_executor.rs | 26 +++++++++--- core-rust/state-manager/src/state_manager.rs | 2 +- core-rust/state-manager/src/types.rs | 5 ++- .../consensus/epoch/EpochManager.java | 6 +-- .../com/radixdlt/consensus/sync/BFTSync.java | 2 +- .../radixdlt/ledger/LedgerProofBundle.java | 22 +++++----- .../com/radixdlt/ledger/LedgerUpdate.java | 2 +- .../radixdlt/logger/EventLoggerModule.java | 5 ++- .../monitoring/InMemorySystemInfo.java | 2 +- .../com/radixdlt/sync/LocalSyncService.java | 2 +- .../com/radixdlt/sync/RemoteSyncService.java | 4 +- .../harness/predicates/NodePredicate.java | 40 +++++++++++++++++++ .../harness/predicates/NodesPredicate.java | 8 ++++ .../consensus/ConsensusTimestampChecker.java | 6 +-- .../modules/MockedSyncServiceModule.java | 4 +- .../statecomputer/StatelessComputer.java | 2 +- .../InMemoryTransactionsAndProofReader.java | 6 +-- .../api/core/NetworkScenariosTest.java | 33 ++++----------- .../radixdlt/api/core/NetworkStatusTest.java | 4 +- .../com/radixdlt/ledger/LedgerUpdateTest.java | 8 +--- .../radixdlt/sync/RemoteSyncServiceTest.java | 2 +- 23 files changed, 120 insertions(+), 82 deletions(-) diff --git a/core-rust-bridge/src/main/java/com/radixdlt/statecomputer/commit/LedgerProof.java b/core-rust-bridge/src/main/java/com/radixdlt/statecomputer/commit/LedgerProof.java index 5ca3d9d233..1129b99c7e 100644 --- a/core-rust-bridge/src/main/java/com/radixdlt/statecomputer/commit/LedgerProof.java +++ b/core-rust-bridge/src/main/java/com/radixdlt/statecomputer/commit/LedgerProof.java @@ -101,9 +101,9 @@ public static LedgerProof testingGenesis( ProtocolConfig.GENESIS_PROTOCOL_VERSION_NAME, Option.some(HashUtils.zero256()), UInt64.ZERO, - "-", + "", UInt64.ZERO, - "-", + "", false)); } diff --git a/core-rust/core-api-server/core-api-schema.yaml b/core-rust/core-api-server/core-api-schema.yaml index 1d28fdce11..dbf7e92ba6 100644 --- a/core-rust/core-api-server/core-api-schema.yaml +++ b/core-rust/core-api-server/core-api-schema.yaml @@ -8226,6 +8226,7 @@ components: description: | Represents a proof from the execution of the babylon genesis protocol update, which starts the babylon-node ledger. + Behind-the-scenes, this is now the same as a `ProtocolUpdateLedgerProofOrigin`, but is kept separate for backwards-compatibility. @@ -8234,7 +8235,7 @@ components: * `batch_group_idx` (placeholder of 0) * `batch_group_name` (placeholder of "") - * `batch_idx` (whatever the non-grouped index was) + * `batch_idx` (placeholder of 0) * `batch_name` (placeholder of "") * `is_end_of_update` (placeholder of false) required: @@ -8293,12 +8294,12 @@ components: NOTE: Some of these values may be placeholder values for protocol updates pre-Cuttlefish on nodes which haven't resynced since Cuttlefish. In particular, the following values might be - invalid on such nodesL + invalid on such nodes: * `config_hash` (placeholder of all zeros) * `batch_group_idx` (placeholder of 0) * `batch_group_name` (placeholder of "") - * `batch_idx` (whatever the non-grouped index was) + * `batch_idx` (placeholder of 0) * `batch_name` (placeholder of "") * `is_end_of_update` (placeholder of false) required: diff --git a/core-rust/state-manager/src/protocol/protocol_update_executor.rs b/core-rust/state-manager/src/protocol/protocol_update_executor.rs index 655e3089bc..f0b7e894bb 100644 --- a/core-rust/state-manager/src/protocol/protocol_update_executor.rs +++ b/core-rust/state-manager/src/protocol/protocol_update_executor.rs @@ -61,10 +61,19 @@ impl NodeProtocolUpdateExecutor { last_batch_index, } => { info!("[UPDATE: {protocol_version_name}] Resuming protocol update"); + + // Note: Because we've resolved to UpdateInProgress, we know the last batch + // wasn't the last in the update. + // That said, it could still be the last in its (non-final) batch group! + // In this case, the batch `(last_batch_group_index, next_batch_in_group)` + // doesn't exist - but this is handled by the `start_at_batch >= total_batches` + // check in `execute_protocol_update_actions`. + let next_batch_in_group = last_batch_index.checked_add(1).unwrap(); + self.execute_protocol_update_actions( &protocol_version_name, last_batch_group_index, - last_batch_index.checked_add(1).unwrap(), + next_batch_in_group, ); latest_enacted = Some(protocol_version_name.clone()); } @@ -121,13 +130,9 @@ impl NodeProtocolUpdateExecutor { for (batch_group_index, batch_group) in remaining_batch_groups { let batch_group_number = batch_group_index + 1; let batch_group_name = batch_group.batch_group_name(); - let start_at_batch = if batch_group_index == from_batch_group_index - && from_batch_index > 0 - { - info!("[UPDATE: {protocol_version}] Continuing {batch_group_name} (batch group {batch_group_number}/{total_batch_groups})"); + let start_at_batch = if batch_group_index == from_batch_group_index { from_batch_index } else { - info!("[UPDATE: {protocol_version}] Commencing {batch_group_name} (batch group {batch_group_number}/{total_batch_groups})"); 0 }; let batches = { @@ -135,6 +140,15 @@ impl NodeProtocolUpdateExecutor { batch_group.generate_batches(self.database.lock().deref()) }; let total_batches = batches.len(); + if start_at_batch >= total_batches { + // This can occur if we resume a non-final batch group which is already complete. + // In which case, let's continue so we advance to the next batch group. + continue; + } else if start_at_batch == 0 { + info!("[UPDATE: {protocol_version}] Commencing {batch_group_name} (batch group {batch_group_number}/{total_batch_groups})"); + } else { + info!("[UPDATE: {protocol_version}] Continuing {batch_group_name} (batch group {batch_group_number}/{total_batch_groups})"); + } let remaining_batches = batches.into_iter().enumerate().skip(start_at_batch); for (batch_index, batch_generator) in remaining_batches { let batch_number = batch_index + 1; diff --git a/core-rust/state-manager/src/state_manager.rs b/core-rust/state-manager/src/state_manager.rs index b722e3b551..05b01d7d6e 100644 --- a/core-rust/state-manager/src/state_manager.rs +++ b/core-rust/state-manager/src/state_manager.rs @@ -406,7 +406,7 @@ impl StateManager { .resume_protocol_update_if_any(); let Some(resultant_version) = resultant_version else { - panic!("apply_protocol_update_and_any_following is only expected to be called if a pending protocol update is known"); + panic!("apply_known_pending_protocol_updates is only expected to be called if a pending protocol update is known"); }; self.handle_completed_protocol_update(resultant_version) diff --git a/core-rust/state-manager/src/types.rs b/core-rust/state-manager/src/types.rs index a7cdedc80d..16ca223bac 100644 --- a/core-rust/state-manager/src/types.rs +++ b/core-rust/state-manager/src/types.rs @@ -574,13 +574,14 @@ impl From for LedgerProofOriginV2 { }, LedgerProofOriginV1::ProtocolUpdate { protocol_version_name, - batch_index, + batch_index: _, } => LedgerProofOriginV2::ProtocolUpdate { protocol_version_name, config_hash: None, batch_group_index: 0, batch_group_name: "".to_string(), - batch_index: batch_index as usize, + // To avoid confusion, we discard the old batch index which was from a different/flattened batching structure + batch_index: 0, batch_name: "".to_string(), is_end_of_update: false, }, diff --git a/core/src/main/java/com/radixdlt/consensus/epoch/EpochManager.java b/core/src/main/java/com/radixdlt/consensus/epoch/EpochManager.java index ea31d114f5..6623d9989a 100644 --- a/core/src/main/java/com/radixdlt/consensus/epoch/EpochManager.java +++ b/core/src/main/java/com/radixdlt/consensus/epoch/EpochManager.java @@ -343,7 +343,7 @@ public EventProcessor epochsLedgerUpdateEventProcessor() { } private void processLedgerUpdate(LedgerUpdate ledgerUpdate) { - this.latestProof = ledgerUpdate.committedProof(); + this.latestProof = ledgerUpdate.committedProofBundle(); ledgerUpdate .epochChange() @@ -368,10 +368,10 @@ private void processEpochChange(EpochChange epochChange) { // Note that if this epoch change came with a protocol update // then we don't broadcast the latest (i.e. post-protocol update) proof, // but the epoch proof that triggered the protocol update. - // That's the `trimProtocolUpdate` call. + // That's the `latestRoundOrEpochChangeProof` call. LedgerProofSyncStatusDto proof = LedgerSyncDtoConversions.ledgerProofToSyncStatusDto( - epochChange.proofBundle().trimProtocolUpdate()); + epochChange.proofBundle().latestRoundOrEpochChangeProof()); final var ledgerStatusUpdate = new LedgerStatusUpdate(proof); for (var validator : currentAndNextValidators) { if (!validator.getValidatorId().getKey().equals(selfValidatorInfo.key())) { diff --git a/core/src/main/java/com/radixdlt/consensus/sync/BFTSync.java b/core/src/main/java/com/radixdlt/consensus/sync/BFTSync.java index 259e6aa206..27debbef09 100644 --- a/core/src/main/java/com/radixdlt/consensus/sync/BFTSync.java +++ b/core/src/main/java/com/radixdlt/consensus/sync/BFTSync.java @@ -665,7 +665,7 @@ public EventProcessor baseLedgerUpdateEventProcessor() { // TODO: Verify headers match private void processLedgerUpdate(LedgerUpdate ledgerUpdate) { - this.latestProof = ledgerUpdate.committedProof(); + this.latestProof = ledgerUpdate.committedProofBundle(); final var header = REv2ToConsensus.ledgerHeader(latestProof.primaryProof().ledgerHeader()); var listeners = this.ledgerSyncing.headMap(header, true).values(); var listenersIterator = listeners.iterator(); diff --git a/core/src/main/java/com/radixdlt/ledger/LedgerProofBundle.java b/core/src/main/java/com/radixdlt/ledger/LedgerProofBundle.java index 4f3a5b6d8b..522ee7c081 100644 --- a/core/src/main/java/com/radixdlt/ledger/LedgerProofBundle.java +++ b/core/src/main/java/com/radixdlt/ledger/LedgerProofBundle.java @@ -123,7 +123,7 @@ public LedgerHeader epochInitialHeader() { * we're in the next epoch post-commit, then the returned round is 0. */ public Round resultantRound() { - final var maybeEpochChangeHeader = trimProtocolUpdate().ledgerHeader(); + final var maybeEpochChangeHeader = latestRoundOrEpochChangeProof().ledgerHeader(); return maybeEpochChangeHeader.nextEpoch().isPresent() ? Round.epochInitial() @@ -144,20 +144,16 @@ public long resultantStateVersion() { } /** - * If the primary proof of this bundle is of ProtocolUpdate origin, then it will be trimmed and - * the closest non-protocol update proof will be returned. + * Typically this will be a consensus proof (because consensus proofs are the ones which initial + * one or more protocol updates). The only exception is right after genesis, when this will be the + * epoch change in genesis wrap-up. */ - public LedgerProof trimProtocolUpdate() { + public LedgerProof latestRoundOrEpochChangeProof() { return switch (primaryProof.origin()) { - // Just return the proof if it originates from consensus or genesis - case LedgerProofOrigin.Consensus consensus -> primaryProof; - case LedgerProofOrigin.ProtocolUpdate ignored -> { - if (latestProofWhichInitiatedOneOrMoreProtocolUpdates().isPresent()) { - yield latestProofWhichInitiatedOneOrMoreProtocolUpdates().unwrap(); - } else { - yield latestProofWhichInitiatedAnEpochChange(); - } - } + case LedgerProofOrigin.Consensus ignored -> primaryProof; + case LedgerProofOrigin.ProtocolUpdate + ignored -> latestProofWhichInitiatedOneOrMoreProtocolUpdates.or( + latestProofWhichInitiatedAnEpochChange); }; } } diff --git a/core/src/main/java/com/radixdlt/ledger/LedgerUpdate.java b/core/src/main/java/com/radixdlt/ledger/LedgerUpdate.java index 641fa672aa..a5b0484e39 100644 --- a/core/src/main/java/com/radixdlt/ledger/LedgerUpdate.java +++ b/core/src/main/java/com/radixdlt/ledger/LedgerUpdate.java @@ -74,7 +74,7 @@ public record LedgerUpdate( CommitSummary commitSummary, - LedgerProofBundle committedProof, + LedgerProofBundle committedProofBundle, Option epochChange, ProtocolState resultantProtocolState, // Only used in tests diff --git a/core/src/main/java/com/radixdlt/logger/EventLoggerModule.java b/core/src/main/java/com/radixdlt/logger/EventLoggerModule.java index 9b9e54abe7..37fda79ce4 100644 --- a/core/src/main/java/com/radixdlt/logger/EventLoggerModule.java +++ b/core/src/main/java/com/radixdlt/logger/EventLoggerModule.java @@ -192,7 +192,7 @@ private void processLedgerUpdate( calculateLoggingLevel(ledgerUpdateLogLimiter, ledgerUpdate.epochChange())); ledgerUpdate.epochChange().ifPresent(epochChange -> logEpochChange(self, epochChange)); - logProtocolUpdate(ledgerUpdate.committedProof()); + logProtocolUpdate(ledgerUpdate.committedProofBundle()); self.bftValidatorId() .ifPresent( @@ -247,7 +247,8 @@ private static void logLedgerUpdate(LedgerUpdate ledgerUpdate, long txnCount, Le } final var header = - REv2ToConsensus.ledgerHeader(ledgerUpdate.committedProof().primaryProof().ledgerHeader()); + REv2ToConsensus.ledgerHeader( + ledgerUpdate.committedProofBundle().primaryProof().ledgerHeader()); final var ledgerHashes = header.getHashes(); logger.log( logLevel, diff --git a/core/src/main/java/com/radixdlt/monitoring/InMemorySystemInfo.java b/core/src/main/java/com/radixdlt/monitoring/InMemorySystemInfo.java index 9cca63817b..5d9da06eff 100644 --- a/core/src/main/java/com/radixdlt/monitoring/InMemorySystemInfo.java +++ b/core/src/main/java/com/radixdlt/monitoring/InMemorySystemInfo.java @@ -112,7 +112,7 @@ public EpochRound getCurrentRound() { public EventProcessor ledgerUpdateEventProcessor() { return update -> { - final var committedProof = update.committedProof(); + final var committedProof = update.committedProofBundle(); final var maybeNextEpoch = committedProof.primaryProof().ledgerHeader().nextEpoch(); this.state = new InMemorySystemInfoState( diff --git a/core/src/main/java/com/radixdlt/sync/LocalSyncService.java b/core/src/main/java/com/radixdlt/sync/LocalSyncService.java index 0de6dc2379..11757539f9 100644 --- a/core/src/main/java/com/radixdlt/sync/LocalSyncService.java +++ b/core/src/main/java/com/radixdlt/sync/LocalSyncService.java @@ -590,7 +590,7 @@ private SyncState processSyncLedgerUpdateTimeout( } private SyncState updateCurrentHeaderIfNeeded(SyncState currentState, LedgerUpdate ledgerUpdate) { - final var committedProof = ledgerUpdate.committedProof().primaryProof(); + final var committedProof = ledgerUpdate.committedProofBundle().primaryProof(); if (committedProof.stateVersion() > currentState.getLatestProof().stateVersion()) { final var newState = currentState.withLatestProof(committedProof); updateCurrentAndTargetMetrics(newState); diff --git a/core/src/main/java/com/radixdlt/sync/RemoteSyncService.java b/core/src/main/java/com/radixdlt/sync/RemoteSyncService.java index 548113ec44..19448c2eaf 100644 --- a/core/src/main/java/com/radixdlt/sync/RemoteSyncService.java +++ b/core/src/main/java/com/radixdlt/sync/RemoteSyncService.java @@ -172,9 +172,9 @@ public EventProcessor ledgerUpdateEventProcessor() { } private void processLedgerUpdate(LedgerUpdate ledgerUpdate) { - if (ledgerUpdate.committedProof().resultantStateVersion() + if (ledgerUpdate.committedProofBundle().resultantStateVersion() > this.latestProof.resultantStateVersion()) { - this.latestProof = ledgerUpdate.committedProof(); + this.latestProof = ledgerUpdate.committedProofBundle(); this.sendStatusUpdateToSomePeers( LedgerSyncDtoConversions.ledgerProofToSyncStatusDto(latestProof.primaryProof())); } diff --git a/core/src/test-core/java/com/radixdlt/harness/predicates/NodePredicate.java b/core/src/test-core/java/com/radixdlt/harness/predicates/NodePredicate.java index 9f260ef76d..a01efca9cb 100644 --- a/core/src/test-core/java/com/radixdlt/harness/predicates/NodePredicate.java +++ b/core/src/test-core/java/com/radixdlt/harness/predicates/NodePredicate.java @@ -68,6 +68,8 @@ import com.radixdlt.consensus.bft.Round; import com.radixdlt.consensus.liveness.PacemakerState; import com.radixdlt.consensus.safety.SafetyRules; +import com.radixdlt.monitoring.InMemorySystemInfo; +import com.radixdlt.protocol.ProtocolConfig; import com.radixdlt.statecomputer.commit.LedgerProof; import com.radixdlt.sync.TransactionsAndProofReader; import com.radixdlt.testutil.TestStateReader; @@ -151,6 +153,44 @@ public static Predicate atOrOverStateVersion(long stateVersion) { return proofCommitted(p -> p.stateVersion() >= stateVersion); } + public static Predicate atExactlyProtocolVersion(String protocolVersion) { + return i -> + i.getInstance(InMemorySystemInfo.class) + .getState() + .protocolState() + .currentProtocolVersion() + .equals(protocolVersion); + } + + public static Predicate atOrOverProtocolVersion(String targetProtocolVersion) { + return i -> { + var currentProtocolVersion = + i.getInstance(InMemorySystemInfo.class) + .getState() + .protocolState() + .currentProtocolVersion(); + var currentIndex = ProtocolConfig.VERSION_NAMES.indexOf(currentProtocolVersion); + if (currentIndex == -1) { + throw new RuntimeException( + String.format( + "The current protocol version \"%s\" does not exist in" + + " `ProtocolConfig.VERSION_NAMES`, so you cannot use" + + " `NodePredicate::atLeastProtocolVersion`", + targetProtocolVersion)); + } + var targetIndex = ProtocolConfig.VERSION_NAMES.indexOf(targetProtocolVersion); + if (targetIndex == -1) { + throw new RuntimeException( + String.format( + "The target protocol version \"%s\" does not exist in" + + " `ProtocolConfig.VERSION_NAMES`, so you cannot use" + + " `NodePredicate::atLeastProtocolVersion`", + targetProtocolVersion)); + } + return currentIndex >= targetIndex; + }; + } + public static Predicate proofCommitted(Predicate predicate) { return i -> i.getInstance(TransactionsAndProofReader.class) diff --git a/core/src/test-core/java/com/radixdlt/harness/predicates/NodesPredicate.java b/core/src/test-core/java/com/radixdlt/harness/predicates/NodesPredicate.java index 88ef58440e..25b4ae5aad 100644 --- a/core/src/test-core/java/com/radixdlt/harness/predicates/NodesPredicate.java +++ b/core/src/test-core/java/com/radixdlt/harness/predicates/NodesPredicate.java @@ -100,6 +100,14 @@ public static Predicate> allAtOrOverEpoch(long epoch) { return allNodesMatch(NodePredicate.atOrOverEpoch(epoch)); } + public static Predicate> allAtExactlyProtocolVersion(String protocolVersion) { + return allNodesMatch(NodePredicate.atExactlyProtocolVersion(protocolVersion)); + } + + public static Predicate> allAtOrOverProtocolVersion(String protocolVersion) { + return allNodesMatch(NodePredicate.atOrOverProtocolVersion(protocolVersion)); + } + public static Predicate> allCommittedTransactionSuccess( RawNotarizedTransaction transaction) { return allNodesMatch(NodePredicate.committedUserTransaction(transaction, true, true)); diff --git a/core/src/test-core/java/com/radixdlt/harness/simulation/monitors/consensus/ConsensusTimestampChecker.java b/core/src/test-core/java/com/radixdlt/harness/simulation/monitors/consensus/ConsensusTimestampChecker.java index 855ccc0ca5..f0f2accecb 100644 --- a/core/src/test-core/java/com/radixdlt/harness/simulation/monitors/consensus/ConsensusTimestampChecker.java +++ b/core/src/test-core/java/com/radixdlt/harness/simulation/monitors/consensus/ConsensusTimestampChecker.java @@ -88,7 +88,7 @@ public ConsensusTimestampChecker(Duration acceptableTimeRange) { private Maybe checkCloseTimestamp(LedgerUpdate update) { final var now = System.currentTimeMillis(); - final var proof = update.committedProof().primaryProof(); + final var proof = update.committedProofBundle().primaryProof(); final var timestamp = proof.ledgerHeader().consensusParentRoundTimestampMs(); // Initial rounds of Consensus can have a timestamp of 0 if (timestamp == 0) { @@ -112,7 +112,7 @@ private Maybe checkCloseTimestamp(LedgerUpdate update) { } private static boolean isFirstRoundOfFirstEpoch(LedgerUpdate ledgerUpdate) { - final var proof = ledgerUpdate.committedProof().primaryProof(); + final var proof = ledgerUpdate.committedProofBundle().primaryProof(); return proof.ledgerHeader().epoch().toLong() == 1 && proof.ledgerHeader().round().toLong() == 1; } @@ -124,7 +124,7 @@ public Observable check(RunningNetwork network) { // Test on only the first ledger update in the network .distinct( update -> { - final var proof = update.committedProof().primaryProof(); + final var proof = update.committedProofBundle().primaryProof(); return EpochRound.of( proof.ledgerHeader().epoch().toLong(), Round.of(proof.ledgerHeader().round().toLong())); diff --git a/core/src/test-core/java/com/radixdlt/modules/MockedSyncServiceModule.java b/core/src/test-core/java/com/radixdlt/modules/MockedSyncServiceModule.java index 2ea6cb89bb..d2749f75d0 100644 --- a/core/src/test-core/java/com/radixdlt/modules/MockedSyncServiceModule.java +++ b/core/src/test-core/java/com/radixdlt/modules/MockedSyncServiceModule.java @@ -128,8 +128,8 @@ private EventProcessorOnDispatch ledgerUpdateEventProcessor() { return new EventProcessorOnDispatch<>( LedgerUpdate.class, update -> { - // We must skip protocol update proofs here (`trimProtocolUpdate`) - final var proof = update.committedProof().trimProtocolUpdate(); + // We must skip protocol update proofs here + final var proof = update.committedProofBundle().latestRoundOrEpochChangeProof(); long stateVersion = proof.stateVersion(); long firstVersion = stateVersion - update.committedNonProtocolUpdateTransactions().size() + 1; diff --git a/core/src/test-core/java/com/radixdlt/statecomputer/StatelessComputer.java b/core/src/test-core/java/com/radixdlt/statecomputer/StatelessComputer.java index 04640b7fcf..769c11ccdb 100644 --- a/core/src/test-core/java/com/radixdlt/statecomputer/StatelessComputer.java +++ b/core/src/test-core/java/com/radixdlt/statecomputer/StatelessComputer.java @@ -197,6 +197,6 @@ public LedgerProofBundle commit( LedgerExtension ledgerExtension, VertexStoreState vertexStoreState) { var ledgerUpdate = this.generateLedgerUpdate(ledgerExtension); ledgerUpdateDispatcher.dispatch(ledgerUpdate); - return ledgerUpdate.committedProof(); + return ledgerUpdate.committedProofBundle(); } } diff --git a/core/src/test-core/java/com/radixdlt/store/InMemoryTransactionsAndProofReader.java b/core/src/test-core/java/com/radixdlt/store/InMemoryTransactionsAndProofReader.java index 0fda937418..3fdef16cc8 100644 --- a/core/src/test-core/java/com/radixdlt/store/InMemoryTransactionsAndProofReader.java +++ b/core/src/test-core/java/com/radixdlt/store/InMemoryTransactionsAndProofReader.java @@ -99,8 +99,8 @@ public static final class Store { public EventProcessor updateProcessor() { return update -> { synchronized (lock) { - // We must skip protocol update proofs here (`trimProtocolUpdate`) - final var proof = update.committedProof().trimProtocolUpdate(); + // We must skip protocol update proofs here + final var proof = update.committedProofBundle().latestRoundOrEpochChangeProof(); final var transactions = update.committedNonProtocolUpdateTransactions(); final var latestStateVersion = proof.stateVersion(); long firstVersion = latestStateVersion - transactions.size() + 1; @@ -116,7 +116,7 @@ public EventProcessor updateProcessor() { .nextEpoch() .ifPresent(nextEpoch -> this.store.epochProofs.put(nextEpoch.epoch().toLong(), proof)); - this.store.latestProof = Optional.of(update.committedProof()); + this.store.latestProof = Optional.of(update.committedProofBundle()); } }; } diff --git a/core/src/test/java/com/radixdlt/api/core/NetworkScenariosTest.java b/core/src/test/java/com/radixdlt/api/core/NetworkScenariosTest.java index 6a7b4963d9..ec32c89cb3 100644 --- a/core/src/test/java/com/radixdlt/api/core/NetworkScenariosTest.java +++ b/core/src/test/java/com/radixdlt/api/core/NetworkScenariosTest.java @@ -64,7 +64,6 @@ package com.radixdlt.api.core; -import static com.radixdlt.harness.predicates.NodesPredicate.allAtOrOverEpoch; import static org.assertj.core.api.Assertions.assertThat; import com.google.common.collect.ImmutableList; @@ -74,9 +73,6 @@ import com.radixdlt.environment.ScenariosExecutionConfig; import com.radixdlt.genesis.GenesisBuilder; import com.radixdlt.genesis.GenesisConsensusManagerConfig; -import com.radixdlt.protocol.ProtocolConfig; -import com.radixdlt.protocol.ProtocolUpdateEnactmentCondition; -import com.radixdlt.protocol.ProtocolUpdateTrigger; import com.radixdlt.rev2.Decimal; import java.util.List; import java.util.stream.LongStream; @@ -87,42 +83,27 @@ public class NetworkScenariosTest extends DeterministicCoreApiTestBase { public void test_network_scenarios() throws Exception { final var config = defaultConfig() - .withProtocolConfig( - new ProtocolConfig( - ImmutableList.of( - new ProtocolUpdateTrigger( - ProtocolConfig.ANEMONE_PROTOCOL_VERSION_NAME, - ProtocolUpdateEnactmentCondition.unconditionallyAtEpoch(3L)), - new ProtocolUpdateTrigger( - ProtocolConfig.BOTTLENOSE_PROTOCOL_VERSION_NAME, - ProtocolUpdateEnactmentCondition.unconditionallyAtEpoch(4L))))) .withScenarioExecutionConfig(ScenariosExecutionConfig.ALL_FOR_NETWORK) .withGenesis( GenesisBuilder.createTestGenesisWithNumValidators( 1, Decimal.ONE, - GenesisConsensusManagerConfig.Builder.testDefaults().epochExactRoundCount(100), - // pick a custom subset/permutation (different than "all scenarios"): + GenesisConsensusManagerConfig.Builder.testDefaults(), + // Pick a custom subset/permutation of genesis scenarios (different from "all + // scenarios") ImmutableList.of("radiswap", "transfer_xrd", "royalties"))); try (var test = buildRunningServerTest(config)) { test.suppressUnusedWarning(); - // Query scenarios right after genesis - final var genesisScenarios = - getStatusApi() - .statusScenariosPost(new ScenariosRequest().network(networkLogicalName)) - .getExecutedScenarios(); - assertThat(genesisScenarios).hasSize(3); // there is 3 of them - - // Wait for all protocol updates: - test.runUntilState(allAtOrOverEpoch(4L)); + // By the time we complete node start-up, all protocol updates and scenarios will have run. - // query all scenarios + // Query all scenarios final var allScenarios = getStatusApi() .statusScenariosPost(new ScenariosRequest().network(networkLogicalName)) .getExecutedScenarios(); - assertThat(allScenarios).hasSize(6); // there is 3 genesis + 3 bottlenose + // There are 3 configured genesis scenarios + 3 bottlenose, plus more at Cuttlefish and beyond + assertThat(allScenarios).hasSizeGreaterThan(6); // assert some selected properties of the known scenarios assertScenario( diff --git a/core/src/test/java/com/radixdlt/api/core/NetworkStatusTest.java b/core/src/test/java/com/radixdlt/api/core/NetworkStatusTest.java index ee95e81fbb..569c45a6ce 100644 --- a/core/src/test/java/com/radixdlt/api/core/NetworkStatusTest.java +++ b/core/src/test/java/com/radixdlt/api/core/NetworkStatusTest.java @@ -88,7 +88,9 @@ public void test_core_api_status_response_at_startup() throws Exception { assertThat(response.getPostGenesisEpochRound().getEpoch()).isEqualTo(2); assertThat(response.getPostGenesisEpochRound().getRound()).isEqualTo(0); - // We also check that the default test configuration has enacted all protocol updates + // We also check that the default test configuration has enacted all protocol updates... + // This check also ensures that we keep our codebase in sync, as it ensures that + // `ProtocolConfig.VERSION_NAMES` is updated at the same time as `testnet_protocol_config` assertThat(response.getCurrentProtocolVersion()) .isEqualTo(ProtocolConfig.LATEST_PROTOCOL_VERSION_NAME); } diff --git a/core/src/test/java/com/radixdlt/ledger/LedgerUpdateTest.java b/core/src/test/java/com/radixdlt/ledger/LedgerUpdateTest.java index 29ce4e1c06..e0ff5c710c 100644 --- a/core/src/test/java/com/radixdlt/ledger/LedgerUpdateTest.java +++ b/core/src/test/java/com/radixdlt/ledger/LedgerUpdateTest.java @@ -84,13 +84,7 @@ public void testEquals() { LedgerProofOrigin.class, new LedgerProofOrigin.Consensus(HashUtils.random256(), ImmutableList.of()), new LedgerProofOrigin.ProtocolUpdate( - "asd", - Option.some(HashUtils.random256()), - UInt64.ZERO, - "-", - UInt64.ZERO, - "-", - false)) + "asd", Option.some(HashUtils.random256()), UInt64.ZERO, "", UInt64.ZERO, "", false)) .withPrefabValues( ProtocolState.PendingProtocolUpdateState.class, new ProtocolState.PendingProtocolUpdateState.ForSignalledReadinessSupportCondition( diff --git a/core/src/test/java/com/radixdlt/sync/RemoteSyncServiceTest.java b/core/src/test/java/com/radixdlt/sync/RemoteSyncServiceTest.java index e0623bbe95..1318d674ac 100644 --- a/core/src/test/java/com/radixdlt/sync/RemoteSyncServiceTest.java +++ b/core/src/test/java/com/radixdlt/sync/RemoteSyncServiceTest.java @@ -198,7 +198,7 @@ public void when_ledger_update_but_syncing__then_dont_send_status_update() { when(proof.stateVersion()).thenReturn(2L); final LedgerProofBundle latestProofs = mock(LedgerProofBundle.class); when(latestProofs.primaryProof()).thenReturn(proof); - when(ledgerUpdate.committedProof()).thenReturn(latestProofs); + when(ledgerUpdate.committedProofBundle()).thenReturn(latestProofs); when(this.localSyncService.getSyncState()) .thenReturn( From 18dde125d317b3060cc9d1184de0f6bd46bf927c Mon Sep 17 00:00:00 2001 From: David Edey Date: Fri, 1 Nov 2024 01:15:28 +0000 Subject: [PATCH 08/12] feat: Update to latest scrypto --- core-rust/Cargo.lock | 38 +++++----- core-rust/Cargo.toml | 24 +++---- .../substates/boot_loader_module.rs | 4 +- .../core_api/handlers/stream_transactions.rs | 14 ++-- ...ed_transaction_identifiers_bottlenose.bin} | Bin ...ted_transaction_identifiers_cuttlefish.bin | Bin 0 -> 2155 bytes .../pending_transaction_result_cache.rs | 65 +++++------------- core-rust/state-manager/src/receipt.rs | 45 ++++++++++-- .../src/transaction/preparation.rs | 10 +-- .../src/transaction/validation.rs | 6 +- 10 files changed, 109 insertions(+), 97 deletions(-) rename core-rust/state-manager/src/{CF_SCHEMA_versioned_committed_transaction_identifiers.bin => CF_SCHEMA_versioned_committed_transaction_identifiers_bottlenose.bin} (100%) create mode 100644 core-rust/state-manager/src/CF_SCHEMA_versioned_committed_transaction_identifiers_cuttlefish.bin diff --git a/core-rust/Cargo.lock b/core-rust/Cargo.lock index a52b4221f8..02850e4d83 100644 --- a/core-rust/Cargo.lock +++ b/core-rust/Cargo.lock @@ -1764,7 +1764,7 @@ dependencies = [ [[package]] name = "radix-blueprint-schema-init" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "bitflags 1.3.2", "radix-common", @@ -1775,7 +1775,7 @@ dependencies = [ [[package]] name = "radix-common" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "bech32", "blake2", @@ -1801,7 +1801,7 @@ dependencies = [ [[package]] name = "radix-common-derive" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "paste", "proc-macro2", @@ -1813,7 +1813,7 @@ dependencies = [ [[package]] name = "radix-engine" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "bitflags 1.3.2", "colored", @@ -1844,7 +1844,7 @@ dependencies = [ [[package]] name = "radix-engine-interface" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "bitflags 1.3.2", "const-sha1", @@ -1865,7 +1865,7 @@ dependencies = [ [[package]] name = "radix-engine-profiling" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "fixedstr", ] @@ -1873,7 +1873,7 @@ dependencies = [ [[package]] name = "radix-engine-profiling-derive" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "proc-macro2", "quote", @@ -1884,7 +1884,7 @@ dependencies = [ [[package]] name = "radix-engine-toolkit-common" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "radix-common", "radix-engine", @@ -1898,7 +1898,7 @@ dependencies = [ [[package]] name = "radix-native-sdk" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "radix-common", "radix-engine-interface", @@ -1909,7 +1909,7 @@ dependencies = [ [[package]] name = "radix-rust" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "indexmap 2.2.6", "serde", @@ -1918,7 +1918,7 @@ dependencies = [ [[package]] name = "radix-sbor-derive" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "proc-macro2", "quote", @@ -1929,7 +1929,7 @@ dependencies = [ [[package]] name = "radix-substate-store-impls" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "hex", "itertools", @@ -1943,7 +1943,7 @@ dependencies = [ [[package]] name = "radix-substate-store-interface" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "hex", "itertools", @@ -1955,7 +1955,7 @@ dependencies = [ [[package]] name = "radix-substate-store-queries" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "hex", "itertools", @@ -1972,7 +1972,7 @@ dependencies = [ [[package]] name = "radix-transaction-scenarios" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "hex", "itertools", @@ -1992,7 +1992,7 @@ dependencies = [ [[package]] name = "radix-transactions" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "annotate-snippets", "bech32", @@ -2165,7 +2165,7 @@ dependencies = [ [[package]] name = "sbor" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "const-sha1", "hex", @@ -2179,7 +2179,7 @@ dependencies = [ [[package]] name = "sbor-derive" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "proc-macro2", "sbor-derive-common", @@ -2189,7 +2189,7 @@ dependencies = [ [[package]] name = "sbor-derive-common" version = "1.3.0-dev" -source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-023d06ff#023d06ff5ec04dce3680c7ca68981da40f1a1a11" +source = "git+https://github.com/radixdlt/radixdlt-scrypto?tag=cuttlefish-86080d60#86080d60ac637999549180f946ce84d2fa4390b7" dependencies = [ "const-sha1", "indexmap 2.2.6", diff --git a/core-rust/Cargo.toml b/core-rust/Cargo.toml index 75fc0135cf..c73500ab52 100644 --- a/core-rust/Cargo.toml +++ b/core-rust/Cargo.toml @@ -26,18 +26,18 @@ resolver = "2" # Then use tag="release_name-BLAH" in the below dependencies. # ================================================================= -sbor = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff", features = ["serde"] } -radix-transactions = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff" } -radix-transaction-scenarios = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff" } -radix-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff", features = ["serde"] } -radix-engine-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff" } -radix-engine = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff" } -radix-substate-store-impls = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff" } -radix-substate-store-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff" } -radix-substate-store-queries = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff" } -radix-rust = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff", features = ["serde"] } -radix-blueprint-schema-init = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff", features = ["serde"] } -radix-engine-toolkit-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-023d06ff" } +sbor = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-86080d60", features = ["serde"] } +radix-transactions = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-86080d60" } +radix-transaction-scenarios = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-86080d60" } +radix-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-86080d60", features = ["serde"] } +radix-engine-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-86080d60" } +radix-engine = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-86080d60" } +radix-substate-store-impls = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-86080d60" } +radix-substate-store-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-86080d60" } +radix-substate-store-queries = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-86080d60" } +radix-rust = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-86080d60", features = ["serde"] } +radix-blueprint-schema-init = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-86080d60", features = ["serde"] } +radix-engine-toolkit-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "cuttlefish-86080d60" } itertools = { version = "=0.10.5" } jni = { version = "=0.19.0" } diff --git a/core-rust/core-api-server/src/core_api/conversions/substates/boot_loader_module.rs b/core-rust/core-api-server/src/core_api/conversions/substates/boot_loader_module.rs index 0e17d5a111..a11bda51a9 100644 --- a/core-rust/core-api-server/src/core_api/conversions/substates/boot_loader_module.rs +++ b/core-rust/core-api-server/src/core_api/conversions/substates/boot_loader_module.rs @@ -206,14 +206,14 @@ pub fn to_api_transaction_validator_configuration_substate( max_epoch_range, max_instructions, message_validation, - allow_notary_to_duplicate_signer, + v1_transactions_allow_notary_to_duplicate_signer, preparation_settings, manifest_validation, v2_transactions_allowed, min_tip_basis_points, max_tip_basis_points, max_subintent_depth, - max_total_signer_signatures, + max_total_signature_validations, max_total_references, } = config; diff --git a/core-rust/core-api-server/src/core_api/handlers/stream_transactions.rs b/core-rust/core-api-server/src/core_api/handlers/stream_transactions.rs index dd35a2863a..7a1c6ed92f 100644 --- a/core-rust/core-api-server/src/core_api/handlers/stream_transactions.rs +++ b/core-rust/core-api-server/src/core_api/handlers/stream_transactions.rs @@ -343,7 +343,7 @@ pub fn to_api_ledger_transaction( notarized_transaction: Box::new(to_api_notarized_transaction_v1( context, tx, - &user_hashes, + user_hashes, )?), } } @@ -360,7 +360,7 @@ pub fn to_api_ledger_transaction( notarized_transaction: Box::new(to_api_notarized_transaction_v2( context, tx, - &user_hashes, + user_hashes, )?), } } @@ -874,6 +874,7 @@ pub fn to_api_notarized_transaction_v2( context, signed_transaction_intent, &user_hashes.transaction_intent_hash, + user_hashes.non_root_subintent_hashes.as_slice(), &user_hashes.signed_transaction_intent_hash, )?), notary_signature: Some(to_api_signature(¬ary_signature.0)), @@ -884,6 +885,7 @@ pub fn to_api_signed_transaction_intent_v2( context: &MappingContext, signed: &SignedTransactionIntentV2, transaction_intent_hash: &TransactionIntentHash, + non_root_subintent_hashes: &[SubintentHash], signed_transaction_intent_hash: &SignedTransactionIntentHash, ) -> Result { let SignedTransactionIntentV2 { @@ -898,6 +900,7 @@ pub fn to_api_signed_transaction_intent_v2( context, transaction_intent, transaction_intent_hash, + non_root_subintent_hashes, )?), transaction_intent_signatures: Box::new(to_api_intent_signatures_v2( transaction_intent_signatures.signatures.as_slice(), @@ -925,6 +928,7 @@ pub fn to_api_transaction_intent_v2( context: &MappingContext, transaction_intent: &TransactionIntentV2, transaction_intent_hash: &TransactionIntentHash, + non_root_subintent_hashes: &[SubintentHash], ) -> Result { let TransactionIntentV2 { transaction_header, @@ -939,9 +943,9 @@ pub fn to_api_transaction_intent_v2( non_root_subintents: non_root_subintents .0 .iter() - // TODO:CUTTLEFISH - fix the subintent hashes - .map(|subintent| { - to_api_subintent_v2(context, subintent, &SubintentHash(Hash([0; Hash::LENGTH]))) + .zip(non_root_subintent_hashes.iter()) + .map(|(subintent, subintent_hash)| { + to_api_subintent_v2(context, subintent, subintent_hash) }) .collect::>()?, }) diff --git a/core-rust/state-manager/src/CF_SCHEMA_versioned_committed_transaction_identifiers.bin b/core-rust/state-manager/src/CF_SCHEMA_versioned_committed_transaction_identifiers_bottlenose.bin similarity index 100% rename from core-rust/state-manager/src/CF_SCHEMA_versioned_committed_transaction_identifiers.bin rename to core-rust/state-manager/src/CF_SCHEMA_versioned_committed_transaction_identifiers_bottlenose.bin diff --git a/core-rust/state-manager/src/CF_SCHEMA_versioned_committed_transaction_identifiers_cuttlefish.bin b/core-rust/state-manager/src/CF_SCHEMA_versioned_committed_transaction_identifiers_cuttlefish.bin new file mode 100644 index 0000000000000000000000000000000000000000..df90c6a1ccaf33e19eb1ed32703e9de8fe47a6e8 GIT binary patch literal 2155 zcmd5-TW`}a6t=?6VevML#;IcW0e(HlCwAjj z%{s(IRF!frpTFbp*eCfi@e)EOew+;Y^dyWul2A&!l+-_pUf+0oG){cTdNxbDFO5lP zxTDh^r2Qrx7_&#AN*H2^pf0gvQAoLKJ=zT$^Mx@z+(yTEK6+i_8R};|?DnIkK(8_P zp5n7h_Z$2c?=GdC7+m`#WK;BC R#D1@Gt!Og`XtUpG@)KH;$n^jK literal 0 HcmV?d00001 diff --git a/core-rust/state-manager/src/mempool/pending_transaction_result_cache.rs b/core-rust/state-manager/src/mempool/pending_transaction_result_cache.rs index 2fe0cb4bf7..eda41bf1e2 100644 --- a/core-rust/state-manager/src/mempool/pending_transaction_result_cache.rs +++ b/core-rust/state-manager/src/mempool/pending_transaction_result_cache.rs @@ -51,8 +51,8 @@ impl MempoolRejectionReason { ExecutionRejectionReason::TransactionEpochNoLongerValid { .. } => false, ExecutionRejectionReason::TransactionProposerTimestampNotYetValid { .. } => false, ExecutionRejectionReason::TransactionProposerTimestampNoLongerValid { .. } => false, - ExecutionRejectionReason::IntentHashPreviouslyCommitted => true, - ExecutionRejectionReason::IntentHashPreviouslyCancelled => true, + ExecutionRejectionReason::IntentHashPreviouslyCommitted(_) => true, + ExecutionRejectionReason::IntentHashPreviouslyCancelled(_) => true, ExecutionRejectionReason::SubintentsNotYetSupported => false, }, MempoolRejectionReason::ValidationError(_) => false, @@ -71,7 +71,7 @@ impl MempoolRejectionReason { MempoolRejectionReason::AlreadyCommitted(_) => { // This is permanent for the intent - because even other, non-committed transactions // of the same intent will fail with `ExecutionRejectionReason::IntentHashPreviouslyCommitted` - RejectionPermanence::PermanentForAnyPayloadWithThisIntent + RejectionPermanence::PermanentForAnyPayloadWithThisTransactionIntent } MempoolRejectionReason::FromExecution(rejection_error) => match **rejection_error { ExecutionRejectionReason::BootloadingError(_) => { @@ -89,7 +89,7 @@ impl MempoolRejectionReason { } } ExecutionRejectionReason::TransactionEpochNoLongerValid { .. } => { - RejectionPermanence::PermanentForAnyPayloadWithThisIntent + RejectionPermanence::PermanentForAnyPayloadWithThisTransactionIntent } ExecutionRejectionReason::TransactionProposerTimestampNotYetValid { valid_from_inclusive, @@ -100,13 +100,13 @@ impl MempoolRejectionReason { }, }, ExecutionRejectionReason::TransactionProposerTimestampNoLongerValid { .. } => { - RejectionPermanence::PermanentForAnyPayloadWithThisIntent + RejectionPermanence::PermanentForAnyPayloadWithThisTransactionIntent } - ExecutionRejectionReason::IntentHashPreviouslyCommitted => { - RejectionPermanence::PermanentForAnyPayloadWithThisIntent + ExecutionRejectionReason::IntentHashPreviouslyCommitted(_) => { + RejectionPermanence::PermanentForAnyPayloadWithThisTransactionIntent } - ExecutionRejectionReason::IntentHashPreviouslyCancelled => { - RejectionPermanence::PermanentForAnyPayloadWithThisIntent + ExecutionRejectionReason::IntentHashPreviouslyCancelled(_) => { + RejectionPermanence::PermanentForAnyPayloadWithThisTransactionIntent } ExecutionRejectionReason::SubintentsNotYetSupported => { RejectionPermanence::wait_for_protocol_update() @@ -126,47 +126,18 @@ impl MempoolRejectionReason { RejectionPermanence::PermanentForPayload } // The signature validity is a property of the payload, not the intent - TransactionValidationError::SignatureValidationError(_) => { + TransactionValidationError::SignatureValidationError { .. } => { RejectionPermanence::PermanentForPayload } - // This is permanent for the intent - because all intents share the same header - TransactionValidationError::HeaderValidationError(_) => { - RejectionPermanence::PermanentForAnyPayloadWithThisIntent - } - // This is permanent for the intent - because all intents share the same manifest - TransactionValidationError::InvalidMessage(_) => { - RejectionPermanence::PermanentForAnyPayloadWithThisIntent - } TransactionValidationError::TransactionVersionNotPermitted(_) => { RejectionPermanence::wait_for_protocol_update() } - // The manifest validity is a property of the intent - TransactionValidationError::ManifestBasicValidatorError(_) => { - RejectionPermanence::PermanentForAnyPayloadWithThisIntent - } - // The manifest validity is a property of the intent - TransactionValidationError::ManifestValidationError(_) => { - RejectionPermanence::PermanentForAnyPayloadWithThisIntent - } // The subintent structure is a property of the intent - TransactionValidationError::SubintentError(_) => { - RejectionPermanence::PermanentForAnyPayloadWithThisIntent - } - // Total signature count is a property of the payload, not intent - TransactionValidationError::TooManySignatures { .. } => { - RejectionPermanence::PermanentForPayload - } - // Intent signature count is a property of the payload, not intent - TransactionValidationError::TooManySignaturesForIntent { .. } => { - RejectionPermanence::PermanentForPayload - } - // Total reference count is a property of the intent - TransactionValidationError::TooManyReferences { .. } => { - RejectionPermanence::PermanentForAnyPayloadWithThisIntent + TransactionValidationError::SubintentStructureError { .. } => { + RejectionPermanence::PermanentForAnyPayloadWithThisTransactionIntent } - // Reference count per intent is a property of the intent - TransactionValidationError::TooManyReferencesForIntent { .. } => { - RejectionPermanence::PermanentForAnyPayloadWithThisIntent + TransactionValidationError::IntentValidationError { .. } => { + RejectionPermanence::PermanentForAnyPayloadWithThisTransactionIntent } }, } @@ -176,7 +147,7 @@ impl MempoolRejectionReason { #[derive(Debug, Clone, PartialEq, Eq)] pub enum RejectionPermanence { PermanentForPayload, - PermanentForAnyPayloadWithThisIntent, + PermanentForAnyPayloadWithThisTransactionIntent, Temporary { retry: RetrySettings }, } @@ -202,7 +173,7 @@ impl RejectionPermanence { pub fn is_permanent_for_payload(&self) -> bool { match self { RejectionPermanence::PermanentForPayload => true, - RejectionPermanence::PermanentForAnyPayloadWithThisIntent => true, + RejectionPermanence::PermanentForAnyPayloadWithThisTransactionIntent => true, RejectionPermanence::Temporary { .. } => false, } } @@ -210,7 +181,7 @@ impl RejectionPermanence { pub fn is_permanent_for_intent(&self) -> bool { match self { RejectionPermanence::PermanentForPayload => false, - RejectionPermanence::PermanentForAnyPayloadWithThisIntent => true, + RejectionPermanence::PermanentForAnyPayloadWithThisTransactionIntent => true, RejectionPermanence::Temporary { .. } => false, } } @@ -535,7 +506,7 @@ impl PendingTransactionRecord { .unwrap_or(RetryFrom::Never) } RejectionPermanence::PermanentForPayload - | RejectionPermanence::PermanentForAnyPayloadWithThisIntent => { + | RejectionPermanence::PermanentForAnyPayloadWithThisTransactionIntent => { // If RejectionPermanence was Permanent, this has already been handled return; } diff --git a/core-rust/state-manager/src/receipt.rs b/core-rust/state-manager/src/receipt.rs index ff21e91d84..3518c3a95e 100644 --- a/core-rust/state-manager/src/receipt.rs +++ b/core-rust/state-manager/src/receipt.rs @@ -1,23 +1,56 @@ use crate::prelude::*; -define_single_versioned! { +define_versioned! { #[derive(Debug, Clone, Sbor)] - pub VersionedCommittedTransactionIdentifiers(CommittedTransactionIdentifiersVersions) => CommittedTransactionIdentifiers = CommittedTransactionIdentifiersV1, + pub VersionedCommittedTransactionIdentifiers(CommittedTransactionIdentifiersVersions) { + previous_versions: [ + 1 => CommittedTransactionIdentifiersV1: { updates_to: 2 }, + ], + latest_version: { + 2 => CommittedTransactionIdentifiers = CommittedTransactionIdentifiersV2, + }, + }, outer_attributes: [ #[derive(ScryptoSborAssertion)] - #[sbor_assert(backwards_compatible( - cuttlefish = "FILE:CF_SCHEMA_versioned_committed_transaction_identifiers.bin" - ))] + #[sbor_assert( + backwards_compatible( + bottlenose = "FILE:CF_SCHEMA_versioned_committed_transaction_identifiers_bottlenose.bin", + cuttlefish = "FILE:CF_SCHEMA_versioned_committed_transaction_identifiers_cuttlefish.bin" + ), + settings(allow_name_changes), + )] ] } #[derive(Debug, Clone, Sbor)] pub struct CommittedTransactionIdentifiersV1 { - pub transaction_hashes: LedgerTransactionHashes, + pub transaction_hashes: LedgerTransactionHashesV1, pub resultant_ledger_hashes: LedgerHashes, pub proposer_timestamp_ms: i64, } +#[derive(Debug, Clone, Sbor)] +pub struct CommittedTransactionIdentifiersV2 { + pub transaction_hashes: LedgerTransactionHashesV2, + pub resultant_ledger_hashes: LedgerHashes, + pub proposer_timestamp_ms: i64, +} + +impl From for CommittedTransactionIdentifiersV2 { + fn from(value: CommittedTransactionIdentifiersV1) -> Self { + let CommittedTransactionIdentifiersV1 { + transaction_hashes, + resultant_ledger_hashes, + proposer_timestamp_ms, + } = value; + CommittedTransactionIdentifiersV2 { + transaction_hashes: transaction_hashes.into(), + resultant_ledger_hashes, + proposer_timestamp_ms, + } + } +} + /// A "flat" representation of an entire Partition's change, suitable for merkle hash computation. #[derive(Debug, Clone, ScryptoSbor)] pub struct PartitionChange { diff --git a/core-rust/state-manager/src/transaction/preparation.rs b/core-rust/state-manager/src/transaction/preparation.rs index 6a82b21a63..84e333bc25 100644 --- a/core-rust/state-manager/src/transaction/preparation.rs +++ b/core-rust/state-manager/src/transaction/preparation.rs @@ -433,7 +433,7 @@ impl Preparator { index, error_message, ledger_hash, - user_hashes, + user_hashes.clone(), )); pending_transaction_results.push(PendingTransactionResult { transaction_intent_hash: user_hashes.transaction_intent_hash, @@ -451,7 +451,9 @@ impl Preparator { }; let prepared_details = prepared_details.retrieve_captured(); - let user_hashes = prepared_details.hashes.as_user().unwrap(); + let user_hashes = prepared_details.hashes.as_user().unwrap().clone(); + let transaction_intent_hash = user_hashes.transaction_intent_hash; + let notarized_transaction_hash = user_hashes.notarized_transaction_hash; let ledger_transaction_hash = prepared_details.hashes.ledger_transaction_hash; let invalid_at_epoch = prepared_details.end_epoch_exclusive; @@ -485,8 +487,8 @@ impl Preparator { user_hashes, )); pending_transaction_results.push(PendingTransactionResult { - transaction_intent_hash: user_hashes.transaction_intent_hash, - notarized_transaction_hash: user_hashes.notarized_transaction_hash, + transaction_intent_hash, + notarized_transaction_hash, invalid_at_epoch, rejection_reason: None, }); diff --git a/core-rust/state-manager/src/transaction/validation.rs b/core-rust/state-manager/src/transaction/validation.rs index fc360b3e06..479ed11a41 100644 --- a/core-rust/state-manager/src/transaction/validation.rs +++ b/core-rust/state-manager/src/transaction/validation.rs @@ -103,10 +103,12 @@ impl CommittabilityValidator { TransactionResult::Reject(RejectResult { reason }) => { if matches!( reason, - ExecutionRejectionReason::IntentHashPreviouslyCommitted + ExecutionRejectionReason::IntentHashPreviouslyCommitted( + IntentHash::Transaction(_) + ) ) { panic!( - "intent {:?} not found by Node, but reported as committed by Engine", + "[INVARIANT VIOLATION] When checking for rejection against a database snapshot, a transaction intent {:?} was not found in the Node's stores, but was reported as committed by the Engine", user_hashes.transaction_intent_hash ); } From d22f64898f2f0a56be8d9d2a1676624ee6197cf1 Mon Sep 17 00:00:00 2001 From: David Edey Date: Fri, 1 Nov 2024 02:00:55 +0000 Subject: [PATCH 09/12] fix: Add back missing `readiness_signal_name` This has been missing in the `PendingProtocolUpdate` model response since May. --- .../java/com/radixdlt/api/system/routes/HealthHandler.java | 2 ++ .../test/java/com/radixdlt/api/system/HealthHandlerTest.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/core/src/main/java/com/radixdlt/api/system/routes/HealthHandler.java b/core/src/main/java/com/radixdlt/api/system/routes/HealthHandler.java index 2b4118e089..6b1523dd50 100644 --- a/core/src/main/java/com/radixdlt/api/system/routes/HealthHandler.java +++ b/core/src/main/java/com/radixdlt/api/system/routes/HealthHandler.java @@ -232,6 +232,8 @@ private PendingProtocolUpdate pendingProtocolUpdate( .protocolVersion( pendingProtocolUpdate.protocolUpdateTrigger().nextProtocolVersion()) .state(apiState) + .readinessSignalName( + pendingProtocolUpdate.protocolUpdateTrigger().readinessSignalName()) .readinessSignalStatus(readinessSignalStatus); projectedFulfillmentEpochByThreshold.values().stream() diff --git a/core/src/test/java/com/radixdlt/api/system/HealthHandlerTest.java b/core/src/test/java/com/radixdlt/api/system/HealthHandlerTest.java index 47123585ae..eae1ba8b6e 100644 --- a/core/src/test/java/com/radixdlt/api/system/HealthHandlerTest.java +++ b/core/src/test/java/com/radixdlt/api/system/HealthHandlerTest.java @@ -191,6 +191,9 @@ public void test_protocol_update_enactment_projection() throws Exception { // Assert first pending enactment assertEquals( "custom-pending-3", response.getPendingProtocolUpdates().get(0).getProtocolVersion()); + assertEquals( + "5bfdcc71f883edd0custom-pending-3", + response.getPendingProtocolUpdates().get(0).getReadinessSignalName()); assertEquals( EXPECTED_PROJECTED_ENACTMENT_EPOCH, requireNonNull( @@ -225,6 +228,7 @@ public void test_protocol_update_enactment_projection() throws Exception { assertEquals( PendingProtocolUpdate.ReadinessSignalStatusEnum.NO_SIGNAL_REQUIRED, response.getPendingProtocolUpdates().get(1).getReadinessSignalStatus()); + assertNull(response.getPendingProtocolUpdates().get(1).getReadinessSignalName()); // It could be argued for us to copy the custom-pending-3 values, but for now let's just // use "null" because: // (A) it's not ~technically~ at the start of this epoch From 778a8bccf3c38832fd30e9f877ea15e52a292c0a Mon Sep 17 00:00:00 2001 From: David Edey Date: Fri, 1 Nov 2024 03:14:23 +0000 Subject: [PATCH 10/12] markups: Handle markups --- .../com/radixdlt/protocol/ProtocolConfig.java | 32 ++++++++++--------- .../modules/FunctionalRadixNodeModule.java | 1 + .../api/system/HealthHandlerTest.java | 1 + .../CuttlefishProtocolUpdateTest.java | 4 ++- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolConfig.java b/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolConfig.java index ff00fb1b0a..90893680d8 100644 --- a/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolConfig.java +++ b/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolConfig.java @@ -120,38 +120,40 @@ public static ProtocolConfig onlyGenesis() { } public static ProtocolConfig launchAt(String upToProtocolVersionName) { - String newVersion = null; + String previousVersion = null; List protocolUpdateTriggers = new ArrayList<>(); for (String version : VERSION_NAMES) { - var lastVersion = newVersion; - newVersion = version; - if (lastVersion != null) { + if (previousVersion != null) { protocolUpdateTriggers.add( - new ProtocolUpdateTrigger(newVersion, immediatelyAfter(lastVersion))); - } - if (newVersion.equals(upToProtocolVersionName)) { - break; + new ProtocolUpdateTrigger(version, immediatelyAfter(previousVersion))); + if (version.equals(upToProtocolVersionName)) { + break; + } } + previousVersion = version; } return new ProtocolConfig(ImmutableList.copyOf(protocolUpdateTriggers)); } + /** + * Runs all previous updates straight after genesis, and then enacts `upToProtocolVersionName` at + * the given epoch. + */ public static ProtocolConfig enactAtEpoch(String upToProtocolVersionName, long epoch) { - String newVersion = null; + String previousVersion = null; List protocolUpdateTriggers = new ArrayList<>(); for (String version : VERSION_NAMES) { - var lastVersion = newVersion; - newVersion = version; - if (lastVersion != null) { - if (newVersion.equals(upToProtocolVersionName)) { + if (previousVersion != null) { + if (version.equals(upToProtocolVersionName)) { protocolUpdateTriggers.add( - new ProtocolUpdateTrigger(newVersion, unconditionallyAtEpoch(epoch))); + new ProtocolUpdateTrigger(version, unconditionallyAtEpoch(epoch))); break; } else { protocolUpdateTriggers.add( - new ProtocolUpdateTrigger(newVersion, immediatelyAfter(lastVersion))); + new ProtocolUpdateTrigger(version, immediatelyAfter(previousVersion))); } } + previousVersion = version; } return new ProtocolConfig(ImmutableList.copyOf(protocolUpdateTriggers)); } diff --git a/core/src/test-core/java/com/radixdlt/modules/FunctionalRadixNodeModule.java b/core/src/test-core/java/com/radixdlt/modules/FunctionalRadixNodeModule.java index c711f57515..8e8d3cf4da 100644 --- a/core/src/test-core/java/com/radixdlt/modules/FunctionalRadixNodeModule.java +++ b/core/src/test-core/java/com/radixdlt/modules/FunctionalRadixNodeModule.java @@ -302,6 +302,7 @@ public boolean supportsREv2() { @Override public void configure() { install(new DispatcherModule()); + install(new SystemInfoModule()); switch (this.nodeStorageConfig) { case NodeStorageConfig.None none -> {} diff --git a/core/src/test/java/com/radixdlt/api/system/HealthHandlerTest.java b/core/src/test/java/com/radixdlt/api/system/HealthHandlerTest.java index eae1ba8b6e..23f5a98ae9 100644 --- a/core/src/test/java/com/radixdlt/api/system/HealthHandlerTest.java +++ b/core/src/test/java/com/radixdlt/api/system/HealthHandlerTest.java @@ -163,6 +163,7 @@ public void configure() { Set.of() /* unused in this test */, EPOCH_TARGET_DURATION_MS, EPOCH_EFFECTIVE_START_MS)); + when(systemInfo.ledgerUpdateEventProcessor()).thenReturn(ignored -> {}); bind(InMemorySystemInfo.class).toInstance(systemInfo); } }); diff --git a/core/src/test/java/com/radixdlt/rev2/protocol/CuttlefishProtocolUpdateTest.java b/core/src/test/java/com/radixdlt/rev2/protocol/CuttlefishProtocolUpdateTest.java index 5ab057d5b4..5522d0cf3d 100644 --- a/core/src/test/java/com/radixdlt/rev2/protocol/CuttlefishProtocolUpdateTest.java +++ b/core/src/test/java/com/radixdlt/rev2/protocol/CuttlefishProtocolUpdateTest.java @@ -147,7 +147,9 @@ public void transaction_v2_behaviour_across_cuttlefish() throws ApiException { TransactionIntentStatus.NOTSEEN, coreApiHelper.getStatus(transactionA).getIntentStatus()); // Arrange: Run the protocol update: - test.runUntilState(allAtOrOverEpoch(ENACTMENT_EPOCH)); + test.runUntilState( + allAtExactlyProtocolVersion(ProtocolConfig.CUTTLEFISH_PROTOCOL_VERSION_NAME)); + assertEquals( ProtocolConfig.CUTTLEFISH_PROTOCOL_VERSION_NAME, stateComputer.protocolState().currentProtocolVersion()); From ab1926a2d8123dec062f57a4108580b42b6c8b76 Mon Sep 17 00:00:00 2001 From: David Edey Date: Fri, 1 Nov 2024 10:04:24 +0000 Subject: [PATCH 11/12] tweak: Only install `SystemInfoModule` if Rev2 enabled in tests --- .../java/com/radixdlt/modules/FunctionalRadixNodeModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/test-core/java/com/radixdlt/modules/FunctionalRadixNodeModule.java b/core/src/test-core/java/com/radixdlt/modules/FunctionalRadixNodeModule.java index 8e8d3cf4da..7b3a6ff87b 100644 --- a/core/src/test-core/java/com/radixdlt/modules/FunctionalRadixNodeModule.java +++ b/core/src/test-core/java/com/radixdlt/modules/FunctionalRadixNodeModule.java @@ -302,7 +302,6 @@ public boolean supportsREv2() { @Override public void configure() { install(new DispatcherModule()); - install(new SystemInfoModule()); switch (this.nodeStorageConfig) { case NodeStorageConfig.None none -> {} @@ -407,6 +406,7 @@ public void configure() { RawGenesisDataWithHash.fromGenesisData(rev2Config.genesis()); install(new REv2LedgerRecoveryModule()); install(new REv2ConsensusRecoveryModule()); + install(new SystemInfoModule()); switch (rev2Config.proposerConfig()) { case REV2ProposerConfig.Generated generated -> { From c0e192016f9df7d23dba3ec6703ef5800f801558 Mon Sep 17 00:00:00 2001 From: David Edey Date: Fri, 1 Nov 2024 14:33:27 +0000 Subject: [PATCH 12/12] fix: Fix panic on duplicate transaction submit --- .../handlers/lts/transaction_status.rs | 13 ++++--- .../handlers/lts/transaction_submit.rs | 6 +-- .../core_api/handlers/transaction_status.rs | 13 ++++--- .../core_api/handlers/transaction_submit.rs | 6 +-- .../state-manager/src/mempool/metrics.rs | 2 +- core-rust/state-manager/src/mempool/mod.rs | 8 ++-- .../pending_transaction_result_cache.rs | 38 ++++++------------- .../src/transaction/validation.rs | 3 +- 8 files changed, 36 insertions(+), 53 deletions(-) diff --git a/core-rust/core-api-server/src/core_api/handlers/lts/transaction_status.rs b/core-rust/core-api-server/src/core_api/handlers/lts/transaction_status.rs index b8696cfc3f..f38cc345be 100644 --- a/core-rust/core-api-server/src/core_api/handlers/lts/transaction_status.rs +++ b/core-rust/core-api-server/src/core_api/handlers/lts/transaction_status.rs @@ -209,11 +209,14 @@ fn map_rejected_payloads_due_to_known_commit( // commit, and we may see a "not-yet-updated" entry - luckily, in such case, we can // precisely tell the transaction's status ourselves: .unwrap_or_else(|| { - MempoolRejectionReason::AlreadyCommitted(AlreadyCommittedError { - notarized_transaction_hash, - committed_state_version, - committed_notarized_transaction_hash: *committed_notarized_transaction_hash, - }) + MempoolRejectionReason::TransactionIntentAlreadyCommitted( + AlreadyCommittedError { + notarized_transaction_hash, + committed_state_version, + committed_notarized_transaction_hash: + *committed_notarized_transaction_hash, + }, + ) .to_string() }); Ok(models::LtsTransactionPayloadDetails { diff --git a/core-rust/core-api-server/src/core_api/handlers/lts/transaction_submit.rs b/core-rust/core-api-server/src/core_api/handlers/lts/transaction_submit.rs index 1028e3d0ca..ea5541b6b9 100644 --- a/core-rust/core-api-server/src/core_api/handlers/lts/transaction_submit.rs +++ b/core-rust/core-api-server/src/core_api/handlers/lts/transaction_submit.rs @@ -40,11 +40,7 @@ pub(crate) async fn handle_lts_transaction_submit( )), Err(MempoolAddError::Duplicate(_)) => Ok(models::LtsTransactionSubmitResponse::new(true)), Err(MempoolAddError::Rejected(rejection)) => { - if rejection.is_rejected_because_intent_already_committed() { - let already_committed_error = rejection - .reason - .already_committed_error() - .expect("Already committed rejections should have an already_committed_error"); + if let Some(already_committed_error) = rejection.transaction_intent_already_committed_error() { Err(detailed_error( StatusCode::BAD_REQUEST, "The transaction intent has already been committed", diff --git a/core-rust/core-api-server/src/core_api/handlers/transaction_status.rs b/core-rust/core-api-server/src/core_api/handlers/transaction_status.rs index 2442317d60..4d29f19844 100644 --- a/core-rust/core-api-server/src/core_api/handlers/transaction_status.rs +++ b/core-rust/core-api-server/src/core_api/handlers/transaction_status.rs @@ -211,11 +211,14 @@ fn map_rejected_payloads_due_to_known_commit( // commit, and we may see a "not-yet-updated" entry - luckily, in such case, we can // precisely tell the transaction's status ourselves: .unwrap_or_else(|| { - MempoolRejectionReason::AlreadyCommitted(AlreadyCommittedError { - notarized_transaction_hash, - committed_state_version, - committed_notarized_transaction_hash: *committed_notarized_transaction_hash, - }) + MempoolRejectionReason::TransactionIntentAlreadyCommitted( + AlreadyCommittedError { + notarized_transaction_hash, + committed_state_version, + committed_notarized_transaction_hash: + *committed_notarized_transaction_hash, + }, + ) .to_string() }); Ok(models::TransactionPayloadDetails { diff --git a/core-rust/core-api-server/src/core_api/handlers/transaction_submit.rs b/core-rust/core-api-server/src/core_api/handlers/transaction_submit.rs index 67992a37f1..d3537733a1 100644 --- a/core-rust/core-api-server/src/core_api/handlers/transaction_submit.rs +++ b/core-rust/core-api-server/src/core_api/handlers/transaction_submit.rs @@ -35,11 +35,7 @@ pub(crate) async fn handle_transaction_submit( )), Err(MempoolAddError::Duplicate(_)) => Ok(models::TransactionSubmitResponse::new(true)), Err(MempoolAddError::Rejected(rejection)) => { - if rejection.is_rejected_because_intent_already_committed() { - let already_committed_error = rejection - .reason - .already_committed_error() - .expect("Already committed rejections should have an already_committed_error"); + if let Some(already_committed_error) = rejection.transaction_intent_already_committed_error() { Err(detailed_error( StatusCode::BAD_REQUEST, "The transaction intent has already been committed", diff --git a/core-rust/state-manager/src/mempool/metrics.rs b/core-rust/state-manager/src/mempool/metrics.rs index eb5512dc52..7213fefea4 100644 --- a/core-rust/state-manager/src/mempool/metrics.rs +++ b/core-rust/state-manager/src/mempool/metrics.rs @@ -152,7 +152,7 @@ impl MetricLabel for MempoolAddResult { None => "Added", Some(MempoolAddError::PriorityThresholdNotMet { .. }) => "PriorityThresholdNotMet", Some(MempoolAddError::Rejected(rejection)) => match &rejection.reason { - MempoolRejectionReason::AlreadyCommitted(_) => "AlreadyCommitted", + MempoolRejectionReason::TransactionIntentAlreadyCommitted(_) => "AlreadyCommitted", MempoolRejectionReason::FromExecution(_) => "ExecutionError", MempoolRejectionReason::ValidationError(_) => "ValidationError", }, diff --git a/core-rust/state-manager/src/mempool/mod.rs b/core-rust/state-manager/src/mempool/mod.rs index 5f98265f9a..835f8d7dcd 100644 --- a/core-rust/state-manager/src/mempool/mod.rs +++ b/core-rust/state-manager/src/mempool/mod.rs @@ -134,15 +134,15 @@ impl MempoolAddRejection { } } - pub fn is_rejected_because_intent_already_committed(&self) -> bool { + pub fn transaction_intent_already_committed_error(&self) -> Option<&AlreadyCommittedError> { match &self.against_state { AtState::Specific(specific) => match specific { AtSpecificState::Committed { .. } => { - self.reason.is_rejected_because_intent_already_committed() + self.reason.transaction_intent_already_committed_error() } - AtSpecificState::PendingPreparingVertices { .. } => false, + AtSpecificState::PendingPreparingVertices { .. } => None, }, - AtState::Static => false, + AtState::Static => None, } } } diff --git a/core-rust/state-manager/src/mempool/pending_transaction_result_cache.rs b/core-rust/state-manager/src/mempool/pending_transaction_result_cache.rs index eda41bf1e2..c307917e88 100644 --- a/core-rust/state-manager/src/mempool/pending_transaction_result_cache.rs +++ b/core-rust/state-manager/src/mempool/pending_transaction_result_cache.rs @@ -13,7 +13,7 @@ pub type ExecutionRejectionReason = RejectionReason; #[derive(Debug, Clone, PartialEq, Eq)] pub enum MempoolRejectionReason { - AlreadyCommitted(AlreadyCommittedError), + TransactionIntentAlreadyCommitted(AlreadyCommittedError), FromExecution(Box), ValidationError(TransactionValidationError), } @@ -40,35 +40,19 @@ impl MempoolRejectionReason { self.permanence().is_permanent_for_intent() } - pub fn is_rejected_because_intent_already_committed(&self) -> bool { + pub fn transaction_intent_already_committed_error(&self) -> Option<&AlreadyCommittedError> { match self { - MempoolRejectionReason::AlreadyCommitted(_) => true, - MempoolRejectionReason::FromExecution(rejection_reason) => match **rejection_reason { - ExecutionRejectionReason::BootloadingError(_) => false, - ExecutionRejectionReason::SuccessButFeeLoanNotRepaid => false, - ExecutionRejectionReason::ErrorBeforeLoanAndDeferredCostsRepaid(_) => false, - ExecutionRejectionReason::TransactionEpochNotYetValid { .. } => false, - ExecutionRejectionReason::TransactionEpochNoLongerValid { .. } => false, - ExecutionRejectionReason::TransactionProposerTimestampNotYetValid { .. } => false, - ExecutionRejectionReason::TransactionProposerTimestampNoLongerValid { .. } => false, - ExecutionRejectionReason::IntentHashPreviouslyCommitted(_) => true, - ExecutionRejectionReason::IntentHashPreviouslyCancelled(_) => true, - ExecutionRejectionReason::SubintentsNotYetSupported => false, - }, - MempoolRejectionReason::ValidationError(_) => false, - } - } - - pub fn already_committed_error(&self) -> Option<&AlreadyCommittedError> { - match self { - MempoolRejectionReason::AlreadyCommitted(error) => Some(error), - _ => None, + MempoolRejectionReason::TransactionIntentAlreadyCommitted(already_committed_error) => { + Some(already_committed_error) + } + MempoolRejectionReason::FromExecution(_) => None, + MempoolRejectionReason::ValidationError(_) => None, } } pub fn permanence(&self) -> RejectionPermanence { match self { - MempoolRejectionReason::AlreadyCommitted(_) => { + MempoolRejectionReason::TransactionIntentAlreadyCommitted(_) => { // This is permanent for the intent - because even other, non-committed transactions // of the same intent will fail with `ExecutionRejectionReason::IntentHashPreviouslyCommitted` RejectionPermanence::PermanentForAnyPayloadWithThisTransactionIntent @@ -197,7 +181,7 @@ pub enum RetrySettings { impl fmt::Display for MempoolRejectionReason { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { - MempoolRejectionReason::AlreadyCommitted(error) => { + MempoolRejectionReason::TransactionIntentAlreadyCommitted(error) => { write!(f, "Already committed: {error:?}") } MempoolRejectionReason::FromExecution(rejection_error) => { @@ -619,7 +603,7 @@ impl PendingTransactionResultCache { // We even overwrite the record for transaction which got committed here // because this is a cache for pending transactions, and it can't be re-committed record.track_attempt(TransactionAttempt { - rejection: Some(MempoolRejectionReason::AlreadyCommitted( + rejection: Some(MempoolRejectionReason::TransactionIntentAlreadyCommitted( AlreadyCommittedError { notarized_transaction_hash: *cached_payload_hash, committed_state_version: committed_transaction.state_version, @@ -654,7 +638,7 @@ impl PendingTransactionResultCache { *intent_hash, None, TransactionAttempt { - rejection: Some(MempoolRejectionReason::AlreadyCommitted( + rejection: Some(MempoolRejectionReason::TransactionIntentAlreadyCommitted( AlreadyCommittedError { notarized_transaction_hash: *notarized_transaction_hash, committed_state_version: committed_intent_record.state_version, diff --git a/core-rust/state-manager/src/transaction/validation.rs b/core-rust/state-manager/src/transaction/validation.rs index 479ed11a41..200be8a9d5 100644 --- a/core-rust/state-manager/src/transaction/validation.rs +++ b/core-rust/state-manager/src/transaction/validation.rs @@ -76,7 +76,7 @@ impl CommittabilityValidator { .expect("transaction of a state version obtained from an index"); return TransactionAttempt { - rejection: Some(MempoolRejectionReason::AlreadyCommitted( + rejection: Some(MempoolRejectionReason::TransactionIntentAlreadyCommitted( AlreadyCommittedError { notarized_transaction_hash: user_hashes.notarized_transaction_hash, committed_state_version: state_version, @@ -107,6 +107,7 @@ impl CommittabilityValidator { IntentHash::Transaction(_) ) ) { + // Note - this panic protects against the invariant that already_committed_error() panic!( "[INVARIANT VIOLATION] When checking for rejection against a database snapshot, a transaction intent {:?} was not found in the Node's stores, but was reported as committed by the Engine", user_hashes.transaction_intent_hash