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

Introduce diverse witnesses in shelley #1844

Closed
paweljakubas opened this issue Jul 1, 2020 · 2 comments
Closed

Introduce diverse witnesses in shelley #1844

paweljakubas opened this issue Jul 1, 2020 · 2 comments
Assignees
Labels
ADDING FEATURE Mark a PR as adding a new feature, for auto-generated CHANGELOG

Comments

@paweljakubas
Copy link
Contributor

paweljakubas commented Jul 1, 2020

Context

As a user
I want to move my funds from my Byron wallet to my shelley wallet
so that I manage my funds

Decision

We want to enable sending txs with Icarus/Byron witnesses within shelley style wallet. This will require introducing TxWitnessTagFor typeclass on key parameter, add the constraint in newTransactionLayer. This will allow adding dedicated mkWitness implementation, also differentiate postTx

Acceptance Criteria

  1. TxWitnessTagFor typeclass and impl for IrarusKey, ByronKey, and ShelleyKey are introduced.
  2. newTransactionLayer is constraint with TxWitnessTagFor
  3. Specialized impl of mkWitness for keys are added.
  4. Estimated fee is revised (IcarusKey and ByronKey witnesses are more costly)
  5. Integration tests illustrating the case are added.

Development

QA

I have demonstrated that decodeTx for shelley/byron witnesses work -> see TransactionSpec tests in shelley
Also showed that byron/icarus txs to shelley work!
It would be good to enable ByronTransactions for shelley integration testing and see byron/icarus -> byron/icarus txs work.
Also, we resigned from mkFeeestimator and use fee estimation endpoint - it would be worth to propagate this change throught code

@paweljakubas paweljakubas added the ADDING FEATURE Mark a PR as adding a new feature, for auto-generated CHANGELOG label Jul 1, 2020
@paweljakubas paweljakubas self-assigned this Jul 1, 2020
@paweljakubas paweljakubas changed the title Introduce diverse witness in shelley Introduce diverse witnesses in shelley Jul 1, 2020
iohk-bors bot added a commit that referenced this issue Jul 10, 2020
1847: Track Stakepool Retirements in the DB r=jonathanknowles a=jonathanknowles

# Related Issues

#1815 
#1816 
#1817 
#1819 
#1880 

# Overview

This PR:

- [x] Extends the pool DB schema to make it possible to store:
    - [x] retirement certificates.
    - [x] the _order_ of publication of certificates _within the same block_, for both registration and retirement certificates. This is necessary, as the intra-block order is _significant_.<br><br>

- [x] Adds the `PoolLifeCycleStatus` type, which indicates the current lifecycle stage of a pool.

    There are currently _three_ possibilities:
    1. `NotRegistered`
        (indicates that a pool has never been registered)
    2. `Registered`
        (indicates that a pool has been registered but _not_ retired)
        (provides a registration certificate)
    3. `RegisteredAndRetired`
        (indicates that a pool has been registered _and_ retired)
        (provides both a registration and a retirement certificate)<br><br>

- [x] Adds the `readPoolLifeCycleStatus` function to the pool DB layer, making it possible to determine the current lifecycle status of a pool. 

- [x] Updates the `retirement` field of `ApiStakePool` with live information.

# Property Tests

This PR adds property tests to ensure that:

- [x] the `determinePoolLifeCycleStatus` function respects the correct order of precedence for registration and retirement certificates:
    - for a given pool, a registration certificate always _supercedes_ a prior retirement certificate.
    - for a given pool, a retirement certificate always _augments_ the latest registration certificate.
- [x] `readPoolLifeCycleStatus` queries work correctly in the presence of blocks containing multiple certificates for the same pool.
- [x] database rollback works correctly in the presence of retirement certificates.

# Future Work

A **_future_** PR will add integration tests to ensure that:

- retiring a pool eventually results in a correct update to the `retirement` field of `ApiStakePool`, when read through the `ListStakePools` operation.
- retiring and then re-registering a pool clears the `retirement` field. 

See QA section of #1819.

1849: Diverse witnesses in shelley r=paweljakubas a=paweljakubas

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->
#1844 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I have added WitnessTag
- [x] I have added impl of mkTx for Byron/Icarus wtinesses
- [x] I have added unit tests verifying decodeTx for Byron/Icarus witnesses
- [x] I have updated fee estimation
- [x] I have added integration tests illustrating the case 


# Comments

<!-- Additional comments or screenshots to attach if any -->

 
<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


1887: Rename our SlotNo to SlotInEpoch r=Anviking a=Anviking


# Issue Number

#1868
<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] Renamed `SlotNo` to `SlotInEpoch` (for consistency with other components)


# Comments

- `W.SlotNo` == `Cardano.SlotInEpoch` /= `Cardano.SlotNo`

