diff --git a/contrib/tools/config-docs-generator/tests/fixtures/minimal_config.json b/contrib/tools/config-docs-generator/tests/fixtures/minimal_config.json
index 3ede4781ca..7d0b8edd52 100644
--- a/contrib/tools/config-docs-generator/tests/fixtures/minimal_config.json
+++ b/contrib/tools/config-docs-generator/tests/fixtures/minimal_config.json
@@ -48,7 +48,7 @@
},
{
"name": "miner",
- "description": "Flag indicating whether this node should activate its mining logic and attempt to\nproduce Stacks blocks. Setting this to `true` typically requires providing\nnecessary private keys (either [`NodeConfig::seed`] or [`MinerConfig::mining_key`]).\nIt also influences default behavior for settings like\n[`NodeConfig::require_affirmed_anchor_blocks`].",
+ "description": "Flag indicating whether this node should activate its mining logic and attempt to\nproduce Stacks blocks. Setting this to `true` typically requires providing\nnecessary private keys (either [`NodeConfig::seed`] or [`MinerConfig::mining_key`]).",
"default_value": "`false`",
"notes": null,
"deprecated": null,
@@ -74,7 +74,6 @@
"referenced_constants": {
"MinerConfig::mining_key": null,
"NodeConfig::miner": null,
- "NodeConfig::mine_microblocks": null,
- "NodeConfig::require_affirmed_anchor_blocks": null
+ "NodeConfig::mine_microblocks": null
}
}
\ No newline at end of file
diff --git a/stacks-node/src/main.rs b/stacks-node/src/main.rs
index 9ffbcd8bb4..c1b7c9e99a 100644
--- a/stacks-node/src/main.rs
+++ b/stacks-node/src/main.rs
@@ -139,7 +139,6 @@ fn cli_get_miner_spend(
&mut sortdb,
&burnchain,
&OnChainRewardSetProvider(no_dispatcher),
- config.node.always_use_affirmation_maps,
)
.unwrap();
diff --git a/stacks-node/src/neon_node.rs b/stacks-node/src/neon_node.rs
index 9fddda7d7e..8d09a3abc8 100644
--- a/stacks-node/src/neon_node.rs
+++ b/stacks-node/src/neon_node.rs
@@ -2109,7 +2109,6 @@ impl BlockMinerThread {
burn_db,
&self.burnchain,
&OnChainRewardSetProvider::new(),
- self.config.node.always_use_affirmation_maps,
) {
Ok(x) => x,
Err(e) => {
diff --git a/stacks-node/src/run_loop/nakamoto.rs b/stacks-node/src/run_loop/nakamoto.rs
index 3029d10754..362d314d24 100644
--- a/stacks-node/src/run_loop/nakamoto.rs
+++ b/stacks-node/src/run_loop/nakamoto.rs
@@ -323,11 +323,6 @@ impl RunLoop {
let mut fee_estimator = moved_config.make_fee_estimator();
let coord_config = ChainsCoordinatorConfig {
- assume_present_anchor_blocks: moved_config.node.assume_present_anchor_blocks,
- always_use_affirmation_maps: moved_config.node.always_use_affirmation_maps,
- require_affirmed_anchor_blocks: moved_config
- .node
- .require_affirmed_anchor_blocks,
txindex: moved_config.node.txindex,
};
ChainsCoordinator::run(
diff --git a/stacks-node/src/run_loop/neon.rs b/stacks-node/src/run_loop/neon.rs
index bdb370527d..11ee5bbb00 100644
--- a/stacks-node/src/run_loop/neon.rs
+++ b/stacks-node/src/run_loop/neon.rs
@@ -13,9 +13,8 @@ use stacks::chainstate::burn::db::sortdb::SortitionDB;
use stacks::chainstate::burn::{BlockSnapshot, ConsensusHash};
use stacks::chainstate::coordinator::comm::{CoordinatorChannels, CoordinatorReceivers};
use stacks::chainstate::coordinator::{
- migrate_chainstate_dbs, static_get_canonical_affirmation_map,
- static_get_heaviest_affirmation_map, static_get_stacks_tip_affirmation_map, ChainsCoordinator,
- ChainsCoordinatorConfig, CoordinatorCommunication, Error as coord_error,
+ migrate_chainstate_dbs, ChainsCoordinator, ChainsCoordinatorConfig, CoordinatorCommunication,
+ Error as coord_error,
};
use stacks::chainstate::stacks::db::{ChainStateBootData, StacksChainState};
use stacks::chainstate::stacks::miner::{signal_mining_blocked, signal_mining_ready, MinerStatus};
@@ -702,11 +701,6 @@ impl RunLoop {
let mut fee_estimator = moved_config.make_fee_estimator();
let coord_config = ChainsCoordinatorConfig {
- assume_present_anchor_blocks: moved_config.node.assume_present_anchor_blocks,
- always_use_affirmation_maps: moved_config.node.always_use_affirmation_maps,
- require_affirmed_anchor_blocks: moved_config
- .node
- .require_affirmed_anchor_blocks,
txindex: moved_config.node.txindex,
};
ChainsCoordinator::run(
@@ -794,8 +788,6 @@ impl RunLoop {
fn drive_pox_reorg_stacks_block_processing(
globals: &Globals,
config: &Config,
- burnchain: &Burnchain,
- sortdb: &SortitionDB,
last_stacks_pox_reorg_recover_time: &mut u128,
) {
let miner_config = config.get_miner_config();
@@ -812,92 +804,10 @@ impl RunLoop {
return;
}
- // compare stacks and heaviest AMs
- let burnchain_db = burnchain
- .open_burnchain_db(false)
- .expect("FATAL: failed to open burnchain DB");
-
- let sn = SortitionDB::get_canonical_burn_chain_tip(sortdb.conn())
- .expect("FATAL: could not read sortition DB");
-
- let indexer = make_bitcoin_indexer(config, Some(globals.should_keep_running.clone()));
-
- let heaviest_affirmation_map = match static_get_heaviest_affirmation_map(
- burnchain,
- &indexer,
- &burnchain_db,
- sortdb,
- &sn.sortition_id,
- ) {
- Ok(am) => am,
- Err(e) => {
- warn!("Failed to find heaviest affirmation map: {e:?}");
- return;
- }
- };
-
- let highest_sn = SortitionDB::get_highest_known_burn_chain_tip(sortdb.conn())
- .expect("FATAL: could not read sortition DB");
-
- let canonical_burnchain_tip = burnchain_db
- .get_canonical_chain_tip()
- .expect("FATAL: could not read burnchain DB");
-
- let sortition_tip_affirmation_map =
- match SortitionDB::find_sortition_tip_affirmation_map(sortdb, &sn.sortition_id) {
- Ok(am) => am,
- Err(e) => {
- warn!("Failed to find sortition affirmation map: {e:?}");
- return;
- }
- };
-
- let stacks_tip_affirmation_map = static_get_stacks_tip_affirmation_map(
- &burnchain_db,
- sortdb,
- &sn.sortition_id,
- &sn.canonical_stacks_tip_consensus_hash,
- &sn.canonical_stacks_tip_hash,
- )
- .expect("FATAL: could not query stacks DB");
-
- if stacks_tip_affirmation_map.len() < heaviest_affirmation_map.len()
- || stacks_tip_affirmation_map
- .find_divergence(&heaviest_affirmation_map)
- .is_some()
- {
- // the sortition affirmation map might also be inconsistent, so we'll need to fix that
- // (i.e. the underlying sortitions) before we can fix the stacks fork
- if sortition_tip_affirmation_map.len() < heaviest_affirmation_map.len()
- || sortition_tip_affirmation_map
- .find_divergence(&heaviest_affirmation_map)
- .is_some()
- {
- debug!("Drive burn block processing: possible PoX reorg (sortition tip: {sortition_tip_affirmation_map}, heaviest: {heaviest_affirmation_map})");
- globals.coord().announce_new_burn_block();
- } else if highest_sn.block_height == sn.block_height
- && sn.block_height == canonical_burnchain_tip.block_height
- {
- // need to force an affirmation reorg because there will be no more burn block
- // announcements.
- debug!("Drive burn block processing: possible PoX reorg (sortition tip: {sortition_tip_affirmation_map}, heaviest: {heaviest_affirmation_map}, burn height {})", sn.block_height);
- globals.coord().announce_new_burn_block();
- }
-
- debug!(
- "Drive stacks block processing: possible PoX reorg (stacks tip: {stacks_tip_affirmation_map}, heaviest: {heaviest_affirmation_map})"
- );
- globals.coord().announce_new_stacks_block();
- } else {
- debug!(
- "Drive stacks block processing: no need (stacks tip: {stacks_tip_affirmation_map}, heaviest: {heaviest_affirmation_map})"
- );
-
- // announce a new stacks block to force the chains coordinator
- // to wake up anyways. this isn't free, so we have to make sure
- // the chain-liveness thread doesn't wake up too often
- globals.coord().announce_new_stacks_block();
- }
+ // announce a new stacks block to force the chains coordinator
+ // to wake up anyways. this isn't free, so we have to make sure
+ // the chain-liveness thread doesn't wake up too often
+ globals.coord().announce_new_stacks_block();
*last_stacks_pox_reorg_recover_time = get_epoch_time_secs().into();
}
@@ -913,7 +823,6 @@ impl RunLoop {
config: &Config,
burnchain: &Burnchain,
sortdb: &SortitionDB,
- chain_state_db: &StacksChainState,
last_burn_pox_reorg_recover_time: &mut u128,
last_announce_time: &mut u128,
) {
@@ -953,82 +862,6 @@ impl RunLoop {
return;
}
- // NOTE: this could be lower than the highest_sn
- let sn = SortitionDB::get_canonical_burn_chain_tip(sortdb.conn())
- .expect("FATAL: could not read sortition DB");
-
- let sortition_tip_affirmation_map =
- match SortitionDB::find_sortition_tip_affirmation_map(sortdb, &sn.sortition_id) {
- Ok(am) => am,
- Err(e) => {
- warn!("Failed to find sortition affirmation map: {e:?}");
- return;
- }
- };
-
- let indexer = make_bitcoin_indexer(config, Some(globals.should_keep_running.clone()));
-
- let heaviest_affirmation_map = match static_get_heaviest_affirmation_map(
- burnchain,
- &indexer,
- &burnchain_db,
- sortdb,
- &sn.sortition_id,
- ) {
- Ok(am) => am,
- Err(e) => {
- warn!("Failed to find heaviest affirmation map: {e:?}");
- return;
- }
- };
-
- let canonical_affirmation_map = match static_get_canonical_affirmation_map(
- burnchain,
- &indexer,
- &burnchain_db,
- sortdb,
- chain_state_db,
- &sn.sortition_id,
- ) {
- Ok(am) => am,
- Err(e) => {
- warn!("Failed to find canonical affirmation map: {e:?}");
- return;
- }
- };
-
- if sortition_tip_affirmation_map.len() < heaviest_affirmation_map.len()
- || sortition_tip_affirmation_map
- .find_divergence(&heaviest_affirmation_map)
- .is_some()
- || sn.block_height < highest_sn.block_height
- {
- debug!("Drive burn block processing: possible PoX reorg (sortition tip: {sortition_tip_affirmation_map}, heaviest: {heaviest_affirmation_map}, {} {})", sn.block_height, highest_sn.block_height);
- globals.coord().announce_new_burn_block();
- globals.coord().announce_new_stacks_block();
- *last_announce_time = get_epoch_time_secs().into();
- } else if sortition_tip_affirmation_map.len() >= heaviest_affirmation_map.len()
- && sortition_tip_affirmation_map.len() <= canonical_affirmation_map.len()
- {
- if let Some(divergence_rc) =
- canonical_affirmation_map.find_divergence(&sortition_tip_affirmation_map)
- {
- if divergence_rc + 1 >= (heaviest_affirmation_map.len() as u64) {
- // we have unaffirmed PoX anchor blocks that are not yet processed in the sortition history
- debug!("Drive burnchain processing: possible PoX reorg from unprocessed anchor block(s) (sortition tip: {sortition_tip_affirmation_map}, heaviest: {heaviest_affirmation_map}, canonical: {canonical_affirmation_map})");
- globals.coord().announce_new_burn_block();
- globals.coord().announce_new_stacks_block();
- *last_announce_time = get_epoch_time_secs().into();
- }
- }
- } else {
- debug!(
- "Drive burn block processing: no need (sortition tip: {sortition_tip_affirmation_map}, heaviest: {heaviest_affirmation_map}, {} {})",
- sn.block_height,
- highest_sn.block_height
- );
- }
-
*last_burn_pox_reorg_recover_time = get_epoch_time_secs().into();
// unconditionally bump every 5 minutes, just in case.
@@ -1051,7 +884,6 @@ impl RunLoop {
config: Config,
burnchain: Burnchain,
sortdb: SortitionDB,
- chain_state_db: StacksChainState,
) {
let mut last_burn_pox_reorg_recover_time = 0;
let mut last_stacks_pox_reorg_recover_time = 0;
@@ -1066,15 +898,12 @@ impl RunLoop {
&config,
&burnchain,
&sortdb,
- &chain_state_db,
&mut last_burn_pox_reorg_recover_time,
&mut last_burn_announce_time,
);
Self::drive_pox_reorg_stacks_block_processing(
&globals,
&config,
- &burnchain,
- &sortdb,
&mut last_stacks_pox_reorg_recover_time,
);
@@ -1092,20 +921,10 @@ impl RunLoop {
.open_sortition_db(true)
.expect("FATAL: could not open sortition DB");
- let (chain_state_db, _) = StacksChainState::open(
- config.is_mainnet(),
- config.burnchain.chain_id,
- &config.get_chainstate_path_str(),
- Some(config.node.get_marf_opts()),
- )
- .unwrap();
-
thread::Builder::new()
.name(format!("chain-liveness-{}", config.node.rpc_bind))
.stack_size(BLOCK_PROCESSOR_STACK_SIZE)
- .spawn(move || {
- Self::drive_chain_liveness(globals, config, burnchain, sortdb, chain_state_db)
- })
+ .spawn(move || Self::drive_chain_liveness(globals, config, burnchain, sortdb))
.expect("FATAL: failed to spawn chain liveness thread")
}
@@ -1209,19 +1028,9 @@ impl RunLoop {
let liveness_thread = self.spawn_chain_liveness_thread(globals.clone());
// Wait for all pending sortitions to process
- let mut burnchain_db = burnchain_config
+ let burnchain_db = burnchain_config
.open_burnchain_db(true)
.expect("FATAL: failed to open burnchain DB");
- if !self.config.burnchain.affirmation_overrides.is_empty() {
- let tx = burnchain_db
- .tx_begin()
- .expect("FATAL: failed to begin burnchain DB tx");
- for (reward_cycle, affirmation) in self.config.burnchain.affirmation_overrides.iter() {
- tx.set_override_affirmation_map(*reward_cycle, affirmation.clone()).unwrap_or_else(|_| panic!("FATAL: failed to set affirmation override ({affirmation}) for reward cycle {reward_cycle}"));
- }
- tx.commit()
- .expect("FATAL: failed to commit burnchain DB tx");
- }
let burnchain_db_tip = burnchain_db
.get_canonical_chain_tip()
.expect("FATAL: failed to query burnchain DB");
diff --git a/stacks-node/src/tests/epoch_21.rs b/stacks-node/src/tests/epoch_21.rs
index 3544ae01b2..c423f2b707 100644
--- a/stacks-node/src/tests/epoch_21.rs
+++ b/stacks-node/src/tests/epoch_21.rs
@@ -2004,8 +2004,6 @@ fn test_pox_reorgs_three_flaps() {
conf_template.node.wait_time_for_blocks = 1_000;
conf_template.burnchain.pox_2_activation = Some(v1_unlock_height);
- conf_template.node.require_affirmed_anchor_blocks = false;
-
// make epoch 2.1 start in the middle of boot-up
let mut epochs = EpochList::new(&*core::STACKS_EPOCHS_REGTEST);
epochs[StacksEpochId::Epoch20].end_height = 101;
@@ -2064,8 +2062,6 @@ fn test_pox_reorgs_three_flaps() {
conf.burnchain.max_rbf = conf_template.burnchain.max_rbf;
conf.burnchain.epochs = conf_template.burnchain.epochs.clone();
conf.burnchain.pox_2_activation = conf_template.burnchain.pox_2_activation;
- conf.node.require_affirmed_anchor_blocks =
- conf_template.node.require_affirmed_anchor_blocks;
// multiple nodes so they must download from each other
conf.miner.wait_for_block_download = true;
@@ -2524,8 +2520,6 @@ fn test_pox_reorg_one_flap() {
conf_template.node.wait_time_for_blocks = 1_000;
conf_template.burnchain.pox_2_activation = Some(v1_unlock_height);
- conf_template.node.require_affirmed_anchor_blocks = false;
-
// make epoch 2.1 start in the middle of boot-up
let mut epochs = EpochList::new(&*core::STACKS_EPOCHS_REGTEST);
epochs[StacksEpochId::Epoch20].end_height = 101;
@@ -2584,8 +2578,6 @@ fn test_pox_reorg_one_flap() {
conf.burnchain.max_rbf = conf_template.burnchain.max_rbf;
conf.burnchain.epochs = conf_template.burnchain.epochs.clone();
conf.burnchain.pox_2_activation = conf_template.burnchain.pox_2_activation;
- conf.node.require_affirmed_anchor_blocks =
- conf_template.node.require_affirmed_anchor_blocks;
// multiple nodes so they must download from each other
conf.miner.wait_for_block_download = true;
@@ -2928,8 +2920,6 @@ fn test_pox_reorg_flap_duel() {
conf_template.node.wait_time_for_blocks = 1_000;
conf_template.burnchain.pox_2_activation = Some(v1_unlock_height);
- conf_template.node.require_affirmed_anchor_blocks = false;
-
// make epoch 2.1 start in the middle of boot-up
let mut epochs = EpochList::new(&*core::STACKS_EPOCHS_REGTEST);
epochs[StacksEpochId::Epoch20].end_height = 101;
@@ -2988,8 +2978,6 @@ fn test_pox_reorg_flap_duel() {
conf.burnchain.max_rbf = conf_template.burnchain.max_rbf;
conf.burnchain.epochs = conf_template.burnchain.epochs.clone();
conf.burnchain.pox_2_activation = conf_template.burnchain.pox_2_activation;
- conf.node.require_affirmed_anchor_blocks =
- conf_template.node.require_affirmed_anchor_blocks;
// multiple nodes so they must download from each other
conf.miner.wait_for_block_download = true;
@@ -3347,8 +3335,6 @@ fn test_pox_reorg_flap_reward_cycles() {
conf_template.node.wait_time_for_blocks = 1_000;
conf_template.burnchain.pox_2_activation = Some(v1_unlock_height);
- conf_template.node.require_affirmed_anchor_blocks = false;
-
// make epoch 2.1 start in the middle of boot-up
let mut epochs = EpochList::new(&*core::STACKS_EPOCHS_REGTEST);
epochs[StacksEpochId::Epoch20].end_height = 101;
@@ -3407,8 +3393,6 @@ fn test_pox_reorg_flap_reward_cycles() {
conf.burnchain.max_rbf = conf_template.burnchain.max_rbf;
conf.burnchain.epochs = conf_template.burnchain.epochs.clone();
conf.burnchain.pox_2_activation = conf_template.burnchain.pox_2_activation;
- conf.node.require_affirmed_anchor_blocks =
- conf_template.node.require_affirmed_anchor_blocks;
// multiple nodes so they must download from each other
conf.miner.wait_for_block_download = true;
@@ -3757,8 +3741,6 @@ fn test_pox_missing_five_anchor_blocks() {
conf_template.node.wait_time_for_blocks = 1_000;
conf_template.burnchain.pox_2_activation = Some(v1_unlock_height);
- conf_template.node.require_affirmed_anchor_blocks = false;
-
// make epoch 2.1 start in the middle of boot-up
let mut epochs = EpochList::new(&*core::STACKS_EPOCHS_REGTEST);
epochs[StacksEpochId::Epoch20].end_height = 101;
@@ -3817,8 +3799,6 @@ fn test_pox_missing_five_anchor_blocks() {
conf.burnchain.max_rbf = conf_template.burnchain.max_rbf;
conf.burnchain.epochs = conf_template.burnchain.epochs.clone();
conf.burnchain.pox_2_activation = conf_template.burnchain.pox_2_activation;
- conf.node.require_affirmed_anchor_blocks =
- conf_template.node.require_affirmed_anchor_blocks;
// multiple nodes so they must download from each other
conf.miner.wait_for_block_download = true;
@@ -4134,9 +4114,6 @@ fn test_sortition_divergence_pre_21() {
conf_template.node.wait_time_for_blocks = 1_000;
conf_template.burnchain.pox_2_activation = Some(v1_unlock_height);
- conf_template.node.require_affirmed_anchor_blocks = false;
- conf_template.node.always_use_affirmation_maps = false;
-
// make epoch 2.1 start after we have created this error condition
let mut epochs = EpochList::new(&*core::STACKS_EPOCHS_REGTEST);
epochs[StacksEpochId::Epoch20].end_height = 101;
@@ -4195,10 +4172,6 @@ fn test_sortition_divergence_pre_21() {
conf.burnchain.max_rbf = conf_template.burnchain.max_rbf;
conf.burnchain.epochs = conf_template.burnchain.epochs.clone();
conf.burnchain.pox_2_activation = conf_template.burnchain.pox_2_activation;
- conf.node.require_affirmed_anchor_blocks =
- conf_template.node.require_affirmed_anchor_blocks;
-
- conf.node.always_use_affirmation_maps = false;
// multiple nodes so they must download from each other
conf.miner.wait_for_block_download = true;
diff --git a/stacks-node/src/tests/epoch_22.rs b/stacks-node/src/tests/epoch_22.rs
index 3a9df900b9..4f28ba3052 100644
--- a/stacks-node/src/tests/epoch_22.rs
+++ b/stacks-node/src/tests/epoch_22.rs
@@ -1256,8 +1256,6 @@ fn test_pox_reorg_one_flap() {
conf_template.node.wait_time_for_blocks = 1_000;
conf_template.burnchain.pox_2_activation = Some(v1_unlock_height);
- conf_template.node.require_affirmed_anchor_blocks = false;
-
// make epoch 2.1 and 2.2 start in the middle of boot-up
let mut epochs = EpochList::new(&*core::STACKS_EPOCHS_REGTEST);
epochs[StacksEpochId::Epoch20].end_height = 101;
@@ -1320,8 +1318,6 @@ fn test_pox_reorg_one_flap() {
conf.burnchain.max_rbf = conf_template.burnchain.max_rbf;
conf.burnchain.epochs = conf_template.burnchain.epochs.clone();
conf.burnchain.pox_2_activation = conf_template.burnchain.pox_2_activation;
- conf.node.require_affirmed_anchor_blocks =
- conf_template.node.require_affirmed_anchor_blocks;
// multiple nodes so they must download from each other
conf.miner.wait_for_block_download = true;
diff --git a/stacks-node/src/tests/neon_integrations.rs b/stacks-node/src/tests/neon_integrations.rs
index dc2471db08..9b25eea868 100644
--- a/stacks-node/src/tests/neon_integrations.rs
+++ b/stacks-node/src/tests/neon_integrations.rs
@@ -5161,9 +5161,6 @@ fn pox_integration_test() {
test_observer::spawn();
test_observer::register_any(&mut conf);
- // required for testing post-sunset behavior
- conf.node.always_use_affirmation_maps = false;
-
let first_bal = 6_000_000_000 * u64::from(core::MICROSTACKS_PER_STACKS);
let second_bal = 2_000_000_000 * u64::from(core::MICROSTACKS_PER_STACKS);
let third_bal = 2_000_000_000 * u64::from(core::MICROSTACKS_PER_STACKS);
@@ -5667,8 +5664,6 @@ fn atlas_integration_test() {
.initial_balances
.push(initial_balance_user_1.clone());
- conf_bootstrap_node.node.always_use_affirmation_maps = false;
-
// Prepare the config of the follower node
let (mut conf_follower_node, _) = neon_integration_test_conf();
let bootstrap_node_url = format!(
@@ -5693,8 +5688,6 @@ fn atlas_integration_test() {
disable_retries: false,
});
- conf_follower_node.node.always_use_affirmation_maps = false;
-
// Our 2 nodes will share the bitcoind node
let mut btcd_controller = BitcoinCoreController::new(conf_bootstrap_node.clone());
btcd_controller
@@ -6200,8 +6193,6 @@ fn antientropy_integration_test() {
conf_bootstrap_node.burnchain.max_rbf = 1000000;
conf_bootstrap_node.node.wait_time_for_blocks = 1_000;
- conf_bootstrap_node.node.always_use_affirmation_maps = false;
-
// Prepare the config of the follower node
let (mut conf_follower_node, _) = neon_integration_test_conf();
let bootstrap_node_url = format!(
@@ -6236,8 +6227,6 @@ fn antientropy_integration_test() {
conf_follower_node.burnchain.max_rbf = 1000000;
conf_follower_node.node.wait_time_for_blocks = 1_000;
- conf_follower_node.node.always_use_affirmation_maps = false;
-
// Our 2 nodes will share the bitcoind node
let mut btcd_controller = BitcoinCoreController::new(conf_bootstrap_node.clone());
btcd_controller
@@ -6474,8 +6463,6 @@ fn atlas_stress_integration_test() {
conf_bootstrap_node.burnchain.max_rbf = 1000000;
conf_bootstrap_node.node.wait_time_for_blocks = 1_000;
- conf_bootstrap_node.node.always_use_affirmation_maps = false;
-
let user_1 = users.pop().unwrap();
let initial_balance_user_1 = initial_balances.pop().unwrap();
@@ -7934,8 +7921,6 @@ fn spawn_follower_node(
conf.connection_options.inv_sync_interval = 3;
- conf.node.always_use_affirmation_maps = false;
-
let mut run_loop = neon::RunLoop::new(conf.clone());
let blocks_processed = run_loop.get_blocks_processed_arc();
let channel = run_loop.get_coordinator_channel().unwrap();
diff --git a/stacks-node/src/tests/signer/multiversion.rs b/stacks-node/src/tests/signer/multiversion.rs
index 39d903ff82..7435f1875d 100644
--- a/stacks-node/src/tests/signer/multiversion.rs
+++ b/stacks-node/src/tests/signer/multiversion.rs
@@ -14,7 +14,7 @@
// along with this program. If not, see .
use std::sync::mpsc::TryRecvError;
use std::thread;
-use std::time::{Duration, SystemTime};
+use std::time::Duration;
use libsigner::v0::messages::{SignerMessage, StateMachineUpdate};
use libsigner::v0::signer_state::{MinerState, ReplayTransactionSet, SignerStateMachine};
diff --git a/stacks-signer/src/client/mod.rs b/stacks-signer/src/client/mod.rs
index 974297cb9e..04fda6c3d6 100644
--- a/stacks-signer/src/client/mod.rs
+++ b/stacks-signer/src/client/mod.rs
@@ -341,7 +341,6 @@ pub(crate) mod tests {
genesis_chainstate_hash: Sha256Sum::zero(),
node_public_key: Some(public_key_buf),
node_public_key_hash: Some(public_key_hash),
- affirmations: None,
last_pox_anchor: None,
stackerdbs: Some(
stackerdb_contract_ids
diff --git a/stackslib/src/chainstate/coordinator/mod.rs b/stackslib/src/chainstate/coordinator/mod.rs
index cc21170543..885a23f4af 100644
--- a/stackslib/src/chainstate/coordinator/mod.rs
+++ b/stackslib/src/chainstate/coordinator/mod.rs
@@ -29,14 +29,11 @@ use stacks_common::util::get_epoch_time_secs;
pub use self::comm::CoordinatorCommunication;
use super::stacks::boot::{RewardSet, RewardSetData};
use super::stacks::db::blocks::DummyEventDispatcher;
-use crate::burnchains::affirmation::{AffirmationMap, AffirmationMapEntry};
use crate::burnchains::db::{BurnchainBlockData, BurnchainDB, BurnchainHeaderReader};
use crate::burnchains::{
Burnchain, BurnchainBlockHeader, Error as BurnchainError, PoxConstants, Txid,
};
-use crate::chainstate::burn::db::sortdb::{
- SortitionDB, SortitionDBConn, SortitionDBTx, SortitionHandleTx,
-};
+use crate::chainstate::burn::db::sortdb::{SortitionDB, SortitionHandleTx};
use crate::chainstate::burn::operations::leader_block_commit::RewardSetInfo;
use crate::chainstate::burn::operations::BlockstackOperationType;
use crate::chainstate::burn::{BlockSnapshot, ConsensusHash};
@@ -58,9 +55,7 @@ use crate::chainstate::stacks::index::marf::MARFOpenOpts;
use crate::chainstate::stacks::index::Error as IndexError;
use crate::chainstate::stacks::miner::{signal_mining_blocked, signal_mining_ready, MinerStatus};
use crate::chainstate::stacks::{Error as ChainstateError, StacksBlockHeader, TransactionPayload};
-use crate::core::{
- StacksEpoch, StacksEpochId, FIRST_BURNCHAIN_CONSENSUS_HASH, FIRST_STACKS_BLOCK_HASH,
-};
+use crate::core::{StacksEpoch, StacksEpochId};
use crate::cost_estimates::{CostEstimator, FeeEstimator};
use crate::monitoring::{
increment_contract_calls_processed, increment_stx_blocks_processed_counter,
@@ -187,15 +182,6 @@ pub trait BlockEventDispatcher {
}
pub struct ChainsCoordinatorConfig {
- /// true: assume all anchor blocks are present, and block chain sync until they arrive
- /// false: process sortitions in reward cycles without anchor blocks
- pub assume_present_anchor_blocks: bool,
- /// true: use affirmation maps before 2.1
- /// false: only use affirmation maps in 2.1 or later
- pub always_use_affirmation_maps: bool,
- /// true: always wait for canonical anchor blocks, even if it stalls the chain
- /// false: proceed to process new chain history even if we're missing an anchor block.
- pub require_affirmed_anchor_blocks: bool,
/// true: enable transactions indexing
/// false: no transactions indexing
pub txindex: bool,
@@ -203,21 +189,11 @@ pub struct ChainsCoordinatorConfig {
impl ChainsCoordinatorConfig {
pub fn new() -> ChainsCoordinatorConfig {
- ChainsCoordinatorConfig {
- always_use_affirmation_maps: true,
- require_affirmed_anchor_blocks: true,
- assume_present_anchor_blocks: true,
- txindex: false,
- }
+ ChainsCoordinatorConfig { txindex: false }
}
pub fn test_new(txindex: bool) -> ChainsCoordinatorConfig {
- ChainsCoordinatorConfig {
- always_use_affirmation_maps: false,
- require_affirmed_anchor_blocks: false,
- assume_present_anchor_blocks: false,
- txindex,
- }
+ ChainsCoordinatorConfig { txindex }
}
}
@@ -726,7 +702,6 @@ pub fn get_next_recipients(
sort_db: &mut SortitionDB,
burnchain: &Burnchain,
provider: &U,
- always_use_affirmation_maps: bool,
) -> Result