Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ledger: remove PoW/faucet #1873

Merged
merged 2 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/1873-remove-pow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Remove pay-fee-with-pow feature and faucet vp.
([\#1873](https://github.com/anoma/namada/pull/1873))
2 changes: 0 additions & 2 deletions apps/src/lib/client/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,6 @@ pub async fn submit_init_validator<
&mut tx,
signing_data.fee_payer.clone(),
None,
#[cfg(not(feature = "mainnet"))]
false,
)
.await?;

Expand Down
28 changes: 0 additions & 28 deletions apps/src/lib/config/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ use borsh::{BorshDeserialize, BorshSerialize};
use derivative::Derivative;
use namada::core::ledger::governance::parameters::GovernanceParameters;
use namada::core::ledger::pgf::parameters::PgfParameters;
#[cfg(not(feature = "mainnet"))]
use namada::core::ledger::testnet_pow;
use namada::ledger::eth_bridge::EthereumBridgeConfig;
use namada::ledger::parameters::EpochDuration;
use namada::ledger::pos::{Dec, GenesisValidator, PosParams};
Expand All @@ -32,8 +30,6 @@ pub mod genesis_config {
use eyre::Context;
use namada::core::ledger::governance::parameters::GovernanceParameters;
use namada::core::ledger::pgf::parameters::PgfParameters;
#[cfg(not(feature = "mainnet"))]
use namada::core::ledger::testnet_pow;
use namada::ledger::parameters::EpochDuration;
use namada::ledger::pos::{Dec, GenesisValidator, PosParams};
use namada::types::address::Address;
Expand All @@ -42,7 +38,6 @@ pub mod genesis_config {
use namada::types::key::*;
use namada::types::time::Rfc3339String;
use namada::types::token::Denomination;
use namada::types::uint::Uint;
use namada::types::{storage, token};
use serde::{Deserialize, Serialize};
use thiserror::Error;
Expand Down Expand Up @@ -116,13 +111,6 @@ pub mod genesis_config {
// Name of the native token - this must one of the tokens included in
// the `token` field
pub native_token: String,
#[cfg(not(feature = "mainnet"))]
/// Testnet faucet PoW difficulty - defaults to `0` when not set
pub faucet_pow_difficulty: Option<testnet_pow::Difficulty>,
#[cfg(not(feature = "mainnet"))]
/// Testnet faucet withdrawal limit - defaults to 1000 tokens when not
/// set
pub faucet_withdrawal_limit: Option<Uint>,
// Initial validator set
pub validator: HashMap<String, ValidatorConfig>,
// Token accounts present at genesis
Expand Down Expand Up @@ -535,10 +523,6 @@ pub mod genesis_config {
let GenesisConfig {
genesis_time,
native_token,
#[cfg(not(feature = "mainnet"))]
faucet_pow_difficulty,
#[cfg(not(feature = "mainnet"))]
faucet_withdrawal_limit,
validator,
token,
established,
Expand Down Expand Up @@ -699,10 +683,6 @@ pub mod genesis_config {
let mut genesis = Genesis {
genesis_time: genesis_time.try_into().unwrap(),
native_token,
#[cfg(not(feature = "mainnet"))]
faucet_pow_difficulty,
#[cfg(not(feature = "mainnet"))]
faucet_withdrawal_limit,
validators: validators.into_values().collect(),
token_accounts,
established_accounts: established_accounts.into_values().collect(),
Expand Down Expand Up @@ -753,10 +733,6 @@ pub mod genesis_config {
pub struct Genesis {
pub genesis_time: DateTimeUtc,
pub native_token: Address,
#[cfg(not(feature = "mainnet"))]
pub faucet_pow_difficulty: Option<testnet_pow::Difficulty>,
#[cfg(not(feature = "mainnet"))]
pub faucet_withdrawal_limit: Option<Uint>,
pub validators: Vec<Validator>,
pub token_accounts: Vec<TokenAccount>,
pub established_accounts: Vec<EstablishedAccount>,
Expand Down Expand Up @@ -1157,10 +1133,6 @@ pub fn genesis(num_validators: u64) -> Genesis {
},
}),
native_token: address::nam(),
#[cfg(not(feature = "mainnet"))]
faucet_pow_difficulty: None,
#[cfg(not(feature = "mainnet"))]
faucet_withdrawal_limit: None,
}
}

Expand Down
Loading
Loading