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

Update to cardano-node 1.35-rc3 #3340

Merged
merged 8 commits into from
Jun 21, 2022
Merged

Update to cardano-node 1.35-rc3 #3340

merged 8 commits into from
Jun 21, 2022

Conversation

sevanspowell
Copy link
Contributor

@sevanspowell sevanspowell commented Jun 16, 2022

I have:

  • Bumped the following dependencies to the 1.35.0-rc3 tag:
    • cardano-node
    • cardano-base
    • cardano-ledger
    • ouroboros-network
  • Updated cardano-wallet code to build with 1.35.0-rc3 tag:
    • evaluateTransactionExecutionUnits has a new error type, updated
      ErrAssignRedeemers accordingly.
    • SimpleScriptWitness now takes a SimpleScriptOrReferenceInput instead of a
      SimpleScript, updated generators accordingly.

TODO:

  • Consider whether the prop_balanceTransactionUnresolvedInputs test makes sense anymore.
  • Test the API output of ErrAssignRedeemersTranslationError.
  • Update readme compatibility matrix

Issue Number

ADP-1907

@sevanspowell sevanspowell changed the title Node 1.35 rc3 Update to cardano-node 1.35-rc3 Jun 16, 2022
@sevanspowell sevanspowell changed the base branch from master to anviking/ADP-1744/node-1.35 June 16, 2022 08:21
@sevanspowell sevanspowell self-assigned this Jun 17, 2022
- Bump cardano-wallet to 1.35.0-rc3
@sevanspowell sevanspowell marked this pull request as ready for review June 17, 2022 03:44
- cardano-base
- cardano-ledger
- ouroboros-network
- 'evaluateTransactionExecutionUnits' has a new error type, update
  ErrAssignRedeemers accordingly.
- 'SimpleScriptWitness' now takes a 'SimpleScriptOrReferenceInput' instead of a
  'SimpleScript', update generators accordingly.
