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

API: get and list only assets associated with the wallet #2492

Merged
merged 2 commits into from
Feb 8, 2021

Conversation

rvl
Copy link
Contributor

@rvl rvl commented Feb 4, 2021

Issue Number

ADP-603 / ADP-604

Overview

  • The list assets endpoint now returns all assets of the wallet, not just available assets.
  • The get asset endpoint checks that the asset id really is associated with the wallet.

@rvl rvl requested a review from piotr-iohk February 4, 2021 14:50
@rvl rvl self-assigned this Feb 4, 2021
Copy link
Contributor

@piotr-iohk piotr-iohk left a comment

Choose a reason for hiding this comment

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

LGTM.

I wonder if we should also return 404 on list assets when there are no assets associated. Currently it returns just [].

Note to self: check this on Byron wallets once #2489 is merged.

@KtorZ
Copy link
Member

KtorZ commented Feb 4, 2021

I wonder if we should also return 404 on list assets when there are no assets associated. Currently it returns just [].

It should return 404 when the wallet id isn't found. If the wallet is found but there are no assets, then [] is sound.

@piotr-iohk
Copy link
Contributor

It should return 404 when the wallet id isn't found. If the wallet is found but there are no assets, then [] is sound.

Yeah, but get assets returns in 404 in such case:

{"code":"asset_not_present","message":"The requested asset is not associated with this wallet."}

So I was thinking it would be nice consistency if list wallet returned something similar... but maybe [] is fine indeed.

@rvl
Copy link
Contributor Author

rvl commented Feb 5, 2021

To me, the 404 response is an error which means that the request path was referring to a resource that doesn't exist.
So, when trying to look up an AssetId which is not present, 404 is the correct response.
But when looking at the /wallets/<wid>/assets collection, that resource exists, even if it could be empty. Same goes with the transactions list.

@rvl rvl force-pushed the rvl/adp-604/list-assets-associated branch from 05a337c to 2fe1ce5 Compare February 5, 2021 05:10
@rvl
Copy link
Contributor Author

rvl commented Feb 5, 2021

Thanks for the review and noticing the issue.

bors r+

iohk-bors bot added a commit that referenced this pull request Feb 5, 2021
2491: Make estimateFee faster for large wallets r=rvl a=Anviking

# Issue Number

ADP-692

# Overview

- [ ] <s>Unify `selectAssets` and `selectAssetsNoOutputs`</s>
    - Idea was to allow `estimateFee` to call both `readUTxOIndex` and `selectAssets` — simplifying the call-sites — but I didn't end up doing this now. This seems right to me still, unless I have missed something?
- [x] Separate out a `readUTxOIndex` from `selectAssets`
- [x] Make sure `readUTxOIndex` is called only once, when repeating the coin selection 100x to estimate fees.


# Comments

- Viewing diff commit-per-commit may be helpful

Instead of 260s, we get 5s estimateFee time:
```
[bench-restore:Info:7] [2021-02-04 14:17:40.76 UTC] Restoring: [still restoring (4.01%)]
restoration: 736.4 s

Running read wallet
read wallet: 4.359 s

Running utxo statistics
utxo statistics: 28.54 ms

Running list addresses
list addresses: 1.010 s

Running list transactions
list transactions: 25.22 s

Running estimate tx fee
estimate tx fee: 5.091 s

[wallet:Error:60] [2021-02-04 14:18:18.44 UTC] Unexpected error following the chain: StatementAlreadyFinalized "BEGIN"
[wallet:Notice:60] [2021-02-04 14:18:18.44 UTC] Destroying cursor connection at ThreadId 61
restore: StatementAlreadyFinalized "BEGIN"


All results:
BenchSeqResults:
  benchName: 90.0-percent-seq
  restoreTime: 736.4 s
  readWalletTime: 4.359 s
  listAddressesTime: 1.010 s
  listTransactionsTime: 25.22 s
  estimateFeesTime: 5.091 s
  walletOverview:
     number of addresses: 54498
     number of transactions: 34810
     = Total value of 25008452939161007 lovelace across 28241 UTxOs
      ... 10                18
      ... 100               142
      ... 1000              133
      ... 10000             153
      ... 100000            280
      ... 1000000           1674
      ... 10000000          1302
      ... 100000000         1369
      ... 1000000000        1768
      ... 10000000000       3139
      ... 100000000000      4682
      ... 1000000000000     9737
      ... 10000000000000    3634
      ... 100000000000000   202
      ... 1000000000000000  6
      ... 10000000000000000 2
      ... 45000000000000000 0

1,186,372,795,296 bytes allocated in the heap
 187,306,453,352 bytes copied during GC
     739,022,840 bytes maximum residency (626 sample(s))
      37,791,752 bytes maximum slop
             704 MB total memory in use (0 MB lost due to fragmentation)

                                     Tot time (elapsed)  Avg pause  Max pause
  Gen  0     1082118 colls, 1082118 par   541.175s  136.483s     0.0001s    0.0040s
  Gen  1       626 colls,   625 par   58.612s  14.913s     0.0238s    0.0730s

  Parallel GC work balance: 10.33% (serial 0%, perfect 100%)

  TASKS: 17 (1 bound, 16 peak workers (16 total), using -N4)

  SPARKS: 0(0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)

  INIT    time    0.002s  (  0.004s elapsed)
  MUT     time  582.358s  (638.775s elapsed)
  GC      time  599.788s  (151.396s elapsed)
  RP      time    0.000s  (  0.000s elapsed)
  PROF    time    0.000s  (  0.000s elapsed)
  EXIT    time    0.000s  (  0.001s elapsed)
  Total   time  1182.148s  (790.176s elapsed)

  Alloc rate    2,037,187,147 bytes per MUT second

  Productivity  49.3% of total user, 80.8% of total elapsed

Benchmark restore: FINISH
Completed 2 action(s).


```

<!-- 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)
 ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
 ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages.
-->


2492: API: get and list only assets associated with the wallet r=rvl a=rvl

### Issue Number

ADP-603 / ADP-604

### Overview

- The list assets endpoint now returns all assets of the wallet, not just available assets.
- The get asset endpoint checks that the asset id really is associated with the wallet.



Co-authored-by: Johannes Lund <[email protected]>
Co-authored-by: Rodney Lorrimar <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 5, 2021

Build failed (retrying...):

#2472

   readPoolProduction should give pools with descending slots
        +++ OK, passed 100 tests.
      readPoolProduction should give pools with descending slots after consecutive 1-slot-depth rollbacks
        +++ OK, passed 100 tests.
      readPoolProduction should never give pools with no slots after rollback - arbitrary N-slot-depth rollbacks
        +++ OK, passed 100 tests (100% number of slots <= 10).
      readStakeDistribution . putStakeDistribution == pure
        +++ OK, passed 100 tests (4% Empty distributions).
building of '/nix/store/7aplr1wzf4vxrrh8gpzrf58by0m1rqvd-cardano-wallet-core-test-unit-2021.1.28-check' timed out after 900 seconds of silence

iohk-bors bot added a commit that referenced this pull request Feb 5, 2021
2492: API: get and list only assets associated with the wallet r=rvl a=rvl

### Issue Number

ADP-603 / ADP-604

### Overview

- The list assets endpoint now returns all assets of the wallet, not just available assets.
- The get asset endpoint checks that the asset id really is associated with the wallet.



Co-authored-by: Rodney Lorrimar <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 5, 2021

Build failed:

Failures:

  src/Test/Integration/Framework/DSL.hs:792:11:
  1) API Specifications, SHELLEY_STAKE_POOLS, STAKE_POOLS_LIST_01 - List stake pools, has non-zero saturation & stake
       Quantity {getQuantity = Percentage {getPercentage = 0 % 1}} does not satisfy (> Quantity {getQuantity = Percentage {getPercentage = 0 % 1}})
       While verifying (Status {statusCode = 200, statusMessage = "OK"},Right [ApiStakePool {id = ApiT {getApiT = PoolId {getPoolId = "\ESC=\193\156j\184\158\175\252\133\SOH\243u\187\ETX\193\ESC\248\237]\CAN76\177\216\EOT\DC3\214"}}, metrics = ApiStakePoolMetrics {nonMyopicMemberRewards = Quantity {getQuantity = 168709080421233}, relativeStake = Quantity {getQuantity = Percentage {getPercentage = 0 % 1}}, saturation = 7.4948645589349105e-6, producedBlocks = Quantity {getQuantity = 0}}, metadata = Nothing, cost = Quantity {getQuantity = 0}, margin = Quantity {getQuantity = Percentage {getPercentage = 1 % 10}}, pledge = Quantity {getQuantity = 2000000000000}, retirement = Nothing, flags = []},ApiStakePool {id = ApiT {getApiT = PoolId {getPoolId = "\187\DC1L\179}u\250\ENQ&\ETX(\194\&5\163\218\226\149\163=\v\166t\165\235\RS>V\142"}}, metrics = ApiStakePoolMetrics {nonMyopicMemberRewards = Quantity {getQuantity = 157271123393020}, relativeStake = Quantity {getQuantity = Percentage {getPercentage = 861 % 5000}}, saturation = 0.516631944807709, producedBlocks = Quantity {getQuantity = 249}}, metadata = Nothing, cost = Quantity {getQuantity = 0}, margin = Quantity {getQuantity = Percentage {getPercentage = 1 % 10}}, pledge = Quantity {getQuantity = 1000000000000}, retirement = Just (ApiEpochInfo {epochNumber = ApiT {getApiT = EpochNo {unEpochNo = 100000}}, epochStartTime = 2021-02-16 22:42:12 UTC}), flags = []},ApiStakePool {id = ApiT {getApiT = PoolId {getPoolId = "\180Wh\193\162\218K\209>\188\170\RS\165\DC4\b\237\163\GS\204!v\\\203\212\a\205\169\242"}}, metrics = ApiStakePoolMetrics {nonMyopicMemberRewards = Quantity {getQuantity = 91428776564965}, relativeStake = Quantity {getQuantity = Percentage {getPercentage = 1291 % 2000}}, saturation = 1.9364805615317395, producedBlocks = Quantity {getQuantity = 830}}, metadata = Nothing, cost = Quantity {getQuantity = 0}, margin = Quantity {getQuantity = Percentage {getPercentage = 1 % 10}}, pledge = Quantity {getQuantity = 1000000000000}, retirement = Just (ApiEpochInfo {epochNumber = ApiT {getApiT = EpochNo {unEpochNo = 1000000}}, epochStartTime = 2021-06-01 02:42:12 UTC}), flags = []}])
       Waited longer than 90s to resolve action: "list pools returns non-empty list".

  To rerun use: --match "/API Specifications/SHELLEY_STAKE_POOLS/STAKE_POOLS_LIST_01 - List stake pools/has non-zero saturation & stake/"

Randomized with seed 1329613335

Finished in 863.9029 seconds
721 examples, 1 failure, 40 pending

Is this a new one??

#2498

@rvl rvl force-pushed the rvl/adp-604/list-assets-associated branch from 2fe1ce5 to 7ab1177 Compare February 5, 2021 11:36
@rvl
Copy link
Contributor Author

rvl commented Feb 5, 2021

bors r+

iohk-bors bot added a commit that referenced this pull request Feb 5, 2021
2489: Add missing APIs for multi-asset r=rvl a=rvl

## Issue Number

ADP-698

## Overview

- Adds assets to the responses of the coin selections endpoints.
- Adds assets to the `/byron-wallets` endpoints.

## Comments



2492: API: get and list only assets associated with the wallet r=rvl a=rvl

### Issue Number

ADP-603 / ADP-604

### Overview

- The list assets endpoint now returns all assets of the wallet, not just available assets.
- The get asset endpoint checks that the asset id really is associated with the wallet.



2493: Let tests and cluster run in pre-mary eras again r=rvl a=rvl

### Issue Number

ADP-695

### Overview

Conditionally fund the assets faucet based on era.


Co-authored-by: Rodney Lorrimar <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 5, 2021

Build failed (retrying...):

iohk-bors bot added a commit that referenced this pull request Feb 5, 2021
2492: API: get and list only assets associated with the wallet r=rvl a=rvl

### Issue Number

ADP-603 / ADP-604

### Overview

- The list assets endpoint now returns all assets of the wallet, not just available assets.
- The get asset endpoint checks that the asset id really is associated with the wallet.



2493: Let tests and cluster run in pre-mary eras again r=rvl a=rvl

### Issue Number

ADP-695

### Overview

Conditionally fund the assets faucet based on era.


Co-authored-by: Rodney Lorrimar <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 5, 2021

Build failed (retrying...):

      readPoolProduction should never give pools with no slots after rollback - arbitrary N-slot-depth rollbacks
        +++ OK, passed 100 tests (100% number of slots <= 10).
      readStakeDistribution . putStakeDistribution == pure
        +++ OK, passed 100 tests (6% Empty distributions).
      putPoolRegistration then readPoolRegistration yields expected result
        +++ OK, passed 100 tests.
building of '/nix/store/8q2wbvfdmx56w0gq4cv7k4z3y6p6b79m-cardano-wallet-core-test-unit-2021.1.28-check' timed out after 900 seconds of silence

#2472

iohk-bors bot added a commit that referenced this pull request Feb 5, 2021
2492: API: get and list only assets associated with the wallet r=rvl a=rvl

### Issue Number

ADP-603 / ADP-604

### Overview

- The list assets endpoint now returns all assets of the wallet, not just available assets.
- The get asset endpoint checks that the asset id really is associated with the wallet.



Co-authored-by: Rodney Lorrimar <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 5, 2021

Build failed:

Failures:

  src/Test/Integration/Framework/DSL.hs:792:11:
  1) API Specifications, SHELLEY_TRANSACTIONS, SHELLEY_TX_REDEEM_01 - Can redeem rewards from self
       0 does not satisfy (> 0)
       While verifying (Status {statusCode = 200, statusMessage = "OK"},Right (ApiWallet {id = ApiT {getApiT = WalletId {getWalletId = e262ca635d5bafdeaeaf2c58f84027cf38e9c1e6}}, addressPoolGap = ApiT {getApiT = AddressPoolGap {getAddressPoolGap = 20}}, balance = ApiWalletBalance {available = Quantity {getQuantity = 100000000000}, total = Quantity {getQuantity = 100000000000}, reward = Quantity {getQuantity = 0}}, assets = ApiWalletAssetsBalance {available = ApiT {getApiT = TokenMap (fromList [])}, total = ApiT {getApiT = TokenMap (fromList [])}}, delegation = ApiWalletDelegation {active = ApiWalletDelegationNext {status = NotDelegating, target = Nothing, changesAt = Nothing}, next = []}, name = ApiT {getApiT = WalletName {getWalletName = "MIR Wallet"}}, passphrase = Just (ApiWalletPassphraseInfo {lastUpdatedAt = 2021-02-05 14:56:49.823824 UTC}), state = ApiT {getApiT = Ready}, tip = ApiBlockReference {absoluteSlotNumber = ApiT {getApiT = SlotNo 2950}, slotId = ApiSlotId {epochNumber = ApiT {getApiT = EpochNo {unEpochNo = 59}}, slotNumber = ApiT {getApiT = SlotInEpoch {unSlotInEpoch = 0}}}, time = 2021-02-05 14:58:29 UTC, block = ApiBlockInfo {height = Quantity {getQuantity = 1463}}}}))
       Waited longer than 90s to resolve action: "MIR wallet: wallet is 100% synced ".

  To rerun use: --match "/API Specifications/SHELLEY_TRANSACTIONS/SHELLEY_TX_REDEEM_01 - Can redeem rewards from self/"

  src/Test/Integration/Framework/DSL.hs:792:11:
  2) API Specifications, SHELLEY_TRANSACTIONS, SHELLEY_TX_REDEEM_02 - Can redeem rewards from other
       0 does not satisfy (> 0)
       While verifying (Status {statusCode = 200, statusMessage = "OK"},Right (ApiWallet {id = ApiT {getApiT = WalletId {getWalletId = 6a992466e5ec9d721993925a313e7898bc076e87}}, addressPoolGap = ApiT {getApiT = AddressPoolGap {getAddressPoolGap = 20}}, balance = ApiWalletBalance {available = Quantity {getQuantity = 100000000000}, total = Quantity {getQuantity = 100000000000}, reward = Quantity {getQuantity = 0}}, assets = ApiWalletAssetsBalance {available = ApiT {getApiT = TokenMap (fromList [])}, total = ApiT {getApiT = TokenMap (fromList [])}}, delegation = ApiWalletDelegation {active = ApiWalletDelegationNext {status = NotDelegating, target = Nothing, changesAt = Nothing}, next = []}, name = ApiT {getApiT = WalletName {getWalletName = "MIR Wallet"}}, passphrase = Just (ApiWalletPassphraseInfo {lastUpdatedAt = 2021-02-05 14:56:50.28905 UTC}), state = ApiT {getApiT = Ready}, tip = ApiBlockReference {absoluteSlotNumber = ApiT {getApiT = SlotNo 2950}, slotId = ApiSlotId {epochNumber = ApiT {getApiT = EpochNo {unEpochNo = 59}}, slotNumber = ApiT {getApiT = SlotInEpoch {unSlotInEpoch = 0}}}, time = 2021-02-05 14:58:29 UTC, block = ApiBlockInfo {height = Quantity {getQuantity = 1463}}}}))
       Waited longer than 90s to resolve action: "MIR wallet: wallet is 100% synced ".

  To rerun use: --match "/API Specifications/SHELLEY_TRANSACTIONS/SHELLEY_TX_REDEEM_02 - Can redeem rewards from other/"

  src/Test/Integration/Framework/DSL.hs:792:11:
  3) API Specifications, SHELLEY_TRANSACTIONS, SHELLEY_TX_REDEEM_03 - Can't redeem rewards from other if none left
       0 does not satisfy (> 0)
       While verifying (Status {statusCode = 200, statusMessage = "OK"},Right (ApiWallet {id = ApiT {getApiT = WalletId {getWalletId = 5ce80cf48b0791a7f68af1dc47754df035748448}}, addressPoolGap = ApiT {getApiT = AddressPoolGap {getAddressPoolGap = 20}}, balance = ApiWalletBalance {available = Quantity {getQuantity = 100000000000}, total = Quantity {getQuantity = 100000000000}, reward = Quantity {getQuantity = 0}}, assets = ApiWalletAssetsBalance {available = ApiT {getApiT = TokenMap (fromList [])}, total = ApiT {getApiT = TokenMap (fromList [])}}, delegation = ApiWalletDelegation {active = ApiWalletDelegationNext {status = NotDelegating, target = Nothing, changesAt = Nothing}, next = []}, name = ApiT {getApiT = WalletName {getWalletName = "MIR Wallet"}}, passphrase = Just (ApiWalletPassphraseInfo {lastUpdatedAt = 2021-02-05 14:56:50.290175 UTC}), state = ApiT {getApiT = Ready}, tip = ApiBlockReference {absoluteSlotNumber = ApiT {getApiT = SlotNo 2950}, slotId = ApiSlotId {epochNumber = ApiT {getApiT = EpochNo {unEpochNo = 59}}, slotNumber = ApiT {getApiT = SlotInEpoch {unSlotInEpoch = 0}}}, time = 2021-02-05 14:58:29 UTC, block = ApiBlockInfo {height = Quantity {getQuantity = 1463}}}}))
       Waited longer than 90s to resolve action: "MIR wallet: wallet is 100% synced ".

  To rerun use: --match "/API Specifications/SHELLEY_TRANSACTIONS/SHELLEY_TX_REDEEM_03 - Can't redeem rewards from other if none left/"

  src/Test/Integration/Framework/DSL.hs:792:11:
  4) API Specifications, SHELLEY_TRANSACTIONS, SHELLEY_TX_REDEEM_06a - Can't redeem rewards if utxo = 0 from other
       0 does not satisfy (> 0)
       While verifying (Status {statusCode = 200, statusMessage = "OK"},Right (ApiWallet {id = ApiT {getApiT = WalletId {getWalletId = a5edc895da6853244414591cececcea763ded9f3}}, addressPoolGap = ApiT {getApiT = AddressPoolGap {getAddressPoolGap = 20}}, balance = ApiWalletBalance {available = Quantity {getQuantity = 100000000000}, total = Quantity {getQuantity = 100000000000}, reward = Quantity {getQuantity = 0}}, assets = ApiWalletAssetsBalance {available = ApiT {getApiT = TokenMap (fromList [])}, total = ApiT {getApiT = TokenMap (fromList [])}}, delegation = ApiWalletDelegation {active = ApiWalletDelegationNext {status = NotDelegating, target = Nothing, changesAt = Nothing}, next = []}, name = ApiT {getApiT = WalletName {getWalletName = "MIR Wallet"}}, passphrase = Just (ApiWalletPassphraseInfo {lastUpdatedAt = 2021-02-05 15:00:11.901498 UTC}), state = ApiT {getApiT = Ready}, tip = ApiBlockReference {absoluteSlotNumber = ApiT {getApiT = SlotNo 3951}, slotId = ApiSlotId {epochNumber = ApiT {getApiT = EpochNo {unEpochNo = 79}}, slotNumber = ApiT {getApiT = SlotInEpoch {unSlotInEpoch = 1}}}, time = 2021-02-05 15:01:49.2 UTC, block = ApiBlockInfo {height = Quantity {getQuantity = 1964}}}}))
       Waited longer than 90s to resolve action: "MIR wallet: wallet is 100% synced ".

  To rerun use: --match "/API Specifications/SHELLEY_TRANSACTIONS/SHELLEY_TX_REDEEM_06a - Can't redeem rewards if utxo = 0 from other/"

  src/Test/Integration/Framework/DSL.hs:792:11:
  5) API Specifications, SHELLEY_TRANSACTIONS, SHELLEY_TX_REDEEM_07a - Can't redeem rewards if cannot cover fee
       0 does not satisfy (> 0)
       While verifying (Status {statusCode = 200, statusMessage = "OK"},Right (ApiWallet {id = ApiT {getApiT = WalletId {getWalletId = 66d96c026bab93dc351e62e3912c9453c90457b4}}, addressPoolGap = ApiT {getApiT = AddressPoolGap {getAddressPoolGap = 20}}, balance = ApiWalletBalance {available = Quantity {getQuantity = 100000000000}, total = Quantity {getQuantity = 100000000000}, reward = Quantity {getQuantity = 0}}, assets = ApiWalletAssetsBalance {available = ApiT {getApiT = TokenMap (fromList [])}, total = ApiT {getApiT = TokenMap (fromList [])}}, delegation = ApiWalletDelegation {active = ApiWalletDelegationNext {status = NotDelegating, target = Nothing, changesAt = Nothing}, next = []}, name = ApiT {getApiT = WalletName {getWalletName = "MIR Wallet"}}, passphrase = Just (ApiWalletPassphraseInfo {lastUpdatedAt = 2021-02-05 15:00:12.002501 UTC}), state = ApiT {getApiT = Ready}, tip = ApiBlockReference {absoluteSlotNumber = ApiT {getApiT = SlotNo 3951}, slotId = ApiSlotId {epochNumber = ApiT {getApiT = EpochNo {unEpochNo = 79}}, slotNumber = ApiT {getApiT = SlotInEpoch {unSlotInEpoch = 1}}}, time = 2021-02-05 15:01:49.2 UTC, block = ApiBlockInfo {height = Quantity {getQuantity = 1964}}}}))
       Waited longer than 90s to resolve action: "MIR wallet: wallet is 100% synced ".

  To rerun use: --match "/API Specifications/SHELLEY_TRANSACTIONS/SHELLEY_TX_REDEEM_07a - Can't redeem rewards if cannot cover fee/"

  src/Test/Integration/Framework/DSL.hs:792:11:
  6) API Specifications, SHELLEY_TRANSACTIONS, SHELLEY_TX_REDEEM_07b - Can't redeem rewards if not enough money
       0 does not satisfy (> 0)
       While verifying (Status {statusCode = 200, statusMessage = "OK"},Right (ApiWallet {id = ApiT {getApiT = WalletId {getWalletId = 8c25b30f8de851828bee1c476a7af9f9dcf7eb50}}, addressPoolGap = ApiT {getApiT = AddressPoolGap {getAddressPoolGap = 20}}, balance = ApiWalletBalance {available = Quantity {getQuantity = 100000000000}, total = Quantity {getQuantity = 100000000000}, reward = Quantity {getQuantity = 0}}, assets = ApiWalletAssetsBalance {available = ApiT {getApiT = TokenMap (fromList [])}, total = ApiT {getApiT = TokenMap (fromList [])}}, delegation = ApiWalletDelegation {active = ApiWalletDelegationNext {status = NotDelegating, target = Nothing, changesAt = Nothing}, next = []}, name = ApiT {getApiT = WalletName {getWalletName = "MIR Wallet"}}, passphrase = Just (ApiWalletPassphraseInfo {lastUpdatedAt = 2021-02-05 15:00:26.534248 UTC}), state = ApiT {getApiT = Ready}, tip = ApiBlockReference {absoluteSlotNumber = ApiT {getApiT = SlotNo 3998}, slotId = ApiSlotId {epochNumber = ApiT {getApiT = EpochNo {unEpochNo = 79}}, slotNumber = ApiT {getApiT = SlotInEpoch {unSlotInEpoch = 48}}}, time = 2021-02-05 15:01:58.6 UTC, block = ApiBlockInfo {height = Quantity {getQuantity = 1984}}}}))
       Waited longer than 90s to resolve action: "MIR wallet: wallet is 100% synced ".

  To rerun use: --match "/API Specifications/SHELLEY_TRANSACTIONS/SHELLEY_TX_REDEEM_07b - Can't redeem rewards if not enough money/"

  src/Test/Integration/Scenario/CLI/Shelley/Transactions.hs:626:5:
  7) CLI Specifications, SHELLEY_CLI_TRANSACTIONS, TRANS_LIST_RANGE_02 - Transaction at time t is NOT selected by range [t + 𝛿t, ...)
       uncaught exception: StringException
       Control.Exception.Safe.throwString called with:

       Expected at least one transaction with a time.
       Called from:
         throwString (src/Test/Integration/Framework/DSL.hs:703:14 in cardano-wallet-core-integration-2021.1.28-1dPuJsGrHqTE8CGU2dhdXk:Test.Integration.Framework.DSL)

  To rerun use: --match "/CLI Specifications/SHELLEY_CLI_TRANSACTIONS/TRANS_LIST_RANGE_02 - Transaction at time t is NOT selected by range [t + \120575t, ...)/"

Randomized with seed 1726012115

#2467

@rvl
Copy link
Contributor Author

rvl commented Feb 6, 2021

bors r+

iohk-bors bot added a commit that referenced this pull request Feb 6, 2021
2489: Add missing APIs for multi-asset r=rvl a=rvl

## Issue Number

ADP-698

## Overview

- Adds assets to the responses of the coin selections endpoints.
- Adds assets to the `/byron-wallets` endpoints.

## Comments



2492: API: get and list only assets associated with the wallet r=rvl a=rvl

### Issue Number

ADP-603 / ADP-604

### Overview

- The list assets endpoint now returns all assets of the wallet, not just available assets.
- The get asset endpoint checks that the asset id really is associated with the wallet.



2493: Let tests and cluster run in pre-mary eras again r=rvl a=rvl

### Issue Number

ADP-695

### Overview

Conditionally fund the assets faucet based on era.


Co-authored-by: Rodney Lorrimar <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 6, 2021

Build failed (retrying...):

#duplicate

iohk-bors bot added a commit that referenced this pull request Feb 6, 2021
2492: API: get and list only assets associated with the wallet r=rvl a=rvl

### Issue Number

ADP-603 / ADP-604

### Overview

- The list assets endpoint now returns all assets of the wallet, not just available assets.
- The get asset endpoint checks that the asset id really is associated with the wallet.