```
Epoch       0   1   2   3   4
SlotNo*     0 1 2 3 4 5 6 7 8 9
SlotInEpoch 0 1 0 1 0 1 0 1 0 1
```

*) I.e. the one defined in cardano-base and used in ourobouros-consensus.


<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Jonathan Knowles <[email protected]>
Co-authored-by: Pawel Jakubas <[email protected]>
Co-authored-by: IOHK <[email protected]>
Co-authored-by: KtorZ <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
iohk-bors bot added a commit that referenced this issue Jul 10, 2020
1849: Diverse witnesses in shelley r=paweljakubas a=paweljakubas

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->
#1844 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I have added WitnessTag
- [x] I have added impl of mkTx for Byron/Icarus wtinesses
- [x] I have added unit tests verifying decodeTx for Byron/Icarus witnesses
- [x] I have updated fee estimation
- [x] I have added integration tests illustrating the case 


# Comments

<!-- Additional comments or screenshots to attach if any -->

 
<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


1887: Rename our SlotNo to SlotInEpoch r=Anviking a=Anviking


# Issue Number

#1868
<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] Renamed `SlotNo` to `SlotInEpoch` (for consistency with other components)


# Comments

- `W.SlotNo` == `Cardano.SlotInEpoch` /= `Cardano.SlotNo`

```
Epoch       0   1   2   3   4
SlotNo*     0 1 2 3 4 5 6 7 8 9
SlotInEpoch 0 1 0 1 0 1 0 1 0 1
```

*) I.e. the one defined in cardano-base and used in ourobouros-consensus.


<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Pawel Jakubas <[email protected]>
Co-authored-by: IOHK <[email protected]>
Co-authored-by: KtorZ <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
iohk-bors bot added a commit that referenced this issue Jul 10, 2020
1849: Diverse witnesses in shelley r=paweljakubas a=paweljakubas

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->
#1844 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I have added WitnessTag
- [x] I have added impl of mkTx for Byron/Icarus wtinesses
- [x] I have added unit tests verifying decodeTx for Byron/Icarus witnesses
- [x] I have updated fee estimation
- [x] I have added integration tests illustrating the case 


# Comments

<!-- Additional comments or screenshots to attach if any -->

 
<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Pawel Jakubas <[email protected]>
Co-authored-by: IOHK <[email protected]>
Co-authored-by: KtorZ <[email protected]>
@piotr-iohk
Copy link
Contributor

LGTM, I have enabled additional tests for Byron txs, migrations (and also tests for byron addresses, and hw wallets) in integration tests. Also extracted the newly introduced integration test byron tx -> shelley to separate file not to run it on Jormungandr. (Jorm does not support Byron txs so it failed nightly last night). All in -> #1900.

iohk-bors bot added a commit that referenced this issue Jul 13, 2020
1900: Testing byron txs and migrations in Shelley r=piotr-iohk a=piotr-iohk

# Issue Number

#1844, #1675

# Overview

- 66e5151
  Enable more integration tests for byron transactions, migrations, addresses and HW wallets in shelley
  
- d773d95
  Add some special Byron and Icarus wallets to genesis for testing migration scenarios
  
- 834923e
  Use regular HSpec.it for tests that use explicit/special mnemonics, otherwise in case they fail, on repeat there will be a 409 as such wallet would exist
  
- 18d1c34
  Don't run Byron tx test on Jormungandr

  



# Comments

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Piotr Stachyra <[email protected]>
iohk-bors bot added a commit that referenced this issue Jul 14, 2020
1900: Testing byron txs and migrations in Shelley r=piotr-iohk a=piotr-iohk

# Issue Number

#1844, #1675

# Overview

- 66e5151
  Enable more integration tests for byron transactions, migrations, addresses and HW wallets in shelley
  
- d773d95
  Add some special Byron and Icarus wallets to genesis for testing migration scenarios
  
- 834923e
  Use regular HSpec.it for tests that use explicit/special mnemonics, otherwise in case they fail, on repeat there will be a 409 as such wallet would exist
  
- 18d1c34
  Don't run Byron tx test on Jormungandr

  



# Comments

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Piotr Stachyra <[email protected]>
iohk-bors bot added a commit that referenced this issue Jul 17, 2020
1900: Testing byron txs and migrations in Shelley r=rvl a=piotr-iohk

# Issue Number

#1844, #1675

# Overview

- 66e5151
  Enable more integration tests for byron transactions, migrations, addresses and HW wallets in shelley
  
- d773d95
  Add some special Byron and Icarus wallets to genesis for testing migration scenarios
  
- 834923e
  Use regular HSpec.it for tests that use explicit/special mnemonics, otherwise in case they fail, on repeat there will be a 409 as such wallet would exist
  
