Git Product home page Git Product logo

Comments (4)

JustinDrake avatar JustinDrake commented on August 26, 2024

My gut feel is to make the chunks in shard blocks small, maybe 32 bytes. Any reason 256 bytes was chosen @vbuterin?

from consensus-specs.

arnetheduck avatar arnetheduck commented on August 26, 2024

There are three chunk sizes that could be considered "special":

  • aligned with hash function block size - this helps make good use of the hash function itself in terms of entropy and avoiding arbitrary padding
  • aligned with hash output size - this would help make all nodes in the tree have the same size, after chunking
  • aligned with the largest tree_hash_root output - all inputs have to pass through this function, so using the same here makes it easier to avoid arbitrary-length buffers in the tree hashing code

from consensus-specs.

vbuterin avatar vbuterin commented on August 26, 2024

I'm ok with 32 bytes.

Sorry, I remembered that my original reason for wanting 256 bytes was erasure coding efficiency, but then I remembered that hash tree chunk size and erasure code chunk size do not need to be the same. So 32 byte shard chunks it is.

from consensus-specs.

hwwhww avatar hwwhww commented on August 26, 2024

closing via #344

from consensus-specs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.