Skip to content

Commit

Permalink
Merge pull request #204 from koinos/longsync
Browse files Browse the repository at this point in the history
Increase sync apply block timeout
  • Loading branch information
mvandeberg authored Mar 7, 2022
2 parents 2efd88b + a1d3f43 commit 82f9d8a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 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.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
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
8 changes: 4 additions & 4 deletions internal/options/peer_connection_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion internal/p2p/peer_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 82f9d8a

Please sign in to comment.