Skip to content

Commit

Permalink
Sync with tag 'v0.15.4'
Browse files Browse the repository at this point in the history
Namada 0.15.4

* tag 'v0.15.4':
  Namada 0.15.4
  changelog: add #1407
  Fixes e2e tests
  changelog: add #1399
  Tendermint consensus params settable in Namada config
  Updates `InternalStats` display
  changelog: add #1405
  process_proposal: fix typos in test names
  prepare_proposal: add replay protection tests
  Adds replay protection checks in prepare_proposal
  Logs validation error in `process_proposal`
  • Loading branch information
tzemanovic committed May 21, 2023
2 parents 1c09b7b + 4580d38 commit b202b0f
Show file tree
Hide file tree
Showing 34 changed files with 479 additions and 172 deletions.
3 changes: 3 additions & 0 deletions .changelog/v0.15.4/bug-fixes/1405-bugfix-replay-prepare.md
@@ -0,0 +1,3 @@
- Fixed a bug in `prepare_proposal` causing the creation
of blocks containing already applied transactions.
([#1405](https://github.com/anoma/namada/pull/1405))
2 changes: 2 additions & 0 deletions .changelog/v0.15.4/improvements/1399-consensus_params.md
@@ -0,0 +1,2 @@
- Make Tendermint consensus paramenters configurable via Namada configuration.
([#1399](https://github.com/anoma/namada/pull/1399))
2 changes: 2 additions & 0 deletions .changelog/v0.15.4/improvements/1407-tx-validation-log.md
@@ -0,0 +1,2 @@
- Improved error logs in `process_proposal` and added more info to
`InternalStats` ([#1407](https://github.com/anoma/namada/pull/1407))
2 changes: 2 additions & 0 deletions .changelog/v0.15.4/summary.md
@@ -0,0 +1,2 @@
Namada 0.15.4 is a maintenance release addressing the invalid creation of blocks due to missing replay protection checks during prepare
proposal.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Expand Up @@ -24,6 +24,24 @@ applications). ([#925](https://github.com/anoma/namada/pull/925))
- Bump RocksDB crate to 0.21.0 to address compilation errors on certain C++
toolchains. ([#1366](https://github.com/anoma/namada/pull/1366))

## v0.15.4

Namada 0.15.4 is a maintenance release addressing the invalid creation of blocks due to missing replay protection checks during prepare
proposal.

### BUG FIXES

- Fixed a bug in `prepare_proposal` causing the creation
of blocks containing already applied transactions.
([#1405](https://github.com/anoma/namada/pull/1405))

### IMPROVEMENTS

- Make Tendermint consensus paramenters configurable via Namada configuration.
([#1399](https://github.com/anoma/namada/pull/1399))
- Improved error logs in `process_proposal` and added more info to
`InternalStats` ([#1407](https://github.com/anoma/namada/pull/1407))

## v0.15.3

Namada 0.15.3 is a maintenance release addressing the creation of
Expand Down
60 changes: 30 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions Cargo.toml
Expand Up @@ -37,21 +37,21 @@ async-process = {git = "https://github.com/heliaxdev/async-process.git", rev = "
# borsh-schema-derive-internal = {path = "../borsh-rs/borsh-schema-derive-internal"}

# patched to a commit on the `eth-bridge-integration+consensus-timeout` branch of our fork
tendermint = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "4db3c5ea09fae4057008d22bf9e96bf541b55b35"}
tendermint-config = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "4db3c5ea09fae4057008d22bf9e96bf541b55b35"}
tendermint-proto = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "4db3c5ea09fae4057008d22bf9e96bf541b55b35"}
tendermint-rpc = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "4db3c5ea09fae4057008d22bf9e96bf541b55b35"}
tendermint-testgen = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "4db3c5ea09fae4057008d22bf9e96bf541b55b35"}
tendermint-light-client-verifier = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "4db3c5ea09fae4057008d22bf9e96bf541b55b35"}
tendermint = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "02b256829e80f8cfecf3fa0d625c2a76c79cd043"}
tendermint-config = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "02b256829e80f8cfecf3fa0d625c2a76c79cd043"}
tendermint-proto = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "02b256829e80f8cfecf3fa0d625c2a76c79cd043"}
tendermint-rpc = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "02b256829e80f8cfecf3fa0d625c2a76c79cd043"}
tendermint-testgen = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "02b256829e80f8cfecf3fa0d625c2a76c79cd043"}
tendermint-light-client-verifier = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "02b256829e80f8cfecf3fa0d625c2a76c79cd043"}

# patched to a commit on the `eth-bridge-integration` branch of our fork
ibc = {git = "https://github.com/heliaxdev/cosmos-ibc-rs.git", rev = "2d7edc16412b60cabf78163fe24a6264e11f77a9"}
ibc-proto = {git = "https://github.com/heliaxdev/ibc-proto-rs.git", rev = "7e527b5b8c95d83351e93ceafc14ac853224283f"}
ibc-relayer = {git = "https://github.com/heliaxdev/hermes.git", rev = "8e2ff3479edc0653f34b22df450d451eedd2c2ab"}
ibc-relayer-types = {git = "https://github.com/heliaxdev/hermes.git", rev = "8e2ff3479edc0653f34b22df450d451eedd2c2ab"}
ibc = {git = "https://github.com/heliaxdev/cosmos-ibc-rs.git", rev = "e71bc2cc79f8c2b32e970d95312f251398c93d9e"}
ibc-proto = {git = "https://github.com/heliaxdev/ibc-proto-rs.git", rev = "6f4038fcf4981f1ed70771d1cd89931267f917af"}
ibc-relayer = {git = "https://github.com/heliaxdev/hermes.git", rev = "a4ad1355fc0b05908881854aa27221cb2b878ac5"}
ibc-relayer-types = {git = "https://github.com/heliaxdev/hermes.git", rev = "a4ad1355fc0b05908881854aa27221cb2b878ac5"}

# patched to a commit on the `eth-bridge-integration` branch of our fork
tower-abci = {git = "https://github.com/heliaxdev/tower-abci.git", rev = "79069a441cee7d9955a3d826d29656a0fb16115c"}
tower-abci = {git = "https://github.com/heliaxdev/tower-abci.git", rev = "367d8d958b83c501ed2c09e9c4595f8bf75a0b01"}

# patched to the yanked 1.2.0 until masp updates bitvec
funty = { git = "https://github.com/bitvecto-rs/funty/", rev = "7ef0d890fbcd8b3def1635ac1a877fc298488446" }
Expand Down
8 changes: 4 additions & 4 deletions apps/Cargo.toml
Expand Up @@ -126,10 +126,10 @@ signal-hook = "0.3.9"
sysinfo = {version = "=0.21.1", default-features = false}
tar = "0.4.37"
# temporarily using fork work-around
tendermint-abcipp = {package = "tendermint", git = "https://github.com/heliaxdev/tendermint-rs", rev = "4db3c5ea09fae4057008d22bf9e96bf541b55b35", optional = true}
tendermint-config-abcipp = {package = "tendermint-config", git = "https://github.com/heliaxdev/tendermint-rs", rev = "4db3c5ea09fae4057008d22bf9e96bf541b55b35", optional = true}
tendermint-proto-abcipp = {package = "tendermint-proto", git = "https://github.com/heliaxdev/tendermint-rs", rev = "4db3c5ea09fae4057008d22bf9e96bf541b55b35", optional = true}
tendermint-rpc-abcipp = {package = "tendermint-rpc", git = "https://github.com/heliaxdev/tendermint-rs", rev = "4db3c5ea09fae4057008d22bf9e96bf541b55b35", features = ["http-client", "websocket-client"], optional = true}
tendermint-abcipp = {package = "tendermint", git = "https://github.com/heliaxdev/tendermint-rs", rev = "02b256829e80f8cfecf3fa0d625c2a76c79cd043", optional = true}
tendermint-config-abcipp = {package = "tendermint-config", git = "https://github.com/heliaxdev/tendermint-rs", rev = "02b256829e80f8cfecf3fa0d625c2a76c79cd043", optional = true}
tendermint-proto-abcipp = {package = "tendermint-proto", git = "https://github.com/heliaxdev/tendermint-rs", rev = "02b256829e80f8cfecf3fa0d625c2a76c79cd043", optional = true}
tendermint-rpc-abcipp = {package = "tendermint-rpc", git = "https://github.com/heliaxdev/tendermint-rs", rev = "02b256829e80f8cfecf3fa0d625c2a76c79cd043", features = ["http-client", "websocket-client"], optional = true}
tendermint = {version = "0.23.6", optional = true}
tendermint-config = {version = "0.23.6", optional = true}
tendermint-proto = {version = "0.23.6", optional = true}
Expand Down
18 changes: 16 additions & 2 deletions apps/src/lib/config/mod.rs
Expand Up @@ -136,8 +136,13 @@ pub struct Tendermint {
/// Set `true` for strict address routability rules
/// Set `false` for private or local networks
pub p2p_addr_book_strict: bool,
/// How long we wait after committing a block, before starting on the new
/// height
/// Tendermint Consensus Parameters
pub consensus_timeout_propose: Timeout,
pub consensus_timeout_propose_delta: Timeout,
pub consensus_timeout_prevote: Timeout,
pub consensus_timeout_prevote_delta: Timeout,
pub consensus_timeout_precommit: Timeout,
pub consensus_timeout_precommit_delta: Timeout,
pub consensus_timeout_commit: Timeout,
pub tendermint_mode: TendermintMode,
pub instrumentation_prometheus: bool,
Expand Down Expand Up @@ -184,6 +189,15 @@ impl Ledger {
p2p_pex: true,
p2p_allow_duplicate_ip: false,
p2p_addr_book_strict: true,
consensus_timeout_propose: Timeout::from_str("3s").unwrap(),
consensus_timeout_propose_delta: Timeout::from_str("500ms")
.unwrap(),
consensus_timeout_prevote: Timeout::from_str("1s").unwrap(),
consensus_timeout_prevote_delta: Timeout::from_str("500ms")
.unwrap(),
consensus_timeout_precommit: Timeout::from_str("1s").unwrap(),
consensus_timeout_precommit_delta: Timeout::from_str("500ms")
.unwrap(),
consensus_timeout_commit: Timeout::from_str("1s").unwrap(),
tendermint_mode: mode,
instrumentation_prometheus: false,
Expand Down
1 change: 1 addition & 0 deletions apps/src/lib/node/ledger/shell/finalize_block.rs
Expand Up @@ -200,6 +200,7 @@ where

let (mut tx_event, tx_unsigned_hash) = match &tx_type {
TxType::Wrapper(wrapper) => {
stats.increment_wrapper_txs();
let mut tx_event = Event::new_tx_event(&tx_type, height.0);

// Writes both txs hash to storage
Expand Down

0 comments on commit b202b0f

Please sign in to comment.