Skip to content

Use subscribe flag to get and put contract requests #1462

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 28 commits into from
Apr 11, 2025

Conversation

netsirius
Copy link
Collaborator

This pull request introduces a new subscribe field to various contract operations, ensuring that the subscription status is consistently handled throughout the codebase. The changes span multiple files and functions, adding the subscribe field where necessary and updating function calls and state management accordingly.

Key changes include:

Addition of subscribe field:

  • Updated the start_op function in crates/core/src/operations/get.rs to include the subscribe parameter.
  • Modified the GetState enum in crates/core/src/operations/get.rs to include the subscribe field in relevant states. [1] [2]
  • Added the subscribe field to various function calls and state initializations in crates/core/src/client_events.rs and crates/core/src/contract/executor.rs. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Consistent handling of subscribe in operations:

  • Ensured the subscribe field is correctly passed and utilized in the GetOp and PutOp operations. [1] [2] [3] [4] [5] [6]
  • Updated test cases in crates/core/src/client_events.rs to include the subscribe field. [1] [2] [3]

Subscription request handling:

  • Modified subscription request logic in crates/core/src/node.rs and crates/core/src/operations.rs to handle the subscribe field appropriately. [1] [2]

These changes ensure that the subscription status is consistently managed across different parts of the system, improving the reliability and maintainability of the code.

@netsirius netsirius requested a review from iduartgomez March 9, 2025 17:39
@sanity
Copy link
Collaborator

sanity commented Mar 10, 2025

This will be very useful, it means a single API command to initiate syncing of contracts with the network bi-directionally.

@sanity
Copy link
Collaborator

sanity commented Mar 11, 2025

@netsirius I merged this branch into my working River branch as it should simplify the state synchronization - I should probably have checked with you first to see if it's functional enough for me to use experimentally?

@netsirius netsirius force-pushed the use-subscribe-flag branch 2 times, most recently from 45109ca to 0822903 Compare April 9, 2025 20:40
@netsirius netsirius force-pushed the use-subscribe-flag branch from 0822903 to 0e544d1 Compare April 9, 2025 21:21
@netsirius netsirius force-pushed the use-subscribe-flag branch from 7859aa5 to 4f5f218 Compare April 10, 2025 18:46
@netsirius netsirius requested a review from iduartgomez April 10, 2025 20:25
@iduartgomez iduartgomez merged commit 03f1661 into main Apr 11, 2025
6 checks passed
@iduartgomez iduartgomez deleted the use-subscribe-flag branch April 11, 2025 13:46
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
3 participants