Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: compact checkpoint #1256

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

chore: compact checkpoint #1256

wants to merge 2 commits into from

Conversation

goums
Copy link
Contributor

@goums goums commented Nov 18, 2024

use more compact checkpoint by:

  • removing chainId
  • use binary encoding of number
  • export as base64

example checkpoint:

{
    blockTimestamp: 1731943908,
    chainId: 1n,
    blockNumber: 2000159n,
    transactionIndex: 453n,
    eventType: 1,
    eventIndex: 12n,
  } 

previous encoding: 75 characters
173194390800000000000000010000000002000159000000000000045310000000000000012

new encoding (base64): 24 characters
Zztd5AAAAAAAHoUfAcUBAAw=

alternative encoding (hex): 34 characters
673b5de400000000001e851f01c501000c

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