Skip to content

Commit

Permalink
Release/v0.4.2 (#1152)
Browse files Browse the repository at this point in the history
# Goals of PR

Core changes:
release v0.4.2 to main

Notes:
no

Related Issues:
no
  • Loading branch information
wukongcheng authored Jun 27, 2023
2 parents 7f2a90b + 96bc15a commit 32326fa
Show file tree
Hide file tree
Showing 169 changed files with 6,388 additions and 888 deletions.
6 changes: 1 addition & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
/**/Dockerfile* @wukongcheng @shidaxi
/.github @wukongcheng @shidaxi
/ops @wukongcheng @shidaxi @bradyjoestar
/tss @wukongcheng @byteflyfunny @agnarsong
/mt-batcher @wukongcheng @guoshijiang @agnarsong
/* @wukongcheng @bradyjoestar @Sha3nS @HaoyangLiu @agnarsong
/* @wukongcheng
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
# Changelog

## [v0.4.2-alpha.0](https://github.com/mantlenetworkio/mantle/commits/v0.4.2-alpha.0) - 2023-06-27

### Features
- Gas Oracle
- Add additional sources for exchange rates and optimize the calculation method for token ratio([#1014](https://github.com/mantlenetworkio/mantle/pull/1014),[#1108](https://github.com/mantlenetworkio/mantle/pull/1108))
- Improve metrics monitoring([#1102](https://github.com/mantlenetworkio/mantle/pull/1102))
- Added a strategy of real-time adjustment of layer1 overhead based on rollup capacity, to obtain a lower tx fee experience([#926](https://github.com/mantlenetworkio/mantle/pull/926))
- L2 Fee Calculation
- Support L2 fee collection, optimize the method for setting L2 gas price and allow for floating within a certain range([#1144](https://github.com/mantlenetworkio/mantle/pull/1144))
- Upgrade Framework
- Enhance the upgrade framework of l2geth to support management of upgrade heights across different networks([#1007](https://github.com/mantlenetworkio/mantle/pull/1007))
- Batch Submitter
- Expose Tss expected response with metric data, enrich handle logics for unexpected case, enrich control workflow([#1107](https://github.com/mantlenetworkio/mantle/pull/1107))
- L2geth
- Support debug api debug_traceCall([#940](https://github.com/mantlenetworkio/mantle/pull/940))

### Bug Fixes
- Fix issues of missing permission verification in contract([#1118](https://github.com/mantlenetworkio/mantle/pull/1118))
- Fix issues of unreasonable contract naming convention([#1095](https://github.com/mantlenetworkio/mantle/pull/1095))
- Fix smart contract related bugs in audit reports([#1043](https://github.com/mantlenetworkio/mantle/pull/1043), [#1138](https://github.com/mantlenetworkio/mantle/pull/1138))
- Adjust checking strategies for staker staking of MantleDa contracts([#1120](https://github.com/mantlenetworkio/mantle/pull/1120), [#1103](https://github.com/mantlenetworkio/mantle/pull/1103))
- Code optimization for batch-submitter, dtl and mt-batcher([#1063](https://github.com/mantlenetworkio/mantle/pull/1063), [#1045](https://github.com/mantlenetworkio/mantle/pull/1045), [#1043](https://github.com/mantlenetworkio/mantle/pull/1043))
- Add permission verification to tss http api([#854](https://github.com/mantlenetworkio/mantle/pull/854))

## [v0.4.1](https://github.com/mantlenetworkio/mantle/commits/v0.4.1) - 2023-06-25

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(The MIT License)

Copyright 2020-2021 Mantle
Copyright 2022-2023 Mantle

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
51 changes: 30 additions & 21 deletions batch-submitter/batch_submitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@ package batchsubmitter

import (
"context"
"os"
"time"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"github.com/getsentry/sentry-go"
"github.com/urfave/cli"

"github.com/mantlenetworkio/mantle/batch-submitter/drivers/proposer"
"github.com/mantlenetworkio/mantle/batch-submitter/drivers/sequencer"
tss "github.com/mantlenetworkio/mantle/batch-submitter/tss-client"
bsscore "github.com/mantlenetworkio/mantle/bss-core"
"github.com/mantlenetworkio/mantle/bss-core/dial"
"github.com/mantlenetworkio/mantle/bss-core/metrics"
"github.com/mantlenetworkio/mantle/bss-core/txmgr"
"github.com/urfave/cli"
"os"
"time"
)

// Main is the entrypoint into the batch submitter service. This method returns
Expand Down Expand Up @@ -103,7 +105,10 @@ func Main(gitVersion string) func(ctx *cli.Context) error {
return err
}

tssClient := tss.NewClient(cfg.TssClientUrl)
tssClient, err := tss.NewClient(cfg.TssClientUrl, cfg.JwtSecret)
if err != nil {
return err
}
log.Info("Configured tss client", "url", cfg.TssClientUrl)

if cfg.MetricsServerEnable {
Expand Down Expand Up @@ -159,23 +164,27 @@ func Main(gitVersion string) func(ctx *cli.Context) error {

if cfg.RunStateBatchSubmitter {
batchStateDriver, err := proposer.NewDriver(proposer.Config{
Name: "Proposer",
L1Client: l1Client,
L2Client: l2Client,
TssClient: tssClient,
BlockOffset: cfg.BlockOffset,
MinStateRootElements: cfg.MinStateRootElements,
MaxStateRootElements: cfg.MaxStateRootElements,
SCCAddr: sccAddress,
CTCAddr: ctcAddress,
FPRollupAddr: common.HexToAddress(cfg.FPRollupAddress),
ChainID: chainID,
PrivKey: proposerPrivKey,
EnableProposerHsm: cfg.EnableProposerHsm,
ProposerHsmAddress: cfg.ProposerHsmAddress,
ProposerHsmCreden: cfg.ProposerHsmCreden,
ProposerHsmAPIName: cfg.ProposerHsmAPIName,
SccRollback: cfg.EnableSccRollback,
Name: "Proposer",
L1Client: l1Client,
L2Client: l2Client,
TssClient: tssClient,
BlockOffset: cfg.BlockOffset,
MinStateRootElements: cfg.MinStateRootElements,
MaxStateRootElements: cfg.MaxStateRootElements,
SCCAddr: sccAddress,
CTCAddr: ctcAddress,
FPRollupAddr: common.HexToAddress(cfg.FPRollupAddress),
ChainID: chainID,
PrivKey: proposerPrivKey,
SccRollback: cfg.EnableSccRollback,
MaxBatchSubmissionTime: cfg.MaxBatchSubmissionTime,
PollInterval: cfg.PollInterval,
FinalityConfirmations: cfg.FinalityConfirmations,
EnableProposerHsm: cfg.EnableProposerHsm,
ProposerHsmAddress: cfg.ProposerHsmAddress,
ProposerHsmCreden: cfg.ProposerHsmCreden,
ProposerHsmAPIName: cfg.ProposerHsmAPIName,
AllowL2AutoRollback: cfg.AllowL2AutoRollback,
})
if err != nil {
return err
Expand Down
11 changes: 11 additions & 0 deletions batch-submitter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ type Config struct {
// Tss manager client Url
TssClientUrl string

// jwt access token
JwtSecret string

// eigen layer upgrade block.
DaUpgradeBlock uint64

Expand Down Expand Up @@ -224,6 +227,11 @@ type Config struct {
SequencerHsmAPIName string

SequencerHsmCreden string

RollupClientHttp string

// batch submitter rollback
AllowL2AutoRollback bool
}

// NewConfig parses the Config from the provided flags or environment variables.
Expand All @@ -236,6 +244,7 @@ func NewConfig(ctx *cli.Context) (Config, error) {
L1EthRpc: ctx.GlobalString(flags.L1EthRpcFlag.Name),
L2EthRpc: ctx.GlobalString(flags.L2EthRpcFlag.Name),
TssClientUrl: ctx.GlobalString(flags.TssClientUrl.Name),
JwtSecret: ctx.GlobalString(flags.JwtSecret.Name),
DaUpgradeBlock: ctx.GlobalUint64(flags.DaUpgradeBlockFlag.Name),
DAAddress: ctx.GlobalString(flags.DaAddressFlag.Name),
CTCAddress: ctx.GlobalString(flags.CTCAddressFlag.Name),
Expand Down Expand Up @@ -282,6 +291,8 @@ func NewConfig(ctx *cli.Context) (Config, error) {
ProposerHsmAddress: ctx.GlobalString(flags.ProposerHsmAddressFlag.Name),
ProposerHsmAPIName: ctx.GlobalString(flags.ProposerHsmAPIName.Name),
ProposerHsmCreden: ctx.GlobalString(flags.ProposerHsmCreden.Name),
RollupClientHttp: ctx.GlobalString(flags.RollupClientHttpFlag.Name),
AllowL2AutoRollback: ctx.GlobalBool(flags.AllowL2AutoRollback.Name),
}

err := ValidateConfig(&cfg)
Expand Down
Loading

0 comments on commit 32326fa

Please sign in to comment.