Currently we are using a custom version of rust-bitcoin for our cpunet but in reality we need very few things to be customized from the rust-bitcoin; otherwise all other functionalities are needed the same as the original. But these small customisations have their own drawbacks, like maintaining a whole rust-bitcoin dependency and not being able to use the same functions for the other behaviours. For example, we are using the customized validate_pow function from the rust-bitcoin but we can't use the same function to compute the actual pow in any other places of the codebase because it was intended to be used as a customized one. This will lead to using the two rust-bitcoin dependencies (original and customized) which is more worse. The solution for this is to carve out the functions which need to be modified and implement them in the Braidpool under some file util.rs and use these functions for customized behaviour.
Currently we are using a custom version of rust-bitcoin for our cpunet but in reality we need very few things to be customized from the rust-bitcoin; otherwise all other functionalities are needed the same as the original. But these small customisations have their own drawbacks, like maintaining a whole rust-bitcoin dependency and not being able to use the same functions for the other behaviours. For example, we are using the customized
validate_powfunction from the rust-bitcoin but we can't use the same function to compute the actual pow in any other places of the codebase because it was intended to be used as a customized one. This will lead to using the two rust-bitcoin dependencies (original and customized) which is more worse. The solution for this is to carve out the functions which need to be modified and implement them in the Braidpool under some fileutil.rsand use these functions for customized behaviour.