Skip to content

Commit

Permalink
Merge branch 'main' into retry-exponential
Browse files Browse the repository at this point in the history
  • Loading branch information
geoff-vball authored Jan 2, 2025
2 parents bea2de1 + 4e00722 commit eb5cab4
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.10
require (
github.com/alexliesenfeld/health v0.8.0
github.com/ava-labs/avalanchego v1.12.1-0.20241210172525-c7ebd8fbae88
github.com/ava-labs/icm-contracts v1.0.9-0.20241218145356-cd512247d9e2
github.com/ava-labs/icm-contracts v1.0.9-0.20241231155804-0845b3c9fd39
github.com/ava-labs/subnet-evm v0.6.13-0.20241205165027-6c98da796f35
github.com/aws/aws-sdk-go-v2 v1.32.7
github.com/aws/aws-sdk-go-v2/config v1.28.7
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ github.com/ava-labs/avalanchego v1.12.1-0.20241210172525-c7ebd8fbae88 h1:tZdtOPF
github.com/ava-labs/avalanchego v1.12.1-0.20241210172525-c7ebd8fbae88/go.mod h1:yhD5dpZyStIVbxQ550EDi5w5SL7DQ/xGE6TIxosb7U0=
github.com/ava-labs/coreth v0.13.9-rc.1 h1:qIICpC/OZGYUP37QnLgIqqwGmxnLwLpZaUlqJNI85vU=
github.com/ava-labs/coreth v0.13.9-rc.1/go.mod h1:7aMsRIo/3GBE44qWZMjnfqdqfcfZ5yShTTm2LObLaYo=
github.com/ava-labs/icm-contracts v1.0.9-0.20241218145356-cd512247d9e2 h1:4wxAk748u1jaBTaY7qSsCRsNAhLno4h2XqMbwNnowRg=
github.com/ava-labs/icm-contracts v1.0.9-0.20241218145356-cd512247d9e2/go.mod h1:1cCh1DTmorvDRwyBxOSbnhp9JtcRh+j8OdawBCvZTzA=
github.com/ava-labs/icm-contracts v1.0.9-0.20241231155804-0845b3c9fd39 h1:gDvyXiHtyGHL2TfyYz48gybEOfsapI3PBXY148EJ2h8=
github.com/ava-labs/icm-contracts v1.0.9-0.20241231155804-0845b3c9fd39/go.mod h1:hZS72/9tbM+9JKdTs/UuGIWF3z+FEVlcGW4B9C8gECs=
github.com/ava-labs/subnet-evm v0.6.13-0.20241205165027-6c98da796f35 h1:CbXWon0fwGDEDCCiChx2VeIIwO3UML9+8OUTyNwPsxA=
github.com/ava-labs/subnet-evm v0.6.13-0.20241205165027-6c98da796f35/go.mod h1:SfAF4jjYPkezKWShPY/T31WQdD/UHrDyqy0kxA0LE0w=
github.com/aws/aws-sdk-go-v2 v1.32.7 h1:ky5o35oENWi0JYWUZkB7WYvVPP+bcRF5/Iq7JWSb5Rw=
Expand Down
12 changes: 1 addition & 11 deletions peers/app_request_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"context"
"encoding/hex"
"fmt"
"os"
"sync"
"time"

Expand Down Expand Up @@ -76,21 +75,12 @@ type appRequestNetwork struct {

// NewNetwork creates a P2P network client for interacting with validators
func NewNetwork(
logLevel logging.Level,
logger logging.Logger,
registerer prometheus.Registerer,
trackedSubnets set.Set[ids.ID],
manuallyTrackedPeers []info.Peer,
cfg Config,
) (AppRequestNetwork, error) {
logger := logging.NewLogger(
"p2p-network",
logging.NewWrappedCore(
logLevel,
os.Stdout,
logging.JSON.ConsoleEncoder(),
),
)

metrics, err := newAppRequestNetworkMetrics(registerer)
if err != nil {
logger.Error("Failed to create app request network metrics", zap.Error(err))
Expand Down
10 changes: 9 additions & 1 deletion relayer/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ func main() {
if logLevel <= logging.Debug {
networkLogLevel = logLevel
}
networkLogger := logging.NewLogger(
"p2p-network",
logging.NewWrappedCore(
networkLogLevel,
os.Stdout,
logging.JSON.ConsoleEncoder(),
),
)

// Initialize message creator passed down to relayers for creating app requests.
// We do not collect metrics for the message creator.
Expand All @@ -163,7 +171,7 @@ func main() {
}

network, err := peers.NewNetwork(
networkLogLevel,
networkLogger,
registerer,
nil,
manuallyTrackedPeers,
Expand Down
10 changes: 9 additions & 1 deletion signature-aggregator/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ func main() {
if logLevel <= logging.Debug {
networkLogLevel = logLevel
}
networkLogger := logging.NewLogger(
"p2p-network",
logging.NewWrappedCore(
networkLogLevel,
os.Stdout,
logging.JSON.ConsoleEncoder(),
),
)

// Initialize message creator passed down to relayers for creating app requests.
// We do not collect metrics for the message creator.
Expand All @@ -99,7 +107,7 @@ func main() {
}

network, err := peers.NewNetwork(
networkLogLevel,
networkLogger,
prometheus.DefaultRegisterer,
nil,
nil,
Expand Down

0 comments on commit eb5cab4

Please sign in to comment.