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

Use QueryTip for local state queries #1053

Merged
merged 4 commits into from Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,11 @@ changes.

## [0.13.0] - UNRELEASED

- Query at the tip for local cardano-node queries. We witnessed these queries
failing in case of a rollback and always querying at the tip seems to fix
this.


- **BREAKING** Changes to `hydra-plutus` scripts.

- Add option to draft a commit tx using inline datums.
Expand Down
6 changes: 3 additions & 3 deletions hydra-node/src/Hydra/Chain/Direct.hs
Expand Up @@ -163,9 +163,9 @@ mkTinyWallet tracer config = do
point <- case queryPoint of
QueryAt point -> pure point
QueryTip -> queryTip networkId nodeSocket
walletUTxO <- Ledger.unUTxO . toLedgerUTxO <$> queryUTxO networkId nodeSocket (QueryAt point) [address]
BundleAsShelleyBasedProtocolParameters _ pparams <- queryProtocolParameters networkId nodeSocket (QueryAt point)
systemStart <- querySystemStart networkId nodeSocket (QueryAt point)
walletUTxO <- Ledger.unUTxO . toLedgerUTxO <$> queryUTxO networkId nodeSocket QueryTip [address]
BundleAsShelleyBasedProtocolParameters _ pparams <- queryProtocolParameters networkId nodeSocket QueryTip
systemStart <- querySystemStart networkId nodeSocket QueryTip
epochInfo <- queryEpochInfo
pure $ WalletInfoOnChain{walletUTxO, pparams, systemStart, epochInfo, tip = point}

Expand Down