Skip to content

Commit cbc9a8a

Browse files
author
Aaron Blankstein
committed
update scalar value docs, make neon run loop a little less chatty
1 parent d7da301 commit cbc9a8a

File tree

2 files changed

+23
-14
lines changed

2 files changed

+23
-14
lines changed

docs/rpc/openapi.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,15 @@ paths:
315315
316316
* `estimated_cost` - the estimated multi-dimensional cost of
317317
executing the Clarity VM on the provided transaction.
318-
* `estimated_cost_scalar` - a unitless integer that captures
319-
the total proportion of the block limit that a transaction
320-
would be estimated to consume. In order to compute an
321-
estimate of total fee amount for the transaction, this value
322-
is multiplied by the estimated fee rate. This value
323-
incorporates the estimated transaction length.
318+
* `estimated_cost_scalar` - a unitless integer that the Stacks
319+
node uses to compare how much of the block limit is consumed
320+
by different transactions. This value incorporates the
321+
estimated length of the transaction and the estimated
322+
execution cost of the transaction. The range of this integer
323+
may vary between different Stacks nodes. In order to compute
324+
an estimate of total fee amount for the transaction, this
325+
value is multiplied by the same Stacks node's estimated fee
326+
rate.
324327
* `cost_scalar_change_by_byte` - a float value that indicates how
325328
much the `estimated_cost_scalar` value would increase for every
326329
additional byte in the final transaction.

testnet/stacks-node/src/run_loop/neon.rs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ impl RunLoop {
368368
block_height
369369
);
370370

371+
let mut last_block_height = 0;
371372
loop {
372373
// Orchestrating graceful termination
373374
if !should_keep_running.load(Ordering::SeqCst) {
@@ -431,10 +432,12 @@ impl RunLoop {
431432
let sortition_tip = &burnchain_tip.block_snapshot.sortition_id;
432433
let next_height = burnchain_tip.block_snapshot.block_height;
433434

434-
info!(
435-
"Downloaded burnchain blocks up to height {}; new target height is {}; next_height = {}, block_height = {}",
436-
next_burnchain_height, target_burnchain_block_height, next_height, block_height
437-
);
435+
if next_height != last_block_height {
436+
info!(
437+
"Downloaded burnchain blocks up to height {}; new target height is {}; next_height = {}, block_height = {}",
438+
next_burnchain_height, target_burnchain_block_height, next_height, block_height
439+
);
440+
}
438441

439442
if next_height > block_height {
440443
debug!(
@@ -504,10 +507,13 @@ impl RunLoop {
504507
mine_start = 0;
505508

506509
// at tip, and not downloading. proceed to mine.
507-
info!(
508-
"Synchronized full burnchain up to height {}. Proceeding to mine blocks",
509-
block_height
510-
);
510+
if last_block_height != block_height {
511+
info!(
512+
"Synchronized full burnchain up to height {}. Proceeding to mine blocks",
513+
block_height
514+
);
515+
last_block_height = block_height;
516+
}
511517
if !node.relayer_issue_tenure() {
512518
// relayer hung up, exit.
513519
error!("Block relayer and miner hung up, exiting.");

0 commit comments

Comments
 (0)