Skip to content

ethexe: set limits for one announce programs processing #5203

@grishasobol

Description

@grishasobol

As soon as we cannot commit announces on ethereum partially, we need to have a strong limits for actions which can be done in Processor::process_programs, so that batch commit for this announce would not excess ethereum transaction limit and gas limit.

Cases:

  1. Each injected transaction appends a message to programs queue, and changing therefore program state on ethereum, so each update of state hash burns gas and also transitions increase commitment size. So would be nice to have strong limit of max injected transactions included: no more than 64 txs per announce.

  2. Each outgoing to users messages or replies go to ethereum in commitment, which also burns gas and size in transaction. So, here is very important (!!!) to limit summary amount of outging messages bytes, produced by one announce. At least smaller than 128kB (max ethereum transaction size). Better smaller than 64kB.

  3. Callback. If reply calls a callback then we should also take this into account. We should limit amount of allowed replies with callbacks in one announce (for example no more than 4 callbacks <= 2_000_000 gas)

  4. Amount of programs for which we process queues also should be limited, in order to limit max amount of state hash changes.

... can be many other cases which should be taken in to account in order limit transitions gas and size per announce.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions