Skip to content

Commit

Permalink
Merge branch 'develop' into release/rcnet-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
krzlabrdx authored Jul 28, 2023
2 parents 5effce9 + 0c0fae5 commit a9b54e1
Show file tree
Hide file tree
Showing 559 changed files with 10,249 additions and 2,209 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "7.0.5",
"version": "7.0.9",
"commands": [
"dotnet-ef"
]
Expand Down
30 changes: 28 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# 0.5.0 - RCNet v3
Release Date: unreleased

## RCNet v2 to RCNet v3 Migration Guide

_WORK IN PROGRESS_

### What’s New?


### Breaking Changes

- Renamed `access_rules` to `role_assignments`. Included missing `module` to role assignment key.

## Full technical changelog by minor release
### 0.4.1

- Renamed `access_rules` to `role_assignments`. Included missing `module` to role assignment key.
- Added package details to `/satus/entity/details` endpoint.
- New endpoint `/statistics/validators/uptime` returns validator uptime data.
- New endpoint `/state/key-value/data` returns entries of requested KeyValueStore.

-------

# 0.4.0 - RCNet v2
Release Date: 26.07.2023

Expand Down Expand Up @@ -62,14 +86,15 @@ Release Date: 26.07.2023
- Added `affected_global_entities` to `/transaction/committed-details` and `/stream/transactions` endpoints. To include them in response make sure to include `affected_global_entities` optin.
- New `affected_global_entities_filter` filter in `/stream/transactions`.
- Use strongly-typed metadata models.
- return `pending_xrd_withdraw_vault`, `locked_owner_stake_unit_vault`, `pending_owner_stake_unit_unlock_vault`, `stake_vault` from `/state/validators/list` endpoint.
- Return `pending_xrd_withdraw_vault`, `locked_owner_stake_unit_vault`, `pending_owner_stake_unit_unlock_vault`, `stake_vault` from `/state/validators/list` endpoint.
- Changed `access_rule_chain` to partially strongly typed `access_rules`.
- Added package details to `/satus/entity/details` endpoint.

### 0.3.1

- Fix `/state/non-fungible/data` to return data for all NFIDs

-------

# 0.3.0 - RCNet v1
Release Date: 31.03.2023

Expand All @@ -85,6 +110,7 @@ Release Date: 31.03.2023
- new paginable endpoints `/state/entity/page/{x}` for metadata, fungibles, fungible-vaults, non-fungibles, non-fungible-vaults and non-fungible-vault/ids. Cursors returned from `state/entity/details` can be later used to query for next pages in specific endpoints.
- `/transaction/committed-details` endpoint operates on `intent_hash_hex` only now

-------

# 0.1.1 - Betanet v2
Release Date: 14.02.2023
Expand Down
36 changes: 18 additions & 18 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
<Project>
<ItemGroup>
<!-- runtime dependencies -->
<PackageVersion Include="Dapper" Version="2.0.123" />
<PackageVersion Include="FluentValidation" Version="11.5.2" />
<PackageVersion Include="Dapper" Version="2.0.143" />
<PackageVersion Include="FluentValidation" Version="11.6.0" />
<PackageVersion Include="FluentValidation.AspNetCore" Version="11.3.0" />
<PackageVersion Include="JsonSubTypes" Version="2.0.1" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.5" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.9" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.10" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="7.0.5" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.5" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.5" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="7.0.9" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.9" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.9" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="7.0.5" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="7.0.9" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
<PackageVersion Include="Microsoft.OpenApi.Readers" Version="1.6.3" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageVersion Include="Microsoft.OpenApi.Readers" Version="1.6.5" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.4" />
<PackageVersion Include="Polly" Version="7.2.3" />
<PackageVersion Include="prometheus-net" Version="8.0.0" />
<PackageVersion Include="prometheus-net.AspNetCore" Version="8.0.0" />
<PackageVersion Include="prometheus-net.AspNetCore.HealthChecks" Version="8.0.0" />
<PackageVersion Include="Polly" Version="7.2.4" />
<PackageVersion Include="prometheus-net" Version="8.0.1" />
<PackageVersion Include="prometheus-net.AspNetCore" Version="8.0.1" />
<PackageVersion Include="prometheus-net.AspNetCore.HealthChecks" Version="8.0.1" />
<PackageVersion Include="RadixDlt.RadixEngineToolkit" Version="0.11.0-commit-b68ff8d" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<!-- build time dependencies -->
<PackageVersion Include="coverlet.collector" Version="3.2.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageVersion Include="Moq" Version="4.18.2" />
<PackageVersion Include="FluentAssertions" Version="6.11.0" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.435" />
<PackageVersion Include="xunit" Version="2.4.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageVersion Include="xunit" Version="2.5.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.0" />
</ItemGroup>
</Project>
</Project>
92 changes: 92 additions & 0 deletions apps/GatewayApi/Controllers/StateKeyValueStoreController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/* 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.
*/

using Microsoft.AspNetCore.Mvc;
using RadixDlt.NetworkGateway.GatewayApi.AspNetCore;
using RadixDlt.NetworkGateway.GatewayApi.Handlers;
using System.Threading;
using System.Threading.Tasks;
using GatewayModel = RadixDlt.NetworkGateway.GatewayApiSdk.Model;

namespace GatewayApi.Controllers;

