Adding extension for primitive types required and exported from rust-…#398
Adding extension for primitive types required and exported from rust-…#398Sansh2356 wants to merge 14 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a rust_btc_wrapper module intended to carve out a small set of Bitcoin-network primitives (Network/HRP/Params/Address parsing) needed for CPUNet support, reducing reliance on maintaining a full custom rust-bitcoin fork, and updates coinbase address error plumbing accordingly (Issue #396).
Changes:
- Added
rust_btc_wrappermodules forNetworkExtension, chainParams, HRP constants, and a customAddressparser scaffold. - Updated
CoinbaseError::AddressErrorto wrap a new crate-levelParseErrorand adjusted coinbase template address parsing error mapping. - Added
bitcoin-internalsdependency and exported the new wrapper module fromnode.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 13 comments.
Show a summary per file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Updating this PR instead of closing with newer adaptation of implementing the |
06e189e to
7d8bbc7
Compare
zaidmstrr
left a comment
There was a problem hiding this comment.
Approach ACK dc1fd3e
Thanks for taking this up. The approach used here is exactly what I thought initially about creating a separate utility file which serves the purpose of custom cpunet. This PR does the exact same. I haven't reviewed the code yet.
dc1fd3e to
bc19ce9
Compare
9c1d2c6 to
60eeb25
Compare
zaidmstrr
left a comment
There was a problem hiding this comment.
As the goal of this PR is to remove the cpunet dependency from the custom rust-bitcoin. But I still see the dependency of custom rust-bitcoin in Cargo.toml. I think it would be good if you replaced that with the non custom version of it.
a02cb3d to
62b2c97
Compare
zaidmstrr
left a comment
There was a problem hiding this comment.
I have some suggestions described below. You can look at them.
|
@zaidmstrr applied the suggestions . |
|
● PR #398 status: NEEDS‑WORK. Multiple reviewers agree the cpunet hash migration isn’t fully wired through, and there High‑priority blockers
Medium / notes
|
7213fa9 to
84cc859
Compare
The issue number 2 have been identified earlier and require separation of DB structures according to the network kind being used, will be filing an issue with regards to this by tomorrow . |
84cc859 to
7dff966
Compare
7dff966 to
12b3ea4
Compare
ce722ed to
6c79f41
Compare
6c79f41 to
b00ddda
Compare
…ation of cpunet removing the previous exts error enums
fix: updating the lockfile
Removing inline wrappers in cpunet module and changing like name() etc.
…common Moving the cpunet module into separate crate and updating the workspace, updating the import paths and Cargo.toml accordingly. This is aimed at using the common utils to be exported from the commons crate across all the sub-crates present which will help in maintaining structure and less coupling required due to separate imports .
chore: updating tests with network as function param
b00ddda to
17d423f
Compare

Network,HrpandParamsto reduce the issue of maintaining both the bech32 and rust-bitcoin fork as per our deps that will also hamper the SV2 integration due to mixed version of same deps and also will include the extensions required to supportcpunet.cpunetsuch as genesis block hash and Magic which is required for establishing the p2p message communication but were not in use or would not be used at least in the near changes so have not included those.rust-bitcoindependency #396 .