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

Remote staking with P2WSH #592

Merged
merged 18 commits into from
Feb 26, 2019

Conversation

Nizametdinov
Copy link
Member

@Nizametdinov Nizametdinov commented Feb 12, 2019

This PR implements witness v2 programs which allow staking of P2WSH outputs. See UIP-15.

@cmihai cmihai requested a review from a team February 13, 2019 13:12
@Nizametdinov Nizametdinov force-pushed the remote-staking-p2wsh branch 2 times, most recently from e10efd9 to 12ae4d1 Compare February 14, 2019 17:36
Copy link
Member

@cmihai cmihai left a comment

Choose a reason for hiding this comment

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

utACK

@Nizametdinov Nizametdinov requested a review from scravy February 25, 2019 10:33
Copy link
Member

@scravy scravy left a comment

Choose a reason for hiding this comment

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

utACK 6f6d3b9

@Ruteri
Copy link
Member

Ruteri commented Feb 25, 2019

Has to be rebased, as it will break p2p_segwit.py after #678. See change https://github.com/dtr-org/unit-e/pull/678/files#diff-7a31c514dd642ccd6d9940d4096109efR1095. The fix should be similar to what has already been done in multiple tests with increasing the invalid witness program value.

Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
…ngBalance

Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
Copy link
Member

@Ruteri Ruteri left a comment

Choose a reason for hiding this comment

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

utACK 625f017

@Nizametdinov Nizametdinov merged commit 1fa60fd into dtr-org:master Feb 26, 2019
@@ -264,7 +280,8 @@ bool IsStakeableByMe(const CKeyStore &keystore, const CScript &script_pub_key)
{
case TX_PUBKEYHASH:
case TX_WITNESS_V0_KEYHASH:
case TX_WITNESS_V1_REMOTE_STAKING: {
case TX_WITNESS_V1_RS_KEYHASH:
case TX_WITNESS_V2_RS_SCRIPTHASH: {
Copy link
Member

@kostyantyn kostyantyn Feb 26, 2019

Choose a reason for hiding this comment

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

Would prefer to have the full name REMOTESTAKE instead of RS for clarity. I don't think there is an issue that the name is too long. And splitting the if condition by 2 lines is also fine.

@@ -64,7 +64,8 @@ enum txnouttype
TX_NULL_DATA, //!< unspendable OP_RETURN script that carries data
TX_WITNESS_V0_SCRIPTHASH,
TX_WITNESS_V0_KEYHASH,
TX_WITNESS_V1_REMOTE_STAKING,
TX_WITNESS_V1_RS_KEYHASH, //!< UIP-15 Remote staking script with public key hash spending destination
TX_WITNESS_V2_RS_SCRIPTHASH, //!< UIP-25 Remote staking script with script hash spending destination
Copy link
Member

Choose a reason for hiding this comment

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

We don't have UIP-25. We decided to extend UIP-15

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

Successfully merging this pull request may close these issues.

7 participants