fix: Upgrade status-go to the most recent version of release branch which contains memory fix
Fix #4990
This commit is contained in:
committed by
Michał Iskierko
parent
03d490156a
commit
66cf3d21b9
18
vendor/github.com/status-im/status-go/api/default_networks.go
generated
vendored
18
vendor/github.com/status-im/status-go/api/default_networks.go
generated
vendored
@@ -45,11 +45,11 @@ var mainnet = params.Network{
|
||||
var goerli = params.Network{
|
||||
ChainID: goerliChainID,
|
||||
ChainName: "Ethereum Goerli",
|
||||
RPCURL: "https://goerli-archival.rpc.grove.city/v1/",
|
||||
FallbackURL: "https://goerli.infura.io/v3/",
|
||||
RPCURL: "https://goerli.infura.io/v3/",
|
||||
FallbackURL: "",
|
||||
BlockExplorerURL: "https://goerli.etherscan.io/",
|
||||
IconURL: "network/Network=Testnet",
|
||||
ChainColor: "#939BA1",
|
||||
ChainColor: "#627EEA",
|
||||
ShortName: "goEth",
|
||||
NativeCurrencyName: "Ether",
|
||||
NativeCurrencySymbol: "ETH",
|
||||
@@ -63,11 +63,11 @@ var goerli = params.Network{
|
||||
var sepolia = params.Network{
|
||||
ChainID: sepoliaChainID,
|
||||
ChainName: "Ethereum Sepolia",
|
||||
RPCURL: "https://sepolia-archival.rpc.grove.city/v1/",
|
||||
FallbackURL: "https://sepolia.infura.io/v3/",
|
||||
RPCURL: "https://sepolia.infura.io/v3/",
|
||||
FallbackURL: "",
|
||||
BlockExplorerURL: "https://sepolia.etherscan.io/",
|
||||
IconURL: "network/Network=Testnet",
|
||||
ChainColor: "#51D0F0",
|
||||
ChainColor: "#627EEA",
|
||||
ShortName: "eth",
|
||||
NativeCurrencyName: "Ether",
|
||||
NativeCurrencySymbol: "ETH",
|
||||
@@ -103,7 +103,7 @@ var optimismGoerli = params.Network{
|
||||
FallbackURL: "",
|
||||
BlockExplorerURL: "https://goerli-optimism.etherscan.io/",
|
||||
IconURL: "network/Network=Testnet",
|
||||
ChainColor: "#939BA1",
|
||||
ChainColor: "#E90101",
|
||||
ShortName: "goOpt",
|
||||
NativeCurrencyName: "Ether",
|
||||
NativeCurrencySymbol: "ETH",
|
||||
@@ -121,7 +121,7 @@ var optimismSepolia = params.Network{
|
||||
FallbackURL: "",
|
||||
BlockExplorerURL: "https://sepolia-optimism.etherscan.io/",
|
||||
IconURL: "network/Network=Testnet",
|
||||
ChainColor: "#939BA1",
|
||||
ChainColor: "#E90101",
|
||||
ShortName: "opt",
|
||||
NativeCurrencyName: "Ether",
|
||||
NativeCurrencySymbol: "ETH",
|
||||
@@ -157,7 +157,7 @@ var arbitrumGoerli = params.Network{
|
||||
FallbackURL: "",
|
||||
BlockExplorerURL: "https://goerli.arbiscan.io/",
|
||||
IconURL: "network/Network=Testnet",
|
||||
ChainColor: "#939BA1",
|
||||
ChainColor: "#51D0F0",
|
||||
ShortName: "goArb",
|
||||
NativeCurrencyName: "Ether",
|
||||
NativeCurrencySymbol: "ETH",
|
||||
|
||||
34
vendor/github.com/status-im/status-go/api/defaults.go
generated
vendored
34
vendor/github.com/status-im/status-go/api/defaults.go
generated
vendored
@@ -27,23 +27,7 @@ const defaultKeycardPairingDataFile = "/ethereum/mainnet_rpc/keycard/pairings.js
|
||||
|
||||
var paths = []string{pathWalletRoot, pathEIP1581, pathDefaultChat, pathDefaultWallet}
|
||||
|
||||
const (
|
||||
statusProdFleet = "status.prod"
|
||||
statusTestFleet = "status.test"
|
||||
wakuv2ProdFleet = "wakuv2.prod"
|
||||
wakuv2TestFleet = "wakuv2.test"
|
||||
shardsTest = "shards.test"
|
||||
)
|
||||
|
||||
var DefaultWakuNodes = map[string][]string{
|
||||
statusProdFleet: []string{"enrtree://AL65EKLJAUXKKPG43HVTML5EFFWEZ7L4LOKTLZCLJASG4DSESQZEC@prod.status.nodes.status.im"},
|
||||
statusTestFleet: []string{"enrtree://AIO6LUM3IVWCU2KCPBBI6FEH2W42IGK3ASCZHZGG5TIXUR56OGQUO@test.status.nodes.status.im"},
|
||||
wakuv2ProdFleet: []string{"enrtree://ANEDLO25QVUGJOUTQFRYKWX6P4Z4GKVESBMHML7DZ6YK4LGS5FC5O@prod.wakuv2.nodes.status.im"},
|
||||
wakuv2TestFleet: []string{"enrtree://AO47IDOLBKH72HIZZOXQP6NMRESAN7CHYWIBNXDXWRJRZWLODKII6@test.wakuv2.nodes.status.im"},
|
||||
shardsTest: []string{"enrtree://AMOJVZX4V6EXP7NTJPMAYJYST2QP6AJXYW76IU6VGJS7UVSNDYZG4@boot.test.shards.nodes.status.im"},
|
||||
}
|
||||
|
||||
var DefaultFleet = shardsTest
|
||||
var DefaultFleet = params.FleetShardsTest
|
||||
|
||||
func defaultSettings(generatedAccountInfo generator.GeneratedAccountInfo, derivedAddresses map[string]generator.AccountInfo, mnemonic *string) (*settings.Settings, error) {
|
||||
chatKeyString := derivedAddresses[pathDefaultChat].PublicKey
|
||||
@@ -83,6 +67,7 @@ func defaultSettings(generatedAccountInfo generator.GeneratedAccountInfo, derive
|
||||
s.UseMailservers = true
|
||||
|
||||
s.PreviewPrivacy = true
|
||||
s.PeerSyncingEnabled = false
|
||||
s.Currency = "usd"
|
||||
s.LinkPreviewRequestEnabled = true
|
||||
|
||||
@@ -125,7 +110,6 @@ func SetFleet(fleet string, nodeConfig *params.NodeConfig) error {
|
||||
DiscoveryLimit: 20,
|
||||
Host: "0.0.0.0",
|
||||
AutoUpdate: true,
|
||||
PeerExchange: true,
|
||||
}
|
||||
|
||||
clusterConfig, err := params.LoadClusterConfigFromFleet(fleet)
|
||||
@@ -134,10 +118,10 @@ func SetFleet(fleet string, nodeConfig *params.NodeConfig) error {
|
||||
}
|
||||
nodeConfig.ClusterConfig = *clusterConfig
|
||||
nodeConfig.ClusterConfig.Fleet = fleet
|
||||
nodeConfig.ClusterConfig.WakuNodes = DefaultWakuNodes[fleet]
|
||||
nodeConfig.ClusterConfig.DiscV5BootstrapNodes = DefaultWakuNodes[fleet]
|
||||
nodeConfig.ClusterConfig.WakuNodes = params.DefaultWakuNodes(fleet)
|
||||
nodeConfig.ClusterConfig.DiscV5BootstrapNodes = params.DefaultWakuNodes(fleet)
|
||||
|
||||
if fleet == shardsTest {
|
||||
if fleet == params.FleetShardsTest {
|
||||
nodeConfig.ClusterConfig.ClusterID = shardsTestClusterID
|
||||
nodeConfig.WakuV2Config.UseShardAsDefaultTopic = true
|
||||
}
|
||||
@@ -202,7 +186,7 @@ func buildWalletConfig(request *requests.WalletSecretsConfig) params.WalletConfi
|
||||
return walletConfig
|
||||
}
|
||||
|
||||
func defaultNodeConfig(installationID string, request *requests.CreateAccount) (*params.NodeConfig, error) {
|
||||
func defaultNodeConfig(installationID string, request *requests.CreateAccount, opts ...params.Option) (*params.NodeConfig, error) {
|
||||
// Set mainnet
|
||||
nodeConfig := ¶ms.NodeConfig{}
|
||||
nodeConfig.NetworkID = request.NetworkID
|
||||
@@ -288,6 +272,12 @@ func defaultNodeConfig(installationID string, request *requests.CreateAccount) (
|
||||
|
||||
nodeConfig.Networks = BuildDefaultNetworks(request)
|
||||
|
||||
for _, opt := range opts {
|
||||
if err := opt(nodeConfig); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return nodeConfig, nil
|
||||
}
|
||||
|
||||
|
||||
116
vendor/github.com/status-im/status-go/api/geth_backend.go
generated
vendored
116
vendor/github.com/status-im/status-go/api/geth_backend.go
generated
vendored
@@ -18,7 +18,6 @@ import (
|
||||
|
||||
"github.com/imdario/mergo"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||
ethcrypto "github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
@@ -49,7 +48,6 @@ import (
|
||||
"github.com/status-im/status-go/services/ext"
|
||||
"github.com/status-im/status-go/services/personal"
|
||||
"github.com/status-im/status-go/services/typeddata"
|
||||
wcommon "github.com/status-im/status-go/services/wallet/common"
|
||||
"github.com/status-im/status-go/signal"
|
||||
"github.com/status-im/status-go/transactions"
|
||||
"github.com/status-im/status-go/walletdatabase"
|
||||
@@ -624,20 +622,7 @@ func (b *GethStatusBackend) loginAccount(request *requests.Login) error {
|
||||
|
||||
defaultCfg.WalletConfig = buildWalletConfig(&request.WalletSecretsConfig)
|
||||
|
||||
settings, err := b.GetSettings()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var fleet string
|
||||
fleetPtr := settings.Fleet
|
||||
if fleetPtr == nil || *fleetPtr == "" {
|
||||
fleet = DefaultFleet
|
||||
} else {
|
||||
fleet = *fleetPtr
|
||||
}
|
||||
|
||||
err = SetFleet(fleet, defaultCfg)
|
||||
err = b.UpdateNodeConfigFleet(acc, password, defaultCfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -705,7 +690,41 @@ func (b *GethStatusBackend) loginAccount(request *requests.Login) error {
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// UpdateNodeConfigFleet loads the fleet from the settings and updates the node configuration
|
||||
// If the fleet in settings is empty, or not supported anymore, it will be overridden with the default fleet.
|
||||
// In that case settings fleet value remain the same, only runtime node configuration is updated.
|
||||
func (b *GethStatusBackend) UpdateNodeConfigFleet(acc multiaccounts.Account, password string, config *params.NodeConfig) error {
|
||||
if config == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
err := b.ensureDBsOpened(acc, password)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
accountSettings, err := b.GetSettings()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fleet := accountSettings.GetFleet()
|
||||
|
||||
if !params.IsFleetSupported(fleet) {
|
||||
b.log.Warn("fleet is not supported, overriding with default value",
|
||||
"fleet", fleet,
|
||||
"defaultFleet", DefaultFleet)
|
||||
fleet = DefaultFleet
|
||||
}
|
||||
|
||||
err = SetFleet(fleet, config)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *GethStatusBackend) startNodeWithAccount(acc multiaccounts.Account, password string, inputNodeCfg *params.NodeConfig) error {
|
||||
@@ -1279,7 +1298,7 @@ func (b *GethStatusBackend) GetKeyUIDByMnemonic(mnemonic string) (string, error)
|
||||
return info.KeyUID, nil
|
||||
}
|
||||
|
||||
func (b *GethStatusBackend) generateOrImportAccount(mnemonic string, customizationColorClock uint64, request *requests.CreateAccount) (*multiaccounts.Account, error) {
|
||||
func (b *GethStatusBackend) generateOrImportAccount(mnemonic string, customizationColorClock uint64, request *requests.CreateAccount, opts ...params.Option) (*multiaccounts.Account, error) {
|
||||
keystoreDir := keystoreRelativePath
|
||||
|
||||
b.UpdateRootDataDir(request.BackupDisabledDataDir)
|
||||
@@ -1363,7 +1382,7 @@ func (b *GethStatusBackend) generateOrImportAccount(mnemonic string, customizati
|
||||
//settings.MnemonicWasNotShown = true
|
||||
}
|
||||
|
||||
nodeConfig, err := defaultNodeConfig(settings.InstallationID, request)
|
||||
nodeConfig, err := defaultNodeConfig(settings.InstallationID, request, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -1411,12 +1430,12 @@ func (b *GethStatusBackend) generateOrImportAccount(mnemonic string, customizati
|
||||
return &account, nil
|
||||
}
|
||||
|
||||
func (b *GethStatusBackend) CreateAccountAndLogin(request *requests.CreateAccount) (*multiaccounts.Account, error) {
|
||||
func (b *GethStatusBackend) CreateAccountAndLogin(request *requests.CreateAccount, opts ...params.Option) (*multiaccounts.Account, error) {
|
||||
|
||||
if err := request.Validate(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b.generateOrImportAccount("", 1, request)
|
||||
return b.generateOrImportAccount("", 1, request, opts...)
|
||||
}
|
||||
|
||||
func (b *GethStatusBackend) ConvertToRegularAccount(mnemonic string, currPassword string, newPassword string) error {
|
||||
@@ -1890,24 +1909,7 @@ func (b *GethStatusBackend) SendTransaction(sendArgs transactions.SendTxArgs, pa
|
||||
return hash, err
|
||||
}
|
||||
|
||||
hash, err = b.transactor.SendTransaction(sendArgs, verifiedAccount)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
err = b.statusNode.PendingTracker().TrackPendingTransaction(
|
||||
wcommon.ChainID(b.transactor.NetworkID()),
|
||||
common.Hash(hash),
|
||||
common.Address(sendArgs.From),
|
||||
transactions.WalletTransfer,
|
||||
transactions.AutoDelete,
|
||||
)
|
||||
if err != nil {
|
||||
log.Error("TrackPendingTransaction error", "error", err)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
return b.transactor.SendTransaction(sendArgs, verifiedAccount)
|
||||
}
|
||||
|
||||
func (b *GethStatusBackend) SendTransactionWithChainID(chainID uint64, sendArgs transactions.SendTxArgs, password string) (hash types.Hash, err error) {
|
||||
@@ -1916,45 +1918,11 @@ func (b *GethStatusBackend) SendTransactionWithChainID(chainID uint64, sendArgs
|
||||
return hash, err
|
||||
}
|
||||
|
||||
hash, err = b.transactor.SendTransactionWithChainID(chainID, sendArgs, verifiedAccount)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
err = b.statusNode.PendingTracker().TrackPendingTransaction(
|
||||
wcommon.ChainID(b.transactor.NetworkID()),
|
||||
common.Hash(hash),
|
||||
common.Address(sendArgs.From),
|
||||
transactions.WalletTransfer,
|
||||
transactions.AutoDelete,
|
||||
)
|
||||
if err != nil {
|
||||
log.Error("TrackPendingTransaction error", "error", err)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
return b.transactor.SendTransactionWithChainID(chainID, sendArgs, verifiedAccount)
|
||||
}
|
||||
|
||||
func (b *GethStatusBackend) SendTransactionWithSignature(sendArgs transactions.SendTxArgs, sig []byte) (hash types.Hash, err error) {
|
||||
hash, err = b.transactor.BuildTransactionAndSendWithSignature(b.transactor.NetworkID(), sendArgs, sig)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
err = b.statusNode.PendingTracker().TrackPendingTransaction(
|
||||
wcommon.ChainID(b.transactor.NetworkID()),
|
||||
common.Hash(hash),
|
||||
common.Address(sendArgs.From),
|
||||
transactions.WalletTransfer,
|
||||
transactions.AutoDelete,
|
||||
)
|
||||
if err != nil {
|
||||
log.Error("TrackPendingTransaction error", "error", err)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
return b.transactor.BuildTransactionAndSendWithSignature(b.transactor.NetworkID(), sendArgs, sig)
|
||||
}
|
||||
|
||||
// HashTransaction validate the transaction and returns new sendArgs and the transaction hash.
|
||||
|
||||
Reference in New Issue
Block a user