-
Notifications
You must be signed in to change notification settings - Fork 30
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
Update go/ethereum to v1.15.5 #145
Merged
rafalio-cb
merged 6 commits into
coinbase:master
from
rafalio-cb:rafalio/mesh-geth-sdk_upgrade_1740185386
Mar 5, 2025
+290
−767
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
dc755bb
Update version, add holesky
rafalio-cb 805f966
changes
rafalio-cb 072b9e4
update the newest go 1.23
rafalio-cb 113dcbf
update ci golang version
rafalio-cb 0a23f31
cant parse version?
rafalio-cb 3f749d3
exclude licesnse
rafalio-cb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,8 @@ import ( | |
"net/http" | ||
"strconv" | ||
|
||
"github.com/holiman/uint256" | ||
|
||
"github.com/coinbase/rosetta-geth-sdk/configuration" | ||
sdkTypes "github.com/coinbase/rosetta-geth-sdk/types" | ||
|
||
|
@@ -601,20 +603,18 @@ func FlattenTraces(data *Call, flattened []*FlatCall) []*FlatCall { | |
// https://github.com/ethereum/go-ethereum/blob/master/consensus/ethash/consensus.go#L646-L653 | ||
func (ec *SDKClient) miningReward( | ||
currentBlock *big.Int, | ||
) int64 { | ||
) *uint256.Int { | ||
if currentBlock.Int64() == int64(0) { | ||
return big.NewInt(0).Int64() | ||
return uint256.NewInt(0) | ||
} | ||
|
||
blockReward := ethash.FrontierBlockReward.Int64() | ||
blockReward := ethash.FrontierBlockReward | ||
|
||
if ec.P.IsByzantium(currentBlock) { | ||
blockReward = ethash.ByzantiumBlockReward.Int64() | ||
blockReward = ethash.ByzantiumBlockReward | ||
} | ||
if ec.P.IsConstantinople(currentBlock) { | ||
blockReward = ethash.ConstantinopleBlockReward.Int64() | ||
blockReward = ethash.ConstantinopleBlockReward | ||
} | ||
|
||
return blockReward | ||
} | ||
|
||
|
@@ -624,7 +624,7 @@ func (ec *SDKClient) BlockRewardTransaction( | |
uncles []*EthTypes.Header, | ||
) *RosettaTypes.Transaction { | ||
var ops []*RosettaTypes.Operation | ||
miningReward := ec.miningReward(big.NewInt(blockIdentifier.Index)) | ||
miningReward := ec.miningReward(big.NewInt(blockIdentifier.Index)).Uint64() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. afaik this will be totally fine here, and i dont' want to go adn update everything to 256 just to bring in the new go/ethereum version |
||
|
||
// https://github.com/ethereum/go-ethereum/blob/ | ||
// aaca58a7a1d9acbd24bbc74c49933efa2f1af183/consensus/ethash/consensus.go#L645 | ||
|
@@ -638,7 +638,7 @@ func (ec *SDKClient) BlockRewardTransaction( | |
reward := new(big.Float) | ||
uncleReward := float64(numUncles) / sdkTypes.UnclesRewardMultiplier | ||
rewardFloat := reward.Mul(big.NewFloat(uncleReward), big.NewFloat(float64(miningReward))) | ||
rewardInt, _ := rewardFloat.Int64() | ||
rewardInt, _ := rewardFloat.Uint64() | ||
minerReward += rewardInt | ||
} | ||
|
||
|
@@ -653,7 +653,7 @@ func (ec *SDKClient) BlockRewardTransaction( | |
Address: MustChecksum(miner), | ||
}, | ||
Amount: &RosettaTypes.Amount{ | ||
Value: strconv.FormatInt(minerReward, base), | ||
Value: strconv.FormatUint(minerReward, base), | ||
Currency: ec.rosettaConfig.Currency, | ||
}, | ||
} | ||
|
@@ -667,7 +667,7 @@ func (ec *SDKClient) BlockRewardTransaction( | |
big.Int, | ||
).Mul( | ||
big.NewInt(uncleBlock+sdkTypes.MaxUncleDepth-blockIdentifier.Index), | ||
big.NewInt(miningReward/sdkTypes.MaxUncleDepth), | ||
new(big.Int).SetUint64(miningReward/sdkTypes.MaxUncleDepth), | ||
) | ||
|
||
uncleRewardOp := &RosettaTypes.Operation{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,77 @@ | ||
module github.com/coinbase/rosetta-geth-sdk | ||
|
||
go 1.20 | ||
go 1.23.7 | ||
|
||
toolchain go1.24.0 | ||
|
||
require ( | ||
github.com/coinbase/rosetta-sdk-go v0.8.9 | ||
github.com/coinbase/rosetta-sdk-go/types v1.0.0 | ||
github.com/ethereum/go-ethereum v1.13.8 | ||
github.com/hashicorp/golang-lru v0.5.1 | ||
github.com/ethereum/go-ethereum v1.15.5 | ||
github.com/hashicorp/golang-lru v1.0.2 | ||
github.com/neilotoole/errgroup v0.1.6 | ||
github.com/stretchr/testify v1.8.4 | ||
golang.org/x/crypto v0.17.0 | ||
golang.org/x/sync v0.5.0 | ||
github.com/stretchr/testify v1.10.0 | ||
golang.org/x/crypto v0.36.0 | ||
golang.org/x/sync v0.12.0 | ||
) | ||
|
||
require ( | ||
github.com/DataDog/zstd v1.5.2 // indirect | ||
github.com/Microsoft/go-winio v0.6.1 // indirect | ||
github.com/StackExchange/wmi v1.2.1 // indirect | ||
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect | ||
github.com/beorn7/perks v1.0.1 // indirect | ||
github.com/bits-and-blooms/bitset v1.10.0 // indirect | ||
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect | ||
github.com/DataDog/zstd v1.5.6 // indirect | ||
github.com/Microsoft/go-winio v0.6.2 // indirect | ||
github.com/VictoriaMetrics/fastcache v1.12.2 // indirect | ||
github.com/bits-and-blooms/bitset v1.21.0 // indirect | ||
github.com/cenkalti/backoff v2.2.1+incompatible // indirect | ||
github.com/cespare/xxhash/v2 v2.2.0 // indirect | ||
github.com/cockroachdb/errors v1.8.1 // indirect | ||
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f // indirect | ||
github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect | ||
github.com/cockroachdb/redact v1.0.8 // indirect | ||
github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 // indirect | ||
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect | ||
github.com/consensys/bavard v0.1.13 // indirect | ||
github.com/consensys/gnark-crypto v0.12.1 // indirect | ||
github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect | ||
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect | ||
github.com/cespare/xxhash/v2 v2.3.0 // indirect | ||
github.com/consensys/bavard v0.1.29 // indirect | ||
github.com/consensys/gnark-crypto v0.16.0 // indirect | ||
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect | ||
github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // 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 v0.4.0 // indirect | ||
github.com/fatih/color v1.13.0 // indirect | ||
github.com/fsnotify/fsnotify v1.6.0 // indirect | ||
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect | ||
github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect | ||
github.com/deckarep/golang-set/v2 v2.7.0 // indirect | ||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect | ||
github.com/ethereum/c-kzg-4844 v1.0.3 // indirect | ||
github.com/ethereum/go-verkle v0.2.2 // indirect | ||
github.com/fatih/color v1.18.0 // indirect | ||
github.com/fsnotify/fsnotify v1.8.0 // indirect | ||
github.com/go-ole/go-ole v1.3.0 // indirect | ||
github.com/gofrs/flock v0.8.1 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/gofrs/flock v0.12.1 // indirect | ||
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect | ||
github.com/google/uuid v1.6.0 // indirect | ||
github.com/gorilla/mux v1.8.0 // indirect | ||
github.com/gorilla/websocket v1.4.2 // indirect | ||
github.com/gorilla/mux v1.8.1 // indirect | ||
github.com/gorilla/websocket v1.5.3 // indirect | ||
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect | ||
github.com/holiman/uint256 v1.2.4 // indirect | ||
github.com/holiman/uint256 v1.3.2 | ||
github.com/huin/goupnp v1.3.0 // indirect | ||
github.com/jackpal/go-nat-pmp v1.0.2 // indirect | ||
github.com/klauspost/compress v1.15.15 // indirect | ||
github.com/kr/pretty v0.3.1 // indirect | ||
github.com/kr/text v0.2.0 // indirect | ||
github.com/mattn/go-colorable v0.1.13 // indirect | ||
github.com/mattn/go-isatty v0.0.17 // indirect | ||
github.com/mattn/go-runewidth v0.0.13 // indirect | ||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect | ||
github.com/mattn/go-colorable v0.1.14 // indirect | ||
github.com/mattn/go-isatty v0.0.20 // indirect | ||
github.com/mattn/go-runewidth v0.0.16 // indirect | ||
github.com/mitchellh/mapstructure v1.5.0 // indirect | ||
github.com/mmcloughlin/addchain v0.4.0 // indirect | ||
github.com/olekukonko/tablewriter v0.0.5 // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/pion/dtls/v2 v2.2.12 // indirect | ||
github.com/pion/logging v0.2.3 // indirect | ||
github.com/pion/stun/v2 v2.0.0 // indirect | ||
github.com/pion/transport/v2 v2.2.10 // indirect | ||
github.com/pion/transport/v3 v3.0.7 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/prometheus/client_golang v1.12.0 // indirect | ||
github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a // indirect | ||
github.com/prometheus/common v0.32.1 // indirect | ||
github.com/prometheus/procfs v0.7.3 // indirect | ||
github.com/rivo/uniseg v0.2.0 // indirect | ||
github.com/rogpeppe/go-internal v1.9.0 // indirect | ||
github.com/rivo/uniseg v0.4.7 // indirect | ||
github.com/segmentio/fasthash v1.0.3 // indirect | ||
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect | ||
github.com/status-im/keycard-go v0.2.0 // indirect | ||
github.com/stretchr/objx v0.5.0 // indirect | ||
github.com/supranational/blst v0.3.11 // indirect | ||
github.com/shirou/gopsutil v3.21.11+incompatible // indirect | ||
github.com/stretchr/objx v0.5.2 // indirect | ||
github.com/supranational/blst v0.3.14 // indirect | ||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect | ||
github.com/tklauser/go-sysconf v0.3.12 // indirect | ||
github.com/tklauser/numcpus v0.6.1 // indirect | ||
github.com/tyler-smith/go-bip39 v1.1.0 // indirect | ||
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect | ||
golang.org/x/mod v0.14.0 // indirect | ||
golang.org/x/net v0.18.0 // indirect | ||
golang.org/x/sys v0.16.0 // indirect | ||
golang.org/x/text v0.14.0 // indirect | ||
golang.org/x/tools v0.15.0 // indirect | ||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect | ||
google.golang.org/grpc v1.61.2 // indirect | ||
google.golang.org/protobuf v1.31.0 // indirect | ||
github.com/tklauser/go-sysconf v0.3.14 // indirect | ||
github.com/tklauser/numcpus v0.9.0 // indirect | ||
github.com/wlynxg/anet v0.0.5 // indirect | ||
github.com/yusufpapurcu/wmi v1.2.4 // indirect | ||
golang.org/x/exp v0.0.0-20250228200357-dead58393ab7 // indirect | ||
golang.org/x/net v0.36.0 // indirect | ||
golang.org/x/sys v0.31.0 // indirect | ||
golang.org/x/text v0.23.0 // indirect | ||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect | ||
google.golang.org/grpc v1.71.0 // indirect | ||
google.golang.org/protobuf v1.36.5 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
rsc.io/tmplfunc v0.0.3 // indirect | ||
) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making this a uint256 like the newest version of go-ethereum , they switched internally everything to it, @xiaying-peng