Skip to content

chore: Update GaslessRelayer logging with processing time#3238

Open
dijanin-brat wants to merge 9 commits into
masterfrom
dijanin-brat/logSubmittedAtTimestamp
Open

chore: Update GaslessRelayer logging with processing time#3238
dijanin-brat wants to merge 9 commits into
masterfrom
dijanin-brat/logSubmittedAtTimestamp

Conversation

@dijanin-brat
Copy link
Copy Markdown
Contributor

No description provided.

@dijanin-brat dijanin-brat self-assigned this Apr 15, 2026
Comment thread src/gasless/GaslessRelayer.ts Outdated
Comment thread src/gasless/GaslessRelayerConfig.ts Outdated
Comment thread src/gasless/GaslessRelayer.ts Outdated
const delta = (tEnd - tStart) / 1000;
log("info", `Processed ${origin} depositId ${depositId} in ${delta} seconds.`);
const submitToProcessedTime = (tEnd - new Date(depositMessage.submittedAt).getTime()) / 1000;
log("info", `Processed ${origin} depositId ${depositId} in ${delta} seconds.`, { submitToProcessedTime });
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming is hard, but I am wondering about tSubmitDelta or something?

Note also that we will emit this log when we are re-processing an existing deposit (i.e. if it was already deposited and/or filled), in which case the timestamp won't be reliable. That might reduce the utility of this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8c4501c

Yes, it will log even if the deposit is processed already, tho this can be the final trigger for us to refactor this and discard all deposits that have already been processed when new bot instance start?

Comment thread src/gasless/GaslessRelayer.ts Outdated
@dijanin-brat dijanin-brat marked this pull request as ready for review April 16, 2026 09:24
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d6f8428819

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const tEnd = performance.now();
const delta = (tEnd - tStart) / 1000;
log("info", `Processed ${origin} depositId ${depositId} in ${delta} seconds.`);
const tSubmitDelta = (tEnd - new Date(depositMessage.submittedAt).getTime()) / 1000;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Compute submit latency from wall-clock timestamp

tSubmitDelta is calculated by subtracting an epoch timestamp (new Date(depositMessage.submittedAt).getTime()) from performance.now(), but performance.now() is process-relative monotonic time, not wall-clock time. In this path the value will be a large negative number for every message, so the new latency log is always incorrect and can mislead any monitoring based on tSubmitDelta.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants