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

Update smoldot to 0.14.0 and smoldot-light to 0.12.0 #1307

Merged
merged 6 commits into from
Dec 6, 2023
Merged

Conversation

lexnv
Copy link
Collaborator

@lexnv lexnv commented Dec 5, 2023

This PR bumps the light client dependencies.

  • adjusts the PlatformRef implementation
  • removes the with_buffers module from subxt and relies on the smoldot ones

While at it, bump which build dependency to 5.0.0

@lexnv lexnv requested a review from a team as a code owner December 5, 2023 16:44
}
pub struct Stream(
#[pin]
pub smoldot::libp2p::with_buffers::WithBuffers<
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
pub smoldot::libp2p::with_buffers::WithBuffers<
pub smoldot::libp2p::with_buffers::WithBuffers<

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I also found this annoying, however it seems this is how rustfmt is formatting this for me 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's very strange; I haven't seen such double-space formatting before; moving to single space casues a fmt error?

Maybe the macro leads to something weird hmmm

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep that's super weird:

cargo fmt --all -- --check                                                              19:42:04
Diff in /home/lexnv/workspace/subxt/lightclient/src/platform/wasm_helpers.rs at line 34:
 #[pin_project::pin_project]
 pub struct Stream(
     #[pin]
-    pub smoldot::libp2p::with_buffers::WithBuffers<
+    pub  smoldot::libp2p::with_buffers::WithBuffers<
         future::BoxFuture<'static, Result<WasmSocket, std::io::Error>>,
         WasmSocket,
         Instant,

And also the CI fmt check is passing: https://github.com/paritytech/subxt/actions/runs/7103856224/job/19337498624?pr=1307

Copy link
Collaborator

Choose a reason for hiding this comment

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

shrugs ah well :)

))
})
future::ready(super::wasm_helpers::Stream(with_buffers::WithBuffers::new(
Box::pin(socket_future),
Copy link
Member

Choose a reason for hiding this comment

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

a little annoying to box twice i.e, both the future and the stream but yeye

Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like only one box to me on the future, and the stream isn't boxed? Maybe I haven't dug deeply enough!

Copy link
Member

Choose a reason for hiding this comment

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

awesome 🎉

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yup, awesome to see this stuff going away!

Signed-off-by: Alexandru Vasile <[email protected]>
@jsdw jsdw merged commit 418c3af into master Dec 6, 2023
10 of 11 checks passed
@jsdw jsdw deleted the lexnv/smoldot-bump branch December 6, 2023 15:53
@jsdw jsdw mentioned this pull request Dec 7, 2023
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.

3 participants