Skip to content

Commit

Permalink
Merge pull request #623 from radixdlt/net-cfg-comp
Browse files Browse the repository at this point in the history
Restore access_rules_package on NetworkConfigurationResponse
  • Loading branch information
krzlabrdx authored Jan 24, 2024
2 parents db85bbc + e5a07eb commit 24b667a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 8 deletions.
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@
Release Date: _unreleased_

- Return components effective role assignments only for assigned modules.
- Dropped `balance_changes` fallback mechanism.
- Dropped internal `balance_changes` fallback mechanism. As of right now this information is ingested as part of regular transaction ingestion process.
- Reworked internal mechanism used to fetch network configuration. Is no longer stored in the underlying database and it is shared across all services.

### Breaking Changes
### What’s new?
- Added new filters for the `/stream/transactions` endpoint: `accounts_with_manifest_owner_method_calls`, `accounts_without_manifest_owner_method_calls` and `manifest_class_filter`.
- Added new `manifest_instructions` opt-in for `/transaction/committed-details` and `/stream/transactions` endpoints returning original manifest of user transactions.

- Renamed well-known network configuration address property `access_rules_package` to `role_assignment_module_package`.
### Deprecations
- Obsoleted incorrectly named `access_rules_package` in favor of `role_assignment_module_package` on `NetworkConfigurationResponse.well_known_addresses`. Obsoleted property will contain effective copy of the new one for backwards compability.

## 1.3.0
Release Date: _unreleased_

- 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.

### Deprecations
- Obsoleted `vm_type`, `code_hash_hex` and `code_hex` properties of `StateEntityDetailsResponsePackageDetails` in favor of `codes` collection. With upcoming protocol upgrade it's going to be allowed to have multiple codes per package. Obsoleted properties will contain effective copy of the first element of the new collection for backwards compability.

## 1.2.4
Release Date: 4.01.2024

