-
Notifications
You must be signed in to change notification settings - Fork 220
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
jormungandr launch: use --rest-listen instead of generating config.yaml #862
Conversation
Just err -> readerError err | ||
Nothing -> pure arg | ||
validate arg | ||
| "--block-hash" `isPrefixOf` arg = Just $ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be --genesis-block-hash
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it should be, fixed.
4985c42
to
698fa0b
Compare
suggestion "--rest-listen" | ||
| "--storage" `isPrefixOf` arg = Just $ | ||
suggestion "--storage" | ||
| otherwise = Nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we missing --log-level
here? it is also provided automatically on launch
...
btw. why do we want to have --log-level info
hardcoded in launch
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The log level setting was in config.yaml
before, so I kept it. But I think it's better to decouple the log levels of cardano-wallet and jormungandr, so I have now removed this field.
suggestion "--storage" | ||
| otherwise = Nothing | ||
suggestion arg = "The " <> arg <> " argument is used by " | ||
<> "`cardano-wallet-jormungandr launch'." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better print executing script name (like System.Environment.getProgName
- or maybe there's smth better). That's because released binary is called cardano-wallet
actually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's OK as is - the meaning is conveyed well enough. But if you really want we can use unsafePerformIO getProgName
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, I think it'd be better to hardcode cardano-wallet
(if hardcoding is better), since it is the name of the released binary. But that's nitpicking...
suggestion arg = "The " <> arg <> " argument is used by " | ||
<> "`cardano-wallet-jormungandr launch'." | ||
<> "\nIf you need this level of flexibility, run `jormungandr' " | ||
<> " separately and use `cardano-wallet-jormungandr serve'." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two spaces here (between 'jormungandr'
and separately
). Also `jormungandr' uses two different quote signs...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are open and close quotes. But I have changed it to symmetrical double quotes and fixed the space.
698fa0b
to
63031d8
Compare
extraArguments :: Parser [Text] | ||
extraArguments = some $ argument str $ mempty | ||
extraArguments :: Parser [String] | ||
extraArguments = many $ argument jmArg $ mempty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
bors r+ |
Merge conflict (retrying...) |
1 similar comment
Merge conflict (retrying...) |
Merge conflict |
I am currently rebasing, I also reviewed a bit the launch command documentation and added some examples usage and extended the footer note to make it a bit clearer:
|
63031d8
to
782de4c
Compare
bors r+ |
862: jormungandr launch: use --rest-listen instead of generating config.yaml r=KtorZ a=rvl Relates to #832 and #848. Supersedes #850. # Overview `cardano-wallet-jormungandr launch` specifies the REST API port and storage directory. The user provides the rest of the Jörmungandr configuration (e.g. trusted peers). # Comments The Jörmungandr P2P listen address, port, and log level are no longer configured by cardano-wallet. Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]>
Timed out |
bors r+ |
862: jormungandr launch: use --rest-listen instead of generating config.yaml r=KtorZ a=rvl Relates to #832 and #848. Supersedes #850. # Overview `cardano-wallet-jormungandr launch` specifies the REST API port and storage directory. The user provides the rest of the Jörmungandr configuration (e.g. trusted peers). # Comments The Jörmungandr P2P listen address, port, and log level are no longer configured by cardano-wallet. Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]>
Timed out |
Looks like it waited 1h26m to get a buildkite agent :-/. bors r+ |
862: jormungandr launch: use --rest-listen instead of generating config.yaml r=rvl a=rvl Relates to #832 and #848. Supersedes #850. # Overview `cardano-wallet-jormungandr launch` specifies the REST API port and storage directory. The user provides the rest of the Jörmungandr configuration (e.g. trusted peers). # Comments The Jörmungandr P2P listen address, port, and log level are no longer configured by cardano-wallet. Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]>
Yeah, Devops have been running some heavy tests yesterday which took up all agents for... Something like 6h :| |
Build failed |
782de4c
to
94cab4a
Compare
bors r+ |
862: jormungandr launch: use --rest-listen instead of generating config.yaml r=KtorZ a=rvl Relates to #832 and #848. Supersedes #850. # Overview `cardano-wallet-jormungandr launch` specifies the REST API port and storage directory. The user provides the rest of the Jörmungandr configuration (e.g. trusted peers). # Comments The Jörmungandr P2P listen address, port, and log level are no longer configured by cardano-wallet. 864: nix: Provide derivations for Daedalus installer r=KtorZ a=rvl Relates to #863. Based on #828. # Overview - @disassembler @cleverca22 It's not exactly the same as before but should work ok I think. - Adds source filtering to avoid unnecessary rebuilds. # Comments To build: ``` nix-build -A cardano-wallet-jormungandr nix-build release.nix -A daedalus-jormungandr.windows -o daedalus-jormungandr-windows nix-build release.nix -A daedalus-jormungandr.macos -o daedalus-jormungandr-macos nix-build release.nix -A daedalus-jormungandr.linux -o daedalus-jormungandr-linux ``` Note that `daedalus-jormungandr.{windows,macos,linux}` from `release.nix` reference the same `cardano-wallet-jormungandr` derivation, only with different `system` or `crossSystem` arguments. So Daedalus may also import from `default.nix` rather than `release.nix`. Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]>
bors r- |
Canceled |
94cab4a
to
bcf292f
Compare
bors r+ |
862: jormungandr launch: use --rest-listen instead of generating config.yaml r=KtorZ a=rvl Relates to #832 and #848. Supersedes #850. # Overview `cardano-wallet-jormungandr launch` specifies the REST API port and storage directory. The user provides the rest of the Jörmungandr configuration (e.g. trusted peers). # Comments The Jörmungandr P2P listen address, port, and log level are no longer configured by cardano-wallet. 864: nix: Provide derivations for Daedalus installer r=KtorZ a=rvl Relates to #863. Based on #828. # Overview - @disassembler @cleverca22 It's not exactly the same as before but should work ok I think. - Adds source filtering to avoid unnecessary rebuilds. # Comments To build: ``` nix-build -A cardano-wallet-jormungandr nix-build release.nix -A daedalus-jormungandr.windows -o daedalus-jormungandr-windows nix-build release.nix -A daedalus-jormungandr.macos -o daedalus-jormungandr-macos nix-build release.nix -A daedalus-jormungandr.linux -o daedalus-jormungandr-linux ``` Note that `daedalus-jormungandr.{windows,macos,linux}` from `release.nix` reference the same `cardano-wallet-jormungandr` derivation, only with different `system` or `crossSystem` arguments. So Daedalus may also import from `default.nix` rather than `release.nix`. 878: Support for legacy UTxO witness in Jörmungandr r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #779 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have extended `mkStdTx` so that it would properly handle transactions coming from a `RndKey` and construct `legacy-utxo` witnesses for it. # Comments <!-- Additional comments or screenshots to attach if any --> Jörmungandr doesn't implement creating legacy utxo witnesses from jcli ... [jcli/src/jcli_app/transaction/mk_witness.rs](https://github.com/input-output-hk/jormungandr/blob/master/jcli/src/jcli_app/transaction/mk_witness.rs#L78-L82) ```rust WitnessType::OldUTxO => { // TODO unimplemented!() let _secret_key: SecretKey<Ed25519Bip32> = self.secret()?; Err(Error::MakeWitnessLegacyUtxoUnsupported)?; unimplemented!() } ``` so I had to construct them by hand according to: - The format defined in [chain-impl-mockchain#witnesses](https://github.com/input-output-hk/chain-libs/blob/incentive/chain-impl-mockchain/doc/format.md#witnesses) - The format from the source (double checking it matches the doc..) [chain-impl-mockchain/src/transaction/witness.rs](https://github.com/input-output-hk/chain-libs/blob/incentive/chain-impl-mockchain/src/transaction/witness.rs#L173-L176) It'd be nice to review our golden if / when the constructor for the witness type gets updated. <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> 879: Porting the rest of forget pending tx integration tests to CLI r=KtorZ a=paweljakubas # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #836 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have ported the rest of forgetting pending tx integration tests to CLI # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]> Co-authored-by: Pawel Jakubas <[email protected]>
Canceled (will resume) |
862: jormungandr launch: use --rest-listen instead of generating config.yaml r=KtorZ a=rvl Relates to #832 and #848. Supersedes #850. # Overview `cardano-wallet-jormungandr launch` specifies the REST API port and storage directory. The user provides the rest of the Jörmungandr configuration (e.g. trusted peers). # Comments The Jörmungandr P2P listen address, port, and log level are no longer configured by cardano-wallet. 864: nix: Provide derivations for Daedalus installer r=KtorZ a=rvl Relates to #863. Based on #828. # Overview - @disassembler @cleverca22 It's not exactly the same as before but should work ok I think. - Adds source filtering to avoid unnecessary rebuilds. # Comments To build: ``` nix-build -A cardano-wallet-jormungandr nix-build release.nix -A daedalus-jormungandr.windows -o daedalus-jormungandr-windows nix-build release.nix -A daedalus-jormungandr.macos -o daedalus-jormungandr-macos nix-build release.nix -A daedalus-jormungandr.linux -o daedalus-jormungandr-linux ``` Note that `daedalus-jormungandr.{windows,macos,linux}` from `release.nix` reference the same `cardano-wallet-jormungandr` derivation, only with different `system` or `crossSystem` arguments. So Daedalus may also import from `default.nix` rather than `release.nix`. 878: Support for legacy UTxO witness in Jörmungandr r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #779 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have extended `mkStdTx` so that it would properly handle transactions coming from a `RndKey` and construct `legacy-utxo` witnesses for it. # Comments <!-- Additional comments or screenshots to attach if any --> Jörmungandr doesn't implement creating legacy utxo witnesses from jcli ... [jcli/src/jcli_app/transaction/mk_witness.rs](https://github.com/input-output-hk/jormungandr/blob/master/jcli/src/jcli_app/transaction/mk_witness.rs#L78-L82) ```rust WitnessType::OldUTxO => { // TODO unimplemented!() let _secret_key: SecretKey<Ed25519Bip32> = self.secret()?; Err(Error::MakeWitnessLegacyUtxoUnsupported)?; unimplemented!() } ``` so I had to construct them by hand according to: - The format defined in [chain-impl-mockchain#witnesses](https://github.com/input-output-hk/chain-libs/blob/incentive/chain-impl-mockchain/doc/format.md#witnesses) - The format from the source (double checking it matches the doc..) [chain-impl-mockchain/src/transaction/witness.rs](https://github.com/input-output-hk/chain-libs/blob/incentive/chain-impl-mockchain/src/transaction/witness.rs#L173-L176) It'd be nice to review our golden if / when the constructor for the witness type gets updated. <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> 879: Porting the rest of forget pending tx integration tests to CLI r=KtorZ a=paweljakubas # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #836 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have ported the rest of forgetting pending tx integration tests to CLI # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]> Co-authored-by: Pawel Jakubas <[email protected]>
Build failed (retrying...) |
862: jormungandr launch: use --rest-listen instead of generating config.yaml r=KtorZ a=rvl Relates to #832 and #848. Supersedes #850. # Overview `cardano-wallet-jormungandr launch` specifies the REST API port and storage directory. The user provides the rest of the Jörmungandr configuration (e.g. trusted peers). # Comments The Jörmungandr P2P listen address, port, and log level are no longer configured by cardano-wallet. 864: nix: Provide derivations for Daedalus installer r=KtorZ a=rvl Relates to #863. Based on #828. # Overview - @disassembler @cleverca22 It's not exactly the same as before but should work ok I think. - Adds source filtering to avoid unnecessary rebuilds. # Comments To build: ``` nix-build -A cardano-wallet-jormungandr nix-build release.nix -A daedalus-jormungandr.windows -o daedalus-jormungandr-windows nix-build release.nix -A daedalus-jormungandr.macos -o daedalus-jormungandr-macos nix-build release.nix -A daedalus-jormungandr.linux -o daedalus-jormungandr-linux ``` Note that `daedalus-jormungandr.{windows,macos,linux}` from `release.nix` reference the same `cardano-wallet-jormungandr` derivation, only with different `system` or `crossSystem` arguments. So Daedalus may also import from `default.nix` rather than `release.nix`. Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]>
Build failed (retrying...) |
862: jormungandr launch: use --rest-listen instead of generating config.yaml r=KtorZ a=rvl Relates to #832 and #848. Supersedes #850. # Overview `cardano-wallet-jormungandr launch` specifies the REST API port and storage directory. The user provides the rest of the Jörmungandr configuration (e.g. trusted peers). # Comments The Jörmungandr P2P listen address, port, and log level are no longer configured by cardano-wallet. Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]>
Build succeeded |
880: Jormungandr 0.7.0 r=KtorZ a=piotr-iohk # Issue Number # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [ ] ~Jormungandr 0.7.0-alpha.dev~ - [ ] Jormungandr 0.7.0-alpha.dev.1 # Comments It works fine with `jormungandr + cardano-wallet-jormungandr serve` but doesn't work with launch... ``` $cardano-wallet-jormungandr launch --genesis-block block0.bin -- --secret secret.yaml [iohk.cardano-wallet:Info:ThreadId 4] [2019-10-22 09:55:55.38 UTC] Using directory: /home/piotr/.local/share/cardano-wallet/jormungandr/testnet [iohk.cardano-wallet:Info:ThreadId 4] [2019-10-22 09:55:55.38 UTC] Using directory: /home/piotr/.local/share/cardano-wallet/jormungandr/testnet/wallets [iohk.cardano-wallet:Info:ThreadId 4] [2019-10-22 09:55:55.38 UTC] Running as v2019.10.16 [iohk.cardano-wallet:Info:ThreadId 4] [2019-10-22 09:55:55.38 UTC] Wallet backend server starting... [iohk.cardano-wallet:Info:ThreadId 4] [2019-10-22 09:55:55.38 UTC] Node is Jörmungandr on testnet [iohk.cardano-wallet:Info:ThreadId 4] [2019-10-22 09:55:55.38 UTC] Generated Jörmungandr's configuration to: /home/piotr/.local/share/cardano-wallet/jormungandr/testnet/jormungandr-config.yaml [iohk.cardano-wallet:Notice:ThreadId 4] [2019-10-22 09:55:55.39 UTC] Starting process jormungandr --genesis-block block0.bin --config /home/piotr/.local/share/cardano-wallet/jormungandr/testnet/jormungandr-config.yaml --log-level info --secret secret.yaml [iohk.cardano-wallet.jormungandr.14208:Info:ThreadId 4] [2019-10-22 09:55:55.39 UTC] Process jormungandr started with pid 14208 Oct 22 11:55:55.396 INFO Starting jormungandr 0.7.0-alpha.dev (HEAD-61fa897, release, linux [x86_64]) - [rustc 1.38.0 (625451e37 2019-09-23)], task: init Oct 22 11:55:55.396 INFO Starting 1 workers, scope: global Oct 22 11:55:55.396 INFO Starting server on 127.0.0.1:33671, scope: global Oct 22 11:55:55.397 INFO storing blockchain in '"/home/piotr/.local/share/cardano-wallet/jormungandr/testnet/chain/blocks.sqlite"', task: init Oct 22 11:55:55.406 ERRO Error occurred during request handling, status: 503 Service Unavailable Full REST context not available yet, scope: global cardano-wallet-jormungandr: ErrUnexpectedNetworkFailure (Link {_segments = ["api","v0","block","4c05c5bb1dfa2848a2a36249b28d97ef8e6c77c7cb1f9626d1c4024c2470a2c2"], _queryParams = []}) (FailureResponse (Response {responseStatusCode = Status {statusCode = 503, statusMessage = "Service Unavailable"}, responseHeaders = fromList [("content-length","0"),("date","Tue, 22 Oct 2019 09:55:55 GMT")], responseHttpVersion = HTTP/1.1, responseBody = ""})) ``` 886: cardano-wallet-jormungandr: tweak error message style r=KtorZ a=rvl Relates to #848. # Overview Addresses this [review comment](#862 (comment)) from @piotr-iohk on #862. Co-authored-by: Piotr Stachyra <[email protected]> Co-authored-by: KtorZ <[email protected]> Co-authored-by: Rodney Lorrimar <[email protected]>
886: cardano-wallet-jormungandr: tweak error message style r=KtorZ a=rvl Relates to #848. # Overview Addresses this [review comment](#862 (comment)) from @piotr-iohk on #862. Co-authored-by: Rodney Lorrimar <[email protected]>
886: cardano-wallet-jormungandr: tweak error message style r=KtorZ a=rvl Relates to #848. # Overview Addresses this [review comment](#862 (comment)) from @piotr-iohk on #862. Co-authored-by: Rodney Lorrimar <[email protected]>
881: Connect Pool DB with Api r=KtorZ a=Anviking # Issue Number #713 # Overview - [x] I have implemented a `GET /stake-pool` that reads and combines metrics from `Pool.DB` - [x] TODO: Figure out when we are unsynced - [ ] TODO: Look for things to test if possible in this PR # Comments ### Self-node with a very short epoch-length (results are unavailable across epoch boundaries) ![self-node-short-epochs](https://user-images.githubusercontent.com/304423/67398367-d0edc680-f5aa-11e9-86da-ac13337e2a63.gif) ### Testnet syncing which is interrupted and resumed ![testnet-2](https://user-images.githubusercontent.com/304423/67399072-f7f8c800-f5ab-11e9-9fb1-38e8886aeba4.gif) <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> 884: More integration tests for Byron wallets r=KtorZ a=piotr-iohk # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [ ] More integration tests for Byron wallets ensuring that Shelley endpoints/CLI cannot manage them # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> 886: cardano-wallet-jormungandr: tweak error message style r=KtorZ a=rvl Relates to #848. # Overview Addresses this [review comment](#862 (comment)) from @piotr-iohk on #862. Co-authored-by: Johannes Lund <[email protected]> Co-authored-by: KtorZ <[email protected]> Co-authored-by: Piotr Stachyra <[email protected]> Co-authored-by: Rodney Lorrimar <[email protected]>
884: More integration tests for Byron wallets r=KtorZ a=piotr-iohk # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [ ] More integration tests for Byron wallets ensuring that Shelley endpoints/CLI cannot manage them # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> 886: cardano-wallet-jormungandr: tweak error message style r=KtorZ a=rvl Relates to #848. # Overview Addresses this [review comment](#862 (comment)) from @piotr-iohk on #862. Co-authored-by: Piotr Stachyra <[email protected]> Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]>
Relates to #832 and #848.
Supersedes #850.
Overview
cardano-wallet-jormungandr launch
specifies the REST API port and storage directory. The user provides the rest of the Jörmungandr configuration (e.g. trusted peers).Comments
The Jörmungandr P2P listen address, port, and log level are no longer configured by cardano-wallet.