Skip to content

Commit

Permalink
Merge pull request #615 from radixdlt/fixes-for-first-protocol-update
Browse files Browse the repository at this point in the history
Fixes for first protocol update
  • Loading branch information
PawelPawelec-RDX authored Jan 18, 2024
2 parents 9c953f4 + b0283c6 commit b83e0f1
Show file tree
Hide file tree
Showing 101 changed files with 4,652 additions and 279 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
## 1.2.5
## 1.3.0
Release Date: _unreleased_

- add support for new transaction types (flash transactions) that are gonna occur on protocol update.
- added support for new transaction types (flash transactions) that are gonna occur on protocol updates.
- moved vm_type to `package_code_history` table from package in `entity` table.
- `vm_type`, `code_hash_hex` and `code_hex` are returned as collection (it's allowed after protocol update to have multiple codes per package). Previous properties will return empty strings to keep contract compatibility.
- created new `package_blueprint_aggregate_history` table which will hold pointers to all package blueprints.
- created new `package_code_aggregate_history` table which will hold pointers to all package codes.

## 1.2.4
Release Date: 4.01.2024
Expand Down
104 changes: 96 additions & 8 deletions src/RadixDlt.CoreApiSdk/core-api-spec-copy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1907,6 +1907,20 @@ components:
items:
$ref: '#/components/schemas/ActiveValidator'
description: Active validator set for the new epoch, ordered by stake descending.
significant_protocol_update_readiness:
type: array
items:
$ref: '#/components/schemas/SignificantProtocolUpdateReadinessEntry'
SignificantProtocolUpdateReadinessEntry:
type: object
required:
- readiness_signal_name
- signalled_stake
properties:
readiness_signal_name:
type: string
signalled_stake:
type: string
CreatedSubstate:
type: object
required:
Expand Down Expand Up @@ -2022,6 +2036,7 @@ components:
- Royalty
- Main
- Schema
- BootLoader
PartitionKind:
type: string
description: |
Expand Down Expand Up @@ -3131,6 +3146,7 @@ components:
SystemFieldKind:
type: string
enum:
- BootLoader
- TypeInfo
ObjectSubstateTypeReferenceType:
type: string
Expand Down Expand Up @@ -3649,6 +3665,7 @@ 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
BootLoaderModuleFieldVmBoot: '#/components/schemas/BootLoaderModuleFieldVmBootSubstate'
TypeInfoModuleFieldTypeInfo: '#/components/schemas/TypeInfoModuleFieldTypeInfoSubstate'
RoleAssignmentModuleFieldOwnerRole: '#/components/schemas/RoleAssignmentModuleFieldOwnerRoleSubstate'
RoleAssignmentModuleRuleEntry: '#/components/schemas/RoleAssignmentModuleRuleEntrySubstate'
Expand Down Expand Up @@ -3700,6 +3717,7 @@ components:
SubstateType:
type: string
enum:
- BootLoaderModuleFieldVmBoot
- TypeInfoModuleFieldTypeInfo
- RoleAssignmentModuleFieldOwnerRole
- RoleAssignmentModuleRuleEntry
Expand Down Expand Up @@ -3895,6 +3913,25 @@ components:
################################################
# GENERAL / SHARED MODELS - specific substates #
################################################
BootLoaderModuleFieldVmBootSubstate:
allOf:
- $ref: '#/components/schemas/Substate'
- type: object
required:
- value
properties:
value:
$ref: '#/components/schemas/BootLoaderModuleFieldVmBootValue'
BootLoaderModuleFieldVmBootValue:
type: object
required:
- scrypto_v1_minor_version
properties:
scrypto_v1_minor_version:
type: integer
format: int64
minimum: 0
maximum: 10000000000
TypeInfoModuleFieldTypeInfoSubstate:
allOf:
- $ref: '#/components/schemas/Substate'
Expand Down Expand Up @@ -7182,21 +7219,72 @@ components:
type: array
items:
$ref: "#/components/schemas/LtsEntityNonFungibleBalanceChanges"
LedgerProofOriginType:
type: string
enum:
- Genesis
- Consensus
- ProtocolUpdate
LedgerProofOrigin:
type: object
required:
- type
properties:
type:
$ref: "#/components/schemas/LedgerProofOriginType"
discriminator:
propertyName: type
mapping:
# NOTE: These need to match LedgerProofOriginType
Genesis: '#/components/schemas/GenesisLedgerProofOrigin'
Consensus: '#/components/schemas/ConsensusLedgerProofOrigin'
ProtocolUpdate: '#/components/schemas/ProtocolUpdateLedgerProofOrigin'
GenesisLedgerProofOrigin:
allOf:
- $ref: "#/components/schemas/LedgerProofOrigin"
- type: object
required:
- genesis_opaque_hash
properties:
genesis_opaque_hash:
type: string
ConsensusLedgerProofOrigin:
allOf:
- $ref: "#/components/schemas/LedgerProofOrigin"
- type: object
required:
- opaque_hash
- timestamped_signatures
properties:
opaque_hash:
$ref: "#/components/schemas/OpaqueHash"
timestamped_signatures:
type: array
items:
$ref: "#/components/schemas/TimestampedValidatorSignature"
ProtocolUpdateLedgerProofOrigin:
allOf:
- $ref: "#/components/schemas/LedgerProofOrigin"
- type: object
required:
- protocol_version_name
- batch_idx
properties:
protocol_version_name:
type: string
batch_idx:
type: integer
format: int64
LedgerProof:
type: object
required:
- opaque_hash
- ledger_header
- timestamped_signatures
- origin
properties:
opaque_hash:
$ref: "#/components/schemas/OpaqueHash"
ledger_header:
$ref: "#/components/schemas/LedgerHeader"
timestamped_signatures:
type: array
items:
$ref: "#/components/schemas/TimestampedValidatorSignature"
origin:
$ref: "#/components/schemas/LedgerProofOrigin"
LedgerHeader:
type: object
required:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ namespace RadixDlt.CoreApiSdk.Model
[JsonSubtypes.KnownSubType(typeof(AccountFieldStateSubstate), "AccountFieldState")]
[JsonSubtypes.KnownSubType(typeof(AccountResourcePreferenceEntrySubstate), "AccountResourcePreferenceEntry")]
[JsonSubtypes.KnownSubType(typeof(AccountVaultEntrySubstate), "AccountVaultEntry")]
[JsonSubtypes.KnownSubType(typeof(BootLoaderModuleFieldVmBootSubstate), "BootLoaderModuleFieldVmBoot")]
[JsonSubtypes.KnownSubType(typeof(ConsensusManagerFieldConfigSubstate), "ConsensusManagerFieldConfig")]
[JsonSubtypes.KnownSubType(typeof(ConsensusManagerFieldCurrentProposalStatisticSubstate), "ConsensusManagerFieldCurrentProposalStatistic")]
[JsonSubtypes.KnownSubType(typeof(ConsensusManagerFieldCurrentTimeSubstate), "ConsensusManagerFieldCurrentTime")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ namespace RadixDlt.CoreApiSdk.Model
[JsonSubtypes.KnownSubType(typeof(AccountFieldStateSubstate), "AccountFieldState")]
[JsonSubtypes.KnownSubType(typeof(AccountResourcePreferenceEntrySubstate), "AccountResourcePreferenceEntry")]
[JsonSubtypes.KnownSubType(typeof(AccountVaultEntrySubstate), "AccountVaultEntry")]
[JsonSubtypes.KnownSubType(typeof(BootLoaderModuleFieldVmBootSubstate), "BootLoaderModuleFieldVmBoot")]
[JsonSubtypes.KnownSubType(typeof(ConsensusManagerFieldConfigSubstate), "ConsensusManagerFieldConfig")]
[JsonSubtypes.KnownSubType(typeof(ConsensusManagerFieldCurrentProposalStatisticSubstate), "ConsensusManagerFieldCurrentProposalStatistic")]
[JsonSubtypes.KnownSubType(typeof(ConsensusManagerFieldCurrentTimeSubstate), "ConsensusManagerFieldCurrentTime")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ namespace RadixDlt.CoreApiSdk.Model
[JsonSubtypes.KnownSubType(typeof(AccountFieldStateSubstate), "AccountFieldState")]
[JsonSubtypes.KnownSubType(typeof(AccountResourcePreferenceEntrySubstate), "AccountResourcePreferenceEntry")]
[JsonSubtypes.KnownSubType(typeof(AccountVaultEntrySubstate), "AccountVaultEntry")]
[JsonSubtypes.KnownSubType(typeof(BootLoaderModuleFieldVmBootSubstate), "BootLoaderModuleFieldVmBoot")]
[JsonSubtypes.KnownSubType(typeof(ConsensusManagerFieldConfigSubstate), "ConsensusManagerFieldConfig")]
[JsonSubtypes.KnownSubType(typeof(ConsensusManagerFieldCurrentProposalStatisticSubstate), "ConsensusManagerFieldCurrentProposalStatistic")]
[JsonSubtypes.KnownSubType(typeof(ConsensusManagerFieldCurrentTimeSubstate), "ConsensusManagerFieldCurrentTime")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ namespace RadixDlt.CoreApiSdk.Model
[JsonSubtypes.KnownSubType(typeof(AccountFieldStateSubstate), "AccountFieldState")]
[JsonSubtypes.KnownSubType(typeof(AccountResourcePreferenceEntrySubstate), "AccountResourcePreferenceEntry")]
[JsonSubtypes.KnownSubType(typeof(AccountVaultEntrySubstate), "AccountVaultEntry")]
[JsonSubtypes.KnownSubType(typeof(BootLoaderModuleFieldVmBootSubstate), "BootLoaderModuleFieldVmBoot")]
[JsonSubtypes.KnownSubType(typeof(ConsensusManagerFieldConfigSubstate), "ConsensusManagerFieldConfig")]
[JsonSubtypes.KnownSubType(typeof(ConsensusManagerFieldCurrentProposalStatisticSubstate), "ConsensusManagerFieldCurrentProposalStatistic")]
[JsonSubtypes.KnownSubType(typeof(ConsensusManagerFieldCurrentTimeSubstate), "ConsensusManagerFieldCurrentTime")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ namespace RadixDlt.CoreApiSdk.Model
[JsonSubtypes.KnownSubType(typeof(AccountFieldStateSubstate), "AccountFieldState")]
[JsonSubtypes.KnownSubType(typeof(AccountResourcePreferenceEntrySubstate), "AccountResourcePreferenceEntry")]
[JsonSubtypes.KnownSubType(typeof(AccountVaultEntrySubstate), "AccountVaultEntry")]
[JsonSubtypes.KnownSubType(typeof(BootLoaderModuleFieldVmBootSubstate), "BootLoaderModuleFieldVmBoot")]
[JsonSubtypes.KnownSubType(typeof(ConsensusManagerFieldConfigSubstate), "ConsensusManagerFieldConfig")]
[JsonSubtypes.KnownSubType(typeof(ConsensusManagerFieldCurrentProposalStatisticSubstate), "ConsensusManagerFieldCurrentProposalStatistic")]
[JsonSubtypes.KnownSubType(typeof(ConsensusManagerFieldCurrentTimeSubstate), "ConsensusManagerFieldCurrentTime")]
Expand Down
Loading

0 comments on commit b83e0f1

Please sign in to comment.