Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manifest: 🔨 fix build against v0.78.0 release #105

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

cratelyn
Copy link
Contributor

@cratelyn cratelyn commented Jun 26, 2024

🚁 overview

fixes #104. see penumbra-zone/penumbra#4582.

@conorsch reported this error, when upgrading to a new testnet release:

While performing the upgrade to Testnet 78
(penumbra-zone/penumbra#4582)
today, I noticed belated that Galileo isn't building against that
version of the Penumbra monorepo. See example build failure here:
https://github.com/penumbra-zone/galileo/actions/runs/9683427186/job/26718838171

#20 226.5 error[E0277]: the trait bound `rustls_acme::axum::AxumAcceptor: Accept<hyper::server::tcp::addr_stream::AddrStream, _>` is not satisfied
#20 226.5    --> src/opt/rpc.rs:115:44
#20 226.5     |
#20 226.5 115 |                 tokio::task::spawn($server.serve(make_svc))
#20 226.5     |                                            ^^^^^ the trait `Accept<hyper::server::tcp::addr_stream::AddrStream, _>` is not implemented for `rustls_acme::axum::AxumAcceptor`
#20 226.5 ...
#20 226.5 128 |                 spawn_grpc_server!(grpc_server.acceptor(acceptor))
#20 226.5     |                 -------------------------------------------------- in this macro invocation
#20 226.5     |
#20 226.5     = help: the trait `Accept<I, S>` is implemented for `DefaultAcceptor`
#20 226.5     = note: this error originates in the macro `spawn_grpc_server` (in Nightly builds, run with -Z macro-backtrace for more info)
#20 226.5
#20 226.5 error[E0277]: the trait bound `rustls_acme::axum::AxumAcceptor: Accept<hyper::server::tcp::addr_stream::AddrStream, _>` is not satisfied
#20 226.5    --> src/opt/rpc.rs:115:50
#20 226.5     |
#20 226.5 115 |                 tokio::task::spawn($server.serve(make_svc))
#20 226.5     |                                            ----- ^^^^^^^^ the trait `Accept<hyper::server::tcp::addr_stream::AddrStream, _>` is not implemented for `rustls_acme::axum::AxumAcceptor`
#20 226.5     |                                            |
#20 226.5     |                                            required by a bound introduced by this call
#20 226.5 ...
#20 226.5 128 |                 spawn_grpc_server!(grpc_server.acceptor(acceptor))
#20 226.5     |                 -------------------------------------------------- in this macro invocation

this commit fixes that build error.

😷 diagnosis

running this command in the monorepo...

; git diff v0.77.4...v0.78.0 Cargo.lock

we can see some relevant changes to the dependency tree:

 [[package]]
 name = "axum-server"
-version = "0.4.7"
+version = "0.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bace45b270e36e3c27a190c65883de6dfc9f1d18c829907c127464815dc67b24"
+checksum = "447f28c85900215cc1bea282f32d4a2f22d55c5a300afdfbc661c8d6a632e063"
 dependencies = [
  "arc-swap",
  "bytes",
 [[package]]
 name = "penumbra-auto-https"
-version = "0.77.0"
+version = "0.78.0"
 dependencies = [
  "anyhow",
  "axum-server",
  "futures",
- "rustls 0.20.9",
+ "rustls",
  "rustls-acme",
  "tracing",
 ]

the axum-server dependency has been upgraded, which in turn affects the version of axum-server that the value provided by penumbra_auto_https::axum_acceptor() may be used with.

we call that function in opt/rpc.rs and provide it to axum-server, so Galileo should use the same version as the monorepo.

 ### 🚁 overview

fixes #104.

@conorsch reported this error, when upgrading to a new testnet release:

> While performing the upgrade to Testnet 78
> ([penumbra-zone/penumbra#4582](penumbra-zone/penumbra#4582))
> today, I noticed belated that Galileo isn't building against that
> version of the Penumbra monorepo. See example build failure here:
> https://github.com/penumbra-zone/galileo/actions/runs/9683427186/job/26718838171
>
> ```
> #20 226.5 error[E0277]: the trait bound `rustls_acme::axum::AxumAcceptor: Accept<hyper::server::tcp::addr_stream::AddrStream, _>` is not satisfied
> #20 226.5    --> src/opt/rpc.rs:115:44
> #20 226.5     |
> #20 226.5 115 |                 tokio::task::spawn($server.serve(make_svc))
> #20 226.5     |                                            ^^^^^ the trait `Accept<hyper::server::tcp::addr_stream::AddrStream, _>` is not implemented for `rustls_acme::axum::AxumAcceptor`
> #20 226.5 ...
> #20 226.5 128 |                 spawn_grpc_server!(grpc_server.acceptor(acceptor))
> #20 226.5     |                 -------------------------------------------------- in this macro invocation
> #20 226.5     |
> #20 226.5     = help: the trait `Accept<I, S>` is implemented for `DefaultAcceptor`
> #20 226.5     = note: this error originates in the macro `spawn_grpc_server` (in Nightly builds, run with -Z macro-backtrace for more info)
> #20 226.5
> #20 226.5 error[E0277]: the trait bound `rustls_acme::axum::AxumAcceptor: Accept<hyper::server::tcp::addr_stream::AddrStream, _>` is not satisfied
> #20 226.5    --> src/opt/rpc.rs:115:50
> #20 226.5     |
> #20 226.5 115 |                 tokio::task::spawn($server.serve(make_svc))
> #20 226.5     |                                            ----- ^^^^^^^^ the trait `Accept<hyper::server::tcp::addr_stream::AddrStream, _>` is not implemented for `rustls_acme::axum::AxumAcceptor`
> #20 226.5     |                                            |
> #20 226.5     |                                            required by a bound introduced by this call
> #20 226.5 ...
> #20 226.5 128 |                 spawn_grpc_server!(grpc_server.acceptor(acceptor))
> #20 226.5     |                 -------------------------------------------------- in this macro invocation

this commit fixes that build error.

 ### 😷 diagnosis

the

running this command in the monorepo...

```sh
; git diff v0.77.4...v0.78.0 Cargo.lock
```

we can see some relevant changes to the dependency tree:

```diff
 [[package]]
 name = "axum-server"
-version = "0.4.7"
+version = "0.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bace45b270e36e3c27a190c65883de6dfc9f1d18c829907c127464815dc67b24"
+checksum = "447f28c85900215cc1bea282f32d4a2f22d55c5a300afdfbc661c8d6a632e063"
 dependencies = [
  "arc-swap",
  "bytes",
```

```diff
 [[package]]
 name = "penumbra-auto-https"
-version = "0.77.0"
+version = "0.78.0"
 dependencies = [
  "anyhow",
  "axum-server",
  "futures",
- "rustls 0.20.9",
+ "rustls",
  "rustls-acme",
  "tracing",
 ]
```

the `axum-server` dependency has been upgraded, which in turn affects
the version of `axum-server` that the value provided by
`penumbra_auto_https::axum_acceptor()` may be used with.

we call that function in `opt/rpc.rs` and provide it to `axum-server`,
so Galileo should use the same version as the monorepo.
@cratelyn cratelyn self-assigned this Jun 26, 2024
@cratelyn cratelyn requested a review from conorsch June 26, 2024 20:08
@cratelyn cratelyn marked this pull request as ready for review June 26, 2024 20:12
Copy link
Contributor

@conorsch conorsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 🙏

@cratelyn cratelyn merged commit b087233 into main Jun 26, 2024
5 checks passed
@cratelyn cratelyn deleted the kate/fix-v0.78.0-build branch June 26, 2024 20:16
@cratelyn
Copy link
Contributor Author

#106 adds our lockfile to the repository, which would have been helpful here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

galileo won't build against penumbra v0.78.0
2 participants