Ignasi Ramos

@Ignasi

Joined on Nov 10, 2021

  • First approach implementation: How many withdraws (bridges) can the PP support? How to verify withdrawals with the NewSR? Synchrony between state transition and PP, specially with invariant chainsMaybe add input to PP with LERS(i+x) Are withdrawals signed (to verify)? Maybe by trusted Seq? Input consensus AggLayer synch? Massive update at agg layer
     Like  Bookmark
  • 3. Inappropria te zk-counter check leads to possib le out of counters before This is an already known issue. This error has been mitigated with the counters margin we add at the rom. You can check the margin here Example Binaries example: the max real amount of available binaries is set at constants.zkasm: CONST %TOTAL_STEPS_LIMIT = 2**23 CONST %MAX_CNT_BINARY_LIMIT = %TOTAL_STEPS_LIMIT / 16 On the other hand, the value we use at the rom while processing a batch has a safety margin from this value:
     Like  Bookmark
  • VCM Javascript class implementation that handles the virtual counters throught a batch execution. Current status: Virtual counters approach is currently working with etrog hardfork. All test vectors have passed. TODO: In som tests, the amount of some virtual counters is up to ten times the amount of real counters. This tests should be reviewed one by one and fix the vcounters computations accordly. Would be very interesting to do a tool that computes the vcounters of transaction in mainnet and testnet and checks the vcounter computation is lower than the real one Repositories: zkevm-commonjs:
     Like  Bookmark
  • How to generate your own executor inputs The used repo for this purpose is https://github.com/0xPolygonHermez/zkevm-testvectors There are 2 differentated steps: 1- Generate state-transition file from gen file 2- Generate executor input from state-transition file 1- Generate state-transition file from gen file You have to create a generator json file with the desired test and store it at /zkevm-testvectors/tools-calldata/evm/generate-test-vectors folder To know the structore of the file to follow, there is plenty of examples in the above folder.
     Like  Bookmark
  • Blockhash company comparison Scope: 1- Deploy/call a smart contract that stores the blockhash from BLOCKHASH opcode image 2- Check returned block hash from rpc call 3- Check block hash at explorers 4- Compute block hash from block header params: const rlp = ethers.utils.RLP.encode([
     Like  Bookmark
  • Plasma bottleneck: Large client-side data storage costs Fundamental limitations of Plasma that make it hard to generalize beyond payments (EVM) Challenges regarding generalizing plasma to EVM (hard) State objects in the EVM do not have a clear "owner" EVM does not attempt to limit dependencies Unbounded dependencies in the EVM make it much harder to have aligned incentives to prove validity How validity proofs can alleviate many of these problems?
     Like  Bookmark
  • Summary branches virtual counters ForkId 5: zkevm-testvectors: feature/forkid-5-vcounters zkevm-commonjs: feature/forkid-5-vcounters zkevm-rom: feature/forkid-5-vcounters Etrog:Still WIP -> waiting to completely finish rom Testing full tracer
     Like  Bookmark
  • Counters legend: S: steps P: Poseidons Pa: Padding A: Arith B: Binaries K: Keccaks M: Mem align Constants:
     Like  Bookmark
  • Review previous meet IgnasiblockHash forkId6 -> finished at rom and zkevmcommonjs Updated test vectors with forkid6 -> all passed update full tracer + comms proto -> in progress Laia update zkevm-testvectors-internal:forkid 6 forkid 6 refactor pairings
     Like  Bookmark
  • Review previous meet IgnasiblockHash forkId6 spec zkevm-comms-protocol spec full-tracer Laia holidays Jesus
     Like  Bookmark
  • What happened? In Ethereum, transaction Receipt Trie contains status and logs of a transaction organized in a trie structure. The receipt data resides in the state database and the root hash is stored in the block header. The logs in the trie are inserted in emision order. We have found an issue in the tracer where the logs where returned in a wrong order (not emision order). This issue directly affects the value of the hash of the Transactions Receipts Trie. The hash is computed the following way: Hash(log_0, log_1, log_2) If the logs are not correclty ordered, it directly affects the hash value. Solution
     Like  Bookmark
  • Tests Transfer Eth ERC20 NFT Deploy
     Like  Bookmark
  • zkVM instructions MLOAD(addr) op = mem(addr) addr = SP | SP++ | SP-- | SP+offset | SP-offset | SYS:E+offset | SYS:E+offset | SYS:E-offset | SYS:E | MEM:E | MEM:E+offset | MEM:E-offset | STACK:E | STACK:E+offset | STACK:E-offset | variable | variable + E | variable + E MSTORE(addr) mem(addr) = op SLOAD
     Like  Bookmark
  • In some cases we may want to run an input at executorjs using an external database (withouth adding th db at the input). This is very useful to debug the behaviour of the rom with a batchL2data obtained from internal or public testnet/mainnet. Steps 1- Get the input: Donwload hermez-localrepository: https://github.com/hermeznetwork/hermez-local We want to run docker-compose in folder mango-sync: Configurations: From file config.json (executor config) Set saveResponseToFile, saveOutputToFile, saveInputToFileto true. This will make the executor to create a file for each batch.
     Like  Bookmark
  • Objective Detect posible out of counters at prover from the rom code before it happens Current approach Currently we are checking if we have enough counters to run a function at the begginning of the function, always checking the worst case scenario. We are doing it at the lowest function level. Example: opJUMPI: check counters 100 steps + 2 binaries EQ -> -1 binary checkJumpDestcheckJumpDestDeploymentcheckJumpDestDeploymentCreateMLOADX: check 100 steps + 2 binary + 1 mem align
     Like  Bookmark
  • Ethereum transfers: 619 num-bytes batch = 39288 bytes error: OOC keccaks total GAS: 12999000 binaries to process 1 tx. 2 bin/batch - main 16 bin/tx + 3 bin/batch - util 3 bin/tx - rlp 713 bin/tx + 3 bin/batch - ecrecover
     Like  Bookmark