You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -441,6 +443,8 @@ For real networks, the estimation process differs for legacy transactions and th
441
443
5.**Final Fee Calculation**: Sum the base fee and adjusted tip to set the `gas_fee_cap`.
442
444
6.**Congestion Buffer**: Similar to legacy transactions, analyze congestion and apply a buffer to both the fee cap and the tip to secure transaction inclusion.
443
445
446
+
Regardless of transaction type, if fetching data from RPC or calculating prices fails due to any issue and `gas_price_estimation_attempt_count` is > 1 we will retry it N-1 number of times.
447
+
444
448
Understanding and setting these parameters correctly ensures that your transactions are processed efficiently and cost-effectively on the network.
445
449
446
450
When fetching historical base fee and tip data, we will use the last `gas_price_estimation_blocks` blocks. If it's set to `0` we will default to `100` last blocks. If the blockchain has less than `100` blocks we will use all of them.
@@ -492,6 +496,14 @@ case Congestion_VeryHigh:
492
496
For low congestion rate we will increase gas price by 10%, for medium by 20%, for high by 30% and for very high by 40%. We cache block header data in an in-memory cache, so we don't have to fetch it every time we estimate gas. The cache has capacity equal to `gas_price_estimation_blocks` and every time we add a new element, we remove one that is least frequently used and oldest (with block number being a constant and chain always moving forward it makes no sense to keep old blocks). It's important to know that in order to use congestion metrics we need to fetch at least 80% of the requested blocks. If that fails, we will skip this part of the estimation and only adjust the gas price based on priority.
493
497
For both transaction types if any of the steps fails, we fall back to hardcoded values.
494
498
499
+
##### Gas estimations attemps
500
+
501
+
If for any reason fetching gas price suggestions or fee history from the RPC fails, or subsequent calulation of percentiles fails, it can be retried. This behaviour is controlled by `gas_price_estimation_attempt_count`, which if empty or set to `0` will default to
502
+
just one attempt, which means that if it fails, it won't be retried. Set it to `2` to allow a single retry, etc.
503
+
504
+
> [!NOTE]
505
+
> To disable gas estimation set `gas_price_estimation_enabled` to `false`. Setting `gas_price_estimation_attempt_count` to `0` won't have such effect.
506
+
495
507
### DOT graphs
496
508
497
509
There are multiple ways of visualising DOT graphs:
If you run into any issues with `BenchSpy` it might help to lower the default logging level to either `debug` or `trace`. It's controlled by environment variable called `BENCHSPY_LOG_LEVEL`.
Copy file name to clipboardExpand all lines: book/src/libs/wasp/benchspy/real_world.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,15 +87,17 @@ This function fetches the current report (for version passed as environment vari
87
87
Let’s assume you want to ensure that none of the performance metrics degrade by more than **1%** between releases (and that error rate has not changed at all). Here's how you can write assertions using a convenient function for the `Direct` query executor:
0 commit comments