Skip to content

dataworker: compact tabular Slack summary for root bundle proposals#3414

Open
droplet-rl wants to merge 1 commit into
masterfrom
droplet/T90K0AL22-C03GF0EF537-1779599732-969189
Open

dataworker: compact tabular Slack summary for root bundle proposals#3414
droplet-rl wants to merge 1 commit into
masterfrom
droplet/T90K0AL22-C03GF0EF537-1779599732-969189

Conversation

@droplet-rl

Copy link
Copy Markdown
Contributor

Summary

  • Replace the per-leaf JSON dump in the proposer Slack notification with two aligned tables (bundle blocks, pool rebalance) plus the relayer-refund / slow-relay roots.
  • Paused chains (startBlock === endBlock) collapse onto a single 🥶 paused: … line carrying the paused block number.
  • Pool-rebalance leaves where every token is zero across netSendAmounts, runningBalances, and bundleLpFees collapse onto a quiet leaves (all zero): … line; field names are preserved verbatim as column headers.
  • Numeric formatter is decimal-point-aligned: |x| >= 1 → 2 decimals with thousand separators; 0 < |x| < 1 → 4 significant figures in fixed-point notation (no scientific). Zero cells suppress to blank so non-zero values pop out.
  • Full leaf JSON now lives in the existing Dataworker#propose "Enqueuing new root bundle proposal txn" debug log under new poolRebalanceLeaves / relayerRefundLeaves / slowRelayLeaves fields, so the structured data is still available for forensics.
  • generateMarkdownForRootBundle is unchanged; it remains in use by the dispute path.

Example rendered output against a recent proposal lives in the originating Slack thread.

Test plan

  • yarn tsc --noEmit
  • yarn lint
  • yarn test test/Dataworker.proposeRootBundle.ts
  • yarn test test/Dataworker.validateRootBundle.ts
  • Eyeball the next live proposer Slack notification to confirm alignment renders as expected on mobile and desktop.

🤖 Generated with Claude Code

…oposals

The proposer mrkdwn body now renders two aligned tables (bundle blocks,
pool rebalance) instead of per-leaf JSON dumps. Paused chains (start ==
end) collapse onto one line with their paused block; pool-rebalance
leaves whose every token is zero across netSendAmounts, runningBalances,
and bundleLpFees collapse onto a "quiet leaves" line. The decimal-point
alignment plus a per-amount formatter (2 decimals for |x|>=1 with
thousands separators, 4 sig figs in fixed-point for sub-unit values)
keeps small LP fees readable without resorting to scientific notation.

Full leaf JSON is still emitted as part of the existing
"Enqueuing new root bundle proposal txn" debug log, so the structured
data remains available for forensics; only the Slack notification body
changed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

1 participant