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

[Redelegation] fix: EventRedelegation unmarshaling failure #435

Merged
merged 7 commits into from
Mar 21, 2024

Conversation

red-0ne
Copy link
Contributor

@red-0ne red-0ne commented Mar 19, 2024

Summary

Unmarshalling transaction results logic in the delegation client is outdated, making the RelayMiner to panic when listening for these events.

This PR uses tx.UnmarshalTxResult from txClient to unmarshal the transaction.

Issue

When the RelayMiner is running and observing EventRedelegations by listening to application transactions, if a stake application occurs, the client tries to unmarshal it with a "pre-migration" code, causing the RelayMiner to panic

image

Type of change

Select one or more:

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Documentation
  • Other (specify)

Testing

  • Unit Tests: make go_develop_and_test
  • LocalNet E2E Tests: make test_e2e
  • DevNet E2E Tests: Add the devnet-test-e2e label to the PR. THIS IS VERY EXPENSIVE, so only do it after all the reviews are complete.
  • Documentation changes: make docusaurus_start

Sanity Checklist

  • I have tested my changes using the available tooling
  • I have commented my code
  • I have performed a self-review of my own code; both comments & source code
  • I create and referenced any new tickets, if applicable
  • I have left TODOs throughout the codebase, if applicable

@red-0ne red-0ne added application Changes related to the Application actor off-chain Off-chain business logic labels Mar 19, 2024
@red-0ne red-0ne added this to the Shannon TestNet milestone Mar 19, 2024
@red-0ne red-0ne self-assigned this Mar 19, 2024
Copy link
Contributor

@bryanchriswhite bryanchriswhite left a comment

Choose a reason for hiding this comment

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

Nice one! 👌

IIRC correctly, when we were discussing this, we couldn't come up with a great reason not to export cometTxEvent. Otherwise this LGTM. 💪

Copy link

The CI will now also run the e2e tests on devnet, which increases the time it takes to complete all CI checks. If you just created a pull request, you might need to push another commit to produce a container image DevNet can utilize to spin up infrastructure. You can use make trigger_ci to push an empty commit.

@github-actions github-actions bot added devnet push-image CI related - pushes images to ghcr.io labels Mar 21, 2024
Copy link
Contributor

@h5law h5law left a comment

Choose a reason for hiding this comment

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

LGTM Short and sweet nice changes :)

@Olshansk Olshansk merged commit f99e5da into main Mar 21, 2024
9 checks passed
@Olshansk Olshansk deleted the fix/event-redelegation-unmarshalling branch March 21, 2024 22:45
bryanchriswhite added a commit that referenced this pull request Mar 22, 2024
* pokt/main:
  [AppGateServer] feat: Use round-robin endpoint selection strategy (#443)
  [RelayMiner] feat: Make the RelayMiner wait for its corresponding Supllier to stake (#439)
  [Proof] Relay signature & Merkle proof validation (#406)
  [Redelegation] fix: EventRedelegation unmarshaling failure (#435)
@bryanchriswhite bryanchriswhite removed push-image CI related - pushes images to ghcr.io devnet-test-e2e labels May 16, 2024
okdas added a commit that referenced this pull request Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application Changes related to the Application actor off-chain Off-chain business logic
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

5 participants