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

Creating faucet for jormungandr #424

Merged
merged 12 commits into from
Jun 19, 2019
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .weeder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@
- message:
- name: Module not compiled
- module: Cardano.Launcher.Windows

- package:
- name: cardano-wallet-jormungandr
- section: test:integration
2 changes: 0 additions & 2 deletions cardano-wallet.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ executable cardano-wallet
, text
, text-class
, warp
other-modules:
Paths_cardano_wallet
hs-source-dirs:
exe/wallet
main-is:
Expand Down
6 changes: 2 additions & 4 deletions exe/wallet/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ import Cardano.Wallet.Primitive.Mnemonic
( entropyToMnemonic, genEntropy, mnemonicToText )
import Cardano.Wallet.Primitive.Types
( DecodeAddress, EncodeAddress )
import Cardano.Wallet.Version
( showVersion, version )
import Control.Arrow
( second )
import Control.Concurrent
Expand All @@ -107,16 +109,12 @@ import Data.Text
( Text )
import Data.Text.Class
( FromText (..), ToText (..) )
import Data.Version
( showVersion )
import Fmt
( blockListF, fmt, nameF )
import Network.HTTP.Client
( Manager, defaultManagerSettings, newManager )
import Network.Wai.Handler.Warp
( setBeforeMainLoop )
import Paths_cardano_wallet
( version )
import Servant
( (:<|>) (..), (:>) )
import Servant.Client
Expand Down
2 changes: 1 addition & 1 deletion lib/core/cardano-wallet-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ library
, vector
, wai
, warp

hs-source-dirs:
src
exposed-modules:
Expand All @@ -95,6 +94,7 @@ library
Cardano.Wallet.Primitive.Model
Cardano.Wallet.Primitive.Types
Cardano.Wallet.Transaction
Cardano.Wallet.Version
Data.Quantity
Network.Wai.Middleware.ServantError
Network.Wai.Middleware.Logging
Expand Down
9 changes: 9 additions & 0 deletions lib/core/src/Cardano/Wallet/Version.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Cardano.Wallet.Version
( version
, showVersion
) where

import Data.Version
( showVersion )
import Paths_cardano_wallet_core
( version )
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ module Test.Integration.Scenario.CLI.Mnemonics

import Prelude

import Cardano.Wallet.Version
( showVersion, version )
import Control.Monad
( forM_ )
import Data.List
( length )
import Data.Version
( showVersion )
import Paths_cardano_wallet_http_bridge
( version )
import System.Command
( Exit (..), Stderr (..), Stdout (..) )
import System.Exit
Expand Down
1 change: 0 additions & 1 deletion lib/http-bridge/cardano-wallet-http-bridge.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ test-suite integration
Test.Integration.Scenario.CLI.Wallets
Test.Integration.Scenario.CLI.Port
Test.Integration.Scenario.CLI.Server
Paths_cardano_wallet_http_bridge

benchmark restore
default-language:
Expand Down
34 changes: 33 additions & 1 deletion lib/jormungandr/cardano-wallet-jormungandr.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -112,25 +112,57 @@ test-suite integration
ghc-options:
-Werror
build-depends:
async
aeson
, aeson-qq
, async
, base
, bytestring
, cardano-wallet-cli
, cardano-wallet-core
, cardano-wallet-http-bridge
, cardano-wallet-jormungandr
, cardano-wallet-launcher
, command
, cryptonite
, deepseq
, directory
, exceptions
, generic-lens
, hspec
, hspec-expectations-lifted
, http-api-data
, http-client
, http-types
, persistent-sqlite
, process
, QuickCheck
, retry
, servant
, template-haskell
, temporary
, text
, transformers
, warp
type:
exitcode-stdio-1.0
hs-source-dirs:
test/integration
main-is:
Main.hs
other-modules:
Cardano.Faucet
Cardano.LauncherSpec
Cardano.Wallet.Jormungandr.NetworkSpec
Test.Integration.Faucet
Test.Integration.Framework.DSL
Test.Integration.Framework.Request
Test.Integration.Framework.TestData
Test.Integration.Scenario.API.Addresses
Test.Integration.Scenario.API.Transactions
Test.Integration.Scenario.API.Wallets
Test.Integration.Scenario.CLI.Addresses
Test.Integration.Scenario.CLI.Mnemonics
Test.Integration.Scenario.CLI.Server
Test.Integration.Scenario.CLI.Transactions
Test.Integration.Scenario.CLI.Wallets
Test.Integration.Scenario.CLI.Port
Binary file modified lib/jormungandr/test/data/jormungandr/block-0.bin
Binary file not shown.
Binary file added lib/jormungandr/test/data/jormungandr/block0.bin
Binary file not shown.
205 changes: 204 additions & 1 deletion lib/jormungandr/test/data/jormungandr/genesis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,213 @@ blockchain_configuration:

# The initial deposits present in the blockchain.
#
# It can be UTxO addresses or account (if allow_account_creation is set).
# The last 10 addresses come from 10 different wallets. For the integration
# test's faucets to be of similar shape with the one used with the http-bridge,
# we want each wallet to have 10 UTxO available, hence the repetition for each
# address.
initial_funds:
- address: ta1svejfsmcd8qjy6y6xkghmaf6fu3ffga99a59up04lrjnhpl8afzj7w4yyxw
value: 14
- address: ta1svz5hw3leda47fy3scdku2ut7z3ljftumuha7sw2ttmswtnhcu8n5nm0ynp
value: 100000000000
- address: ta1svz5hw3leda47fy3scdku2ut7z3ljftumuha7sw2ttmswtnhcu8n5nm0ynp
value: 100000000000
- address: ta1svz5hw3leda47fy3scdku2ut7z3ljftumuha7sw2ttmswtnhcu8n5nm0ynp
value: 100000000000
- address: ta1svz5hw3leda47fy3scdku2ut7z3ljftumuha7sw2ttmswtnhcu8n5nm0ynp
value: 100000000000
- address: ta1svz5hw3leda47fy3scdku2ut7z3ljftumuha7sw2ttmswtnhcu8n5nm0ynp
value: 100000000000
- address: ta1svz5hw3leda47fy3scdku2ut7z3ljftumuha7sw2ttmswtnhcu8n5nm0ynp
value: 100000000000
- address: ta1svz5hw3leda47fy3scdku2ut7z3ljftumuha7sw2ttmswtnhcu8n5nm0ynp
value: 100000000000
- address: ta1svz5hw3leda47fy3scdku2ut7z3ljftumuha7sw2ttmswtnhcu8n5nm0ynp
value: 100000000000
- address: ta1svz5hw3leda47fy3scdku2ut7z3ljftumuha7sw2ttmswtnhcu8n5nm0ynp
value: 100000000000
- address: ta1svz5hw3leda47fy3scdku2ut7z3ljftumuha7sw2ttmswtnhcu8n5nm0ynp
value: 100000000000
- address: ta1swfe83rfm8rech3z0ea09epz3q4gut4uy9kd6mu72nsxpu33t0zpg795k3y
value: 100000000000
- address: ta1swfe83rfm8rech3z0ea09epz3q4gut4uy9kd6mu72nsxpu33t0zpg795k3y
value: 100000000000
- address: ta1swfe83rfm8rech3z0ea09epz3q4gut4uy9kd6mu72nsxpu33t0zpg795k3y
value: 100000000000
- address: ta1swfe83rfm8rech3z0ea09epz3q4gut4uy9kd6mu72nsxpu33t0zpg795k3y
value: 100000000000
- address: ta1swfe83rfm8rech3z0ea09epz3q4gut4uy9kd6mu72nsxpu33t0zpg795k3y
value: 100000000000
- address: ta1swfe83rfm8rech3z0ea09epz3q4gut4uy9kd6mu72nsxpu33t0zpg795k3y
value: 100000000000
- address: ta1swfe83rfm8rech3z0ea09epz3q4gut4uy9kd6mu72nsxpu33t0zpg795k3y
value: 100000000000
- address: ta1swfe83rfm8rech3z0ea09epz3q4gut4uy9kd6mu72nsxpu33t0zpg795k3y
value: 100000000000
- address: ta1swfe83rfm8rech3z0ea09epz3q4gut4uy9kd6mu72nsxpu33t0zpg795k3y
value: 100000000000
- address: ta1swfe83rfm8rech3z0ea09epz3q4gut4uy9kd6mu72nsxpu33t0zpg795k3y
value: 100000000000
- address: ta1s08fhk0qve7lde4w090gkp43n2vr6gvahrqzvza0enhaw8kvlmpakd7swne
value: 100000000000
- address: ta1s08fhk0qve7lde4w090gkp43n2vr6gvahrqzvza0enhaw8kvlmpakd7swne
value: 100000000000
- address: ta1s08fhk0qve7lde4w090gkp43n2vr6gvahrqzvza0enhaw8kvlmpakd7swne
value: 100000000000
- address: ta1s08fhk0qve7lde4w090gkp43n2vr6gvahrqzvza0enhaw8kvlmpakd7swne
value: 100000000000
- address: ta1s08fhk0qve7lde4w090gkp43n2vr6gvahrqzvza0enhaw8kvlmpakd7swne
value: 100000000000
- address: ta1s08fhk0qve7lde4w090gkp43n2vr6gvahrqzvza0enhaw8kvlmpakd7swne
value: 100000000000
- address: ta1s08fhk0qve7lde4w090gkp43n2vr6gvahrqzvza0enhaw8kvlmpakd7swne
value: 100000000000
- address: ta1s08fhk0qve7lde4w090gkp43n2vr6gvahrqzvza0enhaw8kvlmpakd7swne
value: 100000000000
- address: ta1s08fhk0qve7lde4w090gkp43n2vr6gvahrqzvza0enhaw8kvlmpakd7swne
value: 100000000000
- address: ta1s08fhk0qve7lde4w090gkp43n2vr6gvahrqzvza0enhaw8kvlmpakd7swne
value: 100000000000
- address: ta1svpqqhsfs8ea75fa0vcfhsfslf045l9873ys8fjahkjmeym4s0dr69g8lec
value: 100000000000
- address: ta1svpqqhsfs8ea75fa0vcfhsfslf045l9873ys8fjahkjmeym4s0dr69g8lec
value: 100000000000
- address: ta1svpqqhsfs8ea75fa0vcfhsfslf045l9873ys8fjahkjmeym4s0dr69g8lec
value: 100000000000
- address: ta1svpqqhsfs8ea75fa0vcfhsfslf045l9873ys8fjahkjmeym4s0dr69g8lec
value: 100000000000
- address: ta1svpqqhsfs8ea75fa0vcfhsfslf045l9873ys8fjahkjmeym4s0dr69g8lec
value: 100000000000
- address: ta1svpqqhsfs8ea75fa0vcfhsfslf045l9873ys8fjahkjmeym4s0dr69g8lec
value: 100000000000
- address: ta1svpqqhsfs8ea75fa0vcfhsfslf045l9873ys8fjahkjmeym4s0dr69g8lec
value: 100000000000
- address: ta1svpqqhsfs8ea75fa0vcfhsfslf045l9873ys8fjahkjmeym4s0dr69g8lec
value: 100000000000
- address: ta1svpqqhsfs8ea75fa0vcfhsfslf045l9873ys8fjahkjmeym4s0dr69g8lec
value: 100000000000
- address: ta1svpqqhsfs8ea75fa0vcfhsfslf045l9873ys8fjahkjmeym4s0dr69g8lec
value: 100000000000
- address: ta1swx2gtq0q24vxqv3qh82ft96dmpy0ey9j0as2kpny55wvgr76x7z2u8kvzf
value: 100000000000
- address: ta1swx2gtq0q24vxqv3qh82ft96dmpy0ey9j0as2kpny55wvgr76x7z2u8kvzf
value: 100000000000
- address: ta1swx2gtq0q24vxqv3qh82ft96dmpy0ey9j0as2kpny55wvgr76x7z2u8kvzf
value: 100000000000
- address: ta1swx2gtq0q24vxqv3qh82ft96dmpy0ey9j0as2kpny55wvgr76x7z2u8kvzf
value: 100000000000
- address: ta1swx2gtq0q24vxqv3qh82ft96dmpy0ey9j0as2kpny55wvgr76x7z2u8kvzf
value: 100000000000
- address: ta1swx2gtq0q24vxqv3qh82ft96dmpy0ey9j0as2kpny55wvgr76x7z2u8kvzf
value: 100000000000
- address: ta1swx2gtq0q24vxqv3qh82ft96dmpy0ey9j0as2kpny55wvgr76x7z2u8kvzf
value: 100000000000
- address: ta1swx2gtq0q24vxqv3qh82ft96dmpy0ey9j0as2kpny55wvgr76x7z2u8kvzf
value: 100000000000
- address: ta1swx2gtq0q24vxqv3qh82ft96dmpy0ey9j0as2kpny55wvgr76x7z2u8kvzf
value: 100000000000
- address: ta1swx2gtq0q24vxqv3qh82ft96dmpy0ey9j0as2kpny55wvgr76x7z2u8kvzf
value: 100000000000
- address: ta1swhanynytvyctm374ee4h2zhcxcc64ad7ep0lvtjjxym7k63u6ctkfjeg2n
value: 100000000000
- address: ta1swhanynytvyctm374ee4h2zhcxcc64ad7ep0lvtjjxym7k63u6ctkfjeg2n
value: 100000000000
- address: ta1swhanynytvyctm374ee4h2zhcxcc64ad7ep0lvtjjxym7k63u6ctkfjeg2n
value: 100000000000
- address: ta1swhanynytvyctm374ee4h2zhcxcc64ad7ep0lvtjjxym7k63u6ctkfjeg2n
value: 100000000000
- address: ta1swhanynytvyctm374ee4h2zhcxcc64ad7ep0lvtjjxym7k63u6ctkfjeg2n
value: 100000000000
- address: ta1swhanynytvyctm374ee4h2zhcxcc64ad7ep0lvtjjxym7k63u6ctkfjeg2n
value: 100000000000
- address: ta1swhanynytvyctm374ee4h2zhcxcc64ad7ep0lvtjjxym7k63u6ctkfjeg2n
value: 100000000000
- address: ta1swhanynytvyctm374ee4h2zhcxcc64ad7ep0lvtjjxym7k63u6ctkfjeg2n
value: 100000000000
- address: ta1swhanynytvyctm374ee4h2zhcxcc64ad7ep0lvtjjxym7k63u6ctkfjeg2n
value: 100000000000
- address: ta1swhanynytvyctm374ee4h2zhcxcc64ad7ep0lvtjjxym7k63u6ctkfjeg2n
value: 100000000000
- address: ta1svw8c4pr69vq0mp73af3r220dvhm27dsv7mdgla8wq9sxqwrvvy6qhpq5c8
value: 100000000000
- address: ta1svw8c4pr69vq0mp73af3r220dvhm27dsv7mdgla8wq9sxqwrvvy6qhpq5c8
value: 100000000000
- address: ta1svw8c4pr69vq0mp73af3r220dvhm27dsv7mdgla8wq9sxqwrvvy6qhpq5c8
value: 100000000000
- address: ta1svw8c4pr69vq0mp73af3r220dvhm27dsv7mdgla8wq9sxqwrvvy6qhpq5c8
value: 100000000000
- address: ta1svw8c4pr69vq0mp73af3r220dvhm27dsv7mdgla8wq9sxqwrvvy6qhpq5c8
value: 100000000000
- address: ta1svw8c4pr69vq0mp73af3r220dvhm27dsv7mdgla8wq9sxqwrvvy6qhpq5c8
value: 100000000000
- address: ta1svw8c4pr69vq0mp73af3r220dvhm27dsv7mdgla8wq9sxqwrvvy6qhpq5c8
value: 100000000000
- address: ta1svw8c4pr69vq0mp73af3r220dvhm27dsv7mdgla8wq9sxqwrvvy6qhpq5c8
value: 100000000000
- address: ta1svw8c4pr69vq0mp73af3r220dvhm27dsv7mdgla8wq9sxqwrvvy6qhpq5c8
value: 100000000000
- address: ta1svw8c4pr69vq0mp73af3r220dvhm27dsv7mdgla8wq9sxqwrvvy6qhpq5c8
value: 100000000000
- address: ta1sv3k85asvx84fnpq4qehnstxgaxazysuvaxl4q6f0cc7e3g6j3tdzp2vjac
value: 100000000000
- address: ta1sv3k85asvx84fnpq4qehnstxgaxazysuvaxl4q6f0cc7e3g6j3tdzp2vjac
value: 100000000000
- address: ta1sv3k85asvx84fnpq4qehnstxgaxazysuvaxl4q6f0cc7e3g6j3tdzp2vjac
value: 100000000000
- address: ta1sv3k85asvx84fnpq4qehnstxgaxazysuvaxl4q6f0cc7e3g6j3tdzp2vjac
value: 100000000000
- address: ta1sv3k85asvx84fnpq4qehnstxgaxazysuvaxl4q6f0cc7e3g6j3tdzp2vjac
value: 100000000000
- address: ta1sv3k85asvx84fnpq4qehnstxgaxazysuvaxl4q6f0cc7e3g6j3tdzp2vjac
value: 100000000000
- address: ta1sv3k85asvx84fnpq4qehnstxgaxazysuvaxl4q6f0cc7e3g6j3tdzp2vjac
value: 100000000000
- address: ta1sv3k85asvx84fnpq4qehnstxgaxazysuvaxl4q6f0cc7e3g6j3tdzp2vjac
value: 100000000000
- address: ta1sv3k85asvx84fnpq4qehnstxgaxazysuvaxl4q6f0cc7e3g6j3tdzp2vjac
value: 100000000000
- address: ta1sv3k85asvx84fnpq4qehnstxgaxazysuvaxl4q6f0cc7e3g6j3tdzp2vjac
value: 100000000000
- address: ta1s07wt2t29f6jum5lhqvddj6rxglrcpexh7xv49jdkrl67yzx0pdzzc3wnmv
value: 100000000000
- address: ta1s07wt2t29f6jum5lhqvddj6rxglrcpexh7xv49jdkrl67yzx0pdzzc3wnmv
value: 100000000000
- address: ta1s07wt2t29f6jum5lhqvddj6rxglrcpexh7xv49jdkrl67yzx0pdzzc3wnmv
value: 100000000000
- address: ta1s07wt2t29f6jum5lhqvddj6rxglrcpexh7xv49jdkrl67yzx0pdzzc3wnmv
value: 100000000000
- address: ta1s07wt2t29f6jum5lhqvddj6rxglrcpexh7xv49jdkrl67yzx0pdzzc3wnmv
value: 100000000000
- address: ta1s07wt2t29f6jum5lhqvddj6rxglrcpexh7xv49jdkrl67yzx0pdzzc3wnmv
value: 100000000000
- address: ta1s07wt2t29f6jum5lhqvddj6rxglrcpexh7xv49jdkrl67yzx0pdzzc3wnmv
value: 100000000000
- address: ta1s07wt2t29f6jum5lhqvddj6rxglrcpexh7xv49jdkrl67yzx0pdzzc3wnmv
value: 100000000000
- address: ta1s07wt2t29f6jum5lhqvddj6rxglrcpexh7xv49jdkrl67yzx0pdzzc3wnmv
value: 100000000000
- address: ta1s07wt2t29f6jum5lhqvddj6rxglrcpexh7xv49jdkrl67yzx0pdzzc3wnmv
value: 100000000000
- address: ta1sv75hznxzw783x5s44llz49x5xx4nsasnjrw6wuj4h505vkhqeq0uq77d56
value: 100000000000
- address: ta1sv75hznxzw783x5s44llz49x5xx4nsasnjrw6wuj4h505vkhqeq0uq77d56
value: 100000000000
- address: ta1sv75hznxzw783x5s44llz49x5xx4nsasnjrw6wuj4h505vkhqeq0uq77d56
value: 100000000000
- address: ta1sv75hznxzw783x5s44llz49x5xx4nsasnjrw6wuj4h505vkhqeq0uq77d56
value: 100000000000
- address: ta1sv75hznxzw783x5s44llz49x5xx4nsasnjrw6wuj4h505vkhqeq0uq77d56
value: 100000000000
- address: ta1sv75hznxzw783x5s44llz49x5xx4nsasnjrw6wuj4h505vkhqeq0uq77d56
value: 100000000000
- address: ta1sv75hznxzw783x5s44llz49x5xx4nsasnjrw6wuj4h505vkhqeq0uq77d56
value: 100000000000
- address: ta1sv75hznxzw783x5s44llz49x5xx4nsasnjrw6wuj4h505vkhqeq0uq77d56
value: 100000000000
- address: ta1sv75hznxzw783x5s44llz49x5xx4nsasnjrw6wuj4h505vkhqeq0uq77d56
value: 100000000000
- address: ta1sv75hznxzw783x5s44llz49x5xx4nsasnjrw6wuj4h505vkhqeq0uq77d56
value: 100000000000
Copy link
Member

Choose a reason for hiding this comment

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

I suppose these addresses comes from 10 different wallets (would be nice to put as a comment).
Note that, for the integration tests faucets to be of similar shape with the one used with the bridge, we need each wallet to have 10 UTxO available (this allows for testing things like multi-output transactions and coin selection more easily). There's no issue in re-using the same address for that, so each line here should be duplicated 10x times (modulo the amount which also could deserve a comment for readability :))

Copy link
Contributor Author

@paweljakubas paweljakubas Jun 18, 2019

Choose a reason for hiding this comment

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

I changed the values 10x to accommodate up to 10 UTxOs per wallet each having 10^12 plus added corresponding comment. And regenerated block-0.bin


# The initial certificates.
initial_certs:
Expand Down
Loading