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

chore(ckbtc): add check_transaction_query method to Bitcoin checker #3454

Merged

Conversation

lpahlavi
Copy link
Contributor

@lpahlavi lpahlavi commented Jan 15, 2025

(XC-194) Query interface to retrieve check_transaction status.

The check_transaction call requires cycles to execute due to to the HTTP outcalls it has to perform. However, in the event a transaction and all of its inputs have already been loaded to the cache in heap memory, no HTTP calls are required. This new query method therefore checks whether a transaction status may be obtained using only cached information, and if so, returns it without charging any cycles.

@github-actions github-actions bot added the chore label Jan 15, 2025
@lpahlavi lpahlavi force-pushed the lpahlavi/XC-194-query-retrieve-check-transaction-status branch 2 times, most recently from f4bfb78 to 5354b6f Compare January 15, 2025 10:44
@lpahlavi lpahlavi force-pushed the lpahlavi/XC-194-query-retrieve-check-transaction-status branch from 5354b6f to 0331d1d Compare January 23, 2025 14:08
@lpahlavi lpahlavi force-pushed the lpahlavi/XC-194-query-retrieve-check-transaction-status branch from 0331d1d to 3184c66 Compare January 23, 2025 14:14
@lpahlavi lpahlavi added the CI_ALL_BAZEL_TARGETS Runs all bazel targets and uploads them to S3 label Jan 23, 2025
@lpahlavi lpahlavi marked this pull request as ready for review January 23, 2025 14:19
@lpahlavi lpahlavi requested a review from a team as a code owner January 23, 2025 14:19
Copy link
Member

@gregorydemay gregorydemay left a comment

Choose a reason for hiding this comment

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

Thanks @lpahlavi for this PR! Some preliminary comments.

rs/bitcoin/checker/src/fetch.rs Outdated Show resolved Hide resolved
rs/bitcoin/checker/src/main.rs Outdated Show resolved Hide resolved
rs/bitcoin/checker/btc_checker_canister.did Outdated Show resolved Hide resolved
rs/bitcoin/checker/btc_checker_canister.did Outdated Show resolved Hide resolved
rs/bitcoin/checker/src/main.rs Outdated Show resolved Hide resolved
@lpahlavi
Copy link
Contributor Author

@gregorydemay Thanks a lot for the feedback! I've implemented your suggested changes, and will wait for @ninegua's +1 before adding all of the required tests.

Copy link
Member

@gregorydemay gregorydemay left a comment

Choose a reason for hiding this comment

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

Thanks a lot @lpahlavi for this PR!

@lpahlavi lpahlavi added this pull request to the merge queue Feb 6, 2025
Merged via the queue into master with commit 8dc1b0d Feb 6, 2025
25 checks passed
@lpahlavi lpahlavi deleted the lpahlavi/XC-194-query-retrieve-check-transaction-status branch February 6, 2025 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore CI_ALL_BAZEL_TARGETS Runs all bazel targets and uploads them to S3 @cross-chain-team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants