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

fukasa light client: implement Ssz and Log EIPs to enable merkle proof generation and validation #3452

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Jun 13, 2024

WIP

ref: - https://github.com/ethereum/EIPs/blob/master/EIPS/eip-6493.md

How to :

git clone the repo and checkout/pull the eip-6493 branch

in repo root run: npm i this will build all packages:

test ssz spec for the ssz wrappers
  1. cd packages/util
  2. (build the package if changed something from last build); npm run build
  3. run test spec: npx vitest run test/ssz.spec.ts

TODO:

Note

  1. please note that a dummy hardfork eip6493 has been added for ease of development testing and devnet creation (on top of prague) so that will be cleaned up later when the work will become mergable
  2. some parts of the code will be cleaned up/optimized for e.g. right now PR removes the root calc optimization of empty transactions/withdrawals (for trie). however this will be added back along with the default values for ssz as well

@g11tech g11tech changed the title common,util,tx: implement aip 6493 stable container txs common,util,tx: implement EIP-6493 stable container txs Jun 13, 2024
Copy link

codecov bot commented Jun 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.88%. Comparing base (d24ca11) to head (15c4677).
Report is 39 commits behind head on master.

Current head 15c4677 differs from pull request most recent head beffd4b

Please upload reports for the commit beffd4b to get more accurate results.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 80.78% <ø> (?)
blockchain 90.97% <ø> (ø)
common ?
evm 73.75% <ø> (?)
genesis 99.98% <ø> (?)
statemanager ?
util ?
vm 63.04% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

@paulmillr
Copy link
Member

paulmillr commented Jun 21, 2024

FYI micro-eth-signer (https://github.com/paulmillr/micro-eth-signer) ssz implementation was like 8 times smaller the last time i've checked.

It's tree-shakeable, so you won't need to use the entire package.

@holgerd77
Copy link
Member

🤔

Atm this work here is conceptual only (so: not to be merged soon), but might be worth a try.

@wemeetagain
Copy link
Contributor

@paulmillr nice library, if you implement https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7495.md there, then it can be used

@etan-status
Copy link

@paulmillr thanks, have added it to https://stabilitynow.box

@g11tech g11tech changed the title common,util,tx: implement EIP-6493 stable container txs common,util,tx,block,client: implement EIP-6493 stable container txs Jun 23, 2024
@g11tech g11tech force-pushed the eip-6493 branch 2 times, most recently from 86eb2fa to beffd4b Compare June 30, 2024 11:37
debug and fix the legacy ssz encoding decoding

add a spec test for legacy ssz encoding decoding

add the ssztx boilerplate to other tx types

implement sszRaw value for 2930 tx

add 2930 spec test and debug/fix ssz encoding/decoding

add the ssz encoding decoding to 1559 tx

add eip 1559 testcase and get it working

add 4844 ssz encoding decoding

add eip 4844 testcase and get it working

define block transactions ssz type and test ssz transactionsRoot

handle ssz roots for transactions and withdrawals in block when 6493 activated

handle the roots gen in the build block

fix the transaction stable container

update the execution payload serialization deserialization for 6493

add 6493 hardfork for the testing/devnet

refactor the transaction factory ssz tx deserialization

add ssz profile<>stablecontaiber conversion spec test

add eip6493 support to common

debug and fix the block transaction withdrawal root comparision by removing null keccak hash hardcoding

enhance eip6493 tx test by testing transaction factory deserialization which uses stable container

add client eip6493 end to end spec and fix the payload generation

refactor tx serialization deserializion with respect to execution/beacon payload

add, debug and fix the transactionv1 or hex transactions validator and debug/fix the newpayloadeip6493 spec test

add 6493 to electra for kurtosis testing

console log error for debugging

console log error for debugging

txpool fix attempt

add more descriptive checks for nulloroptional

add more descriptive checks for nulloroptional

log full error

debug and fix handling of replay vs legacy tx w.r.t. v/ypartity and confirm via spec test

build fix

dev and add transaction inclusion proof to the getTransactionX apis

workaround to get the proof since stable container impl for proof seems buggy and breaking

refactor the proof format based on feedback

debug, discuss and fix the signature packing scheme

add hack to schedule 6493 on prague in cli for stablecontainer devnets

debug and fix newpayload eip6493 spec
@paulmillr
Copy link
Member

@wemeetagain @etan-status SSZ stable containers have been implemented in eth-signer v0.12.

@etan-status
Copy link

@wemeetagain @etan-status SSZ stable containers have been implemented in eth-signer v0.12.

Cool, have added the checkmark on https://stabilitynow.box – Thanks!!

@paulmillr
Copy link
Member

@etan-status doesn't seem like the site got updated? Also url to micro-eth-signer is wrong, instead of github it's some random website

@etan-status
Copy link

etan-status commented Sep 24, 2024

Yeah, I noticed that weird link as well and informed @philknows - something weird with that notion instance going on (the link is correct in the editor but points to this weird caching server that has wrong http headers once rendered)

@g11tech g11tech changed the title common,util,tx,block,client: implement EIP-6493 stable container txs fukasa light client: implement Ssz and Log EIPs to enable merkle proof generation and validation Sep 25, 2024
@philknows
Copy link

Yeah, I noticed that weird link as well and informed @philknows - something weird with that notion instance going on (the link is correct in the editor but points to this weird caching server that has wrong http headers once rendered)

This has been fixed now @paulmillr , thanks for bringing it to our attention!

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

Successfully merging this pull request may close these issues.

6 participants