Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
sol-242: remove subnet_name argument in manager
Browse files Browse the repository at this point in the history
  • Loading branch information
adlrocha committed Oct 13, 2023
1 parent 0518d7c commit c2f9d6c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 14 deletions.
3 changes: 0 additions & 3 deletions ipc/cli/src/commands/subnet/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ impl CreateSubnet {
.create_subnet(
from,
parent,
arguments.name.clone(),
arguments.min_validators,
f64_to_token_amount(arguments.min_validator_stake)?,
arguments.bottomup_check_period,
Expand Down Expand Up @@ -75,8 +74,6 @@ pub struct CreateSubnetArgs {
#[arg(long, short, help = "The parent subnet to create the new actor in")]
pub parent: String,
#[arg(long, short, help = "The name of the subnet")]
pub name: String,
#[arg(long, help = "The minimal validator stake amount (in whole FIL units)")]
pub min_validator_stake: f64,
#[arg(long, help = "The minimal number of validators")]
pub min_validators: u64,
Expand Down
2 changes: 0 additions & 2 deletions ipc/provider/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ impl IpcProvider {
&mut self,
from: Option<Address>,
parent: SubnetID,
subnet_name: String,
min_validators: u64,
min_validator_stake: TokenAmount,
bottomup_check_period: ChainEpoch,
Expand All @@ -244,7 +243,6 @@ impl IpcProvider {

let constructor_params = ConstructParams {
parent,
name: subnet_name,
ipc_gateway_addr: subnet_config.gateway_addr(),
consensus: ConsensusType::Mir,
min_validators,
Expand Down
8 changes: 0 additions & 8 deletions ipc/provider/src/manager/evm/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const TRANSACTION_RECEIPT_RETRIES: usize = 200;

/// The majority vote percentage for checkpoint submission when creating a subnet.
const SUBNET_MAJORITY_PERCENTAGE: u8 = 60;
const SUBNET_NAME_MAX_LEN: usize = 32;

pub struct EthSubnetManager {
keystore: Arc<RwLock<PersistentKeyStore<EthKeyAddress>>>,
Expand Down Expand Up @@ -202,13 +201,6 @@ impl SubnetManager for EthSubnetManager {
async fn create_subnet(&self, from: Address, params: ConstructParams) -> Result<Address> {
self.ensure_same_gateway(&params.ipc_gateway_addr)?;

let name_len = params.name.as_bytes().len();
if name_len > SUBNET_NAME_MAX_LEN {
return Err(anyhow!("subnet name too long"));
}
let mut name = [0u8; SUBNET_NAME_MAX_LEN];
name[0..name_len].copy_from_slice(params.name.as_bytes());

let min_validator_stake = params
.min_validator_stake
.atto()
Expand Down
1 change: 0 additions & 1 deletion ipc/sdk/src/subnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ pub const MANIFEST_ID: &str = "ipc_subnet_actor";
#[derive(Clone, Debug, Serialize_tuple, Deserialize_tuple, PartialEq, Eq)]
pub struct ConstructParams {
pub parent: SubnetID,
pub name: String,
pub ipc_gateway_addr: Address,
pub consensus: ConsensusType,
pub min_validator_stake: TokenAmount,
Expand Down

0 comments on commit c2f9d6c

Please sign in to comment.