Home / Reports / Jan 17, 2023
Tuesday, January 17, 2023
102 commits had been pushed across 21 repos by 33 authors. There were 2,170,843 additions and 18,657 deletions. Official weekly status updates can be found on essentialcardano.io.
Authors
Repos Updated
- cardano-node17
- cardano-db-sync14
- CIPs13
- uptime11
- cardano-wallet9
- cardano-node-tests5
- cardano-world4
- plutus-ops4
- developer-portal3
- cardano-updates3
- PSG3
- blockfrost-backend-ryo2
- dapps-world2
- Developer-Experience-working-group2
- metadata-registry-testnet2
- ouroboros-network2
- plutus2
- haskell.nix1
- marlowe1
- ops-lib1
- sidechains-tooling1
Commit Log
00:32:02
[901b8f0c]
Merge pull request #281 from Digital-Syndicate/master
(metadata-registry-testnet)
05:54:51
[22759027]
plutusStaging: Bump plutus to 96ced2949ec9bfe59dccc2d344e5c1ab72f4d2c5
(plutus-ops)
07:06:16
[cde14c55]
Merge pull request #35 from Benjmhart/minutes-2022-11-01
(Developer-Experience-working-group)
07:26:19
[fb0f6192]
Merge pull request #39 from Benjmhart/minutes-2022-11-15
(Developer-Experience-working-group)
09:34:04
[b6404fb5]
Merge pull request #4800 from input-output-hk/newhoggy/skip-ci-on-doc-only-changes
(cardano-node)
10:03:39
[08e5155b]
Revert "Merge pull request #4800 from input-output-hk/newhoggy/skip-ci-on-doc-only-changes"
(cardano-node)
10:04:01
[425ca854]
Revert "Merge pull request #4792 from input-output-hk/newhoggy/docs-dont-trigger-ci"
(cardano-node)
10:06:49
[460e167d]
Merge pull request #4802 from input-output-hk/newhoggy/revert-skip-doc-in-ci
(cardano-node)
11:50:33
[03a80e07]
plutusStaging: Bump plutus to 0d35e44c615b57c8cce48d4e2d38f33e03e6f7cf
(plutus-ops)
12:01:45
[af9476ab]
docs: Merge #3693 3693: Machine-readable shared wallet API errors. r=jonathanknowles a=jonathanknowles ## Issue Number
Follow-on from review of https://github.com/input-output-hk/cardano-wallet/pull/3676.
## Summary
This PR removes an **interpolated string equality check** from our API integration test suite, and replaces it an equality check that uses **`decodeErrorInfo`** in conjunction with an **API error record**:
```patch
lib/wallet/integration/src/Test/Integration/Scenario/API/Shared/Wallets.hs
- expectErrorMessage (errMsg403NoSuchCosigner (toText Payment) 7) rPatch5
+ decodeErrorInfo rPatch5 `shouldBe` SharedWalletNoSuchCosigner
+ ApiErrorSharedWalletNoSuchCosigner
+ { cosignerIndex = ApiCosignerIndex 7
+ , credentialType = ApiCredentialType Payment
+ }
```
```patch
lib/wallet/integration/src/Test/Integration/Framework/TestData.hs
- errMsg403NoSuchCosigner :: Text -> Int -> String
- errMsg403NoSuchCosigner cred cosigner = unwords
- [ "It looks like you've tried to add a cosigner key to a"
- , "shared wallet's"
- , unpack cred
- , "template for a non-existing cosigner index:"
- , show cosigner
- ]
```
The above definition of `errMsg403NoCosigner` (now removed) was essentially a **duplicate** of an identical interpolated string in `Http.Server.Error`:
https://github.com/input-output-hk/cardano-wallet/blob/1263e6ed8c486f31ed75219b59a8e5fc6af577de/lib/wallet/api/http/Cardano/Wallet/Api/Http/Server/Error.hs#L801-L807
## Advantages
1. If we make any breaking changes to the API error type, the compiler will warn us to update the test suite.
2. Someone browsing the integration tests can easily jump to the definition of the error type, or to the definitions of any of the constructors used.
3. We no longer need to manually keep two copies of an interpolated string function in sync with one another.
## Method
To achieve this, we introduce the following structured error type:
```haskell
data ApiErrorSharedWalletNoSuchCosigner = ApiErrorSharedWalletNoSuchCosigner
{ cosignerIndex
:: !ApiCosignerIndex
, credentialType
:: !ApiCredentialType
}
deriving (Data, Eq, Generic, Show, Typeable)
deriving (FromJSON, ToJSON)
via DefaultRecord ApiErrorSharedWalletNoSuchCosigner
deriving anyclass NFData
```
And add it as a parameter to the relevant constructor of ApiErrorInfo:
```patch
lib/wallet/api/http/Cardano/Wallet/Api/Types/Error.hs
data ApiErrorInfo
= ...
| ...
- | SharedWalletNoSuchCosigner
+ | SharedWalletNoSuchCosigner !ApiErrorSharedWalletNoSuchCosigner
| ...
```
When errors of this type are encoded as JSON, this results in objects of the following format:
```json
{ "code": "shared_wallet_no_such_cosigner"
, "info":
{ "cosigner_index": 182
, "credential_type": "delegation"
}
, "message": "It looks like you've..."
}
```
## Future Work
This PR serves as a demonstration of this technique, and only converts one particular error type. We could use this method to remove all duplicate interpolated error messages from our API integration test suite. Co-authored-by: Jonathan Knowles <[email protected]> Source commit: 76fdaf9c6ac441bf1cad12ef70e1b88ed69289ac
(cardano-wallet)
12:31:08
[22caaa0f]
Merge pull request #4785 from input-output-hk/newhoggy/straight-line-error-handling
(cardano-node)
13:25:01
[8dd9b084]
Merge pull request #1589 from input-output-hk/wait_for_rewards
(cardano-node-tests)
14:03:28
[18228d57]
Edit CIP numbers and top-level README from editors meeting #60's outcome (#434)
(CIPs)
15:27:31
[81322aa9]
Merge pull request #1591 from input-output-hk/more_detailed_error
(cardano-node-tests)
15:33:22
[3a2af471]
Add `test_withdrawal_wrong_amount` negative withdrawal test
(cardano-node-tests)
15:52:35
[bceec530]
Merge pull request #1590 from input-output-hk/negative_withdrawal_tests
(cardano-node-tests)
16:02:48
[495348db]
plutusStaging: Bump plutus to 699071488477c5765e44d9fda2ac634f1e759f9a
(plutus-ops)
16:05:04
[4951e23b]
docs: Merge #3611 3611: [ADP-2392] implement store db for new submissions store r=paolino a=paolino
- [x] ~~implement store db for new submissions store primitives~~
- [x] ~~implement store laws properties for new submissions store primitives~~
- [x] implement store db for new submissions store API operations
- [x] implement store laws properties for new submissions store API operations
### Comments
The delta language of the API, called Operation, is implemented as a composition of primitive deltas. Primitive deltas are not required to respect all API-level invariants. In reality, only the roll-forward operation is a proper composition of 2 primitives.
The DB implementation uses the in-memory state change to compute the database difference, which means we are not pattern-matching the delta language as we do in the in-memory implementation. This removes even the instantiation of a store at the primitive level, so we end up with a very small implementation that relies on the correctness of the model that is executed in parallel to the DB one. This missing code could be necessary if we want to switch to an in-disk-only store.
<!-- Additional comments, links, or screenshots to attach, if any. -->
### Issue Number
ADP-2392
<!-- Reference the Jira/GitHub issue that this PR relates to, and which requirements it tackles.
Note: Jira issues of the form ADP- will be auto-linked. -->
Co-authored-by: paolo veronelli <[email protected]> Source commit: e4c6f590bf177d2c0e833166c80b14997881372b
(cardano-wallet)
23:05:18
[15e9b3aa]
🟩 C1 Devnet Sidechain Explorer is up (200 in 375 ms) [skip ci] [upptime]
(uptime)
23:05:20
[03cb923b]
🟩 C1 Mainnet Sidechain Explorer is up (200 in 787 ms) [skip ci] [upptime]
(uptime)
23:35:10
[ce3daec4]
Merge pull request #4279 from input-output-hk/newhoggy/query-stake-snapshot-multiple-pools
(cardano-node)