Merge branch 'develop' into fix/book-deadlock

This commit is contained in:
Ludo Galabru
2021-04-06 17:55:13 -04:00
committed by GitHub
7 changed files with 938 additions and 125 deletions

View File

@@ -14,3 +14,4 @@ RUN ln -s /bitcoin-0.20.0/bin/bitcoind /bin/
ENV BITCOIND_TEST 1
WORKDIR /src/testnet/stacks-node
RUN cargo test -- --test-threads 1 --ignored tests::neon_integrations::atlas_integration_test
RUN cargo test -- --test-threads 1 --ignored tests::neon_integrations::atlas_stress_integration_test

1
Cargo.lock generated
View File

@@ -2240,6 +2240,7 @@ dependencies = [
"rand 0.7.2",
"reqwest",
"ring",
"rusqlite",
"serde",
"serde_derive",
"serde_json",

View File

@@ -1218,7 +1218,7 @@ impl StacksChainState {
.map_err(|e| e.into())
})
})
.expect("FATAL: `ust-liquid-supply` overflowed");
.expect("FATAL: `ustx-liquid-supply` overflowed");
clarity_tx.commit_to_block(&FIRST_BURNCHAIN_CONSENSUS_HASH, &FIRST_STACKS_BLOCK_HASH);
}

View File

@@ -914,6 +914,10 @@ impl StacksChainState {
(Value::err_none(), AssetMap::new(), vec![])
}
ClarityRuntimeTxError::AbortedByCallback(value, assets, events) => {
info!("Contract-call aborted by post-condition";
"contract_name" => %contract_id,
"function_name" => %contract_call.function_name,
"function_args" => %VecDisplay(&contract_call.function_args));
let receipt = StacksTransactionReceipt::from_condition_aborted_contract_call(
tx.clone(),
events,

View File

@@ -29,6 +29,10 @@ warp = "0.2"
tokio = "0.2.21"
reqwest = { version = "0.10", features = ["blocking", "json", "rustls"] }
[dev-dependencies.rusqlite]
version = "=0.24.2"
features = ["blob", "serde_json", "i128_blob", "bundled", "trace"]
[[bin]]
name = "stacks-node"
path = "src/main.rs"

View File

@@ -259,7 +259,20 @@ impl PoxSyncWatchdog {
last_processed_height: u64,
burnchain_height: u64,
) -> bool {
last_processed_height + (burnchain.stable_confirmations as u64) < burnchain_height
let ibd =
last_processed_height + (burnchain.stable_confirmations as u64) < burnchain_height;
if ibd {
debug!(
"PoX watchdog: {} + {} < {}, so iniitial block download",
last_processed_height, burnchain.stable_confirmations, burnchain_height
);
} else {
debug!(
"PoX watchdog: {} + {} >= {}, so steady-state",
last_processed_height, burnchain.stable_confirmations, burnchain_height
);
}
ibd
}
/// Calculate the first derivative of a list of points
@@ -471,6 +484,11 @@ impl PoxSyncWatchdog {
}
if self.unconditionally_download {
debug!(
"PoX watchdog set to unconditionally download (ibd={})",
ibbd
);
self.relayer_comms.set_ibd(ibbd);
return Ok(ibbd);
}
@@ -502,10 +520,14 @@ impl PoxSyncWatchdog {
"PoX watchdog in last reward cycle -- sync after {} seconds",
self.steady_state_burnchain_sync_interval
);
self.relayer_comms.set_ibd(ibbd);
self.relayer_comms
.interruptable_sleep(self.steady_state_burnchain_sync_interval)?;
} else {
debug!("PoX watchdog in last reward cycle -- sync immediately");
self.relayer_comms.set_ibd(ibbd);
}
self.relayer_comms.set_ibd(ibbd);
return Ok(ibbd);
}

File diff suppressed because it is too large Load Diff