namada icon indicating copy to clipboard operation
namada copied to clipboard

Updates to tendermint patching

Open james-chf opened this issue 2 years ago • 0 comments

Relates to https://github.com/anoma/namada/issues/825

This PR makes it so that we pull in tendermint-related dependencies directly via a git source as we used before. e.g.

tendermint = {package = "tendermint", git = "https://github.com/heliaxdev/tendermint-rs", rev = "e6c684731f21bffd89886d3e91074b96aee074ba"}

This makes more sense as the namada code does hard depend on our forks, and doesn't work with upstream tendermint-rs packages. By specifying our forks as direct dependencies, there is no longer a need to patch in the correct versions via the workspace Cargo.tomls. Unfortunately we obscure the versions of our forks from our Cargo.tomls, but the versions will still show up in cargo tree and when running cargo build, cargo check, etc.

The motivation for changing this in the first place was to make patching over tendermint-rs easier, but it is still possible to do this by patching one git source to a different once (see https://github.com/rust-lang/cargo/issues/5478 for why this is required) although it is a bit hacky e.g.

# example patch that we might have in the `eth-bridge-integration` branch, if we had to use a different version to what was in `main`
[patch."https://github.com/heliaxdev/tendermint-rs"]
tendermint = {git = "https://github.com/heliaxdev/tendermint-rs.git?branch=eth-bridge-integration", rev = "..."}

james-chf avatar Nov 25 '22 16:11 james-chf