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

Fix sol msg verifier logic (and add cache) #10

Merged
merged 10 commits into from
Mar 5, 2024

Conversation

eloylp
Copy link
Member

@eloylp eloylp commented Mar 3, 2024

This PR closes #7. It accomplishes the following:

  1. Adds a small cache for the Sol RPC client to handle scenarios where multiple Axelar messages are in the same Sol transaction.
  2. Utilizes the RPC client with the cache in the message verifier.
  3. Simplifies the message processing logic in point 2, enabling iteration per each message to decide the vote result on a per-message basis.
  4. Previously, the Vec<Vote> was being overwritten, resulting in incorrect votation. It would be beneficial to allocate additional time to implement unit tests for this functionality. Here we are only fixing the production code.

Review Tip: Please review each commit separately.

Now we iterate per each message, doing the necessary RPC calls and making the vote decision. The RPC client is now caching requested transactions.

Per each message, we search in all sol tx logs, as each tx can hold multiple messages.
@eloylp eloylp changed the base branch from starknet to solana March 3, 2024 21:16
@eloylp eloylp linked an issue Mar 3, 2024 that may be closed by this pull request
@eloylp eloylp marked this pull request as ready for review March 3, 2024 21:23
@eloylp eloylp self-assigned this Mar 3, 2024
@eloylp eloylp requested a review from tilacog March 3, 2024 21:24
@eloylp eloylp merged commit 010d752 into solana Mar 5, 2024
0 of 5 checks passed
@eloylp eloylp deleted the fix-msg-verifier-logic-cache branch March 5, 2024 12:15
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.

Improve/fix message verifier logic
2 participants