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
Changes from 1 commit
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
0bf2f9f
transaction type and accounts with/without manifest owner call filters.
PawelPawelec-RDX Dec 12, 2023
a15acfc
rename to manifest class
PawelPawelec-RDX Dec 20, 2023
faa1472
return only assigned modules role assignments.
PawelPawelec-RDX Dec 20, 2023
caf0f9c
Version bump
krzlabrdx Jan 2, 2024
9fc8cde
Regenerated first migration
krzlabrdx Jan 3, 2024
e1c6f65
regenerate initial migration.
PawelPawelec-RDX Jan 3, 2024
4030a66
Upgrade Core API SDK
krzlabrdx Jan 3, 2024
06b281a
Dropped balance_changes fallback mechanism
krzlabrdx Jan 3, 2024
91dd77a
add docs to new filters.
PawelPawelec-RDX Jan 4, 2024
e3c74fa
Merge branch 'release/babylon-2.0.0' of github.com:radixdlt/babylon-g…
PawelPawelec-RDX Jan 4, 2024
850099e
Merge pull request #585 from radixdlt/transaction-type-and-account-ow…
PawelPawelec-RDX Jan 4, 2024
c33e4b3
regenerate initial migration.
PawelPawelec-RDX Jan 4, 2024
ec0152b
Merge branch 'release/babylon-2.0.0' of github.com:radixdlt/babylon-g…
PawelPawelec-RDX Jan 4, 2024
6222855
Merge pull request #590 from radixdlt/return-only-assigned-module-rol…
PawelPawelec-RDX Jan 4, 2024
86431a6
update docs, regenerate migration.
PawelPawelec-RDX Jan 4, 2024
556190c
Merge pull request #600 from radixdlt/return-only-assigned-module-rol…
PawelPawelec-RDX Jan 4, 2024
f795335
Merge branch 'release/babylon-2.0.0' into balance-changes-db
krzlabrdx Jan 5, 2024
99c15c9
Merge pull request #597 from radixdlt/balance-changes-db
krzlabrdx Jan 5, 2024
fc34e01
fix mocking virtual entities role assignment after role assignment re…
PawelPawelec-RDX Jan 5, 2024
a0273ee
Reworked NetworkConfiguration
krzlabrdx Jan 4, 2024
31b2728
Renamed Abstractions.Addressing to Abstractions.Network
krzlabrdx Jan 4, 2024
a01c6c8
Restored NetworkConfiguration logic
krzlabrdx Jan 5, 2024
2805b51
Fixed rebase
krzlabrdx Jan 5, 2024
950607d
Regenerated first migration
krzlabrdx Jan 5, 2024
9d102cf
Share NetworkOptions by all services
krzlabrdx Jan 5, 2024
c7fc164
Move majority of Core API interaction out of component services
krzlabrdx Jan 8, 2024
a3cf582
Read configuration using network options and Core API nodes
krzlabrdx Jan 8, 2024
2d79f8b
Merge pull request #602 from radixdlt/fix-mocking-virtual-entities-ro…
PawelPawelec-RDX Jan 9, 2024
d2ec5c0
Merge pull request #603 from radixdlt/core-connectivity-rework
krzlabrdx Jan 10, 2024
bc5c5f2
Merge branch 'release/babylon-2.0.0' into network-configuration-rework
krzlabrdx Jan 10, 2024
887e924
Merge pull request #601 from radixdlt/network-configuration-rework
krzlabrdx Jan 10, 2024
499332c
Merge branch 'develop' of github.com:radixdlt/babylon-gateway into re…
PawelPawelec-RDX Jan 12, 2024
b99d632
Restored Core API connection configuration capabilities
krzlabrdx Jan 15, 2024
a233338
Merge pull request #613 from radixdlt/node-selector-fix
krzlabrdx Jan 15, 2024
0ea2fbd
add tx manifest to transactions.
PawelPawelec-RDX Jan 12, 2024
66d53e1
wip
PawelPawelec-RDX Jan 15, 2024
e67357c
Merge pull request #609 from radixdlt/add-manifest-to-transactions
krzlabrdx Jan 15, 2024
729bb25
Merge pull request #614 from radixdlt/fix-ioc-registration-for-coreap…
krzlabrdx Jan 15, 2024
f0e138e
Use synchronous implementation for RadixAddressValidator
krzlabrdx Jan 15, 2024
613d1cf
Tuned operation summary for some endpoints
krzlabrdx Jan 23, 2024
2635a73
Merge pull request #618 from radixdlt/oas-symmaries
krzlabrdx Jan 24, 2024
133e7f1
Merge branch 'develop' into release/babylon-2.0.0
krzlabrdx Jan 24, 2024
1cc2114
Renamed well-known network configuration address property access_rule…
krzlabrdx Jan 24, 2024
db85bbc
Merge pull request #622 from radixdlt/net-conf-name
krzlabrdx Jan 24, 2024
e5a07eb
Restore access_rules_package on NetworkConfigurationResponse
krzlabrdx Jan 24, 2024
24b667a
Merge pull request #623 from radixdlt/net-cfg-comp
krzlabrdx Jan 24, 2024
462dff2
Added manifest_classes collection to CommittedTransactionInfo
krzlabrdx Jan 25, 2024
322dbcc
Updated changelog
krzlabrdx Jan 25, 2024
a672a16
Merge pull request #625 from radixdlt/feature/tx-manifest-class
krzlabrdx Jan 25, 2024
f229383
Merge branch 'develop' of github.com:radixdlt/babylon-gateway into re…
PawelPawelec-RDX Jan 25, 2024
8e87549
Merge branch 'develop' into release/babylon-2.0.0
PawelPawelec-RDX Jan 26, 2024
aade6fc
Merge pull request #630 from radixdlt/release/anemone
krzlabrdx Jan 29, 2024
81b3ece
Dropped WIP code
krzlabrdx Jan 30, 2024
3976358
More verbose exceptions on node misconfiguration
krzlabrdx Jan 30, 2024
a4e014d
Merge branch 'develop' into release/babylon-2.0.0
PawelPawelec-RDX Jan 31, 2024
63c9476
added CONTRIBUTING.md and CODE_OF_CONDUCT.md files.
PawelPawelec-RDX Jan 31, 2024
aa46f1c
Fast-fail on no enabled Nodes in application configuration
krzlabrdx Jan 31, 2024
141d53a
Merge pull request #634 from radixdlt/configuration-exceptions
krzlabrdx Jan 31, 2024
104267b
add PermanentlyRejectsAtEpoch to transaction status response.
PawelPawelec-RDX Jan 31, 2024
32c387a
make description for permanently_rejects_at_epoch more descriptive.
PawelPawelec-RDX Jan 31, 2024
08596c4
use GatewayModel alias for usings.
PawelPawelec-RDX Jan 31, 2024
c5eb83e
move _statusesToReturnPermanentlyRejectsAtEpoch to static field.
PawelPawelec-RDX Feb 1, 2024
d4ad76c
change end_epoch_exclusive to bigint to match gateway strategy
PawelPawelec-RDX Feb 1, 2024
9be6ab2
Merge pull request #636 from radixdlt/add-permanently-rejects-at-epoc…
PawelPawelec-RDX Feb 1, 2024
355311c
Merge branch 'main' into develop
PawelPawelec-RDX Feb 1, 2024
ab53b58
Merge branch 'develop' into release/babylon-2.0.0
PawelPawelec-RDX Feb 1, 2024
d7f1535
Fixed HttpClient registration for GatewayApi
krzlabrdx Feb 1, 2024
515230a
Merge pull request #639 from radixdlt/httpclient-fix
PawelPawelec-RDX Feb 1, 2024
3bc1146
changelog entry for tx status change (rejection epoch).
PawelPawelec-RDX Feb 1, 2024
4480314
fix indents in changelog.
PawelPawelec-RDX Feb 2, 2024
4b1d774
wip
PawelPawelec-RDX Feb 2, 2024
8d4a260
link to contributing.md from readme.
PawelPawelec-RDX Jan 31, 2024
8174de2
Merge pull request #635 from radixdlt/how-to-contribute-files
PawelPawelec-RDX Feb 2, 2024
498bec7
Merge branch 'develop' of github.com:radixdlt/babylon-gateway into re…
PawelPawelec-RDX Feb 2, 2024
ca4a243
Extended component's method royalty aggregation
krzlabrdx Feb 5, 2024
275d68b
Dumpyard_ComponentMethodRoyalty WIP
krzlabrdx Feb 5, 2024
b97a1ba
Dumpyard_EntityRoleAssignment WIP
krzlabrdx Feb 5, 2024
0eedf22
Dumpyard_PackageBlueprint and Dumpyard_PackageCode WIP
krzlabrdx Feb 5, 2024
bcd1d5c
Code clean-up
krzlabrdx Feb 5, 2024
921026a
Dumpyard_PackageBlueprint WIP
krzlabrdx Feb 5, 2024
0bb3141
Dumpyard_EntityState WIP
krzlabrdx Feb 6, 2024
84fc87d
Dumpyard_ComponentMethodRoyalty WIP
krzlabrdx Feb 6, 2024
e8781d3
new endpoint to iterate over key value store keys.
PawelPawelec-RDX Feb 6, 2024
e39cd9c
Code clean-up
krzlabrdx Feb 6, 2024
234050b
LedgerExtension extensions
krzlabrdx Feb 6, 2024
afa3d9e
Moved COPY operations to their dedicated processors
krzlabrdx Feb 6, 2024
06cef12
Moved "read most recent" operations to their dedicated processors
krzlabrdx Feb 6, 2024
488117a
Added missing licence headers
krzlabrdx Feb 6, 2024
ad45fcd
regenerate specs with 1.4.0 version.
PawelPawelec-RDX Feb 6, 2024
225217c
Code clean-up
krzlabrdx Feb 6, 2024
dbb492d
cleanup changelog, apply pr comments.
PawelPawelec-RDX Feb 6, 2024
513db23
Merge pull request #641 from radixdlt/method-royalty-agg
krzlabrdx Feb 7, 2024
9105d5b
use paste tense in changelog.
PawelPawelec-RDX Feb 7, 2024
ac49776
Merge branch 'release/babylon-1.4.0' of github.com:radixdlt/babylon-g…
PawelPawelec-RDX Feb 7, 2024
9afb130
regenerate migration after merge.
PawelPawelec-RDX Feb 7, 2024
712cf67
Merge pull request #643 from radixdlt/new-endpoint-to-iterate-key-val…
PawelPawelec-RDX Feb 7, 2024
7ee04a5
Changed `ValidatorEmissionStatistics` index to improve performance of…
krzlabrdx Feb 7, 2024
f4d94a9
Use strict at_ledger_state.state_version and from_ledger_state.state_…
krzlabrdx Feb 6, 2024
23b2028
Merge pull request #647 from radixdlt/strict-ledger-state
krzlabrdx Feb 7, 2024
4829f19
Merge pull request #648 from radixdlt/validator-uptime-idx
krzlabrdx Feb 7, 2024
4255ed9
regenerate typescript sdk.
PawelPawelec-RDX Feb 8, 2024
7c90d59
update compose with newest images and add put release date in changelog.
PawelPawelec-RDX Feb 8, 2024
c12b446
update redocly docs how to query kv store.
PawelPawelec-RDX Feb 9, 2024
a0d1eb2
escape types in docs.
PawelPawelec-RDX Feb 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 90 additions & 2 deletions src/RadixDlt.NetworkGateway.GatewayApi/gateway-api-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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.


i.e:
```
/state/key-value-store/keys

{
"key_value_store_address": "internal_keyvaluestore_tdx_2_1kzjd929eqlzd9n02uuj8jd48705vcrpvhv4mgxnaltrgystnca3qxk"
}
```

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.


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.

```
{
...
"total_count": 8,
"items": [
{
"key": {
"raw_hex": "5c0c0131",
"programmatic_json": {
"value": "1",
"kind": "String"
}
},
"last_updated_at_state_version": 4939670
},
...
],
"key_value_store_address": "internal_keyvaluestore_tdx_2_1kzjd929eqlzd9n02uuj8jd48705vcrpvhv4mgxnaltrgystnca3qxk"
}
```

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


i.e:
```
/state/key-value-store/data

{
"key_value_store_address": "internal_keyvaluestore_tdx_2_1kzjd929eqlzd9n02uuj8jd48705vcrpvhv4mgxnaltrgystnca3qxk",
"keys": [
{
"key_hex": "5c0c0131"
}
]
}
```

Will respond with data held under that key:

```
{
...
"key_value_store_address": "internal_keyvaluestore_tdx_2_1kzjd929eqlzd9n02uuj8jd48705vcrpvhv4mgxnaltrgystnca3qxk",
"entries": [
{
"key": {
"raw_hex": "5c0c0131",
"programmatic_json": {
"value": "1",
"kind": "String"
}
},
"value": {
"raw_hex": "5c90588c6d59227f64bd7fc68e38bf7c7013cf179a78d5562ce9378b1378e2fa",
"programmatic_json": {
"value": "internal_vault_tdx_2_1tzxx6kfz0ajt6l7x3cut7lrsz0830xnc64tze6fh3vfh3ch6587c5d",
"kind": "Own",
"type_name": "Vault"
}
},
"last_updated_at_state_version": 4939415,
"is_locked": false
}
]
}
```

In our case, we may want to look up information about the vault (for example, the vault's resource address and balance).
This can be done with the `/state/entity/details` endpoint.

The gateway doesn't currently support iterating over keys, although we plan to add APIs which can support this in the near future. For now, a client would need to keep track on their own of all created keys or use lower level APIs to extract that data.
#### Constructing json keys

The json keys are specified as programmatic SBOR JSON (which is a recursive data format, with each layer being a discriminated union with the `kind` discriminator). Search for [SBOR on our docs site](https://docs.radixdlt.com) for more information on SBOR and the programmatic SBOR JSON format.

Expand Down
Loading