Skip to content

Commit

Permalink
Add RSKIP for Segwit compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Pamela Gonzalez Perilli authored and Pamela Gonzalez Perilli committed Oct 25, 2019
1 parent a687bfe commit 9c4c0cc
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
42 changes: 42 additions & 0 deletions IPs/RSKIP143.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Segwit Compatibility

|RSKIP |143 |
| :------------ |:-------------|
|**Title** |Segwit Compatibility|
|**Created** |22-OCT-19 |
|**Author** |PGP |
|**Purpose** |Sca,USa |
|**Layer** |Core |
|**Complexity** |2 |
|**Status** |Draft|

## Abstract

This document describes the procedure allows the 2wp proccess to accept segwit transaction sent using a P2SH wallet.

## Motivation

Actually, 2wp proccess only allows transaction who was sent using a P2PK address. The idea of this new RSKIP is that Bridge can accept P2SH since this is one of the most popular wallet nowadays and the segwit transactions needs less space in a block.

## Specification

During the execution of the Bridge process, the proccess parse every new transaction sent and use the data and can chatch the value of signature correctly. No a days if this transaction don't have this value inside the transaction, Bridge can not get it and identify this transaction as invalid.
The changes related with this RKSIP is to change the verification of invalid transaction, including another check than can verify if the transaction has a witness value. If this transaction have it we can consider as valid and get the signature value from the witness itself.

As Bridge can identify and parse every transaction, then the rest of the process can be working correctly. Saying this, the only changes related to include Segwit compatibility inside Bridge is to can parse this kind of transaction when the transaction is registered.
Some libraries as Bitconj-core and Bitcoinj-thin must be modified in order to asegurate that these can parse an storagevfl
.

Bitcoinj-thin was verified and it is working fine as it is. This library can parse and storage. Bitcoinj-core needs to be modified.



## References

[1] Other RSKIP https://github.com/rsksmart/RSKIPs/blob/master/IPs/RSKIP??.md

[2] Other Articles such as Smart Contracts for Bribing Miners http://homepages.cs.ncl.ac.uk/patrick.mccorry/minerbribery.pdf

### Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ RSK Improvement Proposals
| 135 |[Managing BridgeMaster Federation Members](IPs/RSKIP135.md)| 25-NOV-16 | SDL | Sca | Core | 2 | Draft |
| 138 |[Multi-signed transactions supporting enveloping and multi-key accounts](IPs/RSKIP138.md)| 10-SEP-19 | SDL | Sca | Core | 2 | Draft |
| 139 |[Precompile to get transaction refunds](IPs/RSKIP139.md)| 10-SEP-19 | SDL | Sca | Core | 1 | Draft |
| 143 |[Segwit Compatibility](IPs/RSKIP142.md)| 25-OCT-19 | PGP | Sca, Usa | Core | 2 | Draft |


(*) Under evaluation to be implemented in the next reference client release

Expand All @@ -148,4 +150,5 @@ RSK Improvement Proposals
| MMa | Matias Marquez | |
| MM | Martin Medina | [email protected] |
| SDL | Sergio Demian Lerner | [email protected] |
| SMS | Sebastian Matias Sicardi | [email protected] |
| SMS | Sebastian Matias Sicardi | [email protected]|
| PGP | Pamela González Perilli | [email protected] |

0 comments on commit 9c4c0cc

Please sign in to comment.