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

Enable transaction support in integration tests for cardano-http-bridge #258

Merged
merged 10 commits into from May 14, 2019

Conversation

KtorZ
Copy link
Member

@KtorZ KtorZ commented May 13, 2019

Issue Number

#220

Overview

  • I have slightly improved error message in the networking layer when an unexpected error is encountered
  • I have fixed the local cluster installation so that "local" would actually match "testnet" configuration but with a different genesis UTxO upon which we have some control.
  • I have allowed a special transaction in the integration test framework that is made from a rich faucet and can be used to provide many wallets with funds.

Comments

To be done: initialize a hundred wallets with funds by making an initial "setup" transaction to addresses we control (with known mnemonics). Later, these wallets can be restored and used in integration scenarios.

@KtorZ KtorZ requested a review from piotr-iohk May 13, 2019 18:09
@KtorZ KtorZ self-assigned this May 13, 2019
@KtorZ KtorZ force-pushed the KtorZ/220/transactions-in-integration-tests branch from 6509b05 to 124f026 Compare May 13, 2019 18:12

-- | A faucet / genesis UTxO generate from the configuration.yaml.
-- The secret key can be generated using `cardano-keygen`, and then, using
-- `deriveForstHDAddress` from cardano-sl to get the corresponding address key.
Copy link
Contributor

Choose a reason for hiding this comment

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

deriveFirstHDAddress ?

-- | Get the first address for that wallet
let (Right seed) = fromMnemonic @'[15] mnemonics
let (Right pwd) = fromText "cardano-wallet"
let addr0 = firstAddress (seed, pwd)
Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose It would be actually quite useful to implement the listAddress endpoint and use it for this...

Copy link
Member Author

@KtorZ KtorZ May 14, 2019

Choose a reason for hiding this comment

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

Hmmm.. Yes, and no. The wallets above aren't in the API yet. That's the whole point, we simply create a transaction to the corresponding addresses, and, if restored, the wallets will already have some funds :)

Copy link
Member Author

Choose a reason for hiding this comment

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

(would be clearer with the next incoming PR, but generally speaking, I do agree about implementing the listAddress endpoint. I think I'll tackle that as part of the debt).

@piotr-iohk
Copy link
Contributor

Looks good (but does not compile ;) )

@KtorZ KtorZ force-pushed the KtorZ/220/transactions-in-integration-tests branch from 124f026 to 95d08dd Compare May 14, 2019 07:33
@KtorZ
Copy link
Member Author

KtorZ commented May 14, 2019

but does not compile

Yes, just noticed some functionalities moved from a module to another :) .. Fixed.

@KtorZ KtorZ force-pushed the KtorZ/220/transactions-in-integration-tests branch 2 times, most recently from 3ae6341 to e9f85a0 Compare May 14, 2019 10:37
@KtorZ KtorZ force-pushed the KtorZ/220/transactions-in-integration-tests branch from e9f85a0 to 55154e9 Compare May 14, 2019 12:04
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 👍

@KtorZ KtorZ merged commit c1ca651 into master May 14, 2019
@KtorZ KtorZ deleted the KtorZ/220/transactions-in-integration-tests branch May 14, 2019 13:37
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.

None yet

2 participants