Expand Down
1 change: 1 addition & 0 deletions apps/GatewayApi/Controllers/StatusController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public StatusController(IStatusHandler statusHandler, INetworkConfigurationProvi
transactionProcessorPackage: wellKnownAddresses.TransactionProcessorPackage,
metadataModulePackage: wellKnownAddresses.MetadataModulePackage,
royaltyModulePackage: wellKnownAddresses.RoyaltyModulePackage,
accessRulesPackage: wellKnownAddresses.RoleAssignmentModulePackage,
roleAssignmentModulePackage: wellKnownAddresses.RoleAssignmentModulePackage,
genesisHelperPackage: wellKnownAddresses.GenesisHelperPackage,
faucetPackage: wellKnownAddresses.FaucetPackage,
Expand Down
11 changes: 8 additions & 3 deletions src/RadixDlt.NetworkGateway.GatewayApi/gateway-api-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2374,6 +2374,7 @@ components:
- transaction_processor_package
- metadata_module_package
- royalty_module_package
- access_rules_package
- role_assignment_module_package
- genesis_helper_package
- faucet_package
Expand Down Expand Up @@ -2420,6 +2421,10 @@ components:
$ref: "#/components/schemas/Address"
royalty_module_package:
$ref: "#/components/schemas/Address"
access_rules_package:
description: "Obsolete! Use `role_assignment_module_package` instead."
deprecated: true
$ref: "#/components/schemas/Address"
role_assignment_module_package:
$ref: "#/components/schemas/Address"
genesis_helper_package:
Expand Down Expand Up @@ -3162,15 +3167,15 @@ components:
codes:
$ref: "#/components/schemas/StateEntityDetailsResponsePackageDetailsCodeCollection"
vm_type:
description: "Obsolete! Use codes collection"
description: "Obsolete! Use `codes` collection instead."
deprecated: true
$ref: "#/components/schemas/PackageVmType"
code_hash_hex:
description: "Obsolete! Use codes collection"
description: "Obsolete! Use `codes` collection instead."
deprecated: true
$ref: "#/components/schemas/HexString"
code_hex:
description: "Obsolete! Use codes collection"
description: "Obsolete! Use `codes` collection instead."
deprecated: true
$ref: "#/components/schemas/HexString"
royalty_vault_balance:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,15 @@ protected NetworkConfigurationResponseWellKnownAddresses() { }
/// <param name="transactionProcessorPackage">Bech32m-encoded human readable version of the address. (required).</param>
/// <param name="metadataModulePackage">Bech32m-encoded human readable version of the address. (required).</param>
/// <param name="royaltyModulePackage">Bech32m-encoded human readable version of the address. (required).</param>
/// <param name="accessRulesPackage">Bech32m-encoded human readable version of the address. (required).</param>
/// <param name="roleAssignmentModulePackage">Bech32m-encoded human readable version of the address. (required).</param>
/// <param name="genesisHelperPackage">Bech32m-encoded human readable version of the address. (required).</param>
/// <param name="faucetPackage">Bech32m-encoded human readable version of the address. (required).</param>
/// <param name="consensusManager">Bech32m-encoded human readable version of the address. (required).</param>
/// <param name="genesisHelper">Bech32m-encoded human readable version of the address. (required).</param>
/// <param name="faucet">Bech32m-encoded human readable version of the address. (required).</param>
/// <param name="poolPackage">Bech32m-encoded human readable version of the address. (required).</param>
public NetworkConfigurationResponseWellKnownAddresses(string xrd = default(string), string secp256k1SignatureVirtualBadge = default(string), string ed25519SignatureVirtualBadge = default(string), string packageOfDirectCallerVirtualBadge = default(string), string globalCallerVirtualBadge = default(string), string systemTransactionBadge = default(string), string packageOwnerBadge = default(string), string validatorOwnerBadge = default(string), string accountOwnerBadge = default(string), string identityOwnerBadge = default(string), string packagePackage = default(string), string resourcePackage = default(string), string accountPackage = default(string), string identityPackage = default(string), string consensusManagerPackage = default(string), string accessControllerPackage = default(string), string transactionProcessorPackage = default(string), string metadataModulePackage = default(string), string royaltyModulePackage = default(string), string roleAssignmentModulePackage = default(string), string genesisHelperPackage = default(string), string faucetPackage = default(string), string consensusManager = default(string), string genesisHelper = default(string), string faucet = default(string), string poolPackage = default(string))
public NetworkConfigurationResponseWellKnownAddresses(string xrd = default(string), string secp256k1SignatureVirtualBadge = default(string), string ed25519SignatureVirtualBadge = default(string), string packageOfDirectCallerVirtualBadge = default(string), string globalCallerVirtualBadge = default(string), string systemTransactionBadge = default(string), string packageOwnerBadge = default(string), string validatorOwnerBadge = default(string), string accountOwnerBadge = default(string), string identityOwnerBadge = default(string), string packagePackage = default(string), string resourcePackage = default(string), string accountPackage = default(string), string identityPackage = default(string), string consensusManagerPackage = default(string), string accessControllerPackage = default(string), string transactionProcessorPackage = default(string), string metadataModulePackage = default(string), string royaltyModulePackage = default(string), string accessRulesPackage = default(string), string roleAssignmentModulePackage = default(string), string genesisHelperPackage = default(string), string faucetPackage = default(string), string consensusManager = default(string), string genesisHelper = default(string), string faucet = default(string), string poolPackage = default(string))
{
// to ensure "xrd" is required (not null)
if (xrd == null)
Expand Down Expand Up @@ -245,6 +246,12 @@ protected NetworkConfigurationResponseWellKnownAddresses() { }
throw new ArgumentNullException("royaltyModulePackage is a required property for NetworkConfigurationResponseWellKnownAddresses and cannot be null");
}
this.RoyaltyModulePackage = royaltyModulePackage;
// to ensure "accessRulesPackage" is required (not null)
if (accessRulesPackage == null)
{
throw new ArgumentNullException("accessRulesPackage is a required property for NetworkConfigurationResponseWellKnownAddresses and cannot be null");
}
this.AccessRulesPackage = accessRulesPackage;
// to ensure "roleAssignmentModulePackage" is required (not null)
if (roleAssignmentModulePackage == null)
{
Expand Down Expand Up @@ -422,6 +429,13 @@ protected NetworkConfigurationResponseWellKnownAddresses() { }
[DataMember(Name = "royalty_module_package", IsRequired = true, EmitDefaultValue = true)]
public string RoyaltyModulePackage { get; set; }

/// <summary>
/// Bech32m-encoded human readable version of the address.
/// </summary>
/// <value>Bech32m-encoded human readable version of the address.</value>
[DataMember(Name = "access_rules_package", IsRequired = true, EmitDefaultValue = true)]
public string AccessRulesPackage { get; set; }

/// <summary>
/// Bech32m-encoded human readable version of the address.
/// </summary>
Expand Down Expand Up @@ -498,6 +512,7 @@ public override string ToString()
sb.Append(" TransactionProcessorPackage: ").Append(TransactionProcessorPackage).Append("\n");
sb.Append(" MetadataModulePackage: ").Append(MetadataModulePackage).Append("\n");
sb.Append(" RoyaltyModulePackage: ").Append(RoyaltyModulePackage).Append("\n");
sb.Append(" AccessRulesPackage: ").Append(AccessRulesPackage).Append("\n");
sb.Append(" RoleAssignmentModulePackage: ").Append(RoleAssignmentModulePackage).Append("\n");
sb.Append(" GenesisHelperPackage: ").Append(GenesisHelperPackage).Append("\n");
sb.Append(" FaucetPackage: ").Append(FaucetPackage).Append("\n");
Expand Down Expand Up @@ -635,6 +650,11 @@ public bool Equals(NetworkConfigurationResponseWellKnownAddresses input)
(this.RoyaltyModulePackage != null &&
this.RoyaltyModulePackage.Equals(input.RoyaltyModulePackage))
) &&
(
this.AccessRulesPackage == input.AccessRulesPackage ||
(this.AccessRulesPackage != null &&
this.AccessRulesPackage.Equals(input.AccessRulesPackage))
) &&
(
this.RoleAssignmentModulePackage == input.RoleAssignmentModulePackage ||
(this.RoleAssignmentModulePackage != null &&
Expand Down Expand Up @@ -757,6 +777,10 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + this.RoyaltyModulePackage.GetHashCode();
}
if (this.AccessRulesPackage != null)
{
hashCode = (hashCode * 59) + this.AccessRulesPackage.GetHashCode();
}
if (this.RoleAssignmentModulePackage != null)
{
hashCode = (hashCode * 59) + this.RoleAssignmentModulePackage.GetHashCode();
Expand Down

0 comments on commit 24b667a

Please sign in to comment.