@sevanspowell sevanspowell marked this pull request as draft June 17, 2022 05:20
-- We differentiate this from @TranslationError@ for partial API
-- backwards compatibility.
apiError err400 PastHorizon $ T.unwords
[ "The transaction's validity interval is past the horizon"
, "of safe slot-to-time conversions."
, "of safe slot-to-time conversions: " <> t <> "."
Copy link
Member

Choose a reason for hiding this comment

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

Ooh, nice! We have gotten some details back again. I think the exact Text comes from https://github.com/input-output-hk/cardano-wallet/blob/8e1b7239c090d3c110e8f24fb58396b5ec30327c/lib/shelley/src/Cardano/Wallet/Shelley/Transaction.hs#L1180 and is pretty long, so could we make this some "\n\n Here are the full details:" <> t at the end?

Copy link
Contributor Author

@sevanspowell sevanspowell Jun 20, 2022

Choose a reason for hiding this comment

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

Thank you. I was trying to write a test that would return this error (I was also worried about the readability), as chasing the definition of the error down proved more difficult than expected. But triggering the error also proved difficult. I will move it to the end 👍

Comment on lines -5047 to -5057
-- Note that although this error is thrown from
-- '_assignScriptRedeemers', it's more related to balanceTransaction
-- in general than to assigning redeemers. Hence we don't mention
-- redeemers in the message.
apiError err400 UnresolvedInputs $ T.unwords
[ "The transaction I was given contains inputs I don't know"
, "about. Please ensure all foreign inputs are specified as "
, "part of the API request. The unknown inputs are:\n\n"
, pretty ins
]
ErrAssignRedeemersTranslationError TimeTranslationPastHorizon ->
Copy link
Member

@Anviking Anviking Jun 17, 2022

Choose a reason for hiding this comment

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

Probably TranslationLogicMissingInput is the replacement for the removed UnknownTxIns error, so:

Suggestion:

        ErrAssignRedeemersTranslationError (TranslationLogicMissingInput inp) ->
             -- Note that although this error is thrown from
             -- '_assignScriptRedeemers', it's more related to balanceTransaction
             -- in general than to assigning redeemers. Hence we don't mention
             -- redeemers in the message.
             apiError err400 UnresolvedInputs $ T.unwords
                 [ "The transaction I was given contains inputs I don't know"
                 , "about. Please ensure all foreign inputs are specified as "
                 , "part of the API request. The unknown input is:\n\n"
                 , T.pack $ show inp
                 ]

then we should be able to keep the test (and this error code) unchanged. (Maybe it is in fact neater to more transparently only relying on TranslationError, but in-doubt, minimising the API changes for now seems safer to me — let me know if you disagree)

Copy link
Member

@Anviking Anviking Jun 17, 2022

Choose a reason for hiding this comment

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

For some reason the test coverage seems very poor now. Not sure what's changed. I do get the new error, but just very rarely. I think it might be best to mark it pending / remove, and if anything have a simple unit test.

I pushed to a separate branch, feel free to cherry-pick if you see fit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, wanted to ask you about this 👍

Base automatically changed from anviking/ADP-1744/node-1.35 to master June 17, 2022 17:54
Copy link
Member

@Anviking Anviking left a comment

Choose a reason for hiding this comment

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

As long as we preserve the UnresolvedInputs API error for good measure and update the readme I think we should merge!

@Anviking
Copy link
Member

bors try

iohk-bors bot added a commit that referenced this pull request Jun 17, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 17, 2022

try

Build failed:

sevanspowell and others added 4 commits June 20, 2022 12:18
- Move full details of "time translation past horizon" error to the end of the
  error message, in case the full details are long.
- Bump supported version of cardano-node in compatibility matrix to 1.35.0-rc3.
@sevanspowell
Copy link
Contributor Author

sevanspowell commented Jun 20, 2022

I've cherry picked your commits @Anviking so we can go ahead and merge. I had a better look into the coverage issue. I'm not sure why the coverage fell yet, but I can see a lot of coverage is lost to insufficient funds errors - might be worth re-jigging generators to be aware of the Wallet's UTxO to improve coverage.

For now we should probably merge and I'll work on something like that - or a unit test.

@sevanspowell sevanspowell marked this pull request as ready for review June 20, 2022 07:43
@sevanspowell
Copy link
Contributor Author

E.g., after some fixes to conflicting withdrawals, this is the sort of error coverage I get:

         0.2% unknown txins
        
        75.5% select assets selection balance error - insufficient.
         9.6% balance tx zero ada output
         7.5% succeeded despite unresolved input
         3.2% balance tx conflicting networks
         2.1% select assets selection balance error - insufficient min coin
         0.9% balance tx max size limit exceeded
         0.5% balance tx existing collateral
         0.4% nothing dropped

@Anviking
Copy link
Member

bors r+

iohk-bors bot added a commit that referenced this pull request Jun 20, 2022
3340: Update to cardano-node 1.35-rc3 r=Anviking a=sevanspowell

I have:

- Bumped the following dependencies to the `1.35.0-rc3` tag:
  - cardano-node
  - cardano-base
  - cardano-ledger
  - ouroboros-network
- Updated cardano-wallet code to build with `1.35.0-rc3` tag:
  - `evaluateTransactionExecutionUnits` has a new error type, updated
  `ErrAssignRedeemers` accordingly.
  - `SimpleScriptWitness` now takes a `SimpleScriptOrReferenceInput` instead of a
  `SimpleScript`, updated generators accordingly.
 
TODO:
- [x] Consider whether the `prop_balanceTransactionUnresolvedInputs` test makes sense anymore.
- [ ] Test the API output of `ErrAssignRedeemersTranslationError`.
- [x] Update readme compatibility matrix

### Issue Number

ADP-1907

Co-authored-by: Samuel Evans-Powell <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 20, 2022

Build failed:

@Anviking
Copy link
Member

bors r+

iohk-bors bot added a commit that referenced this pull request Jun 20, 2022
3340: Update to cardano-node 1.35-rc3 r=Anviking a=sevanspowell

I have:

- Bumped the following dependencies to the `1.35.0-rc3` tag:
  - cardano-node
  - cardano-base
  - cardano-ledger
  - ouroboros-network
- Updated cardano-wallet code to build with `1.35.0-rc3` tag:
  - `evaluateTransactionExecutionUnits` has a new error type, updated
  `ErrAssignRedeemers` accordingly.
  - `SimpleScriptWitness` now takes a `SimpleScriptOrReferenceInput` instead of a
  `SimpleScript`, updated generators accordingly.
 
TODO:
- [x] Consider whether the `prop_balanceTransactionUnresolvedInputs` test makes sense anymore.
- [ ] Test the API output of `ErrAssignRedeemersTranslationError`.
- [x] Update readme compatibility matrix

### Issue Number

ADP-1907

3341: Light mode: reduce concurrency when retrieving data. r=Unisay a=Unisay

- [x] Replace concurrent traversals with sequential ones in order to minimize likelihood of hitting `Too Many Requests` error.
- [x] Fix bug with fetching Tx hashes for the same block multiple times.

### Comments

Unfortunately the "Too Many Requests" error shows up anyway:
[wallet.log](https://github.com/input-output-hk/cardano-wallet/files/8918830/wallet.log)

### Issue Number

ADP-1651


Co-authored-by: Samuel Evans-Powell <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
Co-authored-by: Yuriy Lazaryev <[email protected]>
Co-authored-by: Yura Lazarev <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 20, 2022

Build failed (retrying...):

iohk-bors bot added a commit that referenced this pull request Jun 20, 2022
3340: Update to cardano-node 1.35-rc3 r=Anviking a=sevanspowell

I have:

- Bumped the following dependencies to the `1.35.0-rc3` tag:
  - cardano-node
  - cardano-base
  - cardano-ledger
  - ouroboros-network
- Updated cardano-wallet code to build with `1.35.0-rc3` tag:
  - `evaluateTransactionExecutionUnits` has a new error type, updated
  `ErrAssignRedeemers` accordingly.
  - `SimpleScriptWitness` now takes a `SimpleScriptOrReferenceInput` instead of a
  `SimpleScript`, updated generators accordingly.
 
TODO:
- [x] Consider whether the `prop_balanceTransactionUnresolvedInputs` test makes sense anymore.
- [ ] Test the API output of `ErrAssignRedeemersTranslationError`.
- [x] Update readme compatibility matrix

### Issue Number

ADP-1907

Co-authored-by: Samuel Evans-Powell <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 20, 2022

Build failed:

@Anviking
Copy link
Member

bors r+

iohk-bors bot added a commit that referenced this pull request Jun 20, 2022
3340: Update to cardano-node 1.35-rc3 r=Anviking a=sevanspowell

I have:

- Bumped the following dependencies to the `1.35.0-rc3` tag:
  - cardano-node
  - cardano-base
  - cardano-ledger
  - ouroboros-network
- Updated cardano-wallet code to build with `1.35.0-rc3` tag:
  - `evaluateTransactionExecutionUnits` has a new error type, updated
  `ErrAssignRedeemers` accordingly.
  - `SimpleScriptWitness` now takes a `SimpleScriptOrReferenceInput` instead of a
  `SimpleScript`, updated generators accordingly.
 
TODO:
- [x] Consider whether the `prop_balanceTransactionUnresolvedInputs` test makes sense anymore.
- [ ] Test the API output of `ErrAssignRedeemersTranslationError`.
- [x] Update readme compatibility matrix

### Issue Number

ADP-1907

Co-authored-by: Samuel Evans-Powell <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 20, 2022

Build failed:

packet-ipxe-3-ci3-1

/nix/store/ymqvszd7hp2pz5ic46j725nj6nssyc86-cabal-install-exe-cabal-3.4.0.0/bin/cabal --project-file=/var/lib/buildkite-agent-iohk/builds/packet-ipxe-3-ci3-1/input-output-hk/cardano-wallet/.nix-shell-cabal.project update
--
  | Downloading the latest package list from hackage.haskell.org
  | cabal: Could not read index. Did you call 'checkForUpdates'?

and

packet-ipxe-1-ci1-3

hspec-discover: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory

@Anviking
Copy link
Member

bors r+

iohk-bors bot added a commit that referenced this pull request Jun 20, 2022
3340: Update to cardano-node 1.35-rc3 r=Anviking a=sevanspowell

I have:

- Bumped the following dependencies to the `1.35.0-rc3` tag:
  - cardano-node
  - cardano-base
  - cardano-ledger
  - ouroboros-network
- Updated cardano-wallet code to build with `1.35.0-rc3` tag:
  - `evaluateTransactionExecutionUnits` has a new error type, updated
  `ErrAssignRedeemers` accordingly.
  - `SimpleScriptWitness` now takes a `SimpleScriptOrReferenceInput` instead of a
  `SimpleScript`, updated generators accordingly.
 
TODO:
- [x] Consider whether the `prop_balanceTransactionUnresolvedInputs` test makes sense anymore.
- [ ] Test the API output of `ErrAssignRedeemersTranslationError`.
- [x] Update readme compatibility matrix

### Issue Number

ADP-1907

Co-authored-by: Samuel Evans-Powell <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 20, 2022

Build failed:

@Anviking
Copy link
Member

bors r+

iohk-bors bot added a commit that referenced this pull request Jun 20, 2022
3340: Update to cardano-node 1.35-rc3 r=Anviking a=sevanspowell

I have:

- Bumped the following dependencies to the `1.35.0-rc3` tag:
  - cardano-node
  - cardano-base
  - cardano-ledger
  - ouroboros-network
- Updated cardano-wallet code to build with `1.35.0-rc3` tag:
  - `evaluateTransactionExecutionUnits` has a new error type, updated
  `ErrAssignRedeemers` accordingly.
  - `SimpleScriptWitness` now takes a `SimpleScriptOrReferenceInput` instead of a
  `SimpleScript`, updated generators accordingly.
 
TODO:
- [x] Consider whether the `prop_balanceTransactionUnresolvedInputs` test makes sense anymore.
- [ ] Test the API output of `ErrAssignRedeemersTranslationError`.
- [x] Update readme compatibility matrix

### Issue Number

ADP-1907

3341: Light mode: reduce concurrency when retrieving data. r=Unisay a=Unisay

- [x] Replace concurrent traversals with sequential ones in order to minimize likelihood of hitting `Too Many Requests` error.
- [x] Fix bug with fetching Tx hashes for the same block multiple times.

### Comments

Unfortunately the "Too Many Requests" error shows up anyway:
[wallet.log](https://github.com/input-output-hk/cardano-wallet/files/8918830/wallet.log)

### Issue Number

ADP-1651


3344: Move `adjustNoSuchWallet` and `ErrNoSuchWallet` r=HeinrichApfelmus a=HeinrichApfelmus

### Issue number

ADP-1043

### Overview

This pull request is a pure refactoring.

We move `adjustNoSuchWallet` and `ErrNoSuchWallet` to the `Cardano.Wallet.DB.WalletState` module.


Co-authored-by: Samuel Evans-Powell <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
Co-authored-by: Yuriy Lazaryev <[email protected]>
Co-authored-by: Yura Lazarev <[email protected]>
Co-authored-by: Heinrich Apfelmus <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 20, 2022

Build failed (retrying...):

iohk-bors bot added a commit that referenced this pull request Jun 20, 2022
3340: Update to cardano-node 1.35-rc3 r=Anviking a=sevanspowell

I have:

- Bumped the following dependencies to the `1.35.0-rc3` tag:
  - cardano-node
  - cardano-base
  - cardano-ledger
  - ouroboros-network
- Updated cardano-wallet code to build with `1.35.0-rc3` tag:
  - `evaluateTransactionExecutionUnits` has a new error type, updated
  `ErrAssignRedeemers` accordingly.
  - `SimpleScriptWitness` now takes a `SimpleScriptOrReferenceInput` instead of a
  `SimpleScript`, updated generators accordingly.
 
TODO:
- [x] Consider whether the `prop_balanceTransactionUnresolvedInputs` test makes sense anymore.
- [ ] Test the API output of `ErrAssignRedeemersTranslationError`.
- [x] Update readme compatibility matrix

### Issue Number

ADP-1907

Co-authored-by: Samuel Evans-Powell <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 20, 2022

Build failed:

@sevanspowell
Copy link
Contributor Author

bors r+

iohk-bors bot added a commit that referenced this pull request Jun 21, 2022
3340: Update to cardano-node 1.35-rc3 r=sevanspowell a=sevanspowell

I have:

- Bumped the following dependencies to the `1.35.0-rc3` tag:
  - cardano-node
  - cardano-base
  - cardano-ledger
  - ouroboros-network
- Updated cardano-wallet code to build with `1.35.0-rc3` tag:
  - `evaluateTransactionExecutionUnits` has a new error type, updated
  `ErrAssignRedeemers` accordingly.
  - `SimpleScriptWitness` now takes a `SimpleScriptOrReferenceInput` instead of a
  `SimpleScript`, updated generators accordingly.
 
TODO:
- [x] Consider whether the `prop_balanceTransactionUnresolvedInputs` test makes sense anymore.
- [ ] Test the API output of `ErrAssignRedeemersTranslationError`.
- [x] Update readme compatibility matrix

### Issue Number

ADP-1907

Co-authored-by: Samuel Evans-Powell <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 21, 2022

Build failed:

@sevanspowell
Copy link
Contributor Author

Unfortunately I can't reproduce the timeout bors is seeing locally, so think this is a bors r+ until it works scenario. Load on Hydra seems quite high atm, likely exacerbating the problem.

@sevanspowell
Copy link
Contributor Author

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 21, 2022

Build succeeded:

@iohk-bors iohk-bors bot merged commit c3f5038 into master Jun 21, 2022
@iohk-bors iohk-bors bot deleted the node-1.35-rc3 branch June 21, 2022 04:00
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.

2 participants