Skip to content

Commit

Permalink
Merge branch 'tomas/vp-less-permissive' (anoma#2213)
Browse files Browse the repository at this point in the history
* origin/tomas/vp-less-permissive:
  additions from comments
  wasm/vp_user+vp_implicit: update for IBC actions
  benches: fix foreign key write tx sigs
  wasm/vp_user+vp_implicit: always print rejected keys
  wasm/vp_user+vp_implicit: impl PoS key checks
  changelog: add anoma#2213
  wasm/vp_implicit: require valid sig for unknown changes
  wasm/vp_user: require valid sig for unknown changes
  wasm/vp_implicit: port Masp and PgfSteward key handling from vp_user
  wasm/vp_user: fix a typo
  • Loading branch information
brentstone committed Dec 29, 2023
2 parents 6c6b3bf + 763ea16 commit c6b3f39
Show file tree
Hide file tree
Showing 7 changed files with 634 additions and 280 deletions.
3 changes: 3 additions & 0 deletions .changelog/unreleased/improvements/2213-vp-less-permissive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- The default implicit and established user account VPs now
require valid signature(s) for unknown storage changes.
([\#2213](https://github.com/anoma/namada/pull/2213))
5 changes: 2 additions & 3 deletions benches/vps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ fn vp_implicit(c: &mut Criterion) {
.try_to_sk()
.unwrap();

let foreign_key_write =
generate_foreign_key_tx(&defaults::albert_keypair());
let foreign_key_write = generate_foreign_key_tx(&implicit_account);

let shell = BenchShell::default();
let transfer = shell.generate_tx(
Expand Down Expand Up @@ -327,7 +326,7 @@ fn vp_validator(c: &mut Criterion) {
let mut group = c.benchmark_group("vp_validator");

let foreign_key_write =
generate_foreign_key_tx(&defaults::albert_keypair());
generate_foreign_key_tx(&defaults::validator_account_keypair());

let transfer = shell.generate_tx(
TX_TRANSFER_WASM,
Expand Down
2 changes: 2 additions & 0 deletions core/src/types/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ pub const POS_SLASH_POOL: Address =
pub const GOV: Address = Address::Internal(InternalAddress::Governance);
/// Internal MASP address
pub const MASP: Address = Address::Internal(InternalAddress::Masp);
/// Internal Multitoken address
pub const MULTITOKEN: Address = Address::Internal(InternalAddress::Multitoken);

/// Error from decoding address from string
pub type DecodeError = string_encoding::DecodeError;
Expand Down
1 change: 1 addition & 0 deletions core/src/types/ibc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use crate::ibc::apps::transfer::types::{Memo, PrefixedDenom, TracePath};
use crate::ibc::core::handler::types::events::{
Error as IbcEventError, IbcEvent as RawIbcEvent,
};
pub use crate::ledger::ibc::storage::is_ibc_key;
use crate::tendermint::abci::Event as AbciEvent;
use crate::types::masp::PaymentAddress;

Expand Down
Loading

0 comments on commit c6b3f39

Please sign in to comment.