-
Notifications
You must be signed in to change notification settings - Fork 84
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
Spike / Not merge: Inception chain component #1603
Conversation
By separating starting of processes from the scenario, we can re-use it better.
Not quite happy with the re-use of functions across scenarios, but this will do.
Obviously there should be more re-use across running on cardano-node and hydra-node
This should allow us to publish the scripts also in a hydra head (query utxo differently etc)
3a4c50e
to
d82053c
Compare
@@ -192,6 +192,14 @@ postDecommit HydraClient{apiHost = Host{hostname, port}} decommitTx = do | |||
<&> setRequestBodyJSON decommitTx | |||
>>= httpLbs | |||
|
|||
-- | Fetch protocol parameters fro a hydra-node. |
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.
-- | Fetch protocol parameters fro a hydra-node. | |
-- | Fetch protocol parameters for a hydra-node. |
withTracerOutputTo h "Inception" $ \tracer -> do | ||
let l2Dir = tmpDir </> "l2" | ||
withCardanoNodeDevnet (contramap FromCardanoNode tracer) l2Dir $ \node@RunningNode{networkId} -> do | ||
hydraScriptsTxId <- publishHydraScriptsAs node Faucet |
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.
hydraScriptsTxId <- publishHydraScriptsAs node Faucet | |
-- Publish hydra scripts in L1 | |
hydraScriptsTxId <- publishHydraScriptsAs node Faucet |
-- This allows to open heads in other heads leveraging the isomorphic nature of | ||
-- the Hydra Head protocol. | ||
-- | ||
-- Basd on a websocket client to the API of one of the underlying head's nodes. |
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.
-- Basd on a websocket client to the API of one of the underlying head's nodes. | |
-- Based on a websocket client to the API of one of the underlying head's nodes. |
Can confirm I can follow the instructions and get it working on the branch! Nice :) Note: There are some compile-time errors on the hydra-node tests; but not too important as we aren't merging it; but just FYI if anyone is looking back. |
```shell | ||
nix run .#hydra-tui -- -c 0.0.0.0:4003 -k inception-demo/wallet.sk | ||
``` | ||
|
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.
Note: You need to initialise the head here; i.e. press i
in the TUI; then continue on with the rest of the steps.
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.
We aren't merging this, but I'm formally "approving" to record that I've been able to at least replicate this demo on this branch by following the instructions.
The inception hydra client must only callback with a transaction observed when it is confirmed. Otherwise, subsequent queries of confirmed UTxO will not include the just observed transactions outputs. Changing SnapshotConfirmed to include full txs allows to write the inception hydra client simply without requiring book-keeping of transactions seen. Obviously this breaks many other things.
This is a bit weird in case of --offline as that would not require publishing scripts in the first place. In fact, this is another hint that we might have different chain components, but the cardano backends share more things than the offline one for example.
This is not meant to be merged as-is as it contains A LOT of hacks to make this work.
hydra-node --inception
.cabal test hydra-cluster --test-options "-m inception"
ServerOutput
to contain full transactions (easier to handle)hydra-node publish-scripts
use the same inception command line options (hacky)See issue #1590 for more details on learnings and a how-to.