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

epic: jidoka types #800

Open
3 tasks
ClementWalter opened this issue Feb 13, 2025 · 0 comments
Open
3 tasks

epic: jidoka types #800

ClementWalter opened this issue Feb 13, 2025 · 0 comments
Labels
epic Label an issue with sub issues kaizen Continuous improvement

Comments

@ClementWalter
Copy link
Member

ClementWalter commented Feb 13, 2025

Why

While we were confident that the fuzz diff testing were allowing us to dev fast and accuratly, we faced a significant number of bugs while finalizing the state transition functions. Amongst them:

  • careless casting = go from one internal XXXStruct to another type NewType(prev.valu/e) caused a lot of issues related especially to endianess
  • verbose type creation and update = hard to understand the core logic of a function when 50% of the code is boilerplate

What

Remove this two issues

  • no more cast (either with the actual keyword, or with the pattern above mentioned) outside of a well scope util
  • modifier for types so that what can just trie_get in one line (example)

How

  • Do not share internal struct if they are not the same underlying data (e.g. Uint256 used by Hash32, U256, etc.)
  • List all such cases and create ad-hoc uils, e.g.
    • U256_to_be_bytes
    • U256_into_Hash32
  • wherever there is a cast, think about a dedicated util/"method" to encapsulate it so that it's well delimited

Tasks

Preview Give feedback
  1. kaizen
  2. kaizen
    obatirou
  3. kaizen
@ClementWalter ClementWalter moved this to Backlog in Keth Feb 13, 2025
@ClementWalter ClementWalter added this to the EELS migration milestone Feb 13, 2025
@ClementWalter ClementWalter added the epic Label an issue with sub issues label Feb 13, 2025
@Eikix Eikix added the kaizen Continuous improvement label Feb 13, 2025
@Eikix Eikix moved this from Backlog to Todo in Keth Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Label an issue with sub issues kaizen Continuous improvement
Projects
Status: Todo
Development

No branches or pull requests

2 participants