Coder Social home page Coder Social logo

Comments (1)

csuwildcat avatar csuwildcat commented on July 20, 2024

I would propose that max batch size be based on a minified (and gzipped?) number of bytes that the entire batch payload must not exceed.

The next question, once a batch is evaluated to be under the max batch size, is whether or not we should enforce a max op size. This comes with a few considerations:

  1. Basing this on either total size vs size of an individual op may require different PoW assessment, given a batch that is 10MB but only contains 2 ops, one that's 9.9MB and one that is 0.1MB should probably require a PoW that is op-size relative. If you just went with an op size limit, you could enforce a less complex PoW assessment, wherein it is the same for each op, regardless of exactly what its per-op size is. At first glance, I think this makes a case for enforcing a per-op size, vs wildly variable size ops that all must fit in a max batch size.
  2. Allowing wildly variable op sizes could also present a challenge for rooting nodes who hope to provide a roughly constant number of ops they can root for inbound callers. If a rooting node is limited to 1 txn per block (because that's all they are willing to expend), a malicious caller could crowd out useful ops more easily by posting a bunch of large, useless, but technically valid ops, just to effectively limit the usefulness of the rooting node to others.

Given the considerations above, it seems like the clear answer is to have a max batch size that no batch can exceed, as well as per-op max size that each individual op must not exceed.

from sidetree.

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.