diff --git a/go.mod b/go.mod index d61106f..7354fe2 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.15 require ( github.com/ipfs/go-log v1.0.5 github.com/koinos/koinos-log-golang v0.0.0-20210621202301-3310a8e5866b - github.com/koinos/koinos-mq-golang v0.0.0-20211026183607-441fb7106dd3 + github.com/koinos/koinos-mq-golang v0.0.0-20220307194511-07a03f6f75f0 github.com/koinos/koinos-proto-golang v0.2.1-0.20220304200226-d96c9cf694de github.com/koinos/koinos-util-golang v0.0.0-20220224193402-85a6df362833 github.com/libp2p/go-libp2p v0.17.0 diff --git a/go.sum b/go.sum index 79f11b6..3d98dc0 100644 --- a/go.sum +++ b/go.sum @@ -531,6 +531,8 @@ github.com/koinos/koinos-log-golang v0.0.0-20210621202301-3310a8e5866b h1:pZ9L1E github.com/koinos/koinos-log-golang v0.0.0-20210621202301-3310a8e5866b/go.mod h1:/dzAVdA+woySENUYwls8RT+5i87Rm4qoMZ4ctEQI8k0= github.com/koinos/koinos-mq-golang v0.0.0-20211026183607-441fb7106dd3 h1:vr3BM+X2ZLmUysECS+1G+YqJeheCQdr01JikxOmLrhc= github.com/koinos/koinos-mq-golang v0.0.0-20211026183607-441fb7106dd3/go.mod h1:EFk+fuUL5ezbaWsGJ2U0KlzbgkflwRv96az8dEVe16I= +github.com/koinos/koinos-mq-golang v0.0.0-20220307194511-07a03f6f75f0 h1:ykFmSn2nhdrr96UvqNlYdvWqXu8xX5Ol18nmLM49icg= +github.com/koinos/koinos-mq-golang v0.0.0-20220307194511-07a03f6f75f0/go.mod h1:EFk+fuUL5ezbaWsGJ2U0KlzbgkflwRv96az8dEVe16I= github.com/koinos/koinos-proto-golang v0.2.1-0.20220224180227-6fbc5fe4a89a h1:3Htl8NnPsoSaHhzJhROeQiAyFIcGwsobypAkvysKGvg= github.com/koinos/koinos-proto-golang v0.2.1-0.20220224180227-6fbc5fe4a89a/go.mod h1:ZonOOdmZcuEbRdOqqdfYRA2I4szYHy5aKzUveMWXBog= github.com/koinos/koinos-proto-golang v0.2.1-0.20220304200226-d96c9cf694de h1:HqOUA4jj5ce4v1kW8jnVc/1LYrELBihqNBDVyqaU+xI= diff --git a/internal/options/peer_connection_options.go b/internal/options/peer_connection_options.go index 1c81d0e..a9d42b6 100644 --- a/internal/options/peer_connection_options.go +++ b/internal/options/peer_connection_options.go @@ -13,11 +13,11 @@ type Checkpoint struct { } const ( - localRPCTimeoutDefault = time.Millisecond * 100 - remoteRPCTimeoutDefault = time.Second + localRPCTimeoutDefault = time.Second * 6 + remoteRPCTimeoutDefault = time.Second * 6 blockRequestBatchSizeDefault = 1000 - blockRequestTimeoutDefault = time.Second * 5 - handshakeRetryTimeDefault = time.Second * 3 + blockRequestTimeoutDefault = time.Second * 6 + handshakeRetryTimeDefault = time.Second * 6 syncedBlockDeltaDefault = 5 syncedPingTimeDefault = time.Second * 10 ) diff --git a/internal/p2p/peer_connection.go b/internal/p2p/peer_connection.go index f5d9b76..9255227 100644 --- a/internal/p2p/peer_connection.go +++ b/internal/p2p/peer_connection.go @@ -133,7 +133,7 @@ func (p *PeerConnection) handleRequestBlocks(ctx context.Context) error { // Apply blocks to local node for _, block := range blocks { - rpcContext, cancelApplyBlock := context.WithTimeout(ctx, 2*time.Second) + rpcContext, cancelApplyBlock := context.WithTimeout(ctx, p.opts.LocalRPCTimeout) defer cancelApplyBlock() _, err = p.localRPC.ApplyBlock(rpcContext, &block) if err != nil {