zkevm-specs icon indicating copy to clipboard operation
zkevm-specs copied to clipboard

Difficulty size limit

Open kobigurk opened this issue 2 years ago • 2 comments

We're implement the circuit for DIFFICULTY atm, and have seen that in https://github.com/scroll-tech/zkevm-specs/blob/master/specs/opcode/41COINBASE-45GASLIMIT_48BASEFEE.md, the DIFFICULTY is 32 bytes.

In https://github.com/ethereum/go-ethereum/blob/d4d288e3f1cebb183fce9137829a76ddf7c6d12a/core/types/block.go#L132 the limit is 10 bytes.

What should we go with?

kobigurk avatar Apr 17 '22 07:04 kobigurk

I would be in favour of aligning with go-ethereum and limiting DIFFICULTY to 10 bytes.

roynalnaruto avatar Apr 17 '22 17:04 roynalnaruto

So the rationale we follow is:

  1. Yellow paper
  2. https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1985.md
  3. Geth implementation.

In that case, nothing is clear from the first two. So I would go for Geth's impl as reference for the RLC size.

CPerezz avatar May 02 '22 14:05 CPerezz