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

feature: Add initial support for runtime rofl transactions #812

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

ptrus
Copy link
Member

@ptrus ptrus commented Dec 2, 2024

Fixes: #806
There were already some ROFL apps deployed on testnet for sapphire, so until we reindex, we will miss those transactions/events for now.

It is also possible to write a script that goes over runtime transactions and events for Sapphire and backfills the rofl events and transactions if we won't do a reindex and will still want the missed data - we can do this at a a later time.

For forntend, just displaying the transations.body and formating the events nicely will probably be good for first version.

@ptrus ptrus force-pushed the ptrus/feature/rofl-txs-events branch 3 times, most recently from e57976e to fa87391 Compare December 2, 2024 10:43
@ptrus ptrus changed the title feature: Add support for runtime rofl transactions feature: Add initial support for runtime rofl transactions Dec 2, 2024
@ptrus ptrus force-pushed the ptrus/feature/rofl-txs-events branch from fa87391 to 5ccc938 Compare December 2, 2024 11:39
@ptrus ptrus marked this pull request as ready for review December 2, 2024 11:41
@ptrus ptrus force-pushed the ptrus/feature/rofl-txs-events branch from 5ccc938 to df2f5c0 Compare December 3, 2024 16:10
@ptrus ptrus force-pushed the ptrus/feature/rofl-txs-events branch from df2f5c0 to 97f8baa Compare December 11, 2024 12:13
Copy link
Collaborator

@Andrew7234 Andrew7234 left a comment

Choose a reason for hiding this comment

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

Nice, the Explorer folks might be interested in designing iconography for rofl transactions. cc @csillag

Comment on lines +129 to +148
case "rofl.Create":
if handler.RoflCreate != nil {
var body rofl.Create
if err := cbor.Unmarshal(call.Body, &body); err != nil {
return fmt.Errorf("unmarshal rofl create: %w", err)
}
if err := handler.RoflCreate(&body); err != nil {
return fmt.Errorf("rofl create: %w", err)
}
}
case "rofl.Update":
if handler.RoflUpdate != nil {
var body rofl.Update
if err := cbor.Unmarshal(call.Body, &body); err != nil {
return fmt.Errorf("unmarshal rofl update: %w", err)
}
if err := handler.RoflUpdate(&body); err != nil {
return fmt.Errorf("rofl update: %w", err)
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there any relevant information in the CallResult for rofl transactions? Or is it left for a future ticket?

Copy link
Member Author

Choose a reason for hiding this comment

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

"rofl.Create" has App ID, others are empty. But we don't have anything to do with it at the moment, will leave it as a followup #807

@@ -0,0 +1,9 @@
feature: Add support for runtime rofl transactions

New runtime transactions:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not an ask for this PR, but we should think about adding another e2e regression suite that encompasses rofl/sapphire/consensusaccount txs and the rest of the new features being added :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea, opened #826

@ptrus
Copy link
Member Author

ptrus commented Dec 13, 2024

Nice, the Explorer folks might be interested in designing iconography for rofl transactions

Already in progress oasisprotocol/explorer#1641

@ptrus ptrus force-pushed the ptrus/feature/rofl-txs-events branch from 97f8baa to 4684659 Compare December 13, 2024 13:30
@ptrus ptrus enabled auto-merge December 13, 2024 13:31
@ptrus ptrus merged commit 31095c5 into main Dec 13, 2024
16 checks passed
@ptrus ptrus deleted the ptrus/feature/rofl-txs-events branch December 13, 2024 13:36
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.

Runtime analyzer: Support ROFL transactions and events
2 participants