Skip to content

Commit b2f2f3d

Browse files
committed
pack, metrics, flamenco: support for simd 0306, update cost limits
1 parent 76ba3e0 commit b2f2f3d

File tree

5 files changed

+9
-12
lines changed

5 files changed

+9
-12
lines changed

src/disco/metrics/metrics.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,14 +508,14 @@ metric introduced.
508508
<counter name="BundleCrankStatus" enum="BundleCrankResult" summary="Result of considering whether bundle cranks are needed" />
509509

510510
<gauge name="CusConsumedInBlock" summary="The number of cost units consumed in the current block, or 0 if pack is not currently packing a block" />
511-
<histogram name="CusScheduled" min="1000000" max="192000000">
511+
<histogram name="CusScheduled" min="1000000" max="240000000">
512512
<summary>The number of cost units scheduled for each block pack produced. This can be higher than the block limit because of returned CUs.</summary>
513513
</histogram>
514-
<histogram name="CusRebated" min="1000000" max="192000000">
514+
<histogram name="CusRebated" min="1000000" max="240000000">
515515
<!-- Note: The switch from cost units to compute units here is deliberate. Of the various types of cost units, only compute units can be rebated. -->
516516
<summary>The number of compute units rebated for each block pack produced. Compute units are rebated when a transaction fails prior to execution or requests more compute units than it uses.</summary>
517517
</histogram>
518-
<histogram name="CusNet" min="1000000" max="60000000">
518+
<histogram name="CusNet" min="1000000" max="100000000">
519519
<summary>The net number of cost units (scheduled - rebated) in each block pack produced.</summary>
520520
</histogram>
521521
<histogram name="CusPct" min="0" max="100">

src/disco/pack/fd_pack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
#define FD_PACK_MAX_COST_PER_BLOCK_UPPER_BOUND (100000000UL) /* simd 0286 */
4040
#define FD_PACK_MAX_VOTE_COST_PER_BLOCK_UPPER_BOUND ( 36000000UL)
41-
#define FD_PACK_MAX_WRITE_COST_PER_ACCT_UPPER_BOUND ( 12000000UL)
41+
#define FD_PACK_MAX_WRITE_COST_PER_ACCT_UPPER_BOUND ( FD_PACK_MAX_COST_PER_BLOCK_UPPER_BOUND * 4UL / 10UL ) /* simd 0306 */
4242

4343
#define FD_PACK_FEE_PER_SIGNATURE (5000UL) /* In lamports */
4444

src/flamenco/runtime/fd_cost_tracker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ fd_cost_tracker_init( fd_cost_tracker_t * self,
322322
fd_spad_t * spad ) {
323323
// Set limits appropriately
324324
self->account_cost_limit = FD_MAX_WRITABLE_ACCOUNT_UNITS;
325-
self->block_cost_limit = FD_MAX_BLOCK_UNITS_SIMD_0207;
325+
self->block_cost_limit = FD_MAX_BLOCK_UNITS_SIMD_0256;
326326
self->vote_cost_limit = FD_MAX_VOTE_UNITS;
327327

328328
/* Init cost tracker map

src/flamenco/runtime/fd_cost_tracker.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@
1919
// https://github.com/anza-xyz/agave/blob/v2.2.0/cost-model/src/block_cost_limits.rs#L34
2020
#define FD_MAX_WRITABLE_ACCOUNT_UNITS ( 12000000UL )
2121

22-
// https://github.com/anza-xyz/agave/blob/v2.2.0/cost-model/src/block_cost_limits.rs#L28
23-
#define FD_MAX_BLOCK_UNITS ( 48000000UL )
24-
25-
// https://github.com/anza-xyz/agave/blob/v2.2.0/cost-model/src/block_cost_limits.rs#L29C11-L29C36
26-
#define FD_MAX_BLOCK_UNITS_SIMD_0207 ( 50000000UL )
22+
// https://github.com/anza-xyz/agave/blob/v2.3.0/cost-model/src/block_cost_limits.rs#L50-L56
23+
#define FD_MAX_BLOCK_UNITS_SIMD_0256 ( 60000000UL )
2724

2825
// https://github.com/anza-xyz/agave/blob/v2.2.0/cost-model/src/block_cost_limits.rs#L38
2926
#define FD_MAX_VOTE_UNITS ( 36000000UL )
@@ -42,7 +39,7 @@
4239
/* This is the reasonably tight upper bound for the number of writable
4340
accounts in a slot. The block CU limit should always be highest
4441
anticipated limit. */
45-
#define FD_WRITABLE_ACCS_IN_SLOT ((FD_MAX_BLOCK_UNITS_SIMD_0207 + FD_WRITE_LOCK_UNITS - 1UL) / FD_WRITE_LOCK_UNITS)
42+
#define FD_WRITABLE_ACCS_IN_SLOT ((FD_MAX_BLOCK_UNITS_SIMD_0256 + FD_WRITE_LOCK_UNITS - 1UL) / FD_WRITE_LOCK_UNITS)
4643

4744
FD_PROTOTYPES_BEGIN
4845

0 commit comments

Comments
 (0)