Repository: 33cn/plugin
Pull request #1282 (2024-01-17 09:13:03)

update gomod

codecov[bot]: ## [Codecov](https://app.codecov.io/gh/33cn/plugin/pull/1282?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Comparison is base [(`004a2d6`)](https://app.codecov.io/gh/33cn/plugin/commit/004a2d6219191348aafdc7734d5c0608a0ada809?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) 48.41% compared to head [(`b7f34e4`)](https://app.codecov.io/gh/33cn/plugin/pull/1282?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) 48.38%.


<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##           master    #1282      +/-   ##
==========================================
- Coverage   48.41%   48.38%   -0.03%     
==========================================
  Files         223      223              
  Lines       42519    42519              
==========================================
- Hits        20586    20574      -12     
- Misses      20040    20052      +12     
  Partials     1893     1893              
```



</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/33cn/plugin/pull/1282?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None).


Patch:
diff --git a/chain33.fork.toml b/chain33.fork.toml
index 0a76797c8..cb53192b2 100644
--- a/chain33.fork.toml
+++ b/chain33.fork.toml
@@ -27,6 +27,7 @@ ForkRootHash=4500000
 ForkFormatAddressKey=0
 ForkCheckEthTxSort=0
 ForkProxyExec=0
+ForkMaxTxFeeV1=0
 
 [fork.sub.none]
 ForkUseTimeDelay=0
diff --git a/chain33.para.toml b/chain33.para.toml
index 0c2f7e99f..960a467b1 100644
--- a/chain33.para.toml
+++ b/chain33.para.toml
@@ -99,6 +99,10 @@ poolCacheSize=10240
 minTxFeeRate=100000
 maxTxNumPerAccount=10000
 
+[mver.mempool.ForkMaxTxFeeV1]
+# 单笔交易最大的手续费, 50 coins
+maxTxFee=5000000000
+
 [consensus]
 name="para"
 genesisBlockTime=1514533390
@@ -319,6 +323,8 @@ ForkRootHash=7200000
 ForkFormatAddressKey=0
 ForkCheckEthTxSort=0
 ForkProxyExec=0
+ForkMaxTxFeeV1=0
+
 [fork.sub.none]
 ForkUseTimeDelay=0
 
diff --git a/chain33.toml b/chain33.toml
index 13ce2b894..c3d96315c 100644
--- a/chain33.toml
+++ b/chain33.toml
@@ -130,6 +130,11 @@ maxTxFeeRate=10000000
 # 单笔交易最大的手续费, 10 coins
 maxTxFee=1000000000
 isLevelFee=true
+
+[mver.mempool.ForkMaxTxFeeV1]
+# 单笔交易最大的手续费, 50 coins
+maxTxFee=5000000000
+
 [mempool.sub.timeline]
 poolCacheSize=10240
 
diff --git a/go.mod b/go.mod
index 6fe00a6b2..a73293a30 100644
--- a/go.mod
+++ b/go.mod
@@ -4,7 +4,7 @@ go 1.19
 
 
 require (
-	github.com/33cn/chain33 v1.68.2-0.20231115062606-d887f73e3c2d
+	github.com/33cn/chain33  v1.68.2-0.20240117085747-5de6bc4d527f
 	github.com/BurntSushi/toml v1.1.0
 	github.com/NebulousLabs/Sia v1.3.7
 	github.com/bitly/go-simplejson v0.5.0
diff --git a/go.sum b/go.sum
index f6a595000..a3b5a5554 100644
--- a/go.sum
+++ b/go.sum
@@ -37,8 +37,8 @@ dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBr
 dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=
 dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
 git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
-github.com/33cn/chain33 v1.68.2-0.20231115062606-d887f73e3c2d h1:0V9qO7MM2R8+LlGeEOjmp6VZoUUBu85GSMjbGihVeIw=
-github.com/33cn/chain33 v1.68.2-0.20231115062606-d887f73e3c2d/go.mod h1:9nwINei+dK/pztPobQSwJpeawYbR2o6UR01QM+AwBC8=
+github.com/33cn/chain33 v1.68.2-0.20240117085747-5de6bc4d527f h1:hFhX36MNyKhCTvBgaIhjfucnLE7yA3outLj32XSch5s=
+github.com/33cn/chain33 v1.68.2-0.20240117085747-5de6bc4d527f/go.mod h1:9nwINei+dK/pztPobQSwJpeawYbR2o6UR01QM+AwBC8=
 github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 h1:cTp8I5+VIoKjsnZuH8vjyaysT/ses3EvZeaV/1UkF2M=
 github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=
 github.com/Azure/azure-sdk-for-go v41.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
diff --git a/plugin/consensus/para/paracommitmsg.go b/plugin/consensus/para/paracommitmsg.go
index 885a42663..c732142c7 100644
--- a/plugin/consensus/para/paracommitmsg.go
+++ b/plugin/consensus/para/paracommitmsg.go
@@ -139,7 +139,7 @@ out:
 	client.paraClient.wg.Done()
 }
 
-//chain height更新时候入口
+// chain height更新时候入口
 func (client *commitMsgClient) updateChainHeightNotify(height int64, isDel bool) {
 	if isDel {
 		atomic.StoreInt32(&client.isRollBack, 1)
@@ -162,7 +162,7 @@ func (client *commitMsgClient) resetNotify() {
 	client.resetCh <- 1
 }
 
-//新的区块产生，检查是否有commitTx正在发送入口
+// 新的区块产生，检查是否有commitTx正在发送入口
 func (client *commitMsgClient) commitTxCheckNotify(block *types.ParaTxDetail) {
 	if client.checkCommitTxSuccess(block) {
 		client.createCommitTx()
@@ -180,7 +180,7 @@ func (client *commitMsgClient) resetSend() {
 	client.resetSendEnv()
 }
 
-//自共识后直接从本地获取最新共识高度，没有自共识，获取主链的共识高度
+// 自共识后直接从本地获取最新共识高度，没有自共识，获取主链的共识高度
 func (client *commitMsgClient) getConsensusHeight() int64 {
 	status, err := client.getSelfConsensus()
 	if err != nil {
@@ -203,8 +203,8 @@ func (client *commitMsgClient) createCommitTx() {
 	client.pushCommitTx(tx)
 }
 
-//四个触发：1,新增区块 2,10s tick例行检查 3,发送交易成功上链 4,异常重发
-//1&2　只要共识高度追赶上了sendingHeight，就可以继续发送，即便当前节点发送交易仍未上链也直接取消发送新交易
+// 四个触发：1,新增区块 2,10s tick例行检查 3,发送交易成功上链 4,异常重发
+// 1&2　只要共识高度追赶上了sendingHeight，就可以继续发送，即便当前节点发送交易仍未上链也直接取消发送新交易
 func (client *commitMsgClient) getCommitTx() *types.Transaction {
 	client.mutex.Lock()
 	defer client.mutex.Unlock()
@@ -245,8 +245,8 @@ func (client *commitMsgClient) getCommitTx() *types.Transaction {
 
 }
 
-//client.checkTxCommitTimes和client.sendingHeight锁的场景可以区分
-//发送commitTx，可能跟checkCommitTxSuccess获取全局变量冲突，加锁，　如果有仍未成功上链的交易，直接覆盖重置
+// client.checkTxCommitTimes和client.sendingHeight锁的场景可以区分
+// 发送commitTx，可能跟checkCommitTxSuccess获取全局变量冲突，加锁，　如果有仍未成功上链的交易，直接覆盖重置
 func (client *commitMsgClient) pushCommitTx(signTx *types.Transaction) {
 	client.mutex.Lock()
 	defer client.mutex.Unlock()
@@ -256,7 +256,7 @@ func (client *commitMsgClient) pushCommitTx(signTx *types.Transaction) {
 	client.sendMsgCh <- signTx
 }
 
-//仍旧setCurrentTx， 这样在几个块之后仍旧会触发重发，重发只是广播，不然发送p2p之后，如果共识没增加，也没有其他触发的条件了
+// 仍旧setCurrentTx， 这样在几个块之后仍旧会触发重发，重发只是广播，不然发送p2p之后，如果共识没增加，也没有其他触发的条件了
 func (client *commitMsgClient) pushCommitTx2P2P(signTx *types.Transaction) {
 	client.mutex.Lock()
 	defer client.mutex.Unlock()
@@ -269,7 +269,7 @@ func (client *commitMsgClient) pushCommitTx2P2P(signTx *types.Transaction) {
 	client.paraClient.SendPubP2PMsg(paraBlsSignTopic, types.Encode(act))
 }
 
-//根据收集的commit action，签名发送, 比如BLS签名后的commit msg
+// 根据收集的commit action，签名发送, 比如BLS签名后的commit msg
 func (client *commitMsgClient) sendCommitActions(acts []*pt.ParacrossCommitAction) {
 	//如果当前正在发送交易，则取消此次发送，待发送被确认或取消后再触发. 考虑到已经聚合共识成功，又收到某节点消息场景，会多发送交易
 	curTx := client.getCurrentTx()
@@ -345,7 +345,7 @@ func (client *commitMsgClient) reSendCommitTx(tx *types.Transaction) bool {
 	return true
 }
 
-//如果共识高度一直没有追上发送高度，超出等待时间后，说明共识一直没达成，安全起见，超过停止次数后，重发
+// 如果共识高度一直没有追上发送高度，超出等待时间后，说明共识一直没达成，安全起见，超过停止次数后，重发
 func (client *commitMsgClient) checkConsensusStop(checks *commitCheckParams) {
 	client.mutex.Lock()
 	defer client.mutex.Unlock()
@@ -500,7 +500,7 @@ func (client *commitMsgClient) getTxsGroup(txsArr *types.Transactions) (*types.T
 		plog.Error("para CreateTxGroup", "err", err.Error())
 		return nil, err
 	}
-	err = group.Check(cfg, 0, cfg.GetMinTxFeeRate(), cfg.GetMaxTxFee())
+	err = group.Check(cfg, 0, cfg.GetMinTxFeeRate(), cfg.GetMaxTxFee(client.chainHeight))
 	if err != nil {
 		plog.Error("para CheckTxGroup", "err", err.Error())
 		return nil, err
@@ -648,8 +648,8 @@ out:
 	client.paraClient.wg.Done()
 }
 
-//当前未考虑获取key非常多失败的场景， 如果获取height非常多，block模块会比较大，但是使用完了就释放了
-//如果有必要也可以考虑每次最多取20个一个txgroup，发送共识部分循环获取发送也没问题
+// 当前未考虑获取key非常多失败的场景， 如果获取height非常多，block模块会比较大，但是使用完了就释放了
+// 如果有必要也可以考虑每次最多取20个一个txgroup，发送共识部分循环获取发送也没问题
 func (client *commitMsgClient) getNodeStatus(start, end int64) ([]*pt.ParacrossNodeStatus, error) {
 	var ret []*pt.ParacrossNodeStatus
 	if start == 0 {
@@ -764,7 +764,7 @@ func (client *commitMsgClient) getGenesisNodeStatus() (*pt.ParacrossNodeStatus,
 	return &status, nil
 }
 
-//only sync once, as main usually sync, here just need the first sync status after start up
+// only sync once, as main usually sync, here just need the first sync status after start up
 func (client *commitMsgClient) mainSync() error {
 	req := &types.ReqNil{}
 	reply, err := client.paraClient.grpcClient.IsSync(context.Background(), req)
@@ -852,7 +852,7 @@ func (client *commitMsgClient) GetProperFeeRate() error {
 	return nil
 }
 
-//在自共识阶段获取共识高度
+// 在自共识阶段获取共识高度
 func (client *commitMsgClient) getSelfConsensus() (*pt.ParacrossStatus, error) {
 	block, err := client.paraClient.getLastBlockInfo()
 	if err != nil {
@@ -885,7 +885,7 @@ func (client *commitMsgClient) getSelfConsensus() (*pt.ParacrossStatus, error) {
 	return nil, types.ErrNotFound
 }
 
-//从本地查询共识高度
+// 从本地查询共识高度
 func (client *commitMsgClient) getSelfConsensusStatus() (*pt.ParacrossStatus, error) {
 	cfg := client.paraClient.GetAPI().GetConfig()
 	ret, err := client.paraClient.GetAPI().QueryChain(&types.ChainExecutor{
@@ -906,7 +906,7 @@ func (client *commitMsgClient) getSelfConsensusStatus() (*pt.ParacrossStatus, er
 
 }
 
-//通过grpc获取主链状态可能耗时，放在定时器里面处理
+// 通过grpc获取主链状态可能耗时，放在定时器里面处理
 func (client *commitMsgClient) getMainConsensusStatus() (*pt.ParacrossStatus, error) {
 	block, err := client.paraClient.getLastBlockInfo()
 	if err != nil {
@@ -937,7 +937,7 @@ func (client *commitMsgClient) getMainConsensusStatus() (*pt.ParacrossStatus, er
 
 }
 
-//node group会在主链和平行链都同时配置,只本地查询就可以
+// node group会在主链和平行链都同时配置,只本地查询就可以
 func (client *commitMsgClient) getNodeGroupAddrs() (string, error) {
 	cfg := client.paraClient.GetAPI().GetConfig()
 	ret, err := client.paraClient.GetAPI().QueryChain(&types.ChainExecutor{
@@ -958,7 +958,7 @@ func (client *commitMsgClient) getNodeGroupAddrs() (string, error) {
 	return resp.Value, nil
 }
 
-//Supervision node group会在主链和平行链都同时配置,只本地查询就可以
+// Supervision node group会在主链和平行链都同时配置,只本地查询就可以
 func (client *commitMsgClient) getSupervisionNodeGroupAddrs() (string, error) {
 	cfg := client.paraClient.GetAPI().GetConfig()
 	ret, err := client.paraClient.GetAPI().QueryChain(&types.ChainExecutor{
@@ -1055,12 +1055,12 @@ func (client *commitMsgClient) fetchPriKey() error {
 	client.privateKey = priKey
 	client.paraClient.blsSignCli.setBlsPriKey(priKey.Bytes())
 
-  addressId, err := address.GetAddressType(client.authAccount)
-  if err != nil {
-    client.addressId = address.GetDefaultAddressID()
-  } else {
-    client.addressId = addressId
-  }
+	addressId, err := address.GetAddressType(client.authAccount)
+	if err != nil {
+		client.addressId = address.GetDefaultAddressID()
+	} else {
+		client.addressId = addressId
+	}
 
 	return nil
 }
@@ -1077,7 +1077,7 @@ func parseSelfConsEnableStr(selfEnables []string) ([]*paraSelfConsEnable, error)
 	return list, nil
 }
 
-//only for "0:50" or "0-50" with one sep
+// only for "0:50" or "0-50" with one sep
 func divideStr2Int64s(s, sep string) ([]int64, error) {
 	var r []int64
 	a := strings.Split(s, sep)
@@ -1108,7 +1108,7 @@ func (client *commitMsgClient) setSelfConsEnable() error {
 	return nil
 }
 
-//适配在自共识合约配置前有自共识的平行链项目，fork之后，采用合约配置
+// 适配在自共识合约配置前有自共识的平行链项目，fork之后，采用合约配置
 func (client *commitMsgClient) isSelfConsEnable(height int64) bool {
 	for _, v := range client.selfConsEnableList {
 		if height >= v.startHeight && height <= v.endHeight {
diff --git a/plugin/dapp/evm/cmd/ci2/chain33.proxyminer.toml b/plugin/dapp/evm/cmd/ci2/chain33.proxyminer.toml
index b830b1153..f0923216e 100644
--- a/plugin/dapp/evm/cmd/ci2/chain33.proxyminer.toml
+++ b/plugin/dapp/evm/cmd/ci2/chain33.proxyminer.toml
@@ -130,6 +130,11 @@ maxTxFeeRate=10000000
 # 单笔交易最大的手续费, 10 coins
 maxTxFee=1000000000
 isLevelFee=true
+
+[mver.mempool.ForkMaxTxFeeV1]
+# 单笔交易最大的手续费, 50 coins
+maxTxFee=5000000000
+
 [mempool.sub.timeline]
 poolCacheSize=10240
 
@@ -515,6 +520,7 @@ ForkRootHash=4500000
 ForkFormatAddressKey=0
 ForkCheckEthTxSort=0
 ForkProxyExec=0
+ForkMaxTxFeeV1=0
 
 [fork.sub.none]
 ForkUseTimeDelay=0
@@ -575,7 +581,6 @@ ForkIntrinsicGas=0
 ForkEVMAddressInit=0
 ForkEvmExecNonce=0
 ForkEvmExecNonceV2=0
-
 [fork.sub.evmxgo]
 Enable=0
 [fork.sub.zksync]
diff --git a/plugin/dapp/rollup/cmd/ci/docker-compose.sh b/plugin/dapp/rollup/cmd/ci/docker-compose.sh
index eca721bf0..57659014f 100755
--- a/plugin/dapp/rollup/cmd/ci/docker-compose.sh
+++ b/plugin/dapp/rollup/cmd/ci/docker-compose.sh
@@ -19,13 +19,13 @@ PWD=$(cd "$(dirname "$0")" && pwd)
 export PATH="$PWD:$PATH"
 
 MAIN_NODE="${1}_main_1"
-MAIN_CLI="docker exec ${MAIN_NODE} /root/chain33-cli"
+MAIN_CLI="docker exec ${MAIN_NODE} /root/chain33-cli --conf=chain33.test.toml"
 
 PARA_NODE="${1}_para1_1"
-CLI="docker exec ${PARA_NODE} /root/chain33-cli --paraName=user.p.para."
+CLI="docker exec ${PARA_NODE} /root/chain33-cli --conf=chain33.para1.toml --paraName=user.p.para."
 
 PARA_NODE2="${1}_para2_1"
-CLI2="docker exec ${PARA_NODE2} /root/chain33-cli --paraName=user.p.para."
+CLI2="docker exec ${PARA_NODE2} /root/chain33-cli --conf=chain33.para2.toml --paraName=user.p.para."
 
 # shellcheck disable=SC2034
 


Test patch:
diff --git a/plugin/consensus/para/para_test.go b/plugin/consensus/para/para_test.go
index 940e2d6da..186242d93 100644
--- a/plugin/consensus/para/para_test.go
+++ b/plugin/consensus/para/para_test.go
@@ -78,7 +78,7 @@ func createTxsGroup(cfg *types.Chain33Config, txs []*types.Transaction) ([]*type
 	if err != nil {
 		return nil, err
 	}
-	err = group.Check(cfg, 0, cfg.GetMinTxFeeRate(), cfg.GetMaxTxFee())
+	err = group.Check(cfg, 0, cfg.GetMinTxFeeRate(), cfg.GetMaxTxFee(0))
 	if err != nil {
 		return nil, err
 	}
diff --git a/plugin/dapp/paracross/cmd/build/chain33.para.test.toml b/plugin/dapp/paracross/cmd/build/chain33.para.test.toml
index 52ff8b97f..d404908f7 100644
--- a/plugin/dapp/paracross/cmd/build/chain33.para.test.toml
+++ b/plugin/dapp/paracross/cmd/build/chain33.para.test.toml
@@ -70,6 +70,9 @@ name="para"
 poolCacheSize=10240
 minTxFeeRate=100000
 maxTxNumPerAccount=10000
+[mver.mempool.ForkMaxTxFeeV1]
+# 单笔交易最大的手续费, 50 coins
+maxTxFee=5000000000
 
 [consensus]
 name="para"
diff --git a/plugin/dapp/paracross/executor/paracross_test.go b/plugin/dapp/paracross/executor/paracross_test.go
index fdf73db91..263e3124c 100644
--- a/plugin/dapp/paracross/executor/paracross_test.go
+++ b/plugin/dapp/paracross/executor/paracross_test.go
@@ -665,7 +665,7 @@ func createTxsGroup(s suite.Suite, txs []*types.Transaction) ([]*types.Transacti
 	if err != nil {
 		return nil, err
 	}
-	err = group.Check(chain33TestCfg, 0, chain33TestCfg.GetMinTxFeeRate(), chain33TestCfg.GetMaxTxFee())
+	err = group.Check(chain33TestCfg, 0, chain33TestCfg.GetMinTxFeeRate(), chain33TestCfg.GetMaxTxFee(0))
 	if err != nil {
 		return nil, err
 	}