mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-01-10 06:28:04 -05:00
Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com> Co-authored-by: noelwei <fan@scroll.io> Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com> Co-authored-by: Rohit Narurkar <rohit.narurkar@proton.me> Co-authored-by: colinlyguo <colinlyguo@scroll.io> Co-authored-by: Péter Garamvölgyi <peter@scroll.io> Co-authored-by: Morty <70688412+yiweichi@users.noreply.github.com> Co-authored-by: omerfirmak <omerfirmak@users.noreply.github.com> Co-authored-by: jonastheis <jonastheis@users.noreply.github.com> Co-authored-by: georgehao <georgehao@users.noreply.github.com>
451 lines
17 KiB
Go
451 lines
17 KiB
Go
package tests
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"math"
|
|
"math/big"
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/scroll-tech/da-codec/encoding"
|
|
"github.com/scroll-tech/go-ethereum/common"
|
|
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
|
|
"github.com/scroll-tech/go-ethereum/params"
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
"gorm.io/gorm"
|
|
|
|
"scroll-tech/common/database"
|
|
"scroll-tech/common/types"
|
|
"scroll-tech/common/types/message"
|
|
|
|
"scroll-tech/rollup/internal/config"
|
|
"scroll-tech/rollup/internal/controller/relayer"
|
|
"scroll-tech/rollup/internal/controller/watcher"
|
|
"scroll-tech/rollup/internal/orm"
|
|
)
|
|
|
|
func testCommitAndFinalizeGenesisBatch(t *testing.T) {
|
|
db := setupDB(t)
|
|
defer database.CloseDB(db)
|
|
|
|
prepareContracts(t)
|
|
|
|
l2Cfg := rollupApp.Config.L2Config
|
|
l2Relayer, err := relayer.NewLayer2Relayer(context.Background(), l2Client, db, l2Cfg.RelayerConfig, ¶ms.ChainConfig{}, true, relayer.ServiceTypeL2RollupRelayer, nil)
|
|
assert.NoError(t, err)
|
|
assert.NotNil(t, l2Relayer)
|
|
defer l2Relayer.StopSenders()
|
|
|
|
genesisChunkHash := common.HexToHash("0x00e076380b00a3749816fcc9a2a576b529952ef463222a54544d21b7d434dfe1")
|
|
chunkOrm := orm.NewChunk(db)
|
|
dbChunk, err := chunkOrm.GetChunksInRange(context.Background(), 0, 0)
|
|
assert.NoError(t, err)
|
|
assert.Len(t, dbChunk, 1)
|
|
assert.Equal(t, genesisChunkHash.String(), dbChunk[0].Hash)
|
|
assert.Equal(t, types.ProvingTaskVerified, types.ProvingStatus(dbChunk[0].ProvingStatus))
|
|
|
|
genesisBatchHash := common.HexToHash("0x2d214b024f5337d83a5681f88575ab225f345ec2e4e3ce53cf4dc4b0cb5c96b1")
|
|
batchOrm := orm.NewBatch(db)
|
|
batch, err := batchOrm.GetBatchByIndex(context.Background(), 0)
|
|
assert.NoError(t, err)
|
|
assert.Equal(t, genesisBatchHash.String(), batch.Hash)
|
|
assert.Equal(t, types.ProvingTaskVerified, types.ProvingStatus(batch.ProvingStatus))
|
|
assert.Equal(t, types.RollupFinalized, types.RollupStatus(batch.RollupStatus))
|
|
}
|
|
|
|
func testCommitBatchAndFinalizeBundleCodecV4V5V6(t *testing.T) {
|
|
db := setupDB(t)
|
|
|
|
prepareContracts(t)
|
|
|
|
euclidTime := uint64(3)
|
|
chainConfig := ¶ms.ChainConfig{LondonBlock: big.NewInt(0), BernoulliBlock: big.NewInt(0), CurieBlock: big.NewInt(0), DarwinTime: new(uint64), DarwinV2Time: new(uint64), EuclidTime: &euclidTime}
|
|
|
|
// Create L2Relayer
|
|
l2Cfg := rollupApp.Config.L2Config
|
|
l2Relayer, err := relayer.NewLayer2Relayer(context.Background(), l2Client, db, l2Cfg.RelayerConfig, chainConfig, true, relayer.ServiceTypeL2RollupRelayer, nil)
|
|
assert.NoError(t, err)
|
|
|
|
// add some blocks to db
|
|
var blocks []*encoding.Block
|
|
for i := int64(0); i < 10; i++ {
|
|
header := gethTypes.Header{
|
|
Number: big.NewInt(i + 1),
|
|
ParentHash: common.Hash{},
|
|
Difficulty: big.NewInt(0),
|
|
BaseFee: big.NewInt(0),
|
|
Root: common.HexToHash("0x1"),
|
|
Time: uint64(i),
|
|
}
|
|
blocks = append(blocks, &encoding.Block{
|
|
Header: &header,
|
|
Transactions: nil,
|
|
WithdrawRoot: common.HexToHash("0x2"),
|
|
RowConsumption: &gethTypes.RowConsumption{},
|
|
})
|
|
}
|
|
|
|
cp := watcher.NewChunkProposer(context.Background(), &config.ChunkProposerConfig{
|
|
MaxBlockNumPerChunk: 100,
|
|
MaxTxNumPerChunk: 10000,
|
|
MaxL1CommitGasPerChunk: 50000000000,
|
|
MaxL1CommitCalldataSizePerChunk: 1000000,
|
|
MaxRowConsumptionPerChunk: 1048319,
|
|
ChunkTimeoutSec: 300,
|
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
|
}, encoding.CodecV4, chainConfig, db, nil)
|
|
|
|
bap := watcher.NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
|
MaxL1CommitGasPerBatch: 50000000000,
|
|
MaxL1CommitCalldataSizePerBatch: 1000000,
|
|
BatchTimeoutSec: 300,
|
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
|
MaxChunksPerBatch: math.MaxInt32,
|
|
}, encoding.CodecV4, chainConfig, db, nil)
|
|
|
|
bup := watcher.NewBundleProposer(context.Background(), &config.BundleProposerConfig{
|
|
MaxBatchNumPerBundle: 1000000,
|
|
BundleTimeoutSec: 300,
|
|
}, encoding.CodecV4, chainConfig, db, nil)
|
|
|
|
l2BlockOrm := orm.NewL2Block(db)
|
|
batchOrm := orm.NewBatch(db)
|
|
bundleOrm := orm.NewBundle(db)
|
|
|
|
err = l2BlockOrm.InsertL2Blocks(context.Background(), blocks[:5])
|
|
assert.NoError(t, err)
|
|
|
|
cp.TryProposeChunk()
|
|
bap.TryProposeBatch()
|
|
|
|
err = l2BlockOrm.InsertL2Blocks(context.Background(), blocks[5:])
|
|
assert.NoError(t, err)
|
|
|
|
cp.TryProposeChunk()
|
|
bap.TryProposeBatch()
|
|
|
|
l2Relayer.ProcessPendingBatches()
|
|
|
|
// make sure that batches are committed before proposing bundles (as bundle proposing depends on batches being committed).
|
|
require.Eventually(t, func() bool {
|
|
batches, getErr := batchOrm.GetBatches(context.Background(), map[string]interface{}{}, nil, 0)
|
|
assert.NoError(t, getErr)
|
|
|
|
assert.Len(t, batches, 3)
|
|
batches = batches[1:]
|
|
for _, batch := range batches {
|
|
if types.RollupCommitted != types.RollupStatus(batch.RollupStatus) {
|
|
return false
|
|
}
|
|
}
|
|
|
|
// make sure that batches 1 and 2 have been committed in separate transactions
|
|
return batches[0].CommitTxHash != batches[1].CommitTxHash
|
|
}, 30*time.Second, time.Second)
|
|
|
|
bup.TryProposeBundle() // The proposed bundle contains two batches when codec version is codecv3.
|
|
|
|
batchProof := &message.Halo2BatchProof{
|
|
RawProof: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31},
|
|
Instances: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31},
|
|
Vk: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31},
|
|
}
|
|
batches, err := batchOrm.GetBatches(context.Background(), map[string]interface{}{}, nil, 0)
|
|
assert.NoError(t, err)
|
|
batches = batches[1:]
|
|
for _, batch := range batches {
|
|
err = batchOrm.UpdateProofByHash(context.Background(), batch.Hash, batchProof, 100)
|
|
assert.NoError(t, err)
|
|
err = batchOrm.UpdateProvingStatus(context.Background(), batch.Hash, types.ProvingTaskVerified)
|
|
assert.NoError(t, err)
|
|
}
|
|
|
|
bundleProof := &message.Halo2BundleProof{
|
|
RawProof: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31},
|
|
Instances: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31},
|
|
Vk: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31},
|
|
}
|
|
bundles, err := bundleOrm.GetBundles(context.Background(), map[string]interface{}{}, nil, 0)
|
|
assert.NoError(t, err)
|
|
for _, bundle := range bundles {
|
|
err = bundleOrm.UpdateProofAndProvingStatusByHash(context.Background(), bundle.Hash, bundleProof, types.ProvingTaskVerified, 100)
|
|
assert.NoError(t, err)
|
|
}
|
|
|
|
assert.Eventually(t, func() bool {
|
|
l2Relayer.ProcessPendingBundles()
|
|
|
|
batches, err := batchOrm.GetBatches(context.Background(), map[string]interface{}{}, nil, 0)
|
|
assert.NoError(t, err)
|
|
assert.Len(t, batches, 3)
|
|
batches = batches[1:]
|
|
for _, batch := range batches {
|
|
if types.RollupStatus(batch.RollupStatus) != types.RollupFinalized {
|
|
return false
|
|
}
|
|
|
|
assert.NotEmpty(t, batch.FinalizeTxHash)
|
|
receipt, getErr := l1Client.TransactionReceipt(context.Background(), common.HexToHash(batch.FinalizeTxHash))
|
|
assert.NoError(t, getErr)
|
|
assert.Equal(t, gethTypes.ReceiptStatusSuccessful, receipt.Status)
|
|
}
|
|
|
|
bundles, err := bundleOrm.GetBundles(context.Background(), map[string]interface{}{}, nil, 0)
|
|
assert.NoError(t, err)
|
|
assert.Len(t, bundles, 1)
|
|
|
|
bundle := bundles[0]
|
|
if types.RollupStatus(bundle.RollupStatus) != types.RollupFinalized {
|
|
return false
|
|
}
|
|
assert.NotEmpty(t, bundle.FinalizeTxHash)
|
|
receipt, err := l1Client.TransactionReceipt(context.Background(), common.HexToHash(bundle.FinalizeTxHash))
|
|
assert.NoError(t, err)
|
|
assert.Equal(t, gethTypes.ReceiptStatusSuccessful, receipt.Status)
|
|
batches, err = batchOrm.GetBatches(context.Background(), map[string]interface{}{"bundle_hash": bundle.Hash}, nil, 0)
|
|
assert.NoError(t, err)
|
|
assert.Len(t, batches, 2)
|
|
for _, batch := range batches {
|
|
assert.Equal(t, batch.RollupStatus, bundle.RollupStatus)
|
|
assert.Equal(t, bundle.FinalizeTxHash, batch.FinalizeTxHash)
|
|
}
|
|
|
|
return true
|
|
}, 30*time.Second, time.Second)
|
|
|
|
l2Relayer.StopSenders()
|
|
database.CloseDB(db)
|
|
}
|
|
|
|
func testCommitBatchAndFinalizeBundleCodecV7(t *testing.T) {
|
|
db := setupDB(t)
|
|
|
|
prepareContracts(t)
|
|
|
|
chainConfig := ¶ms.ChainConfig{
|
|
LondonBlock: big.NewInt(0),
|
|
BernoulliBlock: big.NewInt(0),
|
|
CurieBlock: big.NewInt(0),
|
|
DarwinTime: new(uint64),
|
|
DarwinV2Time: new(uint64),
|
|
EuclidTime: new(uint64),
|
|
EuclidV2Time: new(uint64),
|
|
}
|
|
|
|
// Create L2Relayer
|
|
l2Cfg := rollupApp.Config.L2Config
|
|
l2Relayer, err := relayer.NewLayer2Relayer(context.Background(), l2Client, db, l2Cfg.RelayerConfig, chainConfig, true, relayer.ServiceTypeL2RollupRelayer, nil)
|
|
require.NoError(t, err)
|
|
|
|
defer l2Relayer.StopSenders()
|
|
defer database.CloseDB(db)
|
|
|
|
// add some blocks to db
|
|
var blocks []*encoding.Block
|
|
genesis, err := l2Client.HeaderByNumber(context.Background(), big.NewInt(0))
|
|
require.NoError(t, err)
|
|
|
|
var l1MessageIndex uint64 = 0
|
|
parentHash := genesis.Hash()
|
|
for i := int64(0); i < 10; i++ {
|
|
header := gethTypes.Header{
|
|
Number: big.NewInt(i + 1),
|
|
ParentHash: parentHash,
|
|
Difficulty: big.NewInt(i + 1),
|
|
BaseFee: big.NewInt(i + 1),
|
|
Root: common.HexToHash("0x1"),
|
|
}
|
|
fmt.Println("block number: ", i+1, header.Hash(), parentHash)
|
|
var transactions []*gethTypes.TransactionData
|
|
if i%2 == 0 {
|
|
txs := []*gethTypes.Transaction{
|
|
gethTypes.NewTx(&gethTypes.L1MessageTx{
|
|
QueueIndex: l1MessageIndex,
|
|
Gas: 0,
|
|
To: &common.Address{1, 2, 3},
|
|
Value: big.NewInt(10),
|
|
Data: nil,
|
|
Sender: common.Address{1, 2, 3},
|
|
}),
|
|
}
|
|
transactions = append(transactions, encoding.TxsToTxsData(txs)...)
|
|
l1MessageIndex++
|
|
}
|
|
|
|
blocks = append(blocks, &encoding.Block{
|
|
Header: &header,
|
|
Transactions: transactions,
|
|
WithdrawRoot: common.HexToHash("0x2"),
|
|
RowConsumption: &gethTypes.RowConsumption{},
|
|
})
|
|
parentHash = header.Hash()
|
|
}
|
|
|
|
cp := watcher.NewChunkProposer(context.Background(), &config.ChunkProposerConfig{
|
|
MaxBlockNumPerChunk: 100,
|
|
MaxTxNumPerChunk: 10000,
|
|
MaxL1CommitGasPerChunk: 50000000000,
|
|
MaxL1CommitCalldataSizePerChunk: 1000000,
|
|
MaxRowConsumptionPerChunk: 1048319,
|
|
ChunkTimeoutSec: 300,
|
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
|
}, encoding.CodecV7, chainConfig, db, nil)
|
|
|
|
bap := watcher.NewBatchProposer(context.Background(), &config.BatchProposerConfig{
|
|
MaxL1CommitGasPerBatch: 50000000000,
|
|
MaxL1CommitCalldataSizePerBatch: 1000000,
|
|
BatchTimeoutSec: 300,
|
|
MaxUncompressedBatchBytesSize: math.MaxUint64,
|
|
}, encoding.CodecV7, chainConfig, db, nil)
|
|
|
|
bup := watcher.NewBundleProposer(context.Background(), &config.BundleProposerConfig{
|
|
MaxBatchNumPerBundle: 2,
|
|
BundleTimeoutSec: 300,
|
|
}, encoding.CodecV7, chainConfig, db, nil)
|
|
|
|
l2BlockOrm := orm.NewL2Block(db)
|
|
batchOrm := orm.NewBatch(db)
|
|
bundleOrm := orm.NewBundle(db)
|
|
|
|
var batch1ExpectedLastL1MessageQueueHash common.Hash
|
|
{
|
|
fmt.Println("insert first 5 blocks ------------------------")
|
|
err = l2BlockOrm.InsertL2Blocks(context.Background(), blocks[:5])
|
|
require.NoError(t, err)
|
|
batch1ExpectedLastL1MessageQueueHash, err = encoding.MessageQueueV2ApplyL1MessagesFromBlocks(common.Hash{}, blocks[:5])
|
|
require.NoError(t, err)
|
|
|
|
cp.TryProposeChunk()
|
|
bap.TryProposeBatch()
|
|
}
|
|
|
|
var batch2ExpectedLastL1MessageQueueHash common.Hash
|
|
{
|
|
fmt.Println("insert next 3 blocks ------------------------")
|
|
err = l2BlockOrm.InsertL2Blocks(context.Background(), blocks[5:8])
|
|
for _, block := range blocks[5:8] {
|
|
fmt.Println("insert[5:8] block number: ", block.Header.Number, block.Header.Hash())
|
|
}
|
|
require.NoError(t, err)
|
|
batch2ExpectedLastL1MessageQueueHash, err = encoding.MessageQueueV2ApplyL1MessagesFromBlocks(batch1ExpectedLastL1MessageQueueHash, blocks[5:8])
|
|
require.NoError(t, err)
|
|
|
|
cp.TryProposeChunk()
|
|
bap.TryProposeBatch()
|
|
}
|
|
|
|
var batch3ExpectedLastL1MessageQueueHash common.Hash
|
|
{
|
|
fmt.Println("insert last 2 blocks ------------------------")
|
|
err = l2BlockOrm.InsertL2Blocks(context.Background(), blocks[8:])
|
|
for _, block := range blocks[8:] {
|
|
fmt.Println("insert[:8] block number: ", block.Header.Number, block.Header.Hash())
|
|
}
|
|
require.NoError(t, err)
|
|
batch3ExpectedLastL1MessageQueueHash, err = encoding.MessageQueueV2ApplyL1MessagesFromBlocks(batch2ExpectedLastL1MessageQueueHash, blocks[8:])
|
|
require.NoError(t, err)
|
|
|
|
cp.TryProposeChunk()
|
|
bap.TryProposeBatch()
|
|
}
|
|
|
|
var batches []*orm.Batch
|
|
// make sure that batches are created as expected
|
|
require.Eventually(t, func() bool {
|
|
batches, err = batchOrm.GetBatches(context.Background(), map[string]interface{}{}, nil, 0)
|
|
if err != nil {
|
|
return false
|
|
}
|
|
if len(batches) != 4 {
|
|
return false
|
|
}
|
|
|
|
// batches[0] is the genesis batch, no need to check
|
|
|
|
// assert correctness of L1 message queue hashes
|
|
require.Equal(t, common.Hash{}, common.HexToHash(batches[1].PrevL1MessageQueueHash))
|
|
require.Equal(t, batch1ExpectedLastL1MessageQueueHash, common.HexToHash(batches[1].PostL1MessageQueueHash))
|
|
require.Equal(t, batch1ExpectedLastL1MessageQueueHash, common.HexToHash(batches[2].PrevL1MessageQueueHash))
|
|
require.Equal(t, batch2ExpectedLastL1MessageQueueHash, common.HexToHash(batches[2].PostL1MessageQueueHash))
|
|
require.Equal(t, batch2ExpectedLastL1MessageQueueHash, common.HexToHash(batches[3].PrevL1MessageQueueHash))
|
|
require.Equal(t, batch3ExpectedLastL1MessageQueueHash, common.HexToHash(batches[3].PostL1MessageQueueHash))
|
|
|
|
return true
|
|
}, 30*time.Second, time.Second)
|
|
|
|
// Nothing should happen since no batch is committed yet.
|
|
{
|
|
bup.TryProposeBundle()
|
|
bundles, err := bundleOrm.GetBundles(context.Background(), map[string]interface{}{}, nil, 0)
|
|
require.NoError(t, err)
|
|
require.Len(t, bundles, 0)
|
|
}
|
|
|
|
// simulate batches 2 and 3 being submitted together in a single transaction
|
|
err = db.Transaction(func(dbTX *gorm.DB) error {
|
|
if err = batchOrm.UpdateCommitTxHashAndRollupStatus(context.Background(), batches[1].Hash, "0xdefdef", types.RollupCommitted, dbTX); err != nil {
|
|
return fmt.Errorf("UpdateCommitTxHashAndRollupStatus failed for batch %d: %s, err %v", batches[1].Index, batches[1].Hash, err)
|
|
}
|
|
|
|
for _, batch := range batches[2:] {
|
|
if err = batchOrm.UpdateCommitTxHashAndRollupStatus(context.Background(), batch.Hash, "0xabcabc", types.RollupCommitted, dbTX); err != nil {
|
|
return fmt.Errorf("UpdateCommitTxHashAndRollupStatus failed for batch %d: %s, err %v", batch.Index, batch.Hash, err)
|
|
}
|
|
}
|
|
|
|
return nil
|
|
})
|
|
require.NoError(t, err)
|
|
|
|
// We only allow bundles up to 2 batches. We should have 2 bundles:
|
|
// 1. batch 1 -> because it was committed by itself and the next set of batches could not fit the bundle
|
|
// 2. batch 2 and 3 -> because they were committed together in a single transaction
|
|
{
|
|
// need to propose 2 times to get 2 bundles with all batches
|
|
bup.TryProposeBundle()
|
|
bup.TryProposeBundle()
|
|
|
|
bundles, err := bundleOrm.GetBundles(context.Background(), map[string]interface{}{}, nil, 0)
|
|
require.NoError(t, err)
|
|
require.Len(t, bundles, 2)
|
|
|
|
require.Equal(t, bundles[0].StartBatchIndex, batches[1].Index)
|
|
require.Equal(t, bundles[0].EndBatchIndex, batches[1].Index)
|
|
require.Equal(t, bundles[0].StartBatchHash, batches[1].Hash)
|
|
require.Equal(t, bundles[0].EndBatchHash, batches[1].Hash)
|
|
|
|
require.Equal(t, bundles[1].StartBatchIndex, batches[2].Index)
|
|
require.Equal(t, bundles[1].EndBatchIndex, batches[3].Index)
|
|
require.Equal(t, bundles[1].StartBatchHash, batches[2].Hash)
|
|
require.Equal(t, bundles[1].EndBatchHash, batches[3].Hash)
|
|
}
|
|
|
|
// TODO: update mock bridge contract ABI to support new methods
|
|
// - simulate proof generation -> all batches and bundle are verified
|
|
// - make sure batches are actually committed and bundles are finalized
|
|
|
|
// simulate proof generation -> all batches and bundle are verified
|
|
//{
|
|
// batchProof := &message.OpenVMBatchProof{}
|
|
// batches, err := batchOrm.GetBatches(context.Background(), map[string]interface{}{}, nil, 0)
|
|
// require.NoError(t, err)
|
|
// batches = batches[1:]
|
|
// for _, batch := range batches {
|
|
// err = batchOrm.UpdateProofByHash(context.Background(), batch.Hash, batchProof, 100)
|
|
// require.NoError(t, err)
|
|
// err = batchOrm.UpdateProvingStatus(context.Background(), batch.Hash, types.ProvingTaskVerified)
|
|
// require.NoError(t, err)
|
|
// }
|
|
//
|
|
// bundleProof := &message.OpenVMBundleProof{}
|
|
// bundles, err := bundleOrm.GetBundles(context.Background(), map[string]interface{}{}, nil, 0)
|
|
// require.NoError(t, err)
|
|
// for _, bundle := range bundles {
|
|
// err = bundleOrm.UpdateProofAndProvingStatusByHash(context.Background(), bundle.Hash, bundleProof, types.ProvingTaskVerified, 100)
|
|
// require.NoError(t, err)
|
|
// }
|
|
//}
|
|
}
|