hermeznetwork / hermez-node

Hermez node Go implementation
GNU Affero General Public License v3.0
60 stars 33 forks source link

Revert sync by events to sync every block #1149

Closed tclemos closed 2 years ago

tclemos commented 2 years ago

What does this PR does?

reverts the changes made to synchronize by events

How to test?

wipe the DBs and resynchronize your node with this version

Checklist

These are the criteria that every PR should meet, please check them off as you review them:

tclemos commented 2 years ago

integration tests working fine

Starting test
    ✓ Init variables (5504ms)
    ✓ Check ETH L1 deposit (34349ms)
    ✓ Check ERC20 L1 deposit (54463ms)
    ✓ Check ETH L1 force exit (44136ms)
    ✓ Check ERC20 L1 force exit (48140ms)
    ✓ Check ETH withdrawal from firsts forceExits (16122ms)
    ✓ Check ERC20 withdrawal from firsts forceExits (12128ms)
    ✓ Check ETH N L1 force exits (54144ms)
    ✓ Check ETH withdrawal from previous N force exits (4046ms)
    ✓ Check single ETH L2 transfer (40215ms)
    ✓ Check single ERC20 L2 transfer (40212ms)
    ✓ Transfer ETH to a non-existent Bjj address (50218ms)
    ✓ Transfer ERC20 to a non-existent Bjj address (50216ms)
    ✓ Transfer ETH to hermez ethereum address (40196ms)
    ✓ Transfer ERC20 to hermez ethereum address (40254ms)
    ✓ Transfer ETH to non-existent ETH address (30255ms)
    ✓ Transfer ETH to hermez ethereum address from internal account (40202ms)
    ✓ Transfer ERC20 to hermez ethereum address from internal account (30196ms)
    ✓ Check multiple L2 ETH transfer in same batch (40837ms)
    ✓ Check multiple L2 ETH transfer in different batches (150885ms)
    ✓ Atomic txs (40379ms)
    ✓ Check L2 ETH exit (30190ms)
    ✓ Check L2 ERC20 exit (40213ms)
    ✓ Check ETH withdrawal from L2 exit (4049ms)
    ✓ Check ERC20 withdrawal from L2 exit (8068ms)
    ✓ Exit ETH and circuit withdrawal (46274ms)
    ✓ Assert API endpoints (1583ms)
    ✓ Update Buckets (12184ms)
    ✓ Check ETH L1 force exit bucket (34132ms)
    ✓ Check ERC20 L1 force exit bucket (48126ms)
    ✓ Check ETH withdrawal buckets (12114ms)
    ✓ Check ERC20 withdrawal buckets (12126ms)
    ✓ Check withdrawals buckets

  33 passing (19m)
tclemos commented 2 years ago

I have already fully synchronized my node twice using this version and everything worked fine. I'll let it synchronizing to check the stability of this version while the node is trying to keep it in sync with the blockchain.

Tomorrow I'm planning to forge some batches using this version.