- 18d1c34
  Don't run Byron tx test on Jormungandr

  



# Comments

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Piotr Stachyra <[email protected]>
iohk-bors bot added a commit that referenced this issue Jul 18, 2020
1900: Testing byron txs and migrations in Shelley r=piotr-iohk a=piotr-iohk

# Issue Number

#1844, #1675

# Overview

- 66e5151
  Enable more integration tests for byron transactions, migrations, addresses and HW wallets in shelley
  
- d773d95
  Add some special Byron and Icarus wallets to genesis for testing migration scenarios
  
- 834923e
  Use regular HSpec.it for tests that use explicit/special mnemonics, otherwise in case they fail, on repeat there will be a 409 as such wallet would exist
  
- 18d1c34
  Don't run Byron tx test on Jormungandr

  



# Comments

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Piotr Stachyra <[email protected]>
iohk-bors bot added a commit that referenced this issue Jul 20, 2020
1900: Testing byron txs and migrations in Shelley r=piotr-iohk a=piotr-iohk

# Issue Number

#1844, #1675

# Overview

- 66e5151
  Enable more integration tests for byron transactions, migrations, addresses and HW wallets in shelley
  
- d773d95
  Add some special Byron and Icarus wallets to genesis for testing migration scenarios
  
- 834923e
  Use regular HSpec.it for tests that use explicit/special mnemonics, otherwise in case they fail, on repeat there will be a 409 as such wallet would exist
  
- 18d1c34
  Don't run Byron tx test on Jormungandr

  



# Comments

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Piotr Stachyra <[email protected]>
@piotr-iohk
Copy link
Contributor

Closing. This is basically working OK. Still #1900 with additional tests to be merged.

iohk-bors bot added a commit that referenced this issue Jul 21, 2020
1900: Testing byron txs and migrations in Shelley r=piotr-iohk a=piotr-iohk

# Issue Number

#1844, #1675

# Overview

- 66e5151
  Enable more integration tests for byron transactions, migrations, addresses and HW wallets in shelley
  
- d773d95
  Add some special Byron and Icarus wallets to genesis for testing migration scenarios
  
- 834923e
  Use regular HSpec.it for tests that use explicit/special mnemonics, otherwise in case they fail, on repeat there will be a 409 as such wallet would exist
  
- 18d1c34
  Don't run Byron tx test on Jormungandr

  



# Comments

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Piotr Stachyra <[email protected]>
iohk-bors bot added a commit that referenced this issue Jul 22, 2020
1900: Testing byron txs and migrations in Shelley r=piotr-iohk a=piotr-iohk

# Issue Number

#1844, #1675

# Overview

- 66e5151
  Enable more integration tests for byron transactions, migrations, addresses and HW wallets in shelley
  
- d773d95
  Add some special Byron and Icarus wallets to genesis for testing migration scenarios
  
- 834923e
  Use regular HSpec.it for tests that use explicit/special mnemonics, otherwise in case they fail, on repeat there will be a 409 as such wallet would exist
  
- 18d1c34
  Don't run Byron tx test on Jormungandr

  



# Comments

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Piotr Stachyra <[email protected]>
iohk-bors bot added a commit that referenced this issue Jul 23, 2020
1900: Testing byron txs and migrations in Shelley r=piotr-iohk a=piotr-iohk

# Issue Number

#1844, #1675

# Overview

- 66e5151
  Enable more integration tests for byron transactions, migrations, addresses and HW wallets in shelley
  
- d773d95
  Add some special Byron and Icarus wallets to genesis for testing migration scenarios
  
- 834923e
  Use regular HSpec.it for tests that use explicit/special mnemonics, otherwise in case they fail, on repeat there will be a 409 as such wallet would exist
  
- 18d1c34
  Don't run Byron tx test on Jormungandr

  



# Comments

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Piotr Stachyra <[email protected]>
iohk-bors bot added a commit that referenced this issue Jul 24, 2020
1900: Testing byron txs and migrations in Shelley r=piotr-iohk a=piotr-iohk

# Issue Number

#1844, #1675

# Overview

- 66e5151
  Enable more integration tests for byron transactions, migrations, addresses and HW wallets in shelley
  
- d773d95
  Add some special Byron and Icarus wallets to genesis for testing migration scenarios
  
- 834923e
  Use regular HSpec.it for tests that use explicit/special mnemonics, otherwise in case they fail, on repeat there will be a 409 as such wallet would exist
  
- 18d1c34
  Don't run Byron tx test on Jormungandr

  



# Comments

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Piotr Stachyra <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADDING FEATURE Mark a PR as adding a new feature, for auto-generated CHANGELOG
Projects
None yet
Development

No branches or pull requests

2 participants