Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release first version #4

Merged
merged 29 commits into from
May 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix procedure
zhouop0 committed Apr 10, 2024
commit 0eee83db4b4ed6295bea0f819832788bf4ce347d
77 changes: 0 additions & 77 deletions internal/handler/arweave.go

This file was deleted.

104 changes: 14 additions & 90 deletions internal/handler/checkstatus.go
Original file line number Diff line number Diff line change
@@ -9,107 +9,31 @@
"github.com/pkg/errors"
)

// CheckStatusVoting check proposal vote status
func CheckStatusVoting(ctx *svc.ServiceContext) {
// CheckStatusByContract sync check proposal status
func CheckStatusByContract(ctx *svc.ServiceContext) {
for {
var dbProposal schema.Proposal
err := ctx.DB.Where("status=?", schema.ProposalVotingStatus).Order("end_batch_num asc").First(&dbProposal).Error
proposal, err := ctx.NodeClient.QueryLastProposal()
if err != nil {
log.Errorf("[Handler.CheckStatus] find Voting proposal err: %s\n", errors.WithStack(err).Error())
time.Sleep(5 * time.Second)
log.Errorf("[Handler.CheckStatusByContract][QueryLastProposalID] error info: %s", errors.WithStack(err).Error())
continue
}
proposal, err := ctx.NodeClient.QueryProposalByID(dbProposal.ProposalID)
proposalContract, err := ctx.NodeClient.QueryProposalByID(proposal.Id)
if err != nil {
log.Errorf("[Handler.CheckStatus] QueryProposalByID err: %s\n", errors.WithStack(err).Error())
log.Errorf("[Handler.CheckStatusByContract][QueryProposalByID] error info: %s", errors.WithStack(err).Error())
continue
}
if proposal.Status != schema.ProposalVotingStatus && proposal.Winner.String() != "" {
dbProposal.Winner = proposal.Winner.String()
dbProposal.Status = uint64(proposal.Status)
ctx.DB.Save(dbProposal)
}
time.Sleep(3 * time.Second)
}
}

func CheckStatusPending(ctx *svc.ServiceContext) {
for {
var dbProposal schema.Proposal
err := ctx.DB.Where("status = ?", schema.ProposalPendingStatus).Order("end_batch_num asc").First(&dbProposal).Error
if err != nil {
log.Errorf("[Handler.CheckStatusTimeOut] find Voting proposal err: %s\n", errors.WithStack(err))
time.Sleep(5 * time.Second)
continue
}
proposal, err := ctx.NodeClient.QueryProposalByID(dbProposal.ProposalID)
err = ctx.DB.Where("proposal_id=?", proposal.Id).First(&dbProposal).Error
if err != nil {
log.Errorf("[Handler.CheckStatusTimeOut] QueryProposalByID err: %s\n", errors.WithStack(err))
log.Errorf("[Handler.CheckStatusByContract] find proposal err: %s\n", errors.WithStack(err).Error())
continue
}
if proposal.Status == schema.ProposalCommitting {
dbProposal.Status = uint64(proposal.Status)
dbProposal.Winner = proposal.Winner.String()
dbProposal.BtcTxHash = proposal.BtcTxHash
ctx.DB.Save(dbProposal)
continue
}
time.Sleep(2 * time.Second)
dbProposal.BtcTxHash = proposalContract.BtcTxHash
dbProposal.ArTxHash = proposalContract.ArweaveTxHash
dbProposal.Winner = proposalContract.Winner.String()
dbProposal.Status = uint64(proposalContract.Status)
ctx.DB.Save(&dbProposal)
time.Sleep(20 * time.Second)
}
}

Check failure on line 38 in internal/handler/checkstatus.go

GitHub Actions / Run golangci-lint

File is not `gofumpt`-ed (gofumpt)
func CheckStatusCommitting(ctx *svc.ServiceContext) {
for {
var dbProposal schema.Proposal
err := ctx.DB.Where("status = ?", schema.ProposalCommitting).Order("end_batch_num asc").First(&dbProposal).Error
if err != nil {
log.Errorf("[Handler.CheckStatusTimeOut] find Voting proposal err: %s\n", errors.WithStack(err))
time.Sleep(5 * time.Second)
continue
}
proposal, err := ctx.NodeClient.QueryProposalByID(dbProposal.ProposalID)
if err != nil {
log.Errorf("[Handler.CheckStatusTimeOut] QueryProposalByID err: %s\n", errors.WithStack(err))
continue
}
if proposal.Status == schema.ProposalSucceedStatus {
dbProposal.Status = uint64(proposal.Status)
dbProposal.Winner = proposal.Winner.String()
dbProposal.ArTxHash = proposal.ArweaveTxHash
ctx.DB.Save(dbProposal)
continue
}
time.Sleep(2 * time.Second)
}
}

func CheckStatusPendingTimeOut(ctx *svc.ServiceContext) {
for {
time.Sleep(30 * time.Second)
var dbProposal schema.Proposal
err := ctx.DB.Where("status = ? or status = ?", schema.ProposalPendingStatus,
schema.ProposalCommitting).Order("end_batch_num asc").First(&dbProposal).Error
if err != nil {
log.Errorf("[Handler.CheckStatusTimeOut] find Voting proposal and Committing proposal err: %s\n", errors.WithStack(err).Error())
time.Sleep(5 * time.Second)
continue
}
proposal, err := ctx.NodeClient.QueryProposalByID(dbProposal.ProposalID)
if err != nil {
log.Errorf("[Handler.CheckStatusTimeOut] QueryProposalByID err: %s\n", errors.WithStack(err))
continue
}
if (proposal.BtcTxHash == "" || proposal.ArweaveTxHash == "") && proposal.Winner.String() != ctx.B2NodeConfig.Address {
res, err := ctx.NodeClient.IsProposalTimeout(proposal.Id)
if err != nil {
log.Errorf("[Handler.CheckStatusTimeOut] TimeoutProposal err: %s\n", errors.WithStack(err))
continue
}
if res {
dbProposal.Status = schema.ProposalTimeoutStatus
ctx.DB.Save(dbProposal)
}
time.Sleep(2 * time.Second)
}
}
}
38 changes: 27 additions & 11 deletions internal/handler/committer.go
Original file line number Diff line number Diff line change
@@ -4,9 +4,9 @@
"context"
"encoding/hex"
"fmt"
"github.com/b2network/b2committer/pkg/contract"

Check failure on line 7 in internal/handler/committer.go

GitHub Actions / Run golangci-lint

File is not `gofumpt`-ed (gofumpt)
"strings"
"time"

Check failure on line 9 in internal/handler/committer.go

GitHub Actions / Run golangci-lint

File is not `gofumpt`-ed (gofumpt)

"github.com/b2network/b2committer/pkg/log"

@@ -51,42 +51,59 @@
time.Sleep(10 * time.Second)
continue
}
if lastProposalID == 0 {
lastProposalID = 1
}

