Skip to content

Commit

Permalink
update scalar value docs, make neon run loop a little less chatty
Browse files Browse the repository at this point in the history
  • Loading branch information
kantai committed Oct 20, 2021
1 parent d7da301 commit cbc9a8a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
15 changes: 9 additions & 6 deletions docs/rpc/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,15 @@ paths:
* `estimated_cost` - the estimated multi-dimensional cost of
executing the Clarity VM on the provided transaction.
* `estimated_cost_scalar` - a unitless integer that captures
the total proportion of the block limit that a transaction
would be estimated to consume. In order to compute an
estimate of total fee amount for the transaction, this value
is multiplied by the estimated fee rate. This value
incorporates the estimated transaction length.
* `estimated_cost_scalar` - a unitless integer that the Stacks
node uses to compare how much of the block limit is consumed
by different transactions. This value incorporates the
estimated length of the transaction and the estimated
execution cost of the transaction. The range of this integer
may vary between different Stacks nodes. In order to compute
an estimate of total fee amount for the transaction, this
value is multiplied by the same Stacks node's estimated fee
rate.
* `cost_scalar_change_by_byte` - a float value that indicates how
much the `estimated_cost_scalar` value would increase for every
additional byte in the final transaction.
Expand Down
22 changes: 14 additions & 8 deletions testnet/stacks-node/src/run_loop/neon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ impl RunLoop {
block_height
);

let mut last_block_height = 0;
loop {
// Orchestrating graceful termination
if !should_keep_running.load(Ordering::SeqCst) {
Expand Down Expand Up @@ -431,10 +432,12 @@ impl RunLoop {
let sortition_tip = &burnchain_tip.block_snapshot.sortition_id;
let next_height = burnchain_tip.block_snapshot.block_height;

info!(
"Downloaded burnchain blocks up to height {}; new target height is {}; next_height = {}, block_height = {}",
next_burnchain_height, target_burnchain_block_height, next_height, block_height
);
if next_height != last_block_height {
info!(
"Downloaded burnchain blocks up to height {}; new target height is {}; next_height = {}, block_height = {}",
next_burnchain_height, target_burnchain_block_height, next_height, block_height
);
}

if next_height > block_height {
debug!(
Expand Down Expand Up @@ -504,10 +507,13 @@ impl RunLoop {
mine_start = 0;

// at tip, and not downloading. proceed to mine.
info!(
"Synchronized full burnchain up to height {}. Proceeding to mine blocks",
block_height
);
if last_block_height != block_height {
info!(
"Synchronized full burnchain up to height {}. Proceeding to mine blocks",
block_height
);
last_block_height = block_height;
}
if !node.relayer_issue_tenure() {
// relayer hung up, exit.
error!("Block relayer and miner hung up, exiting.");
Expand Down

0 comments on commit cbc9a8a

Please sign in to comment.