From 9b7d710959ef338f2eb8bf0b32bc7d928f792def Mon Sep 17 00:00:00 2001 From: jiangpeng <11565373+bysomeone@users.noreply.github.com> Date: Sun, 26 May 2024 23:50:19 +0800 Subject: [PATCH] mod:update chain33 & avalanche dependency --- cli/main.go | 1 + go.mod | 4 ++-- go.sum | 8 ++++---- plugin/consensus/ticket/ticket.go | 5 +++-- plugin/crypto/bls/bls.go | 1 + .../dapp/cross2eth/ebrelayer/relayer/ethereum/ethereum.go | 3 ++- .../ebrelayer/relayer/ethereum/ethtxs/relayToEthereum.go | 3 ++- plugin/dapp/cross2eth/ebrelayer/types/config.pb.go | 3 ++- plugin/dapp/cross2eth/ebrelayer/types/relayer.pb.go | 3 ++- plugin/dapp/evm/executor/evm.go | 3 ++- plugin/dapp/evm/executor/exec.go | 3 ++- plugin/dapp/evm/executor/exec_local.go | 1 + plugin/dapp/evm/executor/query.go | 5 +++-- .../vm/common/crypto/blake2b/blake2bAVX2_amd64.go | 1 + .../executor/vm/common/crypto/blake2b/blake2b_amd64.go | 1 + .../executor/vm/common/crypto/blake2b/blake2b_f_fuzz.go | 1 + .../evm/executor/vm/common/crypto/blake2b/blake2b_ref.go | 1 + .../evm/executor/vm/common/crypto/blake2b/register.go | 1 + .../executor/vm/common/crypto/bls12381/arithmetic_decl.go | 1 + .../vm/common/crypto/bls12381/arithmetic_fallback.go | 1 + .../vm/common/crypto/bls12381/arithmetic_x86_adx.go | 1 + .../vm/common/crypto/bls12381/arithmetic_x86_noadx.go | 1 + .../evm/executor/vm/common/crypto/bn256/bn256_fast.go | 1 + .../evm/executor/vm/common/crypto/bn256/bn256_fuzz.go | 1 + .../evm/executor/vm/common/crypto/bn256/bn256_slow.go | 1 + .../vm/common/crypto/bn256/cloudflare/gfp_decl.go | 1 + .../vm/common/crypto/bn256/cloudflare/gfp_generic.go | 1 + plugin/dapp/evm/executor/vm/state/check.go | 3 ++- plugin/dapp/evm/types/evmcontract.pb.go | 5 +++-- plugin/dapp/evmxgo/types/evmxgo.pb.go | 5 +++-- plugin/dapp/exchange/types/exchange.pb.go | 5 +++-- plugin/dapp/mix/types/cryptokey.pb.go | 5 +++-- plugin/dapp/mix/types/merkletree.pb.go | 5 +++-- plugin/dapp/mix/types/mix.pb.go | 5 +++-- plugin/dapp/mix/types/mixwallet.pb.go | 5 +++-- plugin/dapp/multisig/executor/action.go | 1 + plugin/dapp/paracross/executor/rollupcrosstx.go | 2 +- plugin/dapp/paracross/executor/superaccount.go | 3 ++- plugin/dapp/paracross/types/paracross.pb.go | 5 +++-- plugin/dapp/rollup/executor/util.go | 2 +- plugin/dapp/rollup/types/rollup.pb.go | 5 +++-- plugin/dapp/ticket/commands/ticket.go | 3 ++- plugin/dapp/ticket/rpc/rpc.go | 3 ++- plugin/dapp/ticket/wallet/ticket.go | 3 ++- plugin/dapp/ticket/wallet/ticket_test.go | 3 ++- plugin/dapp/token/executor/tokendb.go | 1 + plugin/dapp/vote/executor/action.go | 1 + plugin/dapp/zksync/types/receipt4l2.pb.go | 5 +++-- plugin/dapp/zksync/types/witness.pb.go | 5 +++-- plugin/dapp/zksync/types/zksync.pb.go | 5 +++-- 50 files changed, 94 insertions(+), 48 deletions(-) diff --git a/cli/main.go b/cli/main.go index f608b52590..e4cfc129f0 100644 --- a/cli/main.go +++ b/cli/main.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build go1.8 // +build go1.8 package main diff --git a/go.mod b/go.mod index 087722dc9b..07faa2f777 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/33cn/plugin go 1.19 -replace github.com/33cn/chain33 => github.com/bysomeone/chain33 v0.0.0-20240512025003-55d7dc44896a +replace github.com/33cn/chain33 => github.com/bysomeone/chain33 v0.0.0-20240526154333-c9b4079f37f6 require ( github.com/33cn/chain33 v0.0.0-00010101000000-000000000000 @@ -268,7 +268,7 @@ require ( ) replace ( - github.com/ava-labs/avalanchego => github.com/bysomeone/avalanchego v0.0.0-20240511070301-a9a2aac50464 + github.com/ava-labs/avalanchego => github.com/bysomeone/avalanchego v0.0.0-20240525154058-c4ea5da7ec71 github.com/btcsuite/btcd/btcec => github.com/btcsuite/btcd v0.22.3 github.com/consensys/gnark-crypto => github.com/consensys/gnark-crypto v0.5.3 ) diff --git a/go.sum b/go.sum index e959028aa4..e3eb8e6a52 100644 --- a/go.sum +++ b/go.sum @@ -231,10 +231,10 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE github.com/btcsuite/winsvc v1.0.0 h1:J9B4L7e3oqhXOcm+2IuNApwzQec85lE+QaikUcCs+dk= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/bysomeone/avalanchego v0.0.0-20240511070301-a9a2aac50464 h1:fjGGreFQgEMo+jTduHpxVpDOVbGd45Wata/KXu9ieWg= -github.com/bysomeone/avalanchego v0.0.0-20240511070301-a9a2aac50464/go.mod h1:SgoXVssKD3a3diOV4qaTkOEQ+2KEfErcdOASIhV6a1s= -github.com/bysomeone/chain33 v0.0.0-20240512025003-55d7dc44896a h1:ZnYbRkAmbf95wyyt11j1FcQfm5ClzHX+qOhxUkfJ4Rk= -github.com/bysomeone/chain33 v0.0.0-20240512025003-55d7dc44896a/go.mod h1:NEpm22MBaVvBlXMxokvnecNf4hfE9VWG/6LdEYP4zvw= +github.com/bysomeone/avalanchego v0.0.0-20240525154058-c4ea5da7ec71 h1:y70tfpRGONtMp0EqL+uYMTdaTR4OBpC631a97b0dTa4= +github.com/bysomeone/avalanchego v0.0.0-20240525154058-c4ea5da7ec71/go.mod h1:SgoXVssKD3a3diOV4qaTkOEQ+2KEfErcdOASIhV6a1s= +github.com/bysomeone/chain33 v0.0.0-20240526154333-c9b4079f37f6 h1:fpWxDK9ic/CaRp3RcnXCKHPQl7CAyc7ph6CwJSqXnsE= +github.com/bysomeone/chain33 v0.0.0-20240526154333-c9b4079f37f6/go.mod h1:BwuBoRogoSU1GouVhnFCtLIOGcRALtLaq7ThEu/FsKE= github.com/c-bata/go-prompt v0.2.2 h1:uyKRz6Z6DUyj49QVijyM339UJV9yhbr70gESwbNU3e0= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/cactus/go-statsd-client/statsd v0.0.0-20191106001114-12b4e2b38748/go.mod h1:l/bIBLeOl9eX+wxJAzxS4TveKRtAqlyDpHjhkfO0MEI= diff --git a/plugin/consensus/ticket/ticket.go b/plugin/consensus/ticket/ticket.go index beea977a4c..e484794f1a 100644 --- a/plugin/consensus/ticket/ticket.go +++ b/plugin/consensus/ticket/ticket.go @@ -10,14 +10,15 @@ import ( "encoding/hex" "errors" "fmt" - "github.com/33cn/chain33/common/address" - "github.com/33cn/chain33/system/address/eth" "math/big" "strconv" "strings" "sync" "time" + "github.com/33cn/chain33/common/address" + "github.com/33cn/chain33/system/address/eth" + "github.com/33cn/chain33/common" "github.com/33cn/chain33/common/crypto" "github.com/33cn/chain33/common/difficulty" diff --git a/plugin/crypto/bls/bls.go b/plugin/crypto/bls/bls.go index a716e98634..09c18280dd 100644 --- a/plugin/crypto/bls/bls.go +++ b/plugin/crypto/bls/bls.go @@ -9,6 +9,7 @@ import ( "crypto/rand" "errors" "fmt" + "github.com/33cn/chain33/common" "github.com/33cn/chain33/common/crypto" diff --git a/plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethereum.go b/plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethereum.go index 24f106a2e7..97803d9734 100644 --- a/plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethereum.go +++ b/plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethereum.go @@ -14,7 +14,6 @@ import ( "crypto/ecdsa" "errors" "fmt" - "github.com/ethereum/go-ethereum/core/txpool" "math" "math/big" "regexp" @@ -23,6 +22,8 @@ import ( "sync/atomic" "time" + "github.com/ethereum/go-ethereum/core/txpool" + chain33Common "github.com/33cn/chain33/common" dbm "github.com/33cn/chain33/common/db" log "github.com/33cn/chain33/common/log/log15" diff --git a/plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethtxs/relayToEthereum.go b/plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethtxs/relayToEthereum.go index ceaf04a815..06478d4987 100644 --- a/plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethtxs/relayToEthereum.go +++ b/plugin/dapp/cross2eth/ebrelayer/relayer/ethereum/ethtxs/relayToEthereum.go @@ -2,10 +2,11 @@ package ethtxs import ( "crypto/ecdsa" - "github.com/ethereum/go-ethereum/core/txpool" "math/big" "time" + "github.com/ethereum/go-ethereum/core/txpool" + chain33Common "github.com/33cn/chain33/common" "github.com/33cn/chain33/common/log/log15" "github.com/33cn/plugin/plugin/dapp/cross2eth/contracts/contracts4eth/generated" diff --git a/plugin/dapp/cross2eth/ebrelayer/types/config.pb.go b/plugin/dapp/cross2eth/ebrelayer/types/config.pb.go index ce93ab4dc8..b092b55f9b 100644 --- a/plugin/dapp/cross2eth/ebrelayer/types/config.pb.go +++ b/plugin/dapp/cross2eth/ebrelayer/types/config.pb.go @@ -5,8 +5,9 @@ package types import ( fmt "fmt" - proto "github.com/golang/protobuf/proto" math "math" + + proto "github.com/golang/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/plugin/dapp/cross2eth/ebrelayer/types/relayer.pb.go b/plugin/dapp/cross2eth/ebrelayer/types/relayer.pb.go index 278ba73c9d..0edb2c6174 100644 --- a/plugin/dapp/cross2eth/ebrelayer/types/relayer.pb.go +++ b/plugin/dapp/cross2eth/ebrelayer/types/relayer.pb.go @@ -5,8 +5,9 @@ package types import ( fmt "fmt" - proto "github.com/golang/protobuf/proto" math "math" + + proto "github.com/golang/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/plugin/dapp/evm/executor/evm.go b/plugin/dapp/evm/executor/evm.go index e7d3322cc5..fac4f7f902 100644 --- a/plugin/dapp/evm/executor/evm.go +++ b/plugin/dapp/evm/executor/evm.go @@ -7,11 +7,12 @@ package executor import ( "bytes" "fmt" - log "github.com/33cn/chain33/common/log/log15" "math/big" "os" "reflect" + log "github.com/33cn/chain33/common/log/log15" + "github.com/33cn/chain33/common/address" drivers "github.com/33cn/chain33/system/dapp" "github.com/33cn/chain33/types" diff --git a/plugin/dapp/evm/executor/exec.go b/plugin/dapp/evm/executor/exec.go index 22828485c9..3f9f08d5f8 100644 --- a/plugin/dapp/evm/executor/exec.go +++ b/plugin/dapp/evm/executor/exec.go @@ -8,11 +8,12 @@ import ( "encoding/hex" "errors" "fmt" - "github.com/33cn/chain33/system/crypto/secp256k1eth" "math" "strings" "sync/atomic" + "github.com/33cn/chain33/system/crypto/secp256k1eth" + "github.com/33cn/chain33/common/address" "github.com/33cn/chain33/account" diff --git a/plugin/dapp/evm/executor/exec_local.go b/plugin/dapp/evm/executor/exec_local.go index a19cda1569..9da394d4a8 100644 --- a/plugin/dapp/evm/executor/exec_local.go +++ b/plugin/dapp/evm/executor/exec_local.go @@ -7,6 +7,7 @@ package executor import ( "bytes" "errors" + "github.com/33cn/chain33/common" "github.com/33cn/chain33/system/crypto/secp256k1eth" "github.com/33cn/chain33/types" diff --git a/plugin/dapp/evm/executor/query.go b/plugin/dapp/evm/executor/query.go index 63011af897..8846f5e417 100644 --- a/plugin/dapp/evm/executor/query.go +++ b/plugin/dapp/evm/executor/query.go @@ -8,12 +8,13 @@ import ( "encoding/hex" "errors" "fmt" - "github.com/33cn/chain33/common/address" - "github.com/33cn/chain33/system/address/eth" "math/big" "strings" "sync/atomic" + "github.com/33cn/chain33/common/address" + "github.com/33cn/chain33/system/address/eth" + "github.com/33cn/chain33/executor" "github.com/33cn/chain33/common" diff --git a/plugin/dapp/evm/executor/vm/common/crypto/blake2b/blake2bAVX2_amd64.go b/plugin/dapp/evm/executor/vm/common/crypto/blake2b/blake2bAVX2_amd64.go index 667c8a310c..36e01b9453 100644 --- a/plugin/dapp/evm/executor/vm/common/crypto/blake2b/blake2bAVX2_amd64.go +++ b/plugin/dapp/evm/executor/vm/common/crypto/blake2b/blake2bAVX2_amd64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build go1.7 && amd64 && !gccgo && !appengine // +build go1.7,amd64,!gccgo,!appengine //nolint:unparam // 忽视本文件所有golangci-linter检查 diff --git a/plugin/dapp/evm/executor/vm/common/crypto/blake2b/blake2b_amd64.go b/plugin/dapp/evm/executor/vm/common/crypto/blake2b/blake2b_amd64.go index 6a06ef8bfa..b4bdc666e7 100644 --- a/plugin/dapp/evm/executor/vm/common/crypto/blake2b/blake2b_amd64.go +++ b/plugin/dapp/evm/executor/vm/common/crypto/blake2b/blake2b_amd64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !go1.7 && amd64 && !gccgo && !appengine // +build !go1.7,amd64,!gccgo,!appengine //nolint:unparam // 忽视本文件所有golangci-linter检查 diff --git a/plugin/dapp/evm/executor/vm/common/crypto/blake2b/blake2b_f_fuzz.go b/plugin/dapp/evm/executor/vm/common/crypto/blake2b/blake2b_f_fuzz.go index b6c120d7ba..79208748e4 100644 --- a/plugin/dapp/evm/executor/vm/common/crypto/blake2b/blake2b_f_fuzz.go +++ b/plugin/dapp/evm/executor/vm/common/crypto/blake2b/blake2b_f_fuzz.go @@ -1,3 +1,4 @@ +//go:build gofuzz // +build gofuzz //nolint:unparam // 忽视本文件所有golangci-linter检查 diff --git a/plugin/dapp/evm/executor/vm/common/crypto/blake2b/blake2b_ref.go b/plugin/dapp/evm/executor/vm/common/crypto/blake2b/blake2b_ref.go index 359813a679..31ab80b974 100644 --- a/plugin/dapp/evm/executor/vm/common/crypto/blake2b/blake2b_ref.go +++ b/plugin/dapp/evm/executor/vm/common/crypto/blake2b/blake2b_ref.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !amd64 || appengine || gccgo // +build !amd64 appengine gccgo //nolint:unparam // 忽视本文件所有golangci-linter检查 diff --git a/plugin/dapp/evm/executor/vm/common/crypto/blake2b/register.go b/plugin/dapp/evm/executor/vm/common/crypto/blake2b/register.go index 700e922746..1d368d9e5d 100644 --- a/plugin/dapp/evm/executor/vm/common/crypto/blake2b/register.go +++ b/plugin/dapp/evm/executor/vm/common/crypto/blake2b/register.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build go1.9 // +build go1.9 //nolint:unparam // 忽视本文件所有golangci-linter检查 diff --git a/plugin/dapp/evm/executor/vm/common/crypto/bls12381/arithmetic_decl.go b/plugin/dapp/evm/executor/vm/common/crypto/bls12381/arithmetic_decl.go index e850c0e6ad..e7ee70f41a 100644 --- a/plugin/dapp/evm/executor/vm/common/crypto/bls12381/arithmetic_decl.go +++ b/plugin/dapp/evm/executor/vm/common/crypto/bls12381/arithmetic_decl.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . +//go:build (amd64 && blsasm) || (amd64 && blsadx) // +build amd64,blsasm amd64,blsadx //nolint:unparam // 忽视本文件所有golangci-linter检查 diff --git a/plugin/dapp/evm/executor/vm/common/crypto/bls12381/arithmetic_fallback.go b/plugin/dapp/evm/executor/vm/common/crypto/bls12381/arithmetic_fallback.go index 40eccf71c7..0ac3dde37d 100644 --- a/plugin/dapp/evm/executor/vm/common/crypto/bls12381/arithmetic_fallback.go +++ b/plugin/dapp/evm/executor/vm/common/crypto/bls12381/arithmetic_fallback.go @@ -31,6 +31,7 @@ // Package bls (generated by goff) contains field arithmetics operations +//go:build !amd64 || (!blsasm && !blsadx) // +build !amd64 !blsasm,!blsadx //nolint:unparam // 忽视本文件所有golangci-linter检查 diff --git a/plugin/dapp/evm/executor/vm/common/crypto/bls12381/arithmetic_x86_adx.go b/plugin/dapp/evm/executor/vm/common/crypto/bls12381/arithmetic_x86_adx.go index 14ddc6b16a..42c4b9afcb 100644 --- a/plugin/dapp/evm/executor/vm/common/crypto/bls12381/arithmetic_x86_adx.go +++ b/plugin/dapp/evm/executor/vm/common/crypto/bls12381/arithmetic_x86_adx.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . +//go:build amd64 && blsadx // +build amd64,blsadx //nolint:unparam // 忽视本文件所有golangci-linter检查 diff --git a/plugin/dapp/evm/executor/vm/common/crypto/bls12381/arithmetic_x86_noadx.go b/plugin/dapp/evm/executor/vm/common/crypto/bls12381/arithmetic_x86_noadx.go index 29adf01257..40f44ae127 100644 --- a/plugin/dapp/evm/executor/vm/common/crypto/bls12381/arithmetic_x86_noadx.go +++ b/plugin/dapp/evm/executor/vm/common/crypto/bls12381/arithmetic_x86_noadx.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . +//go:build amd64 && blsasm // +build amd64,blsasm //nolint:unparam // 忽视本文件所有golangci-linter检查 diff --git a/plugin/dapp/evm/executor/vm/common/crypto/bn256/bn256_fast.go b/plugin/dapp/evm/executor/vm/common/crypto/bn256/bn256_fast.go index a1363e15e1..df9580b93d 100644 --- a/plugin/dapp/evm/executor/vm/common/crypto/bn256/bn256_fast.go +++ b/plugin/dapp/evm/executor/vm/common/crypto/bn256/bn256_fast.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file. +//go:build amd64 || arm64 // +build amd64 arm64 // Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve. diff --git a/plugin/dapp/evm/executor/vm/common/crypto/bn256/bn256_fuzz.go b/plugin/dapp/evm/executor/vm/common/crypto/bn256/bn256_fuzz.go index b6fb07c4f5..3298dd318f 100644 --- a/plugin/dapp/evm/executor/vm/common/crypto/bn256/bn256_fuzz.go +++ b/plugin/dapp/evm/executor/vm/common/crypto/bn256/bn256_fuzz.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file. +//go:build gofuzz // +build gofuzz package bn256 //nolint diff --git a/plugin/dapp/evm/executor/vm/common/crypto/bn256/bn256_slow.go b/plugin/dapp/evm/executor/vm/common/crypto/bn256/bn256_slow.go index 231575a9c1..dbdf18cba1 100644 --- a/plugin/dapp/evm/executor/vm/common/crypto/bn256/bn256_slow.go +++ b/plugin/dapp/evm/executor/vm/common/crypto/bn256/bn256_slow.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file. +//go:build !amd64 && !arm64 // +build !amd64,!arm64 // Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve. diff --git a/plugin/dapp/evm/executor/vm/common/crypto/bn256/cloudflare/gfp_decl.go b/plugin/dapp/evm/executor/vm/common/crypto/bn256/cloudflare/gfp_decl.go index 886c2fd2bf..8f3df0c6f3 100644 --- a/plugin/dapp/evm/executor/vm/common/crypto/bn256/cloudflare/gfp_decl.go +++ b/plugin/dapp/evm/executor/vm/common/crypto/bn256/cloudflare/gfp_decl.go @@ -1,3 +1,4 @@ +//go:build (amd64 && !generic) || (arm64 && !generic) // +build amd64,!generic arm64,!generic //nolint:unparam // 忽视本文件所有golangci-linter检查 diff --git a/plugin/dapp/evm/executor/vm/common/crypto/bn256/cloudflare/gfp_generic.go b/plugin/dapp/evm/executor/vm/common/crypto/bn256/cloudflare/gfp_generic.go index c3a0c91ee8..141933ff4a 100644 --- a/plugin/dapp/evm/executor/vm/common/crypto/bn256/cloudflare/gfp_generic.go +++ b/plugin/dapp/evm/executor/vm/common/crypto/bn256/cloudflare/gfp_generic.go @@ -1,3 +1,4 @@ +//go:build (!amd64 && !arm64) || generic // +build !amd64,!arm64 generic //nolint:unparam // 忽视本文件所有golangci-linter检查 diff --git a/plugin/dapp/evm/executor/vm/state/check.go b/plugin/dapp/evm/executor/vm/state/check.go index 492ec81b01..4841b3912a 100644 --- a/plugin/dapp/evm/executor/vm/state/check.go +++ b/plugin/dapp/evm/executor/vm/state/check.go @@ -2,8 +2,9 @@ package state import ( "errors" + + "github.com/33cn/plugin/plugin/dapp/evm/executor/vm/common" ) -import "github.com/33cn/plugin/plugin/dapp/evm/executor/vm/common" // TxData 本文件用来存储硬分叉中需要用到的数据 type EvmTxData struct { diff --git a/plugin/dapp/evm/types/evmcontract.pb.go b/plugin/dapp/evm/types/evmcontract.pb.go index ca000e5183..bca76c40f8 100644 --- a/plugin/dapp/evm/types/evmcontract.pb.go +++ b/plugin/dapp/evm/types/evmcontract.pb.go @@ -7,10 +7,11 @@ package types import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( diff --git a/plugin/dapp/evmxgo/types/evmxgo.pb.go b/plugin/dapp/evmxgo/types/evmxgo.pb.go index 5384fddfbc..dabb06108d 100644 --- a/plugin/dapp/evmxgo/types/evmxgo.pb.go +++ b/plugin/dapp/evmxgo/types/evmxgo.pb.go @@ -8,12 +8,13 @@ package types import ( context "context" + reflect "reflect" + sync "sync" + types "github.com/33cn/chain33/types" grpc "google.golang.org/grpc" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/plugin/dapp/exchange/types/exchange.pb.go b/plugin/dapp/exchange/types/exchange.pb.go index cfb1c17f3d..3262858a1b 100644 --- a/plugin/dapp/exchange/types/exchange.pb.go +++ b/plugin/dapp/exchange/types/exchange.pb.go @@ -8,11 +8,12 @@ package types import ( context "context" + reflect "reflect" + sync "sync" + grpc "google.golang.org/grpc" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/plugin/dapp/mix/types/cryptokey.pb.go b/plugin/dapp/mix/types/cryptokey.pb.go index 6217cff4a6..c9a681fc0d 100644 --- a/plugin/dapp/mix/types/cryptokey.pb.go +++ b/plugin/dapp/mix/types/cryptokey.pb.go @@ -7,10 +7,11 @@ package types import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( diff --git a/plugin/dapp/mix/types/merkletree.pb.go b/plugin/dapp/mix/types/merkletree.pb.go index c31dcbd4dc..0b4a4f282d 100644 --- a/plugin/dapp/mix/types/merkletree.pb.go +++ b/plugin/dapp/mix/types/merkletree.pb.go @@ -7,10 +7,11 @@ package types import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( diff --git a/plugin/dapp/mix/types/mix.pb.go b/plugin/dapp/mix/types/mix.pb.go index 3b9e649c14..b570ef63b7 100644 --- a/plugin/dapp/mix/types/mix.pb.go +++ b/plugin/dapp/mix/types/mix.pb.go @@ -7,10 +7,11 @@ package types import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( diff --git a/plugin/dapp/mix/types/mixwallet.pb.go b/plugin/dapp/mix/types/mixwallet.pb.go index b501d81e00..88c4a2fb5a 100644 --- a/plugin/dapp/mix/types/mixwallet.pb.go +++ b/plugin/dapp/mix/types/mixwallet.pb.go @@ -8,14 +8,15 @@ package types import ( context "context" + reflect "reflect" + sync "sync" + types "github.com/33cn/chain33/types" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/plugin/dapp/multisig/executor/action.go b/plugin/dapp/multisig/executor/action.go index f72f631f4b..7fbac020c0 100644 --- a/plugin/dapp/multisig/executor/action.go +++ b/plugin/dapp/multisig/executor/action.go @@ -6,6 +6,7 @@ package executor import ( "encoding/hex" + "github.com/33cn/plugin/plugin/dapp/common" "github.com/33cn/chain33/system/address/btc" diff --git a/plugin/dapp/paracross/executor/rollupcrosstx.go b/plugin/dapp/paracross/executor/rollupcrosstx.go index ca80c2106e..be8dd8d4b5 100644 --- a/plugin/dapp/paracross/executor/rollupcrosstx.go +++ b/plugin/dapp/paracross/executor/rollupcrosstx.go @@ -171,7 +171,7 @@ func getRollupCrossTxs(api client.QueueProtocolAPI, paraTitle string, idxArr []* // first get from cache blkCrossTxs, ok := blkCrossTxCache[txIdx.BlockHeight] - if !ok && txIdx.BlockHeight > 0{ + if !ok && txIdx.BlockHeight > 0 { // get block from blockchain detail, err := getBlockByHeight(api, txIdx.BlockHeight, true) diff --git a/plugin/dapp/paracross/executor/superaccount.go b/plugin/dapp/paracross/executor/superaccount.go index 0543cff42f..36f018e769 100644 --- a/plugin/dapp/paracross/executor/superaccount.go +++ b/plugin/dapp/paracross/executor/superaccount.go @@ -5,9 +5,10 @@ package executor import ( - common2 "github.com/33cn/plugin/plugin/dapp/common" "strings" + common2 "github.com/33cn/plugin/plugin/dapp/common" + "strconv" "github.com/33cn/chain33/common" diff --git a/plugin/dapp/paracross/types/paracross.pb.go b/plugin/dapp/paracross/types/paracross.pb.go index 004f322b05..78a6b318ee 100644 --- a/plugin/dapp/paracross/types/paracross.pb.go +++ b/plugin/dapp/paracross/types/paracross.pb.go @@ -8,14 +8,15 @@ package types import ( context "context" + reflect "reflect" + sync "sync" + types "github.com/33cn/chain33/types" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/plugin/dapp/rollup/executor/util.go b/plugin/dapp/rollup/executor/util.go index 9a5f9cc772..f9b5447c65 100644 --- a/plugin/dapp/rollup/executor/util.go +++ b/plugin/dapp/rollup/executor/util.go @@ -38,7 +38,7 @@ func GetRoundInfo(kv db.KV, title string, round int64) (*rolluptypes.CommitRound return info, err } -func sha256Hash(h *types.Header) []byte{ +func sha256Hash(h *types.Header) []byte { return common.Sha256(types.Encode(h)) } diff --git a/plugin/dapp/rollup/types/rollup.pb.go b/plugin/dapp/rollup/types/rollup.pb.go index 461e1fd0e6..3163973d1f 100644 --- a/plugin/dapp/rollup/types/rollup.pb.go +++ b/plugin/dapp/rollup/types/rollup.pb.go @@ -8,12 +8,13 @@ package types import ( context "context" + reflect "reflect" + sync "sync" + types "github.com/33cn/chain33/types" grpc "google.golang.org/grpc" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/plugin/dapp/ticket/commands/ticket.go b/plugin/dapp/ticket/commands/ticket.go index 9c6df3ec88..ce06393898 100644 --- a/plugin/dapp/ticket/commands/ticket.go +++ b/plugin/dapp/ticket/commands/ticket.go @@ -8,12 +8,13 @@ import ( "encoding/hex" "encoding/json" "fmt" - "github.com/33cn/chain33/common" "math/rand" "os" "strings" "time" + "github.com/33cn/chain33/common" + cmdtypes "github.com/33cn/chain33/system/dapp/commands/types" "github.com/pkg/errors" diff --git a/plugin/dapp/ticket/rpc/rpc.go b/plugin/dapp/ticket/rpc/rpc.go index dd01d3e629..6f0eb7c63c 100644 --- a/plugin/dapp/ticket/rpc/rpc.go +++ b/plugin/dapp/ticket/rpc/rpc.go @@ -5,13 +5,14 @@ package rpc import ( + "strings" + "github.com/33cn/chain33/common" "github.com/33cn/chain33/common/address" rpctypes "github.com/33cn/chain33/rpc/types" "github.com/33cn/chain33/types" ty "github.com/33cn/plugin/plugin/dapp/ticket/types" "golang.org/x/net/context" - "strings" ) func bindMiner(cfg *types.Chain33Config, param *ty.ReqBindMiner) (*ty.ReplyBindMiner, error) { diff --git a/plugin/dapp/ticket/wallet/ticket.go b/plugin/dapp/ticket/wallet/ticket.go index 52cfbcf161..bce6125bac 100644 --- a/plugin/dapp/ticket/wallet/ticket.go +++ b/plugin/dapp/ticket/wallet/ticket.go @@ -7,12 +7,13 @@ package wallet import ( "encoding/hex" "fmt" - "github.com/33cn/chain33/system/address/eth" "strings" "sync" "sync/atomic" "time" + "github.com/33cn/chain33/system/address/eth" + "github.com/pkg/errors" "github.com/33cn/chain33/client" diff --git a/plugin/dapp/ticket/wallet/ticket_test.go b/plugin/dapp/ticket/wallet/ticket_test.go index cb231196ad..0164d1a9c9 100644 --- a/plugin/dapp/ticket/wallet/ticket_test.go +++ b/plugin/dapp/ticket/wallet/ticket_test.go @@ -6,11 +6,12 @@ package wallet import ( "encoding/hex" - "github.com/33cn/chain33/common/address" "math/rand" "sync" "testing" + "github.com/33cn/chain33/common/address" + "github.com/stretchr/testify/mock" wcom "github.com/33cn/chain33/wallet/common" diff --git a/plugin/dapp/token/executor/tokendb.go b/plugin/dapp/token/executor/tokendb.go index e5f0c9ec59..586c77a570 100644 --- a/plugin/dapp/token/executor/tokendb.go +++ b/plugin/dapp/token/executor/tokendb.go @@ -6,6 +6,7 @@ package executor import ( "fmt" + "github.com/33cn/plugin/plugin/dapp/common" "strings" diff --git a/plugin/dapp/vote/executor/action.go b/plugin/dapp/vote/executor/action.go index bfa79025ca..481d1fd571 100644 --- a/plugin/dapp/vote/executor/action.go +++ b/plugin/dapp/vote/executor/action.go @@ -2,6 +2,7 @@ package executor import ( "encoding/hex" + "github.com/33cn/plugin/plugin/dapp/common" "github.com/33cn/chain33/system/dapp" diff --git a/plugin/dapp/zksync/types/receipt4l2.pb.go b/plugin/dapp/zksync/types/receipt4l2.pb.go index 7f4266a08a..75e62d51ab 100644 --- a/plugin/dapp/zksync/types/receipt4l2.pb.go +++ b/plugin/dapp/zksync/types/receipt4l2.pb.go @@ -7,10 +7,11 @@ package types import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( diff --git a/plugin/dapp/zksync/types/witness.pb.go b/plugin/dapp/zksync/types/witness.pb.go index 7ee9add80e..1b8263e2f3 100644 --- a/plugin/dapp/zksync/types/witness.pb.go +++ b/plugin/dapp/zksync/types/witness.pb.go @@ -7,10 +7,11 @@ package types import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( diff --git a/plugin/dapp/zksync/types/zksync.pb.go b/plugin/dapp/zksync/types/zksync.pb.go index 3d566a7227..281ac93828 100644 --- a/plugin/dapp/zksync/types/zksync.pb.go +++ b/plugin/dapp/zksync/types/zksync.pb.go @@ -8,12 +8,13 @@ package types import ( context "context" + reflect "reflect" + sync "sync" + types "github.com/33cn/chain33/types" grpc "google.golang.org/grpc" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const (