diff --git a/chain/open-block/src/lib.rs b/chain/open-block/src/lib.rs index 54104c4440..7df7510ecd 100644 --- a/chain/open-block/src/lib.rs +++ b/chain/open-block/src/lib.rs @@ -10,7 +10,6 @@ use starcoin_logger::prelude::*; use starcoin_state_api::{ChainStateReader, ChainStateWriter}; use starcoin_statedb::ChainStateDB; use starcoin_storage::Store; -use starcoin_types::block::BlockNumber; use starcoin_types::genesis_config::{ChainId, ConsensusStrategy}; use starcoin_types::vm_error::KeptVMStatus; use starcoin_types::{ @@ -137,17 +136,9 @@ impl OpenedBlock { /// as the internal state may be corrupted. /// TODO: make the function can be called again even last call returns error. pub fn push_txns(&mut self, user_txns: Vec) -> Result { - let mut discard_txns: Vec = Vec::new(); let mut txns: Vec<_> = user_txns - .into_iter() - .filter(|txn| { - let is_blacklisted = AddressFilter::is_blacklisted(txn, self.block_number()); - // Discard the txns send by the account in black list after a block number. - if is_blacklisted { - discard_txns.push(txn.clone()); - } - !is_blacklisted - }) + .iter() + .cloned() .map(Transaction::UserTransaction) .collect(); @@ -174,6 +165,8 @@ impl OpenedBlock { .map(|t| t.try_into().expect("user txn")) .collect() }; + + let mut discard_txns: Vec = Vec::new(); debug_assert_eq!(txns.len(), txn_outputs.len()); for (txn, output) in txns.into_iter().zip(txn_outputs.into_iter()) { let txn_hash = txn.id(); @@ -295,16 +288,3 @@ impl OpenedBlock { Ok(block_template) } } -pub struct AddressFilter; -//static BLACKLIST: [&str; 0] = []; -impl AddressFilter { - const ACTIVATION_BLOCK_NUMBER: BlockNumber = 16801958; - pub fn is_blacklisted(_raw_txn: &SignedUserTransaction, block_number: BlockNumber) -> bool { - block_number > Self::ACTIVATION_BLOCK_NUMBER - /*&& BLACKLIST - .iter() - .map(|&s| AccountAddress::from_str(s).expect("account address decode must success")) - .any(|x| x == raw_txn.sender()) - */ - } -} diff --git a/chain/src/verifier/mod.rs b/chain/src/verifier/mod.rs index 3994d99f8d..247129eb35 100644 --- a/chain/src/verifier/mod.rs +++ b/chain/src/verifier/mod.rs @@ -8,7 +8,6 @@ use starcoin_chain_api::{ }; use starcoin_consensus::{Consensus, ConsensusVerifyError}; use starcoin_logger::prelude::debug; -use starcoin_open_block::AddressFilter; use starcoin_types::block::{Block, BlockHeader, ALLOWED_FUTURE_BLOCKTIME}; use std::{collections::HashSet, str::FromStr}; @@ -69,7 +68,6 @@ pub trait BlockVerifier { watch(CHAIN_WATCH_NAME, "n11"); //verify header let new_block_header = new_block.header(); - Self::verify_blacklisted_txns(&new_block)?; Self::verify_header(current_chain, new_block_header)?; watch(CHAIN_WATCH_NAME, "n12"); StaticVerifier::verify_body_hash(&new_block)?; @@ -84,18 +82,6 @@ pub trait BlockVerifier { Ok(VerifiedBlock(new_block)) } - fn verify_blacklisted_txns(new_block: &Block) -> Result<()> { - let block_number = new_block.header().number(); - for txn in new_block.transactions() { - verify_block!( - VerifyBlockField::Body, - !AddressFilter::is_blacklisted(txn, block_number), - "Invalid block: the sender of transaction in block must be not blacklisted" - ); - } - Ok(()) - } - fn verify_uncles( current_chain: &R, uncles: &[BlockHeader], diff --git a/kube/manifest/starcoin-barnard.yaml b/kube/manifest/starcoin-barnard.yaml index fc1242e044..fc4ced5af3 100644 --- a/kube/manifest/starcoin-barnard.yaml +++ b/kube/manifest/starcoin-barnard.yaml @@ -23,7 +23,7 @@ spec: starcoin/node-pool: seed-pool containers: - name: starcoin - image: ghcr.io/starcoinorg/starcoin:v1.13.8 + image: ghcr.io/starcoinorg/starcoin:v1.13.10-alpha.0.barnard imagePullPolicy: Always command: - bash diff --git a/storage/src/upgrade.rs b/storage/src/upgrade.rs index d4a57a38e1..6336bbca83 100644 --- a/storage/src/upgrade.rs +++ b/storage/src/upgrade.rs @@ -22,10 +22,10 @@ use std::cmp::Ordering; pub struct DBUpgrade; -pub static BARNARD_HARD_FORK_HEIGHT: BlockNumber = 16057420; +pub static BARNARD_HARD_FORK_HEIGHT: BlockNumber = 21306000; pub static BARNARD_HARD_FORK_HASH: Lazy = Lazy::new(|| { HashValue::from_hex_literal( - "0x602bb269e3a221510f82b0b812304e767457f73ac3203663bd401ef3d29bcc97", + "0x0956f14b6d593e9b8758b386cf2cae098dffb1f0d0d1dba0137ff7f8f13cc088", ) .expect("") });