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

Monorepo -> Tree Shaking: Remaining Static Constructor Tasks & Clean-Up #3560

Closed
holgerd77 opened this issue Aug 6, 2024 · 2 comments
Closed

Comments

@holgerd77
Copy link
Member

Ok, this is a issue to finalize on #3487, will go through all the libaries and give a write-up of the remaining constructor refactors + some additional clean-up/refactoring tasks:

Block

  • Kill off from-rpc.ts, header-from-rpc.ts files, move code within function blocks of constructors.ts
  • Create block and header directories, move block.ts and header.ts over, create index.ts file, split constructors.ts into the block and header methods and move over respectively (if this full TODO item is controversial we can also give a quick discussion, I would find it a useful better organizing structure)
  • Rename createBlockFromValuesArray -> createBlockFromBytesArray
  • Rename createBlockHeaderFromValuesArray -> createBlockHeaderFromBytesArray

Util

Withdrawal still missing, accustomed naming scheme:

  • createWithdrawal()
  • createWithdrawalFromBytesArray()

No extra file, all in withdrawal.ts

Same with Request (rename requests.ts to request.ts along for consistency, separate commit):

  • createDepositRequest()
  • createDepositRequestFromJSON()
  • createWithdrawalRequest()
  • createWithdrawalRequestFromJSON()

Verkle

  • New constructors.ts file
  • createVerkleTree()

VM

Yes, I know, only one (same as Verkle). But we should nevertheless do now for both consistency and extensibility reasons, so the moment we want to add a second constructor we would otherwise be stuck with a mixed scheme.

That should be it. One or separate PRs, as preferred, should both be ok! 🙂

@ScottyPoi
Copy link
Contributor

Closing with all tasks completed

@holgerd77
Copy link
Member Author

🎉

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

No branches or pull requests

2 participants