Skip to content

Conversation

@apoelstra
Copy link
Member

It turns out we only ever use do decoding of fixed test vectors. It would be nice to have a hex! macro for this. Eventually.

In some cases we were able to use inherent methods on bitcoin types -- for example ScriptBuf::from_hex or deserialize_hex.

@apoelstra apoelstra marked this pull request as draft May 22, 2025 20:53
@apoelstra
Copy link
Member Author

Drafting. Might as well just wait for the real 1.0.

@apoelstra apoelstra force-pushed the push-ppmrkrkvqkzo branch 3 times, most recently from fb0adc3 to bea8cde Compare May 23, 2025 13:05
@apoelstra
Copy link
Member Author

Published :) will update this tonight or tomorrow morning.

@apoelstra apoelstra force-pushed the push-ppmrkrkvqkzo branch from bea8cde to 78e8f01 Compare July 15, 2025 14:16
Copy link
Member Author

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

On bea8cde successfully ran local tests

@apoelstra apoelstra marked this pull request as ready for review July 15, 2025 14:56
Copy link
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

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

ACK 78e8f01

@tcharding
Copy link
Member

PR title and git log are both stale - they mention 'rc'.

}
}
}
use miniscript::hex;
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

Comment on lines -74 to +73
let depo_tx: Transaction = deserialize(&Vec::<u8>::from_hex(hex_tx).unwrap()).unwrap();
let depo_tx: Transaction = deserialize_hex(hex_tx).unwrap();
Copy link
Member

Choose a reason for hiding this comment

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

This is kind of an unrelated change, bad Andrew no biscuit.

Copy link
Member Author

Choose a reason for hiding this comment

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

How is it unrelated? We used to have a hex library that has from_hex and now we don't.

Copy link
Member

Choose a reason for hiding this comment

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

oooph - I'm a spastic. I did not even look inside the function call to deserialize only at the function name changes - ouch.

Comment on lines -1658 to +1657
Vec::<u8>::from_hex("76a91479091972186c449eb1ded22b78e40d009bdf008988ac").unwrap()[..]
hex::decode_to_vec("76a91479091972186c449eb1ded22b78e40d009bdf008988ac").unwrap()[..]
Copy link
Member

Choose a reason for hiding this comment

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

Out of interest did you find yourself cursing the f***ing hex-conservative devs or were you happy enough during the upgrade?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was happy enough, but the lack of encoding support is idiotic.

Copy link
Member

Choose a reason for hiding this comment

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

True that.

@apoelstra apoelstra changed the title use hex-conservative 1.0 rc1 everywhere for decoding use hex-conservative 1.0 everywhere for decoding Jul 16, 2025
It turns out we only ever use do decoding of fixed test vectors. It
would be nice to have a hex! macro for this. Eventually.

In some cases we were able to use inherent methods on bitcoin types --
for example ScriptBuf::from_hex or deserialize_hex.
@apoelstra apoelstra force-pushed the push-ppmrkrkvqkzo branch from 78e8f01 to a1fa898 Compare July 16, 2025 13:19
Copy link
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

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

ACK a1fa898

@apoelstra
Copy link
Member Author

Going to merge this one -- in general, I don't want to move rust-miniscript to 1.0 dependencies on the main branch because I have been hyping up "Miniscript 13" to people out-of-band and want the next release to be compatible with bdk.

But in the case of hex-conservative, the only "1.0 types" that are expose are error types, so it's okay.

@apoelstra apoelstra merged commit 89a9a4c into rust-bitcoin:master Aug 6, 2025
31 checks passed
@apoelstra apoelstra deleted the push-ppmrkrkvqkzo branch August 6, 2025 20:26
heap-coder added a commit to heap-coder/rust-miniscript that referenced this pull request Sep 27, 2025
…ywhere for decoding

a1fa898f9f164baee2eca787b06fd89ea10f880d use hex-conservative 1.0 everywhere for decoding (Andrew Poelstra)

Pull request description:

  It turns out we only ever use do decoding of fixed test vectors. It would be nice to have a hex! macro for this. Eventually.
  
  In some cases we were able to use inherent methods on bitcoin types -- for example ScriptBuf::from_hex or deserialize_hex.


ACKs for top commit:
  tcharding:
    ACK a1fa898f9f164baee2eca787b06fd89ea10f880d


Tree-SHA512: 234fb4974e86b6b72d3f0aaefbe7f1ea73cfd90c0152c163d3f0b46e94d50f3e784f5499e00b058736b242b1c0dde39b41d5a2583319bf9c580a0db84dc24237
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.

2 participants