Skip to content

Commit 9f4ebc7

Browse files
committed
remove "abcipp" feature
1 parent 7116b6a commit 9f4ebc7

39 files changed

+173
-2502
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ check-mainnet:
8383
check-crates:
8484
$(foreach p,$(crates), echo "Checking $(p)" && cargo +$(nightly) check -Z unstable-options --tests -p $(p) && ) \
8585
make -C $(wasms_for_tests) check && \
86-
cargo check --package namada --target wasm32-unknown-unknown --no-default-features --features "abciplus,namada-sdk"
86+
cargo check --package namada --target wasm32-unknown-unknown --no-default-features --features "namada-sdk"
8787

8888
clippy-wasm = $(cargo) +$(nightly) clippy --manifest-path $(wasm)/Cargo.toml --all-targets -- -D warnings
8989

apps/Cargo.toml

+2-6
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ name = "namadar"
5050
path = "src/bin/namada-relayer/main.rs"
5151

5252
[features]
53-
default = ["std", "abciplus"]
53+
default = ["std"]
5454
mainnet = [
5555
"namada/mainnet",
5656
]
@@ -59,14 +59,10 @@ std = ["ed25519-consensus/std", "rand/std", "rand_core/std", "namada/std", "nama
5959
testing = ["namada_test_utils"]
6060
benches = ["testing", "namada_test_utils"]
6161
integration = []
62-
abciplus = [
63-
"namada/abciplus",
64-
"namada/tendermint-rpc",
65-
]
6662

6763

6864
[dependencies]
69-
namada = {path = "../shared", features = ["ferveo-tpke", "masp-tx-gen", "multicore", "http-client"]}
65+
namada = {path = "../shared", features = ["ferveo-tpke", "masp-tx-gen", "multicore", "http-client", "tendermint-rpc"]}
7066
namada_sdk = {path = "../sdk", default-features = false, features = ["wasm-runtime", "masp-tx-gen"]}
7167
namada_test_utils = {path = "../test_utils", optional = true}
7268
ark-serialize.workspace = true

apps/src/lib/mod.rs

+2-15
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,6 @@ pub mod wasm_loader;
2121
pub use std;
2222

2323
pub mod facade {
24-
//! Facade module to reason about `abcipp` feature flag logic.
25-
26-
#[cfg(not(feature = "abcipp"))]
27-
pub use {
28-
namada::tendermint, namada::tendermint_proto, namada::tendermint_rpc,
29-
tendermint_config, tower_abci,
30-
};
31-
#[cfg(feature = "abcipp")]
32-
pub use {
33-
tendermint_abcipp as tendermint,
34-
tendermint_config_abcipp as tendermint_config,
35-
tendermint_proto_abcipp as tendermint_proto,
36-
tendermint_rpc_abcipp as tendermint_rpc,
37-
tower_abci_abcipp as tower_abci,
38-
};
24+
pub use namada::{tendermint, tendermint_proto, tendermint_rpc};
25+
pub use {tendermint_config, tower_abci};
3926
}

apps/src/lib/node/ledger/shell/finalize_block.rs

-50
Original file line numberDiff line numberDiff line change
@@ -223,56 +223,6 @@ where
223223
self.allow_tx_replay(wrapper_tx);
224224
}
225225

226-
#[cfg(not(any(feature = "abciplus", feature = "abcipp")))]
227-
if let TxType::Wrapper(wrapper) = &tx_header.tx_type {
228-
// Charge fee if wrapper transaction went out of gas or
229-
// failed because of fees
230-
let error_code =
231-
ErrorCodes::from_u32(processed_tx.result.code).unwrap();
232-
if (error_code == ErrorCodes::TxGasLimit)
233-
| (error_code == ErrorCodes::FeeError)
234-
{
235-
let masp_transaction = wrapper
236-
.unshield_section_hash
237-
.map(|ref hash| {
238-
tx.get_section(hash)
239-
.map(|section| {
240-
if let Section::MaspTx(transaction) =
241-
section
242-
{
243-
Some(transaction.to_owned())
244-
} else {
245-
None
246-
}
247-
})
248-
.flatten()
249-
})
250-
.flatten();
251-
if let Err(msg) = protocol::charge_fee(
252-
wrapper,
253-
masp_transaction,
254-
ShellParams::new(
255-
TxGasMeter::new_from_sub_limit(u64::MAX),
256-
&mut self.wl_storage,
257-
&mut self.vp_wasm_cache,
258-
&mut self.tx_wasm_cache,
259-
),
260-
Some(&native_block_proposer_address),
261-
&mut BTreeSet::default(),
262-
) {
263-
self.wl_storage.write_log.drop_tx();
264-
tracing::error!(
265-
"Rejected wrapper tx {} could not pay fee: {}",
266-
Hash::sha256(
267-
tx::try_from(processed_tx.as_ref())
268-
.unwrap()
269-
),
270-
msg
271-
)
272-
}
273-
}
274-
}
275-
276226
continue;
277227
}
278228

apps/src/lib/node/ledger/shell/mod.rs

-13
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ impl ShellMode {
339339

340340
/// If this node is a validator, broadcast a tx
341341
/// to the mempool using the broadcaster subprocess
342-
#[cfg_attr(feature = "abcipp", allow(dead_code))]
343342
pub fn broadcast(&self, data: Vec<u8>) {
344343
if let Self::Validator {
345344
broadcast_sender, ..
@@ -1059,7 +1058,6 @@ where
10591058
tx_bytes: &[u8],
10601059
r#_type: MempoolTxType,
10611060
) -> response::CheckTx {
1062-
#[cfg(not(feature = "abcipp"))]
10631061
use namada::types::transaction::protocol::{
10641062
ethereum_tx_data_variants, ProtocolTxType,
10651063
};
@@ -1134,7 +1132,6 @@ where
11341132

11351133
match tx_type.tx_type {
11361134
TxType::Protocol(protocol_tx) => match protocol_tx.tx {
1137-
#[cfg(not(feature = "abcipp"))]
11381135
ProtocolTxType::EthEventsVext => {
11391136
let ext = try_vote_extension!(
11401137
"Ethereum events",
@@ -1156,7 +1153,6 @@ where
11561153
response.log = String::from(VALID_MSG);
11571154
}
11581155
}
1159-
#[cfg(not(feature = "abcipp"))]
11601156
ProtocolTxType::BridgePoolVext => {
11611157
let ext = try_vote_extension!(
11621158
"Bridge pool roots",
@@ -1180,7 +1176,6 @@ where
11801176
response.log = String::from(VALID_MSG);
11811177
}
11821178
}
1183-
#[cfg(not(feature = "abcipp"))]
11841179
ProtocolTxType::ValSetUpdateVext => {
11851180
let ext = try_vote_extension!(
11861181
"validator set update",
@@ -1839,14 +1834,6 @@ mod test_utils {
18391834
}
18401835
}
18411836

1842-
/// Get the only validator's voting power.
1843-
#[inline]
1844-
#[cfg(not(feature = "abcipp"))]
1845-
#[allow(dead_code)]
1846-
pub fn get_validator_bonded_stake() -> namada::types::token::Amount {
1847-
200_000_000_000.into()
1848-
}
1849-
18501837
/// Config parameters to set up a test shell.
18511838
pub struct SetupCfg<H> {
18521839
/// The last comitted block height.

0 commit comments

Comments
 (0)