hermeznetwork / hermez-node

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

Apply pipeline concurrency pattern to tx selector processL2Txs method #1119

Closed Mikelle closed 2 years ago

Mikelle commented 3 years ago

Closes https://github.com/hermeznetwork/hermez-node/issues/1107

What does this PR does?

Split verification process and processing txs process in tx selector and apply pipeline pattern for tx selection

How to test?

Using unit, integration and load tests

executing MakeFile to initalize all the services in dockers
Starting test
    ✓ Init variables (5602ms)
    ✓ Check ETH L1 deposit (38427ms)
    ✓ Check ERC20 L1 deposit (58826ms)
    ✓ Check ETH L1 force exit (54300ms)
    ✓ Check ERC20 L1 force exit (54245ms)
    ✓ Check ETH withdrawal from firsts forceExits (12255ms)
    ✓ Check ERC20 withdrawal from firsts forceExits (12195ms)
    ✓ Check ETH N L1 force exits (38154ms)
    ✓ Check ETH withdrawal from previous N force exits (4096ms)
    ✓ Check single ETH L2 transfer (40326ms)
    ✓ Check single ERC20 L2 transfer (40304ms)
    ✓ Transfer ETH to a non-existent Bjj address (50308ms)
    ✓ Transfer ERC20 to a non-existent Bjj address (50315ms)
    ✓ Transfer ETH to hermez ethereum address (50282ms)
    ✓ Transfer ERC20 to hermez ethereum address (50296ms)
    ✓ Transfer ETH to non-existent ETH address (40334ms)
    ✓ Transfer ETH to hermez ethereum address from internal account (40274ms)
    ✓ Transfer ERC20 to hermez ethereum address from internal account (40299ms)
    ✓ Check multiple L2 ETH transfer in same batch (31186ms)
    ✓ Check multiple L2 ETH transfer in different batches (171212ms)
    ✓ Atomic txs (40491ms)
    ✓ Check L2 ETH exit (50325ms)
    ✓ Check L2 ERC20 exit (40269ms)
    ✓ Check ETH withdrawal from L2 exit (8094ms)
    ✓ Check ERC20 withdrawal from L2 exit (8125ms)
    ✓ Exit ETH and circuit withdrawal (54980ms)
    ✓ Assert API endpoints (2553ms)
    ✓ Update Buckets (12256ms)
    ✓ Check ETH L1 force exit bucket (48215ms)
    ✓ Check ERC20 L1 force exit bucket (48176ms)
    ✓ Check ETH withdrawal buckets (12146ms)
    ✓ Check ERC20 withdrawal buckets (16222ms)
    ✓ Check withdrawals buckets

  33 passing (21m)

Checklist

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

arnaubennassar commented 2 years ago

Closing this PR as we are not going to add this feature