[ApiController]
[Route("state/key-value-store")]
[ServiceFilter(typeof(ExceptionFilter))]
[ServiceFilter(typeof(InvalidModelStateFilter))]
public class StateKeyValueStoreController : ControllerBase
{
private readonly IKeyValueStoreHandler _keyValueStoreHandler;

public StateKeyValueStoreController(IKeyValueStoreHandler keyValueStoreHandler)
{
_keyValueStoreHandler = keyValueStoreHandler;
}

[HttpPost("data")]
public async Task<GatewayModel.StateKeyValueStoreDataResponse> Data(GatewayModel.StateKeyValueStoreDataRequest request, CancellationToken token)
{
return await _keyValueStoreHandler.Data(request, token);
}
}
92 changes: 92 additions & 0 deletions apps/GatewayApi/Controllers/StatisticsController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/* 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.
*/

using Microsoft.AspNetCore.Mvc;
using RadixDlt.NetworkGateway.GatewayApi.AspNetCore;
using RadixDlt.NetworkGateway.GatewayApi.Handlers;
using System.Threading;
using System.Threading.Tasks;
using GatewayModel = RadixDlt.NetworkGateway.GatewayApiSdk.Model;

namespace GatewayApi.Controllers;

[ApiController]
[Route("statistics")]
[ServiceFilter(typeof(ExceptionFilter))]
[ServiceFilter(typeof(InvalidModelStateFilter))]
public class StatisticsController : ControllerBase
{
private readonly IValidatorHandler _validatorStateHandler;

public StatisticsController(IValidatorHandler validatorStateHandler)
{
_validatorStateHandler = validatorStateHandler;
}

[HttpPost("validators/uptime")]
public async Task<GatewayModel.ValidatorsUptimeResponse> Uptime(GatewayModel.ValidatorsUptimeRequest request, CancellationToken token)
{
return await _validatorStateHandler.Uptime(request, token);
}
}
21 changes: 20 additions & 1 deletion sdk/typescript/lib/generated/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
.openapi-generator-ignore
apis/StateApi.ts
apis/StatisticsApi.ts
apis/StatusApi.ts
apis/StreamApi.ts
apis/TransactionApi.ts
apis/index.ts
index.ts
models/AtLedgerStateMixin.ts
models/CommittedTransactionInfo.ts
models/ComponentEntityAccessRules.ts
models/ComponentEntityRoleAssignmentEntry.ts
models/ComponentEntityRoleAssignmentEntryRoleKey.ts
models/ComponentEntityRoleAssignments.ts
models/CursorLimitMixin.ts
models/EntityMetadataCollection.ts
models/EntityMetadataCollectionAllOf.ts
Expand Down Expand Up @@ -132,6 +135,7 @@ models/NonFungibleResourcesCollectionItemVaultAggregatedVaultItem.ts
models/NonFungibleResourcesCollectionItemVaultAggregatedVaultItemAllOf.ts
models/NotSyncedUpError.ts
models/NotSyncedUpErrorAllOf.ts
models/ObjectModuleId.ts
models/OptionalNonFungibleIdsCollection.ts
models/OptionalNonFungibleIdsCollectionAllOf.ts
models/PackageVmType.ts
Expand Down Expand Up @@ -177,6 +181,9 @@ models/StateEntityDetailsResponsePackageDetailsAllOf.ts
models/StateEntityDetailsResponsePackageDetailsBlueprintCollection.ts
models/StateEntityDetailsResponsePackageDetailsBlueprintCollectionAllOf.ts
models/StateEntityDetailsResponsePackageDetailsBlueprintItem.ts
models/StateEntityDetailsResponsePackageDetailsSchemaCollection.ts
models/StateEntityDetailsResponsePackageDetailsSchemaCollectionAllOf.ts
models/StateEntityDetailsResponsePackageDetailsSchemaItem.ts
models/StateEntityFungibleResourceVaultsPageRequest.ts
models/StateEntityFungibleResourceVaultsPageRequestAllOf.ts
models/StateEntityFungibleResourceVaultsPageResponse.ts
Expand All @@ -198,6 +205,12 @@ models/StateEntityNonFungiblesPageRequest.ts
models/StateEntityNonFungiblesPageRequestAllOf.ts
models/StateEntityNonFungiblesPageRequestOptIns.ts
models/StateEntityNonFungiblesPageResponse.ts
models/StateKeyValueStoreDataRequest.ts
models/StateKeyValueStoreDataRequestAllOf.ts
models/StateKeyValueStoreDataRequestKeyItem.ts
models/StateKeyValueStoreDataResponse.ts
models/StateKeyValueStoreDataResponseAllOf.ts
models/StateKeyValueStoreDataResponseItem.ts
models/StateNonFungibleDataRequest.ts
models/StateNonFungibleDataRequestAllOf.ts
models/StateNonFungibleDataResponse.ts
Expand Down Expand Up @@ -242,6 +255,12 @@ models/ValidatorCollection.ts
models/ValidatorCollectionAllOf.ts
models/ValidatorCollectionItem.ts
models/ValidatorCollectionItemActiveInEpoch.ts
models/ValidatorUptimeCollection.ts
models/ValidatorUptimeCollectionItem.ts
models/ValidatorVaultItem.ts
models/ValidatorsUptimeRequest.ts
models/ValidatorsUptimeRequestAllOf.ts
models/ValidatorsUptimeResponse.ts
models/ValidatorsUptimeResponseAllOf.ts
models/index.ts
runtime.ts
Loading

0 comments on commit a9b54e1

Please sign in to comment.