if proposal.Status == schema.ProposalSucceedStatus {
lastProposalID++
proposal, err = ctx.NodeClient.QueryProposalByID(lastProposalID)
if err != nil {
log.Errorf("[Handler.Committer][QueryProposalByID] error info: %s", errors.WithStack(err).Error())
time.Sleep(10 * time.Second)
continue
}
}

proposalLatest, err := ctx.NodeClient.QueryProposalByID(lastProposalID)
res, err := ctx.NodeClient.CheckProposalTimeout(lastProposalID)
if err != nil {
log.Errorf("[Handler.Committer][QueryLastProposalID] error info: %s", errors.WithStack(err).Error())
return
log.Errorf("[Handler.Committer][CheckProposalTimeout] error info: %s", errors.WithStack(err).Error())
continue
}

if proposalLatest.Status != schema.ProposalTimeoutStatus {
log.Infof("[Handler.Committer] proposal status is processing, proposalID: %d, proposal status: %d", lastProposalID, proposalLatest.Status)
if !res && proposal.Status != schema.ProposalVotingStatus {
log.Infof("[Handler.Committer] proposal status is processing, proposalID: %d", lastProposalID)
time.Sleep(10 * time.Second)
continue
}
if res && lastProposalID == 1 {
lastFinalBatchNum = 0
}

verifyBatchInfo, err := GetVerifyBatchInfoByLastBatchNum(ctx, lastFinalBatchNum)
if err != nil {
log.Errorf("[Handler.Committer] error info: %s", errors.WithStack(err).Error())
time.Sleep(10 * time.Second)
continue
}

err = committerProposal(ctx, verifyBatchInfo, lastProposalID)
if err != nil {
log.Errorf("[Handler.Committer] error info: %s", errors.WithStack(err).Error())
time.Sleep(10 * time.Second)
continue
}
time.Sleep(3 * time.Second)
time.Sleep(30 * time.Second)
}
}

