Skip to content

chore(parallel-executor): compressed coin validation #3001

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

Merged

Conversation

rymnc
Copy link
Member

@rymnc rymnc commented May 8, 2025

Linked Issues/PRs

closes #2996

Description

This pull request introduces a new CoinInBatch struct to encapsulate coin-related data and replaces the previous tuple-based representation of coins in the parallel-executor module.

Introduction of CoinInBatch struct:

  • crates/services/parallel-executor/src/coin.rs: Added the CoinInBatch struct, which encapsulates coin data such as utxo_id, owner, amount, asset_id, and its variant (Signed or Predicate). Implemented methods for constructing CoinInBatch from CoinSigned and CoinPredicate, as well as conversions to CompressedCoin and Input.

Refactoring to use CoinInBatch:

  • crates/services/parallel-executor/src/scheduler.rs: Replaced all instances of (UtxoId, usize) with CoinInBatch in the WorkSessionExecutionResult and WorkSessionSavedData structs, as well as in the CoinDependencyChainVerifier. Updated methods like register_coins_created and verify_coins_used to work with the new struct. [1] [2] [3] [4]

Updates to coin dependency verification:

Integration of CoinInBatch in batch processing:

Module organization:

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • I have reviewed the code myself
  • I have created follow-up issues caused by this PR and linked them here

After merging, notify other teams

[Add or remove entries as needed]

@rymnc rymnc self-assigned this May 8, 2025
@rymnc rymnc added the no changelog Skip the CI check of the changelog modification label May 8, 2025
@rymnc rymnc changed the title chore(parallel-executor): compressed coin validation' chore(parallel-executor): compressed coin validation May 8, 2025
@rymnc rymnc requested a review from AurelienFT May 9, 2025 09:37
@rymnc rymnc marked this pull request as ready for review May 9, 2025 09:37
Copy link
Contributor

@AurelienFT AurelienFT left a comment

Choose a reason for hiding this comment

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

Nice ! It cleans the code + it add the feature. I think we can place this in the skeleton PR as it simplifies the code there also.

@rymnc rymnc merged commit b194afd into create_exec_sequencer_skeleton May 9, 2025
34 checks passed
@rymnc rymnc deleted the chore/compressed-coin-validation branch May 9, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Skip the CI check of the changelog modification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants