diff --git a/.changelog/unreleased/bug-fixes/1949-pow-solution-fix.md b/.changelog/unreleased/bug-fixes/1949-pow-solution-fix.md new file mode 100644 index 0000000000..6addee1bdd --- /dev/null +++ b/.changelog/unreleased/bug-fixes/1949-pow-solution-fix.md @@ -0,0 +1,2 @@ +- Reintroduced a dummy field in order to achieve compatibility with hardware + wallet. ([\#1949](https://github.com/anoma/namada/pull/1949)) \ No newline at end of file diff --git a/apps/src/lib/node/ledger/shell/process_proposal.rs b/apps/src/lib/node/ledger/shell/process_proposal.rs index a83bc7f62e..4968faa050 100644 --- a/apps/src/lib/node/ledger/shell/process_proposal.rs +++ b/apps/src/lib/node/ledger/shell/process_proposal.rs @@ -963,7 +963,7 @@ mod test_process_proposal { use namada::types::token; use namada::types::token::Amount; use namada::types::transaction::protocol::EthereumTxData; - use namada::types::transaction::{Fee, WrapperTx}; + use namada::types::transaction::{Fee, Solution, WrapperTx}; #[cfg(feature = "abcipp")] use namada::types::vote_extensions::bridge_pool_roots::MultiSignedVext; #[cfg(feature = "abcipp")] @@ -1968,6 +1968,7 @@ mod test_process_proposal { epoch: Epoch(0), gas_limit: GAS_LIMIT_MULTIPLIER.into(), unshield_section_hash: None, + pow_solution: Solution::None, }; let tx = Tx::from_type(TxType::Wrapper(Box::new(wrapper))); diff --git a/core/src/types/transaction/wrapper.rs b/core/src/types/transaction/wrapper.rs index 1064833925..4603081d3f 100644 --- a/core/src/types/transaction/wrapper.rs +++ b/core/src/types/transaction/wrapper.rs @@ -165,6 +165,21 @@ pub mod wrapper_tx { } } + /// A degenerate PoW solution type + #[derive( + Debug, + Clone, + BorshSerialize, + BorshDeserialize, + BorshSchema, + Serialize, + Deserialize, + )] + pub enum Solution { + /// No PoW solution + None, + } + /// A transaction with an encrypted payload, an optional shielded pool /// unshielding tx for fee payment and some non-encrypted metadata for /// inclusion and / or verification purposes @@ -191,6 +206,8 @@ pub mod wrapper_tx { /// The hash of the optional, unencrypted, unshielding transaction for /// fee payment pub unshield_section_hash: Option, + /// Mandatory 0x00 byte for deprecated field + pub pow_solution: Solution, } impl WrapperTx { @@ -212,6 +229,7 @@ pub mod wrapper_tx { epoch, gas_limit, unshield_section_hash: unshield_hash, + pow_solution: Solution::None, } }