func GetVerifyBatchInfoByLastBatchNum(ctx *svc.ServiceContext, lastFinalBatchNum uint64) (*VerifyRangBatchInfo, error) {
verifyBatchesAndTxHashs, err := GetVerifyBatchesFromStartBatchNum(ctx, lastFinalBatchNum, ctx.Config.LimitNum)
if err != nil || len(verifyBatchesAndTxHashs) != ctx.Config.LimitNum {
verifyBatchesAndTxHashes, err := GetVerifyBatchesFromStartBatchNum(ctx, lastFinalBatchNum, ctx.Config.LimitNum)
if err != nil || len(verifyBatchesAndTxHashes) != ctx.Config.LimitNum {
return nil, fmt.Errorf("[GetVerifyBatchInfoByLastBatchNum] error info: %s", errors.WithStack(err))
}
verifyBatchesParams := make([]*VerifyBatchesTrustedAggregatorParams, 0, ctx.Config.LimitNum)
for _, verifyBatch := range verifyBatchesAndTxHashs {
for _, verifyBatch := range verifyBatchesAndTxHashes {
verifyBatchParam, err := GetVerifyBatchesParamsByTxHash(ctx, common.HexToHash(verifyBatch.txHash))
if err != nil {
return nil, fmt.Errorf("[GetVerifyBatchInfoByLastBatchNum] error info: %s", errors.WithStack(err))
@@ -102,8 +119,7 @@

// CommitterProposal committer transaction to b2-node
func committerProposal(ctx *svc.ServiceContext, verifyBatchInfo *VerifyRangBatchInfo, lastProposalID uint64) error {
proposalID := lastProposalID + 1
_, err := ctx.NodeClient.SubmitProof(proposalID, verifyBatchInfo.proofRootHash, verifyBatchInfo.stateRootHash,
_, err := ctx.NodeClient.SubmitProof(lastProposalID, verifyBatchInfo.proofRootHash, verifyBatchInfo.stateRootHash,
verifyBatchInfo.startBatchNum, verifyBatchInfo.endBatchNum)
if err != nil {
return fmt.Errorf("[committerProposal] submit proof error info: %s, %d", errors.WithStack(err), verifyBatchInfo.startBatchNum)
18 changes: 6 additions & 12 deletions internal/handler/handler.go
Original file line number Diff line number Diff line change
@@ -7,25 +7,19 @@
func Run(ctx *svc.ServiceContext) {

// query last block number
go LatestBlackNumber(ctx)
// sync blocks
go SyncBlock(ctx)
// sync events
go SyncEvent(ctx)
//go LatestBlackNumber(ctx)

Check failure on line 10 in internal/handler/handler.go

GitHub Actions / Run golangci-lint

commentFormatting: put a space between `//` and comment text (gocritic)
//// sync blocks
//go SyncBlock(ctx)
//// sync events
//go SyncEvent(ctx)
// execute committer
go Committer(ctx)
// check and inscribe
go Inscribe(ctx)
// check status
go CheckStatusVoting(ctx)
// check pending
go CheckStatusPending(ctx)
// check time out
go CheckStatusPendingTimeOut(ctx)
go CheckStatusByContract(ctx)
// sync proposal
go SyncProposal(ctx)
// sequence batches
go SequenceBatches(ctx)
// upload batch detail to ar
go BatchDetailsToAr(ctx)
}
85 changes: 64 additions & 21 deletions internal/handler/sequenceBatches.go
Original file line number Diff line number Diff line change
@@ -9,6 +9,8 @@ import (
"github.com/b2network/b2committer/pkg/event/zkevm"
"github.com/b2network/b2committer/pkg/log"
"github.com/ethereum/go-ethereum/common"
"github.com/everFinance/goar"
"github.com/everFinance/goar/types"
"github.com/pkg/errors"
"os"
"strconv"
@@ -28,41 +30,82 @@ type SequenceBatchesAndTxHash struct {
}

func SequenceBatches(ctx *svc.ServiceContext) {
time.Sleep(40 * time.Second)
for {
var dbProposal schema.Proposal
err := ctx.DB.Where("status = ? and generate_details_file = ? and winner = ?", schema.ProposalCommitting, false,
ctx.B2NodeConfig.Address).Order("proposal_id asc").First(&dbProposal).Error
collectionSequenceBatches, err := GetSequenceBatchesFromStartBatchNum(ctx, dbProposal.StartBatchNum, dbProposal.EndBatchNum)
err := ctx.DB.Where("status = ? and ar_tx_hash=''", schema.ProposalCommitting).Order("proposal_id desc").First(&dbProposal).Error
if err != nil {
log.Errorf("[Handler.SequenceBatches][GetSequenceBatchesFromStartBatchNum] error info: %s", errors.WithStack(err).Error())
time.Sleep(10 * time.Second)
log.Errorf("[Handler.SequenceBatches]query proposal from db, error info: %s", errors.WithStack(err).Error())
time.Sleep(5 * time.Second)
continue
}
if !collectionSequenceBatches.IsCompleted {
log.Errorf("[Handler.SequenceBatches] sync batches not completed")
time.Sleep(10 * time.Second)
continue
}
sequenceBatchesMap, err := GetSequenceBatchesDetails(ctx, collectionSequenceBatches.SequenceBatches)
proposal, err := ctx.NodeClient.QueryProposalByID(dbProposal.ProposalID)
if err != nil {
log.Errorf("[Handler.SequenceBatches][GetSequenceBatchesDetails] error info: %s", errors.WithStack(err).Error())
log.Errorf("[Handler.SequenceBatches] QueryProposalByID err: %s\n", errors.WithStack(err).Error())
time.Sleep(3 * time.Second)
continue
}
res, err := WriteFile(ctx, dbProposal.StartBatchNum, dbProposal.EndBatchNum, sequenceBatchesMap)
if err != nil {
log.Errorf("[Handler.SequenceBatches][WriteFile] error info: %s", errors.WithStack(err).Error())
time.Sleep(3 * time.Second)
continue
}
if res {
err = ctx.DB.Model(&dbProposal).Update("generate_details_file", true).Error
if proposal.Status == schema.ProposalCommitting && proposal.Winner.String() == ctx.B2NodeConfig.Address &&
proposal.ArweaveTxHash == "" {
collectionSequenceBatches, err := GetSequenceBatchesFromStartBatchNum(ctx, dbProposal.StartBatchNum, dbProposal.EndBatchNum)
if err != nil {
log.Errorf("[Handler.SequenceBatches][GetSequenceBatchesFromStartBatchNum] error info: %s", errors.WithStack(err).Error())
time.Sleep(10 * time.Second)
continue
}
if !collectionSequenceBatches.IsCompleted {
log.Errorf("[Handler.SequenceBatches] sync batches not completed")
time.Sleep(10 * time.Second)
continue
}
sequenceBatchesMap, err := GetSequenceBatchesDetails(ctx, collectionSequenceBatches.SequenceBatches)
if err != nil {
log.Errorf("[Handler.SequenceBatches][GetSequenceBatchesDetails] error info: %s", errors.WithStack(err).Error())
time.Sleep(3 * time.Second)
continue
}
jsonData, err := json.Marshal(sequenceBatchesMap)
if err != nil {
log.Errorf("[WriteFile] json marshal error: %s", errors.WithStack(err))
continue
}
tags := []types.Tag{
{Name: "Content-Type", Value: "application/json"},
{Name: "title", Value: "b2-batch"},
{Name: "chainID", Value: strconv.FormatInt(ctx.B2NodeConfig.ChainID, 10)},
}
arNode := ctx.Config.ArweaveRPC
wallet := ctx.Config.ArweaveWallet
w, err := goar.NewWalletFromPath(wallet, arNode)
arTx, err := w.SendData(jsonData, tags)

_, err = ctx.NodeClient.ArweaveTx(dbProposal.ProposalID, arTx.ID)
if err != nil {
log.Errorf("[Handler.BatchDetailsToAr] get ar tx error: %s", errors.WithStack(err).Error())
continue
}
err = ctx.DB.Model(&dbProposal).Update("ar_tx_hash", arTx.ID).Error
if err != nil {
log.Errorf("[Handler.SequenceBatches][Update] error info: %s", errors.WithStack(err).Error())
log.Errorf("[Handler.BatchDetailsToAr] update proposal error: %s", errors.WithStack(err).Error())
continue
}

res, err := WriteFile(ctx, dbProposal.StartBatchNum, dbProposal.EndBatchNum, sequenceBatchesMap)
if err != nil {
log.Errorf("[Handler.SequenceBatches][WriteFile] error info: %s", errors.WithStack(err).Error())
time.Sleep(3 * time.Second)
continue
}
if res {
err = ctx.DB.Model(&dbProposal).Update("generate_details_file", true).Error
if err != nil {
log.Errorf("[Handler.SequenceBatches][Update] error info: %s", errors.WithStack(err).Error())
time.Sleep(3 * time.Second)
continue
}
}
}
time.Sleep(3 * time.Second)
}
}

26 changes: 2 additions & 24 deletions internal/handler/syncProposal.go
Original file line number Diff line number Diff line change
@@ -35,7 +35,6 @@ func SyncProposal(ctx *svc.ServiceContext) {
}
if proposal == nil {
log.Infof("[Handler.SyncProposal] proposal is nil", proposalID)
proposalID++
continue
}
var dbProposal schema.Proposal
@@ -67,31 +66,10 @@ func SyncProposal(ctx *svc.ServiceContext) {
}
}

if dbProposal.ProposalID != 0 && dbProposal.Status != uint64(schema.ProposalVotingStatus) {
log.Infof("[Handler.SyncProposal] already voted :", ctx.B2NodeConfig.Address)
proposalID++
continue
}

if proposal.Status == schema.ProposalVotingStatus {
// voting
verifyBatchInfo, err := GetVerifyBatchInfoByLastBatchNum(ctx, proposal.StartIndex)
if err != nil {
log.Errorf("[Handler.SyncProposal] GetVerifyBatchInfoByLastBatchNum error info:", errors.WithStack(err))
time.Sleep(3 * time.Second)
continue
}

_, err = ctx.NodeClient.SubmitProof(proposal.Id, verifyBatchInfo.proofRootHash, verifyBatchInfo.stateRootHash,
verifyBatchInfo.startBatchNum, verifyBatchInfo.endBatchNum)
if err != nil {
log.Errorf("[Handler.SyncProposal] vote proposal error info", errors.WithStack(err))
time.Sleep(3 * time.Second)
continue
}
if dbProposal.ProposalID != 0 {
log.Infof("[Handler.SyncProposal] already sync :", ctx.B2NodeConfig.Address)
proposalID++
continue
}
time.Sleep(10 * time.Second)
}
}
1 change: 0 additions & 1 deletion internal/handler/vote.go

This file was deleted.

2 changes: 1 addition & 1 deletion internal/types/config.go
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ type Config struct {
type B2NODEConfig struct {
ChainID int64 `env:"B2NODE_CHAIN_ID" envDefault:"1113"`
RPCUrl string `env:"B2NODE_RPC_URL" envDefault:"https://habitat-hub-rpc.bsquared.network"`
CommitterAddress string `env:"B2NODE_COMMITTER_ADDRESS" envDefault:"0x0DD3684F0C7e6b383C7bEc2901dCDa4b5360D893"`
CommitterAddress string `env:"B2NODE_COMMITTER_ADDRESS" envDefault:"0x85D40bDc724bcabF6D17d8343a74e0d916dfD40D"`
Address string `env:"B2NODE_CREATOR_ADDRESS" envDefault:"0xb634434CA448c39b05b460dEC51f458EaC1e2759"`
PrivateKey string `env:"B2NODE_CREATOR_PRIVATE_KEY" envDefault:"0a81baab0ca0b65d406d68c79945054b092cbe77499ca55c57b3ecfd33f1d551"`
}
23 changes: 23 additions & 0 deletions pkg/b2node/b2node.go
Original file line number Diff line number Diff line change
@@ -2,14 +2,16 @@

import (
"crypto/ecdsa"
"fmt"

Check failure on line 5 in pkg/b2node/b2node.go

GitHub Actions / Run golangci-lint

File is not `gofumpt`-ed (gofumpt)
"github.com/b2network/b2committer/internal/schema"
"github.com/b2network/b2committer/pkg/contract"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethclient"
"math/big"

Check failure on line 13 in pkg/b2node/b2node.go

GitHub Actions / Run golangci-lint

File is not `gofumpt`-ed (gofumpt)
"time"
)

type NodeClient struct {
@@ -144,3 +146,24 @@
}
return res, nil
}

func (n NodeClient) CheckProposalTimeout(id uint64) (bool, error) {
res, err := n.IsProposalTimeout(id)
if err != nil {
return false, err
}
if res {
proposalLatest, err := n.QueryProposalByID(id)
if err != nil {
return true, err
}
if proposalLatest.Status != schema.ProposalTimeoutStatus {
_, err := n.TimeoutProposal(id)
if err != nil {
return true, err
}
time.Sleep(5 * time.Second)
}
}
return res, nil
}
17 changes: 15 additions & 2 deletions pkg/b2node/b2node_test.go
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ import (
const (
creatorAddress = "0xb634434CA448c39b05b460dEC51f458EaC1e2759"
creatorPrivateKey = "0a81baab0ca0b65d406d68c79945054b092cbe77499ca55c57b3ecfd33f1d551"
contractAddress = "0x0DD3684F0C7e6b383C7bEc2901dCDa4b5360D893"
contractAddress = "0x85D40bDc724bcabF6D17d8343a74e0d916dfD40D"
URL = "https://habitat-hub-rpc.bsquared.network"
chainID = 1113
)
@@ -46,7 +46,7 @@ func TestSetTimeoutPeriod(t *testing.T) {
tx, err := committer.SetTimeoutPeriod(&bind.TransactOpts{
From: common.HexToAddress(creatorAddress),
Signer: auth.Signer,
}, big.NewInt(60*60*24))
}, big.NewInt(60*20))
require.NoError(t, err)
fmt.Println(tx.Hash())
}
@@ -216,6 +216,19 @@ func TestAr(t *testing.T) {
fmt.Println(tx.Hash())
}

func TestIsProposalTimeout(t *testing.T) {
conn, err := ethclient.Dial(URL)
require.NoError(t, err)
defer conn.Close()

committer, err := contract.NewCommitter(common.HexToAddress(contractAddress), conn)
require.NoError(t, err)
res, err := committer.IsProposalTimeout(&bind.CallOpts{
From: common.HexToAddress(creatorAddress),
}, chainID, 2)
fmt.Println(res)
}

func TestTimeoutProposal(t *testing.T) {
conn, err := ethclient.Dial(URL)
require.NoError(t, err)

Unchanged files with check annotations Beta

package zkevm
import (
"encoding/json"

Check failure on line 4 in pkg/event/zkevm/sequenceBatches.go

GitHub Actions / Run golangci-lint

File is not `gofumpt`-ed (gofumpt)
"github.com/b2network/b2committer/pkg/event"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
}
func (*VerifyBatches) Data(log types.Log) (string, error) {

Check failure on line 43 in pkg/event/zkevm/verifybatches.go

GitHub Actions / Run golangci-lint

File is not `gofumpt`-ed (gofumpt)
transfer := &VerifyBatches{
RollupID: uint32(event.TopicToInt64(log, 1)),
Aggregator: event.TopicToAddress(log, 2).Hex(),
package svc
import (

Check failure on line 3 in internal/svc/svc.go

GitHub Actions / Run golangci-lint

File is not `gofumpt`-ed (gofumpt)
"github.com/b2network/b2committer/internal/types"
"github.com/b2network/b2committer/pkg/b2node"
"github.com/b2network/b2committer/pkg/log"
"gorm.io/driver/mysql"
"gorm.io/gorm"
"gorm.io/gorm/logger"
"time"

Check failure on line 12 in internal/svc/svc.go

GitHub Actions / Run golangci-lint

File is not `gofumpt`-ed (gofumpt)
)
var svc *ServiceContext