Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/babylon 1.4.0 - > main #646

Merged
merged 104 commits into from
Feb 9, 2024
Merged

Release/babylon 1.4.0 - > main #646

merged 104 commits into from
Feb 9, 2024

Conversation

PawelPawelec-RDX
Copy link
Contributor

No description provided.

PawelPawelec-RDX and others added 30 commits December 18, 2023 17:09
…ateway into transaction-type-and-account-owner-method-filters

# Conflicts:
#	src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/IdempotentApplyMigrations.sql
…ner-method-filters

transaction type and accounts with/without manifest owner call filters.
…ateway into return-only-assigned-module-role-assignments

# Conflicts:
#	CHANGELOG.md
#	src/RadixDlt.CoreApiSdk/Model/CommittedTransactionBalanceChanges.cs
#	src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20230922041840_InitialCreate.cs
#	src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20231130132946_AddNetworkHrpSuffixToNetworkConfiguration.Designer.cs
#	src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20240104104456_InitialCreate.Designer.cs
#	src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20240104104456_InitialCreate.cs
#	src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20240104122654_InitialCreate.Designer.cs
#	src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20240104122654_InitialCreate.cs
#	src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/IdempotentApplyMigrations.sql
#	src/RadixDlt.NetworkGateway.PostgresIntegration/ToolkitModelExtensions.cs
…e-assignments

return only assigned module's role assignments.
…e-assignments

update docs, regenerate migration.
Dropped balance_changes fallback mechanism
…le-assignments

fix mocking virtual entities role assignment after role assignment re…
Copy link

github-actions bot commented Feb 6, 2024

Docker tags
docker.io/radixdlt/private-babylon-ng-database-migrations:HEAD-fc0dbbc-arm64

Copy link

github-actions bot commented Feb 6, 2024

Docker tags
docker.io/radixdlt/private-babylon-ng-gateway-api:HEAD-fc0dbbc-arm64

Copy link

github-actions bot commented Feb 6, 2024

Docker tags
docker.io/radixdlt/private-babylon-ng-data-aggregator:HEAD-fc0dbbc-arm64

PawelPawelec-RDX and others added 12 commits February 6, 2024 16:41
Extended component's method royalty aggregation
…ateway into new-endpoint-to-iterate-key-value-store

# Conflicts:
#	CHANGELOG.md
#	src/RadixDlt.NetworkGateway.PostgresIntegration/LedgerExtension/PackageBlueprintAggregator.cs
#	src/RadixDlt.NetworkGateway.PostgresIntegration/LedgerExtension/PackageCodeAggregator.cs
#	src/RadixDlt.NetworkGateway.PostgresIntegration/LedgerExtension/PostgresLedgerExtenderService.cs
#	src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20240201095213_InitialCreate.Designer.cs
#	src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20240201095213_InitialCreate.cs
#	src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20240205103100_InitialCreate.Designer.cs
#	src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20240205103100_InitialCreate.cs
#	src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20240205115035_InitialCreate.Designer.cs
#	src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/20240205115035_InitialCreate.cs
#	src/RadixDlt.NetworkGateway.PostgresIntegration/Migrations/IdempotentApplyMigrations.sql
…ue-store

new endpoint to iterate over key value store keys.
Use strict at_ledger_state.state_version and from_ledger_state.state_…
Changed `ValidatorEmissionStatistics` index to improve performance of…
@PawelPawelec-RDX PawelPawelec-RDX merged commit 9760898 into main Feb 9, 2024
14 of 20 checks passed
Copy link

sonarqubecloud bot commented Feb 9, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Contributor

@dhedey dhedey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks Pawel!

@@ -879,11 +879,99 @@ tags:
}
```

### Iterating over all key value store keys

You can use `/state/key-value-store/keys` endpoint to iterate over all keys in certain key value store.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor English article corrections:

      You can use the `/state/key-value-store/keys` endpoint to iterate over all the keys in a certain key value store.

### Iterating over all key value store keys

You can use `/state/key-value-store/keys` endpoint to iterate over all keys in certain key value store.
If the queried key value store contains more than one page of keys, a next_cursor will be returned, which can be used as cursor in the request to fetch further pages.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor English article corrections:

If the queried key value store contains more than one page of keys, a `next_cursor` will be returned, which can be used as a cursor in the request to fetch further pages.

}
```

Will respond with list of all keys (in both `hex` and `programmatic_json` form) and state version when they were last updated.
Copy link
Contributor

@dhedey dhedey Feb 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor English article corrections:

      Will respond with a list of all keys (in both `hex` and `programmatic_json` form) and the state version when they were last updated.

However(!) I'd suggest we say it's actually not all keys - it's importantly the first page of keys, and we should explain how it's ordered too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about

Will respond with a first page of all keys (in both `hex` and `programmatic_json` form) and the state version when they were last updated. Returned keys are ordered by their last change, first key on a list will be one that was most recently updated/created. 

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest this tweak, if you're happy with it?

Will respond with a first page of the keys of the current entries of the key value store. This collection is ordered by the state version of the entry's last update, descending. In other words, the first entry on the list will be one that was most recently updated/created. Each item includes the entry's key (in both `hex` and `programmatic_json` form) and the state version when it was last updated.

```

Will respond with list of all keys (in both `hex` and `programmatic_json` form) and state version when they were last updated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also - just to verify - if a key value store entry is deleted, what happens?

I think it's still returned by this API? Or do we filter them out?

If it doesn't filter them out, we should explain that this API doesn't do so, and explain how the entry read endpoint handles us looking up a key of an entry that's been deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we filter out deleted keys. do we want to document that somehow?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if we rewrite as per my other message, and say "current entries", this implies deleted keys aren't returned.

### Querying for the content under specific keys

After that you can use `/state/key-value-store/data` endpoint to query the content for given keys. To do that you can either use key in form of `json` or `hex`.
You can either rely on keys returned from `/state/key-value-store/keys` endpoint or construct keys in json form on your own. It's possible if you created that key value store and you know what is the form of keys.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested:

You can either use the keys returned from the `/state/key-value-store/keys` endpoint or construct keys in json form on your own, if you know the key type of the `KeyValueStore`.


#### Querying using hex keys

Simply grab `raw_hex` key returned from `/state/key-value-store/keys` endpoint and call `/state/key-value-store/data` with it as parameter.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

      Simply grab the `raw_hex` key returned from the `/state/key-value-store/keys` endpoint and call `/state/key-value-store/data` with it as a parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants