Skip to content

Commit 51bba2d

Browse files
merge
2 parents 0c83a3a + a4675d6 commit 51bba2d

30 files changed

+493
-791
lines changed

book/api/metrics-generated.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,14 +557,18 @@
557557
## Sock Tile
558558
| Metric | Type | Description |
559559
|--------|------|-------------|
560-
| sock_​syscalls_​sendmmsg | `counter` | Number of sendmmsg syscalls dispatched |
560+
| sock_​syscalls_​sendmmsg_​no_​error | `counter` | Number of sendmmsg syscalls dispatched (No error) |
561+
| sock_​syscalls_​sendmmsg_​slow | `counter` | Number of sendmmsg syscalls dispatched (ENOBUFS, EAGAIN error) |
562+
| sock_​syscalls_​sendmmsg_​perm | `counter` | Number of sendmmsg syscalls dispatched (EPERM error (blocked by netfilter)) |
563+
| sock_​syscalls_​sendmmsg_​unreach | `counter` | Number of sendmmsg syscalls dispatched (ENETUNREACH, EHOSTUNREACH error) |
564+
| sock_​syscalls_​sendmmsg_​down | `counter` | Number of sendmmsg syscalls dispatched (ENONET, ENETDOWN, EHOSTDOWN error) |
565+
| sock_​syscalls_​sendmmsg_​other | `counter` | Number of sendmmsg syscalls dispatched (Unrecognized error code) |
561566
| sock_​syscalls_​recvmmsg | `counter` | Number of recvmsg syscalls dispatched |
562567
| sock_​rx_​pkt_​cnt | `counter` | Number of packets received |
563568
| sock_​tx_​pkt_​cnt | `counter` | Number of packets sent |
564569
| sock_​tx_​drop_​cnt | `counter` | Number of packets failed to send |
565570
| sock_​tx_​bytes_​total | `counter` | Total number of bytes transmitted (including Ethernet header). |
566571
| sock_​rx_​bytes_​total | `counter` | Total number of bytes received (including Ethernet header). |
567-
| sock_​tx_​permission_​error_​cnt | `counter` | Number of send attempts that failed with EPERM (e.g. due to nftables) |
568572

569573
## Repair Tile
570574
| Metric | Type | Description |

src/app/firedancer-dev/config/default.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"entrypoint.testnet.solana.com:8001",
77
"entrypoint2.testnet.solana.com:8001",
88
"entrypoint3.testnet.solana.com:8001",
9-
"${VALIDATOR_IP}:8001",
9+
"{validator_ip}:8001",
1010
]
1111
[blockstore]
1212
shred_max = 16777216

src/app/rpcserver/main.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ static void
2727
init_args( int * argc, char *** argv, fd_rpcserver_args_t * args ) {
2828
memset( args, 0, sizeof(fd_rpcserver_args_t) );
2929

30-
args->valloc = fd_libc_alloc_virtual();
31-
3230
char const * funk_file = fd_env_strip_cmdline_cstr( argc, argv, "--funk-file", NULL, NULL );
3331
if( FD_UNLIKELY( !funk_file ))
3432
FD_LOG_ERR(( "--funk-file argument is required" ));
@@ -101,8 +99,6 @@ init_args_offline( int * argc, char *** argv, fd_rpcserver_args_t * args ) {
10199
memset( args, 0, sizeof(fd_rpcserver_args_t) );
102100
args->offline = 1;
103101

104-
args->valloc = fd_libc_alloc_virtual();
105-
106102
char const * funk_file = fd_env_strip_cmdline_cstr( argc, argv, "--funk-file", NULL, NULL );
107103
if( FD_UNLIKELY( !funk_file ))
108104
FD_LOG_ERR(( "--funk-file argument is required" ));
@@ -208,7 +204,6 @@ int main( int argc, char ** argv ) {
208204
while( !stopflag ) {
209205
fd_rpc_ws_poll( ctx );
210206
}
211-
fd_rpc_stop_service( ctx );
212207
fd_halt();
213208
return 0;
214209
}
@@ -224,8 +219,6 @@ int main( int argc, char ** argv ) {
224219
fd_rpc_ws_poll( ctx );
225220
}
226221

227-
fd_rpc_stop_service( ctx );
228-
229222
fd_halt();
230223
return 0;
231224
}

src/app/rpcserver/test_rpc_server.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,26 @@
1717
fixtures = []
1818

1919
def good_method(arg):
20-
print(arg)
20+
print('GOOD: ' + json.dumps(arg))
2121
data = json.dumps(arg).encode('utf-8')
2222
if fuzz:
2323
fixtures.append(data)
2424
x = requests.post(url,headers={'Content-Type':'application/json'},data=data)
25+
with open('response','wb') as fd:
26+
fd.write(x.content)
2527
res = json.loads(x.content)
2628
print(res)
2729
assert arg['id'] == res['id']
2830
return res
2931

3032
def bad_method(arg):
31-
print(arg)
33+
print("BAD: " + json.dumps(arg))
3234
data = json.dumps(arg).encode('utf-8')
3335
if fuzz:
3436
fixtures.append(data)
3537
x = requests.post(url,headers={'Content-Type':'application/json'},data=data)
36-
print(x.content)
38+
with open('response','bw') as fd:
39+
fd.write(x.content)
3740
res = json.loads(x.content)
3841
print(res)
3942
assert res['error'] is not None

src/disco/metrics/generated/fd_metrics_enums.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@
1919
#define FD_METRICS_ENUM_TILE_REGIME_V_PROCESSING_POSTFRAG_IDX 7
2020
#define FD_METRICS_ENUM_TILE_REGIME_V_PROCESSING_POSTFRAG_NAME "processing_postfrag"
2121

22+
#define FD_METRICS_ENUM_SOCK_ERR_NAME "sock_err"
23+
#define FD_METRICS_ENUM_SOCK_ERR_CNT (6UL)
24+
#define FD_METRICS_ENUM_SOCK_ERR_V_NO_ERROR_IDX 0
25+
#define FD_METRICS_ENUM_SOCK_ERR_V_NO_ERROR_NAME "no_error"
26+
#define FD_METRICS_ENUM_SOCK_ERR_V_SLOW_IDX 1
27+
#define FD_METRICS_ENUM_SOCK_ERR_V_SLOW_NAME "slow"
28+
#define FD_METRICS_ENUM_SOCK_ERR_V_PERM_IDX 2
29+
#define FD_METRICS_ENUM_SOCK_ERR_V_PERM_NAME "perm"
30+
#define FD_METRICS_ENUM_SOCK_ERR_V_UNREACH_IDX 3
31+
#define FD_METRICS_ENUM_SOCK_ERR_V_UNREACH_NAME "unreach"
32+
#define FD_METRICS_ENUM_SOCK_ERR_V_DOWN_IDX 4
33+
#define FD_METRICS_ENUM_SOCK_ERR_V_DOWN_NAME "down"
34+
#define FD_METRICS_ENUM_SOCK_ERR_V_OTHER_IDX 5
35+
#define FD_METRICS_ENUM_SOCK_ERR_V_OTHER_NAME "other"
36+
2237
#define FD_METRICS_ENUM_TPU_RECV_TYPE_NAME "tpu_recv_type"
2338
#define FD_METRICS_ENUM_TPU_RECV_TYPE_CNT (3UL)
2439
#define FD_METRICS_ENUM_TPU_RECV_TYPE_V_UDP_IDX 0

src/disco/metrics/generated/fd_metrics_sock.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
#include "fd_metrics_sock.h"
33

44
const fd_metrics_meta_t FD_METRICS_SOCK[FD_METRICS_SOCK_TOTAL] = {
5-
DECLARE_METRIC( SOCK_SYSCALLS_SENDMMSG, COUNTER ),
5+
DECLARE_METRIC_ENUM( SOCK_SYSCALLS_SENDMMSG, COUNTER, SOCK_ERR, NO_ERROR ),
6+
DECLARE_METRIC_ENUM( SOCK_SYSCALLS_SENDMMSG, COUNTER, SOCK_ERR, SLOW ),
7+
DECLARE_METRIC_ENUM( SOCK_SYSCALLS_SENDMMSG, COUNTER, SOCK_ERR, PERM ),
8+
DECLARE_METRIC_ENUM( SOCK_SYSCALLS_SENDMMSG, COUNTER, SOCK_ERR, UNREACH ),
9+
DECLARE_METRIC_ENUM( SOCK_SYSCALLS_SENDMMSG, COUNTER, SOCK_ERR, DOWN ),
10+
DECLARE_METRIC_ENUM( SOCK_SYSCALLS_SENDMMSG, COUNTER, SOCK_ERR, OTHER ),
611
DECLARE_METRIC( SOCK_SYSCALLS_RECVMMSG, COUNTER ),
712
DECLARE_METRIC( SOCK_RX_PKT_CNT, COUNTER ),
813
DECLARE_METRIC( SOCK_TX_PKT_CNT, COUNTER ),
914
DECLARE_METRIC( SOCK_TX_DROP_CNT, COUNTER ),
1015
DECLARE_METRIC( SOCK_TX_BYTES_TOTAL, COUNTER ),
1116
DECLARE_METRIC( SOCK_RX_BYTES_TOTAL, COUNTER ),
12-
DECLARE_METRIC( SOCK_TX_PERMISSION_ERROR_CNT, COUNTER ),
1317
};

src/disco/metrics/generated/fd_metrics_sock.h

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,50 @@
88
#define FD_METRICS_COUNTER_SOCK_SYSCALLS_SENDMMSG_TYPE (FD_METRICS_TYPE_COUNTER)
99
#define FD_METRICS_COUNTER_SOCK_SYSCALLS_SENDMMSG_DESC "Number of sendmmsg syscalls dispatched"
1010
#define FD_METRICS_COUNTER_SOCK_SYSCALLS_SENDMMSG_CVT (FD_METRICS_CONVERTER_NONE)
11+
#define FD_METRICS_COUNTER_SOCK_SYSCALLS_SENDMMSG_CNT (6UL)
1112

12-
#define FD_METRICS_COUNTER_SOCK_SYSCALLS_RECVMMSG_OFF (17UL)
13+
#define FD_METRICS_COUNTER_SOCK_SYSCALLS_SENDMMSG_NO_ERROR_OFF (16UL)
14+
#define FD_METRICS_COUNTER_SOCK_SYSCALLS_SENDMMSG_SLOW_OFF (17UL)
15+
#define FD_METRICS_COUNTER_SOCK_SYSCALLS_SENDMMSG_PERM_OFF (18UL)
16+
#define FD_METRICS_COUNTER_SOCK_SYSCALLS_SENDMMSG_UNREACH_OFF (19UL)
17+
#define FD_METRICS_COUNTER_SOCK_SYSCALLS_SENDMMSG_DOWN_OFF (20UL)
18+
#define FD_METRICS_COUNTER_SOCK_SYSCALLS_SENDMMSG_OTHER_OFF (21UL)
19+
20+
#define FD_METRICS_COUNTER_SOCK_SYSCALLS_RECVMMSG_OFF (22UL)
1321
#define FD_METRICS_COUNTER_SOCK_SYSCALLS_RECVMMSG_NAME "sock_syscalls_recvmmsg"
1422
#define FD_METRICS_COUNTER_SOCK_SYSCALLS_RECVMMSG_TYPE (FD_METRICS_TYPE_COUNTER)
1523
#define FD_METRICS_COUNTER_SOCK_SYSCALLS_RECVMMSG_DESC "Number of recvmsg syscalls dispatched"
1624
#define FD_METRICS_COUNTER_SOCK_SYSCALLS_RECVMMSG_CVT (FD_METRICS_CONVERTER_NONE)
1725

18-
#define FD_METRICS_COUNTER_SOCK_RX_PKT_CNT_OFF (18UL)
26+
#define FD_METRICS_COUNTER_SOCK_RX_PKT_CNT_OFF (23UL)
1927
#define FD_METRICS_COUNTER_SOCK_RX_PKT_CNT_NAME "sock_rx_pkt_cnt"
2028
#define FD_METRICS_COUNTER_SOCK_RX_PKT_CNT_TYPE (FD_METRICS_TYPE_COUNTER)
2129
#define FD_METRICS_COUNTER_SOCK_RX_PKT_CNT_DESC "Number of packets received"
2230
#define FD_METRICS_COUNTER_SOCK_RX_PKT_CNT_CVT (FD_METRICS_CONVERTER_NONE)
2331

24-
#define FD_METRICS_COUNTER_SOCK_TX_PKT_CNT_OFF (19UL)
32+
#define FD_METRICS_COUNTER_SOCK_TX_PKT_CNT_OFF (24UL)
2533
#define FD_METRICS_COUNTER_SOCK_TX_PKT_CNT_NAME "sock_tx_pkt_cnt"
2634
#define FD_METRICS_COUNTER_SOCK_TX_PKT_CNT_TYPE (FD_METRICS_TYPE_COUNTER)
2735
#define FD_METRICS_COUNTER_SOCK_TX_PKT_CNT_DESC "Number of packets sent"
2836
#define FD_METRICS_COUNTER_SOCK_TX_PKT_CNT_CVT (FD_METRICS_CONVERTER_NONE)
2937

30-
#define FD_METRICS_COUNTER_SOCK_TX_DROP_CNT_OFF (20UL)
38+
#define FD_METRICS_COUNTER_SOCK_TX_DROP_CNT_OFF (25UL)
3139
#define FD_METRICS_COUNTER_SOCK_TX_DROP_CNT_NAME "sock_tx_drop_cnt"
3240
#define FD_METRICS_COUNTER_SOCK_TX_DROP_CNT_TYPE (FD_METRICS_TYPE_COUNTER)
3341
#define FD_METRICS_COUNTER_SOCK_TX_DROP_CNT_DESC "Number of packets failed to send"
3442
#define FD_METRICS_COUNTER_SOCK_TX_DROP_CNT_CVT (FD_METRICS_CONVERTER_NONE)
3543

36-
#define FD_METRICS_COUNTER_SOCK_TX_BYTES_TOTAL_OFF (21UL)
44+
#define FD_METRICS_COUNTER_SOCK_TX_BYTES_TOTAL_OFF (26UL)
3745
#define FD_METRICS_COUNTER_SOCK_TX_BYTES_TOTAL_NAME "sock_tx_bytes_total"
3846
#define FD_METRICS_COUNTER_SOCK_TX_BYTES_TOTAL_TYPE (FD_METRICS_TYPE_COUNTER)
3947
#define FD_METRICS_COUNTER_SOCK_TX_BYTES_TOTAL_DESC "Total number of bytes transmitted (including Ethernet header)."
4048
#define FD_METRICS_COUNTER_SOCK_TX_BYTES_TOTAL_CVT (FD_METRICS_CONVERTER_NONE)
4149

42-
#define FD_METRICS_COUNTER_SOCK_RX_BYTES_TOTAL_OFF (22UL)
50+
#define FD_METRICS_COUNTER_SOCK_RX_BYTES_TOTAL_OFF (27UL)
4351
#define FD_METRICS_COUNTER_SOCK_RX_BYTES_TOTAL_NAME "sock_rx_bytes_total"
4452
#define FD_METRICS_COUNTER_SOCK_RX_BYTES_TOTAL_TYPE (FD_METRICS_TYPE_COUNTER)
4553
#define FD_METRICS_COUNTER_SOCK_RX_BYTES_TOTAL_DESC "Total number of bytes received (including Ethernet header)."
4654
#define FD_METRICS_COUNTER_SOCK_RX_BYTES_TOTAL_CVT (FD_METRICS_CONVERTER_NONE)
4755

48-
#define FD_METRICS_COUNTER_SOCK_TX_PERMISSION_ERROR_CNT_OFF (23UL)
49-
#define FD_METRICS_COUNTER_SOCK_TX_PERMISSION_ERROR_CNT_NAME "sock_tx_permission_error_cnt"
50-
#define FD_METRICS_COUNTER_SOCK_TX_PERMISSION_ERROR_CNT_TYPE (FD_METRICS_TYPE_COUNTER)
51-
#define FD_METRICS_COUNTER_SOCK_TX_PERMISSION_ERROR_CNT_DESC "Number of send attempts that failed with EPERM (e.g. due to nftables)"
52-
#define FD_METRICS_COUNTER_SOCK_TX_PERMISSION_ERROR_CNT_CVT (FD_METRICS_CONVERTER_NONE)
53-
54-
#define FD_METRICS_SOCK_TOTAL (8UL)
56+
#define FD_METRICS_SOCK_TOTAL (12UL)
5557
extern const fd_metrics_meta_t FD_METRICS_SOCK[FD_METRICS_SOCK_TOTAL];

src/disco/metrics/metrics.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,23 @@ metric introduced.
8181
<counter name="XdpTxRingEmptyDescs" summary="xdp_statistics_v1.tx_ring_empty_descs: Failed to retrieve item from tx ring" />
8282
</tile>
8383

84+
<enum name="SockErr">
85+
<int value="0" name="NoError" label="No error" />
86+
<int value="1" name="Slow" label="ENOBUFS, EAGAIN error" />
87+
<int value="2" name="Perm" label="EPERM error (blocked by netfilter)" />
88+
<int value="3" name="Unreach" label="ENETUNREACH, EHOSTUNREACH error" />
89+
<int value="4" name="Down" label="ENONET, ENETDOWN, EHOSTDOWN error" />
90+
<int value="3" name="Other" label="Unrecognized error code" />
91+
</enum>
92+
8493
<tile name="sock">
85-
<counter name="SyscallsSendmmsg" summary="Number of sendmmsg syscalls dispatched" />
94+
<counter name="SyscallsSendmmsg" enum="SockErr" summary="Number of sendmmsg syscalls dispatched" />
8695
<counter name="SyscallsRecvmmsg" summary="Number of recvmsg syscalls dispatched" />
8796
<counter name="RxPktCnt" summary="Number of packets received" />
8897
<counter name="TxPktCnt" summary="Number of packets sent" />
8998
<counter name="TxDropCnt" summary="Number of packets failed to send" />
9099
<counter name="TxBytesTotal" summary="Total number of bytes transmitted (including Ethernet header)." />
91100
<counter name="RxBytesTotal" summary="Total number of bytes received (including Ethernet header)." />
92-
<counter name="TxPermissionErrorCnt" summary="Number of send attempts that failed with EPERM (e.g. due to nftables)" />
93101
</tile>
94102

95103
<enum name="TpuRecvType">

src/disco/net/sock/fd_sock_tile.c

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -436,33 +436,40 @@ static void
436436
flush_tx_batch( fd_sock_tile_t * ctx ) {
437437
ulong batch_cnt = ctx->batch_cnt;
438438
for( int j = 0; j < (int)batch_cnt; /* incremented in loop */ ) {
439-
ctx->metrics.sys_sendmmsg_cnt++;
440-
441439
int remain = (int)batch_cnt - j;
442440
int send_cnt = sendmmsg( ctx->tx_sock, ctx->batch_msg + j, (uint)remain, MSG_DONTWAIT );
441+
if( send_cnt>=0 ) {
442+
ctx->metrics.sys_sendmmsg_cnt[ FD_METRICS_ENUM_SOCK_ERR_V_NO_ERROR_IDX ]++;
443+
}
443444
if( FD_UNLIKELY( send_cnt < remain ) ) {
445+
ctx->metrics.tx_drop_cnt++;
444446
if( FD_UNLIKELY( send_cnt < 0 ) ) {
445447
switch( errno ) {
446-
case EAGAIN:
447-
case ENOBUFS:
448-
ctx->metrics.tx_drop_cnt++;
449-
break;
450-
451-
case EPERM:
452-
ctx->metrics.tx_permission_error_cnt++;
453-
break;
454-
455-
default:
456-
FD_LOG_ERR(( "sendmmsg failed (%i-%s)", errno, fd_io_strerror( errno ) ));
448+
case EAGAIN:
449+
case ENOBUFS:
450+
ctx->metrics.sys_sendmmsg_cnt[ FD_METRICS_ENUM_SOCK_ERR_V_SLOW_IDX ]++;
451+
break;
452+
case EPERM:
453+
ctx->metrics.sys_sendmmsg_cnt[ FD_METRICS_ENUM_SOCK_ERR_V_PERM_IDX ]++;
454+
break;
455+
case ENETUNREACH:
456+
case EHOSTUNREACH:
457+
ctx->metrics.sys_sendmmsg_cnt[ FD_METRICS_ENUM_SOCK_ERR_V_UNREACH_IDX ]++;
458+
break;
459+
case ENONET:
460+
case ENETDOWN:
461+
case EHOSTDOWN:
462+
ctx->metrics.sys_sendmmsg_cnt[ FD_METRICS_ENUM_SOCK_ERR_V_DOWN_IDX ]++;
463+
break;
464+
default:
465+
ctx->metrics.sys_sendmmsg_cnt[ FD_METRICS_ENUM_SOCK_ERR_V_OTHER_IDX ]++;
466+
/* log with NOTICE, since flushing has a significant negative performance impact */
467+
FD_LOG_NOTICE(( "sendmmsg failed (%i-%s)", errno, fd_io_strerror( errno ) ));
457468
}
458469

459470
/* first message failed, so skip failing message and continue */
460471
j++;
461472
} else {
462-
/* sent at least one, and error on ctx->batch_msg[send_cnt] is lost
463-
so assume recoverable and continue */
464-
ctx->metrics.tx_drop_cnt++;
465-
466473
/* send_cnt succeeded, so skip those and also the failing message */
467474
j += send_cnt + 1;
468475

@@ -624,13 +631,12 @@ after_credit( fd_sock_tile_t * ctx,
624631
static void
625632
metrics_write( fd_sock_tile_t * ctx ) {
626633
FD_MCNT_SET( SOCK, SYSCALLS_RECVMMSG, ctx->metrics.sys_recvmmsg_cnt );
627-
FD_MCNT_SET( SOCK, SYSCALLS_SENDMMSG, ctx->metrics.sys_sendmmsg_cnt );
634+
FD_MCNT_ENUM_COPY( SOCK, SYSCALLS_SENDMMSG, ctx->metrics.sys_sendmmsg_cnt );
628635
FD_MCNT_SET( SOCK, RX_PKT_CNT, ctx->metrics.rx_pkt_cnt );
629636
FD_MCNT_SET( SOCK, TX_PKT_CNT, ctx->metrics.tx_pkt_cnt );
630637
FD_MCNT_SET( SOCK, TX_DROP_CNT, ctx->metrics.tx_drop_cnt );
631638
FD_MCNT_SET( SOCK, TX_BYTES_TOTAL, ctx->metrics.tx_bytes_total );
632639
FD_MCNT_SET( SOCK, RX_BYTES_TOTAL, ctx->metrics.rx_bytes_total );
633-
FD_MCNT_SET( SOCK, TX_PERMISSION_ERROR_CNT, ctx->metrics.tx_permission_error_cnt );
634640
}
635641

636642
static ulong

src/disco/net/sock/fd_sock_tile_private.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#if FD_HAS_HOSTED
55

66
#include "../../../util/fd_util_base.h"
7+
#include "../../metrics/generated/fd_metrics_enums.h"
78
#include <poll.h>
89
#include <sys/socket.h>
910

@@ -26,13 +27,12 @@
2627

2728
struct fd_sock_tile_metrics {
2829
ulong sys_recvmmsg_cnt;
29-
ulong sys_sendmmsg_cnt;
30+
ulong sys_sendmmsg_cnt[ FD_METRICS_ENUM_SOCK_ERR_CNT ];
3031
ulong rx_pkt_cnt;
3132
ulong tx_pkt_cnt;
3233
ulong tx_drop_cnt;
3334
ulong rx_bytes_total;
3435
ulong tx_bytes_total;
35-
ulong tx_permission_error_cnt;
3636
};
3737

3838
typedef struct fd_sock_tile_metrics fd_sock_tile_metrics_t;

src/discof/batch/fd_batch_tile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ FD_FN_PURE static inline ulong
6666
scratch_footprint( fd_topo_tile_t const * tile FD_PARAM_UNUSED ) {
6767
ulong l = FD_LAYOUT_INIT;
6868
l = FD_LAYOUT_APPEND( l, alignof(fd_snapshot_tile_ctx_t), sizeof(fd_snapshot_tile_ctx_t) );
69-
l = FD_LAYOUT_APPEND( l, fd_spad_align(), fd_ulong_align_up( MEM_FOOTPRINT, fd_spad_align() ) );
69+
l = FD_LAYOUT_APPEND( l, fd_spad_align(), fd_spad_footprint( MEM_FOOTPRINT ) );
7070
return FD_LAYOUT_FINI( l, scratch_align() );
7171
}
7272

@@ -144,7 +144,7 @@ unprivileged_init( fd_topo_t * topo,
144144
FD_SCRATCH_ALLOC_INIT( l, scratch );
145145
fd_snapshot_tile_ctx_t * ctx = FD_SCRATCH_ALLOC_APPEND( l, alignof(fd_snapshot_tile_ctx_t), sizeof(fd_snapshot_tile_ctx_t) );
146146
memset( ctx, 0, sizeof(fd_snapshot_tile_ctx_t) );
147-
void * spad_mem = FD_SCRATCH_ALLOC_APPEND( l, fd_spad_align(), fd_ulong_align_up( MEM_FOOTPRINT, fd_spad_align() ) );
147+
void * spad_mem = FD_SCRATCH_ALLOC_APPEND( l, fd_spad_align(), fd_spad_footprint( MEM_FOOTPRINT ) );
148148
ulong scratch_alloc_mem = FD_SCRATCH_ALLOC_FINI ( l, scratch_align() );
149149

150150
if( FD_UNLIKELY( scratch_alloc_mem > (ulong)scratch + scratch_footprint(tile) ) ) {

src/discof/geyser/Local.mk

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/discof/geyser/fd_replay_notif.h

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,10 @@
66

77
/* Data structure which is passed through replay_notif link */
88

9-
#define FD_REPLAY_NOTIF_MTU 2048U
10-
#define FD_REPLAY_NOTIF_ACCT_MAX ((FD_REPLAY_NOTIF_MTU - 128U)/sizeof(struct fd_replay_notif_acct))
11-
#define FD_REPLAY_NOTIF_DEPTH (1U<<15U)
12-
13-
#define FD_REPLAY_ACCTS_TYPE 0x29FE5135U
149
#define FD_REPLAY_SLOT_TYPE 0xD1239ACAU
1510

16-
struct __attribute__((aligned(1))) fd_replay_notif_acct {
17-
uchar id [ 32U ]; /* Account id */
18-
uchar flags; /* 0=nothing 1=account written */
19-
};
20-
#define FD_REPLAY_NOTIF_ACCT_WRITTEN ((uchar)1)
21-
#define FD_REPLAY_NOTIF_ACCT_NO_FLAGS ((uchar)0)
22-
2311
struct __attribute__((aligned(64UL))) fd_replay_notif_msg {
2412
union {
25-
struct {
26-
fd_funk_txn_xid_t funk_xid;
27-
uchar sig[64U]; /* Transaction signature */
28-
struct fd_replay_notif_acct accts[FD_REPLAY_NOTIF_ACCT_MAX];
29-
uint accts_cnt;
30-
} accts;
3113
struct {
3214
ulong parent;
3315
ulong root;
@@ -37,13 +19,15 @@ struct __attribute__((aligned(64UL))) fd_replay_notif_msg {
3719
fd_hash_t block_hash;
3820
fd_pubkey_t identity;
3921
ulong transaction_count;
22+
ulong shred_cnt;
23+
ulong ts;
4024
} slot_exec;
4125
};
4226
uint type;
4327
};
4428
typedef struct fd_replay_notif_msg fd_replay_notif_msg_t;
4529

46-
/* MTU on replay_notif link is 128 */
47-
FD_STATIC_ASSERT( sizeof(fd_replay_notif_msg_t) <= FD_REPLAY_NOTIF_MTU, notify message too big);
30+
#define FD_REPLAY_NOTIF_MTU sizeof(fd_replay_notif_msg_t)
31+
#define FD_REPLAY_NOTIF_DEPTH 1024
4832

4933
#endif /* HEADER_fd_src_discof_geyser_fd_replay_notif_h */

0 commit comments

Comments
 (0)