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

bump geth #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 5 additions & 6 deletions bloom/bloom_m.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,11 @@ func (b *bloomMbits) Exist(key []byte) bool {

// Bytes returns the bytes of bloom filter (in Big Endian)
//
// m: uint64 x 1
// k: uint64 x 1
// n: uint64 x 1
// buckets: []uint64
// hash: [32]byte = Hash256b(above)
//
// m: uint64 x 1
// k: uint64 x 1
// n: uint64 x 1
// buckets: []uint64
// hash: [32]byte = Hash256b(above)
func (b *bloomMbits) Bytes() []byte {
buf := new(bytes.Buffer)

Expand Down
16 changes: 16 additions & 0 deletions crypto/secp256k1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,19 @@ func TestSecp256k1(t *testing.T) {
require.Equal("53fbc28faf9a52dfe5f591948a23189e900381b5", hex.EncodeToString(pk.Hash()))

}

func BenchmarkSecp256k1(b *testing.B) {
require := require.New(b)

sk, err := newSecp256k1PrvKey()
require.NoError(err)
defer sk.Zero()
pk := sk.PublicKey()
require.Equal(secp256pubKeyLength, len(pk.Bytes()))
b.ResetTimer()
pkData := pk.Bytes()
for n := 0; n < b.N; n++ {
_, err := newSecp256k1PubKeyFromBytes(pkData)
require.NoError(err)
}
}
36 changes: 24 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,28 +1,40 @@
module github.com/iotexproject/go-pkgs

go 1.17
go 1.21

toolchain go1.21.4

require (
github.com/cespare/cp v1.1.1 // indirect
github.com/deckarep/golang-set v1.7.1 // indirect
github.com/dustinxie/gmsm v1.4.0
github.com/ethereum/go-ethereum v1.10.4
github.com/ethereum/go-ethereum v1.13.5-0.20240410090245-9dcf8aae4742
Copy link
Member Author

@Liuhaai Liuhaai Apr 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used the lastest commit in the master branch for testing, since geth v1.13.15 hasn't been released yet.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For prod usage, we might wait until geth v1.13.15 is released

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just use v1.13.12 (which is the Cancun release version we use for iotex-core)
Does v1.13.12 fix this memory issue?

Copy link
Member Author

@Liuhaai Liuhaai Apr 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no. pls check the geth's pr ethereum/go-ethereum@ab49f22, which isn't included in v1.13.14

github.com/iotexproject/iotex-address v0.2.7
github.com/pkg/errors v0.9.1
github.com/rjeczalik/notify v0.9.2 // indirect
github.com/stretchr/testify v1.7.0
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d
github.com/stretchr/testify v1.8.4
golang.org/x/net v0.21.0
)

require (
github.com/btcsuite/btcd v0.20.1-beta // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/google/uuid v1.1.5 // indirect
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 // indirect
golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
github.com/supranational/blst v0.3.11 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.18.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)

replace github.com/ethereum/go-ethereum v1.10.4 => github.com/iotexproject/go-ethereum v0.4.0
Loading
Loading