Skip to content

Commit 6b212a9

Browse files
authored
Merge branch 'master' into composable-ci-action
2 parents 6de7ef2 + 47550e9 commit 6b212a9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+3021
-1593
lines changed

.github/workflows/c-chain-reexecution-benchmark-container.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,25 @@
2222
]
2323
},
2424
"schedule": {
25-
"include": []
25+
"include": [
26+
{
27+
"runner": "avago-runner-m6i-4xlarge-ebs-fast",
28+
"config": "default",
29+
"start-block": 33000001,
30+
"end-block": 33500000,
31+
"block-dir-src": "s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-30m-40m-ldb/**",
32+
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-33m/**",
33+
"timeout-minutes": 1440
34+
},
35+
{
36+
"runner": "avago-runner-i4i-4xlarge-local-ssd",
37+
"config": "default",
38+
"start-block": 33000001,
39+
"end-block": 33500000,
40+
"block-dir-src": "s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-30m-40m-ldb/**",
41+
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-33m/**",
42+
"timeout-minutes": 1440
43+
}
44+
]
2645
}
2746
}

.github/workflows/c-chain-reexecution-benchmark-container.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ on:
3838

3939
# Disabled because scheduled trigger is empty. To enable, uncomment and add at least one vector to the schedule
4040
# entry in the corresponding JSON file.
41-
# schedule:
42-
# - cron: '0 9 * * *' # Runs every day at 09:00 UTC (04:00 EST)
41+
schedule:
42+
- cron: '0 9 * * *' # Runs every day at 09:00 UTC (04:00 EST)
4343

4444
jobs:
4545
define-matrix:

.github/workflows/c-chain-reexecution-benchmark-gh-native.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@
3131
]
3232
},
3333
"schedule": {
34-
"include": [
35-
{
36-
"runner": "blacksmith-4vcpu-ubuntu-2404",
37-
"config": "default",
38-
"start-block": 33000001,
39-
"end-block": 33500000,
40-
"block-dir-src": "s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-30m-40m-ldb/**",
41-
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-33m/**",
42-
"timeout-minutes": 1440
43-
}
44-
]
34+
"include": []
4535
}
4636
}

.github/workflows/c-chain-reexecution-benchmark-gh-native.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ on:
3535
description: 'Timeout in minutes for the job.'
3636
required: false
3737
default: 30
38-
schedule:
39-
- cron: '0 9 * * *' # Runs every day at 09:00 UTC (04:00 EST)
38+
39+
# Disabled because scheduled trigger is empty. To enable, uncomment and add at least one vector to the schedule
40+
# entry in the corresponding JSON file.
41+
# schedule:
42+
# - cron: '0 9 * * *' # Runs every day at 09:00 UTC (04:00 EST)
4043

4144
jobs:
4245
define-matrix:

api/connectclient/client.go

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ package connectclient
55

66
import (
77
"context"
8+
"crypto/tls"
9+
"net"
10+
"net/http"
811

912
"connectrpc.com/connect"
13+
"golang.org/x/net/http2"
1014

1115
"github.com/ava-labs/avalanchego/api/server"
1216
)
@@ -16,24 +20,40 @@ var _ connect.Interceptor = (*SetRouteHeaderInterceptor)(nil)
1620
// SetRouteHeaderInterceptor sets the api routing header for connect-rpc
1721
// requests
1822
type SetRouteHeaderInterceptor struct {
19-
Route string
23+
Route []string
2024
}
2125

2226
func (s SetRouteHeaderInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc {
2327
return func(ctx context.Context, request connect.AnyRequest) (connect.AnyResponse, error) {
24-
request.Header().Set(server.HTTPHeaderRoute, s.Route)
28+
for _, route := range s.Route {
29+
request.Header().Add(server.HTTPHeaderRoute, route)
30+
}
2531
return next(ctx, request)
2632
}
2733
}
2834

2935
func (s SetRouteHeaderInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc {
3036
return func(ctx context.Context, spec connect.Spec) connect.StreamingClientConn {
3137
conn := next(ctx, spec)
32-
conn.RequestHeader().Set(server.HTTPHeaderRoute, s.Route)
38+
for _, route := range s.Route {
39+
conn.RequestHeader().Add(server.HTTPHeaderRoute, route)
40+
}
3341
return conn
3442
}
3543
}
3644

3745
func (SetRouteHeaderInterceptor) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc {
3846
return next
3947
}
48+
49+
func New() *http.Client {
50+
return &http.Client{
51+
Transport: &http2.Transport{
52+
AllowHTTP: true,
53+
DialTLSContext: func(ctx context.Context, network, addr string, _ *tls.Config) (net.Conn, error) {
54+
var d net.Dialer
55+
return d.DialContext(ctx, network, addr) // Skip TLS to use h2c
56+
},
57+
},
58+
}
59+
}

api/server/router.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (r *router) ServeHTTP(writer http.ResponseWriter, request *http.Request) {
6060

6161
// Request specified the routing header key but did not provide a
6262
// corresponding value
63-
if len(route) != 1 {
63+
if len(route) < 1 {
6464
writer.WriteHeader(http.StatusBadRequest)
6565
return
6666
}

connectproto/pb/proposervm/proposervmconnect/service.connect.go

Lines changed: 113 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)