2493: Let tests and cluster run in pre-mary eras again r=rvl a=rvl

### Issue Number

ADP-695

### Overview

Conditionally fund the assets faucet based on era.


Co-authored-by: Rodney Lorrimar <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 6, 2021

Build failed (retrying...):

#duplicate (batch)

iohk-bors bot added a commit that referenced this pull request Feb 6, 2021
2492: API: get and list only assets associated with the wallet r=rvl a=rvl

### Issue Number

ADP-603 / ADP-604

### Overview

- The list assets endpoint now returns all assets of the wallet, not just available assets.
- The get asset endpoint checks that the asset id really is associated with the wallet.



Co-authored-by: Rodney Lorrimar <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 6, 2021

Build failed:


Failures:

  src/Test/Integration/Scenario/API/Shelley/StakePools.hs:503:5: 
  1) API Specifications, SHELLEY_STAKE_POOLS, STAKE_POOLS_JOIN_01 - Can rejoin another stakepool
       uncaught exception: IOException of type UserError
       user error (next delegation should contain exactly one element)

  To rerun use: --match "/API Specifications/SHELLEY_STAKE_POOLS/STAKE_POOLS_JOIN_01 - Can rejoin another stakepool/"

Randomized with seed 166763341

#2497

@piotr-iohk
Copy link
Contributor

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 8, 2021

Build succeeded:

@iohk-bors iohk-bors bot merged commit 6048753 into master Feb 8, 2021
@iohk-bors iohk-bors bot deleted the rvl/adp-604/list-assets-associated branch February 8, 2021 12:47
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.

3 participants