Skip to content

Commit

Permalink
Merge pull request #155 from nodeset-org/client-timeout
Browse files Browse the repository at this point in the history
Added a client timeout parameter
  • Loading branch information
jclapis authored Oct 1, 2024
2 parents e4acfb1 + c6de484 commit 5342482
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ require (
github.com/goccy/go-json v0.10.3
github.com/mholt/archiver/v4 v4.0.0-alpha.8
github.com/mitchellh/go-homedir v1.1.0
github.com/nodeset-org/hyperdrive-constellation v1.0.0-b1.0.20240927181424-49653a316a20
github.com/nodeset-org/hyperdrive-daemon v1.1.0-b1.0.20240927170333-9fee16a048f0
github.com/nodeset-org/hyperdrive-stakewise v1.1.0-b1.0.20240930165456-a849d41acf24
github.com/nodeset-org/hyperdrive-constellation v1.0.0-b1.0.20241001164901-ef2c7eb6ba4e
github.com/nodeset-org/hyperdrive-daemon v1.1.0-b1.0.20241001161138-fa43cad5c631
github.com/nodeset-org/hyperdrive-stakewise v1.1.0-b1.0.20241001165150-0cd44bdfd6f9
github.com/nodeset-org/osha v0.3.1-0.20240927160812-d66358d4e091
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
github.com/rivo/tview v0.0.0-20230208211350-7dfff1ce7854 // DO NOT UPGRADE
github.com/rocket-pool/node-manager-core v0.5.2-0.20240918224929-a9cee1201bee
github.com/rocket-pool/node-manager-core v0.5.2-0.20241001041416-40f4fb819f98
github.com/rocket-pool/rocketpool-go/v2 v2.0.0-b2.0.20240709170030-c27aeb5fb99b
github.com/stretchr/testify v1.9.0
github.com/tyler-smith/go-bip39 v1.1.0
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,12 @@ github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOEL
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nodeset-org/hyperdrive-constellation v1.0.0-b1.0.20240927181424-49653a316a20 h1:ssX0iJNwUwm3eMjxGWR4YnyGaObhXQnkkS4zWQa0QSY=
github.com/nodeset-org/hyperdrive-constellation v1.0.0-b1.0.20240927181424-49653a316a20/go.mod h1:8gvihGSvHp1gxmI6ky7GZjKMfM8qEBi/KWBBlDYHebg=
github.com/nodeset-org/hyperdrive-daemon v1.1.0-b1.0.20240927170333-9fee16a048f0 h1:E0k1xWwUBGA00P5cA2dtt0TdrN+k33hBmsWbUZ1w49Y=
github.com/nodeset-org/hyperdrive-daemon v1.1.0-b1.0.20240927170333-9fee16a048f0/go.mod h1:sT7SE+9qhmATtO1Rvyfo5D+752OfZa7UEVEYsMnmtEE=
github.com/nodeset-org/hyperdrive-stakewise v1.1.0-b1.0.20240930165456-a849d41acf24 h1:nSF3UNWaf8Itfg1AarPxE7/lQyf3IOZFBRjrSkwcnGk=
github.com/nodeset-org/hyperdrive-stakewise v1.1.0-b1.0.20240930165456-a849d41acf24/go.mod h1:dJzKkDmSzAFhilduv/zGzlABjmId+HTEXxmLM/tFmzs=
github.com/nodeset-org/hyperdrive-constellation v1.0.0-b1.0.20241001164901-ef2c7eb6ba4e h1:Ct7Ob/U0AjZJwc0KDAbEb6jRdBWBEVXUX2EPUYG10Qo=
github.com/nodeset-org/hyperdrive-constellation v1.0.0-b1.0.20241001164901-ef2c7eb6ba4e/go.mod h1:NNEvkijHjH5rYmtrKVJncwJ0NjwNNEABOU7hEIkRb28=
github.com/nodeset-org/hyperdrive-daemon v1.1.0-b1.0.20241001161138-fa43cad5c631 h1:sq+TO6vGHScYOY1sE4hIaARf9Qhyrf+FQsmdSzZZHD0=
github.com/nodeset-org/hyperdrive-daemon v1.1.0-b1.0.20241001161138-fa43cad5c631/go.mod h1:KCZ/EptpaWrk/O2jYAUH2hDYt6Mrcjf68fVOeT8fuew=
github.com/nodeset-org/hyperdrive-stakewise v1.1.0-b1.0.20241001165150-0cd44bdfd6f9 h1:pDNZ/M1kZJELMvrMKNBjsDoK2+Gefj8NDU7Pm9TPxbM=
github.com/nodeset-org/hyperdrive-stakewise v1.1.0-b1.0.20241001165150-0cd44bdfd6f9/go.mod h1:ItnNrOU+UZG/27SaCcYrblDnqHwmdEWwBlvl11EXnXA=
github.com/nodeset-org/nodeset-client-go v1.0.1-0.20240927160821-e348e05e2363 h1:iivCknAFZlpxPwbIDjPc9E2bnj55c2STrXT9MvuMzQM=
github.com/nodeset-org/nodeset-client-go v1.0.1-0.20240927160821-e348e05e2363/go.mod h1:slpwejkJ/vYU9SKA3SYw4hIPJLzDUeQxcx+Cm04kkIA=
github.com/nodeset-org/osha v0.3.1-0.20240927160812-d66358d4e091 h1:oAs4/Yx4jnsNdWh3vTKum1sXC8VCvsY1H2VFSRRkgjc=
Expand Down Expand Up @@ -525,8 +525,8 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rocket-pool/batch-query v1.0.0 h1:5HejmT1n1fIdLIqUhTNwbkG2PGOPl3IVjCpFQcQZ4I4=
github.com/rocket-pool/batch-query v1.0.0/go.mod h1:d1CmxShzk0fioJ4yX0eFGhz2an1odnW/LZ2cp3eDGIQ=
github.com/rocket-pool/node-manager-core v0.5.2-0.20240918224929-a9cee1201bee h1:iKnfrO0dz45YsB03qVFo2AN6ydG682aUwrGUpXAmWAY=
github.com/rocket-pool/node-manager-core v0.5.2-0.20240918224929-a9cee1201bee/go.mod h1:tLL93eZeU8hkwuMkMl/2ERv82cGHLNFufq8kedsrtSo=
github.com/rocket-pool/node-manager-core v0.5.2-0.20241001041416-40f4fb819f98 h1:/vmzEAVs15gRK7q8lUYi1+MJd0XhxJwPe3zMdRB+3c8=
github.com/rocket-pool/node-manager-core v0.5.2-0.20241001041416-40f4fb819f98/go.mod h1:/H1wq3skacZi4zjgnKTtnm0wBLJH7H5r0CvLtWFs19Y=
github.com/rocket-pool/rocketpool-go/v2 v2.0.0-b2.0.20240709170030-c27aeb5fb99b h1:39UmJzNR71/OMIzblEY9wq+3nojGa/gQOJJpLBa6XcE=
github.com/rocket-pool/rocketpool-go/v2 v2.0.0-b2.0.20240709170030-c27aeb5fb99b/go.mod h1:pcY43H/m5pjr7zacrsKVaXnXfKKi1UV08VDPUwxbJkc=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
Expand Down
8 changes: 4 additions & 4 deletions hyperdrive-cli/commands/constellation/minipool/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ func printMinipoolDetails(minipool csapi.MinipoolDetails, latestDelegate common.
fmt.Printf("%sInfractions: %d%s\n", terminal.ColorRed, minipool.Penalties, terminal.ColorReset)
}
fmt.Printf("Status updated: %s\n", minipool.Status.StatusTime.Format(TimeFormat))
fmt.Printf("Node fee: %f%%\n", minipool.Node.Fee*100)
fmt.Printf("Node deposit: %.6f ETH\n", math.RoundDown(eth.WeiToEth(minipool.Node.DepositBalance), 6))
fmt.Printf("Commission: %f%%\n", minipool.Node.Fee*100)
fmt.Printf("Constellation deposit: %.6f ETH\n", math.RoundDown(eth.WeiToEth(minipool.Node.DepositBalance), 6))

// Queue position
if minipool.Queue.Position != 0 {
Expand All @@ -173,7 +173,7 @@ func printMinipoolDetails(minipool csapi.MinipoolDetails, latestDelegate common.
fmt.Printf("RP ETH assigned: no\n")
}
fmt.Printf("Minipool Balance (EL): %.6f ETH\n", math.RoundDown(eth.WeiToEth(minipool.Balances.Eth), 6))
fmt.Printf("Your portion: %.6f ETH\n", math.RoundDown(eth.WeiToEth(minipool.NodeShareOfEthBalance), 6))
fmt.Printf("Constellation portion: %.6f ETH\n", math.RoundDown(eth.WeiToEth(minipool.NodeShareOfEthBalance), 6))
fmt.Printf("Available refund: %.6f ETH\n", math.RoundDown(eth.WeiToEth(minipool.Node.RefundBalance), 6))
fmt.Printf("Total EL rewards: %.6f ETH\n", math.RoundDown(eth.WeiToEth(totalRewards), 6))
}
Expand All @@ -190,7 +190,7 @@ func printMinipoolDetails(minipool csapi.MinipoolDetails, latestDelegate common.
fmt.Printf("Validator active: no\n")
}
fmt.Printf("Beacon balance (CL): %.6f ETH\n", math.RoundDown(eth.WeiToEth(minipool.Validator.Balance), 6))
fmt.Printf("Your portion: %.6f ETH\n", math.RoundDown(eth.WeiToEth(minipool.Validator.NodeBalance), 6))
fmt.Printf("Constellation portion: %.6f ETH\n", math.RoundDown(eth.WeiToEth(minipool.Validator.NodeBalance), 6))
if minipool.RequiresSignedExit {
fmt.Printf("Requires signed exit: yes\n")
} else {
Expand Down
2 changes: 1 addition & 1 deletion internal/tests/cfg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestNewConfig_Holesky(t *testing.T) {
require.NoError(t, err)
modSp, err := modservices.NewModuleServiceProvider(hdApiUrl, swModDir, swconfig.ModuleName, swconfig.ClientLogName, func(hdCfg *hdconfig.HyperdriveConfig) (*swconfig.StakeWiseConfig, error) {
return swconfig.NewStakeWiseConfig(hdCfg, swSettings)
}, hdconfig.ClientTimeout)
})
require.NoError(t, err)
swSp, err := swcommon.NewStakeWiseServiceProvider(modSp, swSettings)
require.NoError(t, err)
Expand Down

0 comments on commit 5342482

Please sign in to comment.