Skip to content
This repository was archived by the owner on Oct 28, 2026. It is now read-only.

Remove bitcoin for secp256k1 with no-std fix - #157

Merged
nyonson merged 1 commit into
rust-bitcoin:mainfrom
nyonson:drop-bitcoin
Sep 6, 2025
Merged

nyonson merged 1 commit into
rust-bitcoin:mainfrom
nyonson:drop-bitcoin

Conversation

@nyonson

@nyonson nyonson commented Sep 5, 2025 •

Copy link
Copy Markdown
Collaborator

Extends #156 with a no-std fix and doc fixes (maybe there is a better way to do this than a new PR, but my git-foo is lacking here).

@rustaceanrob should we try to lower the version of secp for flexibility or is there a reason to set the bar at v0.29.0? EDIT: guess we should just match bitcoin to not cause a multiple versions for consumers.

To help with type safety a bit, I have public callsites use an `impl
Borrow<[u8; 4]>`, which the `p2p::Magic` type implements. This way one
can pass magic variables directly. In the handshake this just gets
dereferenced anyway, but it still feels more ergonomic than forcing a
`to_bytes` on the caller IMO.

I keep the `secp256k1` the same, but maybe it can be bumped. I forget if
there are problems when attempting to build conflicting versions or not.

Concat usage was dropped in favor of explicit array handling. This was
probably being iron'd out by the compiler before, but this patch
introduces Borrow which broke no-std environment support.

Co-authored-by: Nick Johnson <[email protected]>
@nyonson
nyonson requested a review from rustaceanrob September 5, 2025 21:32
@rustaceanrob

rustaceanrob commented Sep 6, 2025 •

Copy link
Copy Markdown
Member

ACK 0aecda7

I'll let you do the honors on merging. Yeah, I think we just match bitcoin here. We don't need anything special and ideally consumers have a single secp

@nyonson
nyonson merged commit 8c46943 into rust-bitcoin:main Sep 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants