forked from ElementsProject/rust-elements
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Test #2
Open
RCasatta
wants to merge
272
commits into
master
Choose a base branch
from
test
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also adds the CHANGELOG file
rust-bitcoin, rust-secp and rust-secp-zkp
These work directly with elements 23.0(24.0?) after it has been released. There are no changes to elements specific proprietary fields, only main bitcoin psbt fields.
65f7838 Add taproot psbt fields according to BIP371 (sanket1729) 9a3b1fc Update dependancies (sanket1729) Pull request description: These work directly with elements 23.0(24.0?) after it has been released. There are no changes to elements specific proprietary fields, only main bitcoin psbt fields. Most of this is just copy pasting code from rust-bitcoin and making it work :) . For reference: https://github.com/bitcoin/bips/blob/master/bip-0371.mediawiki. Unfortunately, this is the only supporting implementation. So, there are no test vectors to check against. ACKs for top commit: apoelstra: ACK 65f7838 Tree-SHA512: b1a27a57577ce7978dcec7d8ddb2a853f427cca8ef7fe106ed3c2df9a2d5aaf2342f08964a225bcc8e3fa4934484a0bf081053d6dc6bf48a7dc61e394463c8ad
Also adds FromStr/Display for SchnorrSignatureHashType
This was a result of copy-pasting code from rust-bitcoin
rust-bitcoin ecosystem also makes sure that H and h in SighashType and SigHashType are consistent. We don't have the bandwidth to do it currently.
SurjectionProofs and RangeProofs were being alloted on stack for the full 1MB even when they were empty. The fixes this by adding a Box around it While we are at it, this also fixes the issue for Psbt decoding while dealing with these cases Add failing test case
35110f6 Add utility methods for fetching sighash types from inputs (sanket1729) a860698 Add #[test] to unused test (sanket1729) f429873 Rename SigHashType to EcdsaSighashType (sanket1729) f02eedc Remove std feature (sanket1729) 8f65c48 Add Support for Psbt Sighash type (sanket1729) Pull request description: Also adds FromStr/Display for SchnorrSignatureHashType - The first commit adds PsbtSighashType(needed for schnorr sigh psbt support) - The second commit fixes a bug introduced in copy-pasting during the ElementsProject#111. - The third commit does renaming to distinguish SchnorrSigHashType and EcdsaSigHashType - The last and fourth commit fixes a small nit by adding a #[test] to untested code in serde feature. ACKs for top commit: apoelstra: ACK 35110f6 Tree-SHA512: 269a10e34bc930de6238a104c7494e56bcb7e68507d194b18a49c612c85c77bf5b5c12a22b43fb467666e3726d178fdfc8564ec1e73881845fd48dc5c1b46155
d27565c Fix Block decoding bug (sanket1729) Pull request description: SurjectionProofs were allocated on the stack for the entire array of characters even when they were empty. The fixes this by adding a Box around it. This is not an issue for rangeproofs as there is already a Box in the ffi layer, but when that changes as we add more support to split range proof from a blob into individual components, we should make sure that we are boxing it here. While we are at it, this also fixes the issue for Psbt decoding while dealing with these cases. The second commit can be swapped to see that test fails without the fix. ACKs for top commit: apoelstra: ACK d27565c Tree-SHA512: 55aff65d198a35e7d85481284f8a52c0adf3e4ad8205eb523967b2fad5f0cb8a22448751b2306f111435267c83ea56be8aabfe279f1a526763d21865ad331422
948254b Release 0.19 (sanket1729) Pull request description: Dependency upgrade and taproot support implemented in ElementsProject#121. Please review that before making a release. This PR is now only has a single commit with the release. Fixes ElementsProject#112 ACKs for top commit: apoelstra: ACK 948254b Tree-SHA512: af86984d6cd2154f112a605a80a3274b1ace58e32a87d001e5ab90871a9953c673c7461805f026dcb00b5e37c10ee87a3cbfb149c36c2ba18d6d2870bb2c70b8
To match the changes introduced in rust-bitcoin: rust-bitcoin/rust-bitcoin#861
…ction methods 2a35bad Use the non-get-prefixed methods (Nadav Ivgi) bdf4604 Deprecate get_ prefix for Block and Transaction methods (Nadav Ivgi) Pull request description: To match the changes introduced in rust-bitcoin/rust-bitcoin#861. This allows using unified code with the same methods for both `elements::{Transaction,Block}` and `bitcoin::{Transaction,Block}` (behind different features), without triggering rust-bitcoin's deprecation warnings for the `get_`-prefixed methods. Note that there are other instances of `get_`-prefixed methods in the rust-elements codebase. I only updated the ones needed for compatibility with the changes made in rust-bitcoin. ACKs for top commit: apoelstra: ACK 2a35bad Tree-SHA512: 6c18f79c05fb860b1615c2f302290caa1c2a83d6d1b5128fbef7ab2053c4e5f6bc6a1ecaa9fb1d638598396d9f1e53ae4338c1dcd7562d5dc8bea72d498a0bc1
These are the same values from rust-bitcoin. Makes it easy to create these structures downstream. Right now, we need to specify all feilds
34cf67c Add some default impls (sanket1729) Pull request description: These are the same values from rust-bitcoin. Makes it easy to create these structures downstream. Right now, we need to specify all feilds ACKs for top commit: apoelstra: ACK 34cf67c Tree-SHA512: 4f0728050d17eb8170f57e7b259c27179ed6055f744edbadcdb11010a838650a3a0ab4965a13686b955ee5f49154c9bffa4dd66e48d40fd0b6ecb2b9ac67cd74
We really never should have required BufRead just to make the commitment parsing a tad more convenient.
This kinda makes the Decodable impls on these types unnecessary, but I'm not against keeping them around just in case anyone wants them. It also makes this whole change backwards compatible.
…Encodable trait c1a7641 encode: Avoid duplicate allocation for commitments (Steven Roose) 203542c encode: Revert io::BufRead requirement on Encodable trait (Steven Roose) Pull request description: We really never should have required `BufRead` just to make the commitment parsing a tad more convenient. ACKs for top commit: apoelstra: ACK c1a7641 sanket1729: ACK c1a7641. `Commitment` and `Generator` are Copy. There is no allocation in them. I would like to keep the decodable Impls because they can come in handy in downstream repos. Tree-SHA512: b4d18cfec524d6d3bdd95511bab2159e5035d01fa04b27f54b39907ecd0e2d546a03458a0e7141a505bcc6dbf4c09a5e680bcc1f5e8ddea2234b98aeba036324
92f7884 Add script utility methods for taproot (sanket1729) Pull request description: ACKs for top commit: stevenroose: utACK [92f7884](ElementsProject@92f7884) apoelstra: ACK 92f7884 Tree-SHA512: e1baaa222798dc5f4a8c8634ac78817449214e959268fc6d86a1c460e48603625c5c699912461ead10b1deea1f69c264309990376d806956f4cd0c1e5953c52c
…o input and output 17d354e pset: test input and output asset blinding factors (Leonardo Comandini) db805b3 pset: output: add asset blinding factor (Leonardo Comandini) d1dfed4 pset: input: add asset blinding factor (Leonardo Comandini) 04ab514 pset: implement (de)serialize for AssetBlindingFactor (Leonardo Comandini) Pull request description: Change corresponding to ElementsProject/elements#1329 ACKs for top commit: apoelstra: ACK 17d354e Tree-SHA512: 14c8d9d096c6412bd15fac1f597a3fbc02a43bee64e3edc8209d487b805671b6cec1fa752337e817324170178a3cf3151bbcbe98dd2646f1e92e3018cd5dceec
New versions of rustc detect invalid feature gates. We had two, which resulted in tests that were never run.
Recent versions of rustc notice when public structs cannot be constructed. In this case, the struct in question a copy-and-paste from the bech32 segwit module, and it was unneeded and (clearly) unused.
We had several accidental list-item continuation in our docs. Add newlines to break them up.
8d58ec3 clippy: use u32::MAX rather than u32::max_value (Andrew Poelstra) 172e36b clippy: fix indentation in documentation (Andrew Poelstra) 4ab1b77 blech32: delete unconstructable iterator struct (Andrew Poelstra) a89ff6e fix a couple feature gates (Andrew Poelstra) Pull request description: Do some cleanups and get CI working again. Will rebase ElementsProject#203 on this. ACKs for top commit: delta1: ACK 8d58ec3 Tree-SHA512: 62ca188d031e71e39279b7407cef746ea4bec2c72baad633603fd67834efa6774027b060d20fddbb9bfff609b676b1b6d2f20a1c663e7fea207a3b08772e3e0c
It is possible to cause a panic by calling `TxIn::pegin_data` on a malformed pegin, which has 6 entries and the last one (which should be a Merkle proof of block inclusion) is too small to even have a blockhash in it. On the actual chain this should not be possible because invalid pegin data would be rejected.
…pegin-parse transaction: range-check pegin data when parsing
b7fc82e tx: add discount_weight and discount_vsize (Byron Hambly) Pull request description: adds implementation of discount virtual size from ElementsProject/elements#1317 same test vectors in ElementsProject/elements#1341 ACKs for top commit: apoelstra: ACK b7fc82e Tree-SHA512: 48f0daafcb93bbcabacff4bb5cd5bc6b2dd99fb97117671f58d2b33c9b9e6357e01eb16d726dcbeb70375c6307b106a11d091604aafde148b5c8377f471e46f1
1166089 pset: elip100: add and get token metadata (Leonardo Comandini) Pull request description: Following changes in ElementsProject/ELIPs#17 ACKs for top commit: RCasatta: ACK 1166089 Tree-SHA512: 5e8f1d309c4781f10130f9e6b8f8e6d17582e5e5292921e5a372b34a3d55c9de0a7a1496b47fc51b155a0e8072fb25895f4c05592694d13d09416889cbe40f0f
7737c82 Add elip_liquidex module (Leonardo Comandini) 2ca6c7b Revert "pset: input/output: add abf" (Leonardo Comandini) Pull request description: Use "liquidex" field for the asset blinding factor. Related ELIP: ElementsProject/ELIPs#18 ACKs for top commit: RCasatta: ACK 7737c82 apoelstra: ACK 7737c82 successfully ran local tests Tree-SHA512: 4bde263a0323cc5c1198c0d024552dd53bc44b5f00572c24da773cb417e5a7020e7158dcb72f6519caff7e3dd2082c049ed9cf5394e91fba7f9a8f8eb8bbaa1a
This is propedeutic to upgrading to bitcoin 0.32 where this address-related variants are removed from base58::Error
4269728 apply tomlfmt to Cargo.toml (Riccardo Casatta) e9a90cc apply rustfmt to encode.rs (Riccardo Casatta) 6789492 apply rustfmt to pset/raw.rs (Riccardo Casatta) 8ae550b apply rustfmt to src/blind.rs (Riccardo Casatta) 084f7d4 Avoid instantiating base58 errors in Address::from_base58 (Riccardo Casatta) 5eefe85 apply rustfmt to address.rs (Riccardo Casatta) Pull request description: This is propedeutic to upgrade to bitcoin 0.32 ElementsProject#209 where the base58 error variant specific to address are removed Also it applies formatting around on which I think we agreed upon, but also on the toml file which I had doubt, let me know if I have to remove it ACKs for top commit: apoelstra: ACK 4269728 successfully ran local tests Tree-SHA512: 0cdc7077d4ec4550a4df6f5e6eb244c7a8c0793b507c9a4327b30bdaf9f597df0dee7c72e33414df0a87cb10f9a9be12588c9a564d71cb308564cf0226b7dec1
Following bitcoin versions change `io` with `bitcoin_io`, upgrading would then require changing also elements::Encodable to match. Instead, we are re-implementing what is needed.
Otherwise we miss them when upgrading to 0.32
… bitcoin::Encodable c08382c Copy ReadExt/WriteExt from bitcoin (Riccardo Casatta) 4aad862 Stop implementing elements::Encodable with bitcoin::Encodable (Riccardo Casatta) Pull request description: Following bitcoin versions change `io` with `bitcoin_io`, upgrading would then require changing also elements::Encodable to match. Instead, we are re-implementing what is needed. Makes ElementsProject#209 easier ACKs for top commit: apoelstra: ACK c08382c successfully ran local tests; a bit redundant but I think this is the right way to go Tree-SHA512: e849dc141ab412f1db3539a132688b28e2770befb8fc46e64d3396f16c3b9035bb7d76a0813d4d7bf65ff85df418cb42e8d75e01d1db7879c5853dd40214e053
avoid setting {BITCOIND,ELEMENTSD}_EXE in setup The logic of setting the env var inside the setup prevents user of other OS like nixos to run the tests (because the included binary are not working on nixos). Setting those env vars is meant to be done in the dev environment not in the code. With this users with `bitcoind` and `elementsd` in their PATH will work too. The CI script will set the variables only if they are not already set. (Allowing Nixos users to override and run it locally)
f889525 improve logging on error (Riccardo Casatta) 802c006 upgrade bitcoin 0.31 -> 0.32, fix test env vars (Riccardo Casatta) Pull request description: ElementsProject#208 ``` fn consensus_encode<W: bitcoin::io::Write + ?Sized>(&self, e: W) -> Result<usize, crate::encode::Error> {} fn consensus_decode<R: bitcoin::io::BufRead + ?Sized>(reader: &mut R) -> Result<Self, crate::encode::Error> {} ``` We went for not depending on bitcoin::Encodable instead ACKs for top commit: apoelstra: ACK f889525 successfully ran local tests Tree-SHA512: 23fbf597c7adad52c40f1c26b2d0cad6755a0ff8f9da3ee498d2dd80856b24f557f2f7bf504712a6d25e358d5417fc5f7c467122470d9087f93f1e7d260e5539
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.