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

Document offline mode #1414

Merged

Conversation

cardenaso11
Copy link
Contributor

@cardenaso11 cardenaso11 commented May 3, 2024

Document the newly introduced Ledger-only offline-mode for Hydra, and improve error messages when it's misconfigured

@ch1bo ch1bo added this to the 0.17.0 milestone May 8, 2024
@ch1bo ch1bo added the documentation 📖 Documentation changes label May 13, 2024
@@ -0,0 +1,9 @@
Hydra supports an offline mode, which allows for disabling the Layer 1 interface (that is, the underlying Cardano blockchain which Hydra heads use to seed funds and ultimately funds are withdrawn to). Disabling Layer 1 interactions allows use-cases which would otherwise require running and configuring an entire Layer 1 private devnet.
Copy link
Contributor

Choose a reason for hiding this comment

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

can u mention some use-cases?

@@ -0,0 +1,9 @@
Hydra supports an offline mode, which allows for disabling the Layer 1 interface (that is, the underlying Cardano blockchain which Hydra heads use to seed funds and ultimately funds are withdrawn to). Disabling Layer 1 interactions allows use-cases which would otherwise require running and configuring an entire Layer 1 private devnet.

In this offline mode, only the Layer 2 ledger is run. Therefore, ledger genesis parameters that normally influence things like time-based transaction validation, may be set to defaults that aren't reflective of mainnet. To set this, set --ledger-protocol-parameters to a non-zero file. TODO: show how to obtain this.
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be great to resolve the TODO

Copy link
Contributor

Choose a reason for hiding this comment

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

I think u not only have the l2 ledger but also:

  • networking stack
  • persistence

Would be really good to explain why did we maintain these 2 layers.

At the same time I would like to know:
"how fast an offline head runs and how many tx am I able process per unit of time."

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't have those metrics yet but we'll obtain them soon and add them in

Copy link
Contributor Author

Choose a reason for hiding this comment

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

additionally, when #1413 is merged, I think it'll be good to mention here, wrt additional flexibility in changing how persistence works

Copy link
Contributor Author

Choose a reason for hiding this comment

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

would it be possible to add benchmarking info in a later PR or should it be done in order to get this merged?

hydra-node/src/Hydra/Chain/Offline.hs Outdated Show resolved Hide resolved
@ffakenz ffakenz force-pushed the document-offline-mode branch from ea79cc7 to 5817f23 Compare May 16, 2024 09:46
@cardenaso11 cardenaso11 marked this pull request as ready for review May 16, 2024 16:40
@ffakenz
Copy link
Contributor

ffakenz commented May 17, 2024

Would be great to add this section to https://hydra.family/head-protocol/unstable/docs/configuration#offline-mode

Copy link
Contributor

@ffakenz ffakenz left a comment

Choose a reason for hiding this comment

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

Going to address my minor suggestions in a follow up PR.
Ty for your valuable contribution 🙏
Nice job!

@ch1bo ch1bo force-pushed the document-offline-mode branch from e19a73e to 3a7b50f Compare May 17, 2024 08:17
@ch1bo ch1bo merged commit 433c5dc into cardano-scaling:master May 17, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📖 Documentation changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants