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

Adding substate and partition delete support to FlashLedgerTransaction in Core API #810

Merged
merged 6 commits into from
Jan 22, 2024

Conversation

jakrawcz-rdx
Copy link
Contributor

An omission reported at https://rdxworks.slack.com/archives/C01M90Y2448/p1705913560366799

Intuitively, the FlashTransaction could be represented as StateUpdates.
However, our existing StateUpdates Core API output is very receipt-focused (e.g. it includes previous value for substate updates) and it is hard to render for FlashTransaction. So I had to re-create a similar structure.

@@ -7413,10 +7413,10 @@ components:
- $ref: "#/components/schemas/LedgerTransaction"
- type: object
required:
- flash_transaction
- flashed_state_updates
Copy link
Contributor Author

Choose a reason for hiding this comment

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

(note from author)

A flash transaction, apart from state updates, also has a name.
Do we want to include it in the Core API response?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes please :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(already done - see - name one line above)

Copy link

github-actions bot commented Jan 22, 2024

Docker tags
docker.io/radixdlt/private-babylon-node:pr-810
docker.io/radixdlt/private-babylon-node:d32d65589d
docker.io/radixdlt/private-babylon-node:sha-d32d655

@@ -1360,7 +1360,6 @@ impl SubstateDatabase for RocksDBStore {
self.open_db_context()
.cf(SubstatesCf)
.iterate_group_from(&(partition_key.clone(), from_sort_key), Direction::Forward)
.take_while(move |((next_key, _), _)| next_key == &partition_key)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

(note from author)

This is just a drive-by mentioned at https://rdxworks.slack.com/archives/D04CPLNN81Y/p1705591790950219

@jakrawcz-rdx jakrawcz-rdx requested a review from dhedey January 22, 2024 16:42
Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@dhedey dhedey merged commit 77ffe35 into develop Jan 22, 2024
22 checks passed
@dhedey dhedey deleted the feature/substate_flash_core_api branch January 22, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants