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

[Validator API Fix]support validator txn with its events. #454

Merged
merged 3 commits into from
Jul 12, 2024

Conversation

larry-aptos
Copy link
Collaborator

@larry-aptos larry-aptos commented Jul 11, 2024

Description

  • This is to supports events from validator transactions with events migrated from BlockMetadataTransaction.

Backfill

  • First validator transaction in mainnet: 554229017
  • First validator transaction in testnet: 942054324

Test Plan

Tested in devnet and looks good.

image

image

@larry-aptos larry-aptos requested a review from a team July 11, 2024 08:20
Copy link
Collaborator

@rtso rtso Jul 11, 2024

Choose a reason for hiding this comment

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

Besides delegated staking activities, are there other staking models that need to be indexed? I'd imagine we also need to index the wsc of validator txn's

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated; all i did is for the places that requires match TxnData:: branching logic, I added Validator condition..

but for if TxnData::User, I ignored them since they're usually specific to user transactions.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We need to parse all the wsc in ValidatorTransaction now, because there might be delegator resource changes in them. Like here:

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

wait.. but this event was moved from BlockMetadtaTransaciton, does this mean we forgot to handle the writesetchanges in BlockMetadataTransaciton?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you have the proto txn? We can take a look at what's in it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@rtso
Copy link
Collaborator

rtso commented Jul 11, 2024

Could you update the description with testnet and mainnet backfill versions? Which version did the first validator txn appear?

@larry-aptos
Copy link
Collaborator Author

Addressed the comments; ready for another review.

@larry-aptos larry-aptos requested a review from rtso July 12, 2024 00:20
@larry-aptos larry-aptos force-pushed the support-validtor-changes branch from 6d18285 to b9df927 Compare July 12, 2024 19:26
@larry-aptos larry-aptos force-pushed the support-validtor-changes branch from 978d3e8 to 73591d8 Compare July 12, 2024 19:38
@larry-aptos larry-aptos merged commit 7e24dd8 into main Jul 12, 2024
7 checks passed
@larry-aptos larry-aptos deleted the support-validtor-changes branch July 12, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants