Skip to content

Commit eb100ce

Browse files
committed
add sim logs to filler errors
1 parent a27577d commit eb100ce

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

src/bots/common/threads/txSender.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ export class TxSender {
486486
simResult.cuEstimate
487487
} simError: ${JSON.stringify(
488488
simResult.simError
489-
)}, sim tx logs:\n${JSON.stringify(simResult.simTxLogs, null, 2)}`
489+
)}, sim logs:\n${JSON.stringify(simResult.simTxLogs, null, 2)}`
490490
);
491491
}
492492
this.metrics.txAttempted++;

src/bots/filler.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,7 +1842,9 @@ export class FillerBot extends TxThreaded implements Bot {
18421842
logger.error(
18431843
`simError: ${JSON.stringify(
18441844
simResult.simError
1845-
)} (fillTxId: ${fillTxId})`
1845+
)} (fillTxId: ${fillTxId}), sim logs:\n${
1846+
simResult.simTxLogs ? simResult.simTxLogs.join('\n') : 'none'
1847+
}`
18461848
);
18471849
handleSimResultError(
18481850
simResult,
@@ -2094,7 +2096,7 @@ export class FillerBot extends TxThreaded implements Bot {
20942096
logger.error(
20952097
`executeTriggerablePerpNodesForMarket simError: (simError: ${JSON.stringify(
20962098
simResult.simError
2097-
)}, logs: ${JSON.stringify(simResult.simTxLogs)})`
2099+
)}, sim logs: ${JSON.stringify(simResult.simTxLogs)})`
20982100
);
20992101
handleSimResultError(
21002102
simResult,
@@ -2246,7 +2248,11 @@ export class FillerBot extends TxThreaded implements Bot {
22462248

22472249
if (this.simulateTxForCUEstimate && simResult.simError) {
22482250
logger.info(
2249-
`settlePnls simError: ${JSON.stringify(simResult.simError)}`
2251+
`settlePnls simError: ${JSON.stringify(
2252+
simResult.simError
2253+
)}, sim logs:\n${
2254+
simResult.simTxLogs ? simResult.simTxLogs.join('\n') : 'none'
2255+
}`
22502256
);
22512257
handleSimResultError(
22522258
simResult,

src/experimental-bots/filler/fillerMultithreaded.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,7 +1944,9 @@ export class FillerMultithreaded {
19441944
logger.error(
19451945
`simError: ${JSON.stringify(
19461946
simResult.simError
1947-
)} (fillTxId: ${fillTxId})`
1947+
)} (fillTxId: ${fillTxId}), sim logs:\n${
1948+
simResult.simTxLogs ? simResult.simTxLogs.join('\n') : 'none'
1949+
}`
19481950
);
19491951
} else {
19501952
if (this.hasEnoughSolToFill) {
@@ -2158,7 +2160,11 @@ export class FillerMultithreaded {
21582160

21592161
if (this.simulateTxForCUEstimate && simResult.simError) {
21602162
logger.info(
2161-
`settlePnls simError: ${JSON.stringify(simResult.simError)}`
2163+
`settlePnls simError: ${JSON.stringify(
2164+
simResult.simError
2165+
)}, sim logs:\n${
2166+
simResult.simTxLogs ? simResult.simTxLogs.join('\n') : 'none'
2167+
}`
21622168
);
21632169
handleSimResultError(
21642170
simResult,

src/experimental-bots/spotFiller/spotFillerMultithreaded.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,9 @@ export class SpotFillerMultithreaded {
10291029
logger.error(
10301030
`simError: ${JSON.stringify(
10311031
simResult.simError
1032-
)} (fillTxId: ${fillTxId})`
1032+
)} (fillTxId: ${fillTxId}), sim logs:\n${
1033+
simResult.simTxLogs ? simResult.simTxLogs.join('\n') : 'none'
1034+
}`
10331035
);
10341036
handleSimResultError(
10351037
simResult,

0 commit comments

Comments
 (0)