Skip to content

The hydra node can publish hydra scripts via blockfrost using --blockfrost #1668

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

Closed
2 tasks done
Tracked by #1305
noonio opened this issue Sep 30, 2024 · 2 comments · Fixed by #1907
Closed
2 tasks done
Tracked by #1305

The hydra node can publish hydra scripts via blockfrost using --blockfrost #1668

noonio opened this issue Sep 30, 2024 · 2 comments · Fixed by #1907
Assignees
Labels
amber ⚠️ Medium complexity or partly unclear feature 💬 feature A feature on our roadmap
Milestone

Comments

@noonio
Copy link
Contributor

noonio commented Sep 30, 2024

Why

As Hydra moves towards using Blockfrost as a chain layer, we need to extend the functionality to publish Hydra scripts via the Blockfrost API. This follows up on #1305 and builds upon our initial exploration on #1631.

What

Introduce the capability to publish Hydra scripts using Blockfrost as follows:

mkdir -p blockfrost-demo/
curl localhost:4001/protocol-parameters > blockfrost-demo/protocol-parameters.json

function publishScripts() {
  nix run .#hydra-node -- publish-scripts \
    --blockfrost "file_path_project_token_hash" \
    --cardano-signing-key blockfrost-demo/wallet.sk
}

export HYDRA_SCRIPTS_TX_ID_ON_BLOCKFROST="$(publishScripts)"

How

Taking the inception spike as inspiration, we need to:

  • Refactor PublishOptions to support Blockfrost options:
    newtype PublishOptions = PublishOptions
      { publishChainConfig :: ChainConfig }
      deriving stock (Show, Eq)
    
    data ChainConfig
      = Offline OfflineChainConfig
      | Direct DirectChainConfig
      | Blockfrost BlockfrostChainConfig
      deriving stock (Eq, Show, Generic)

The path to the Blockfrost project token hash will be passed as part of these new options.

  • Extend hydra-node/Main.hs to support publishing scripts using the modules above.
@noonio noonio mentioned this issue Sep 30, 2024
9 tasks
@github-project-automation github-project-automation bot moved this to In Progress 🕐 in ☕ Hydra Team Work Sep 30, 2024
@noonio noonio moved this from In Progress 🕐 to Todo 📋 in ☕ Hydra Team Work Sep 30, 2024
@noonio noonio added amber ⚠️ Medium complexity or partly unclear feature 💬 feature A feature on our roadmap labels Oct 22, 2024
@noonio noonio moved this to Todo 📋 in ☕ Hydra Team Work Mar 4, 2025
@ffakenz ffakenz linked a pull request Mar 8, 2025 that will close this issue
4 tasks
@noonio noonio moved this from Todo 📋 to In progress 🕐 in ☕ Hydra Team Work Mar 10, 2025
@noonio noonio assigned v0d1ch and unassigned ffakenz Mar 18, 2025
@v0d1ch
Copy link
Contributor

v0d1ch commented Mar 25, 2025

Just to double check - is this issue not suppose to include adding a new chain layer for blockfrost? We should only extend hydra-node/Main.hs and not do anything in Run.hs related to new addition of BlockfrostConfig in ChainConfig type and we should have another issue to add new chain component? (like Hydra.Chain.Direct but for blockfrost)

@ch1bo
Copy link
Member

ch1bo commented Mar 25, 2025

Just to double check - is this issue not suppose to include adding a new chain layer for blockfrost? We should only extend hydra-node/Main.hs and not do anything in Run.hs related to new addition of BlockfrostConfig in ChainConfig type and we should have another issue to add new chain component? (like Hydra.Chain.Direct but for blockfrost)

Yes, this is only about publishing scripts, which is not integrated with the headlogic / Chain interface. The full integration should happen in the "Blockfrost chain layer" issue.

@v0d1ch v0d1ch moved this from In progress 🕐 to In review 👀 in ☕ Hydra Team Work Mar 25, 2025
@noonio noonio added this to the 0.x.x milestone Mar 31, 2025
@github-project-automation github-project-automation bot moved this from In review 👀 to Done ✔ in ☕ Hydra Team Work Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
amber ⚠️ Medium complexity or partly unclear feature 💬 feature A feature on our roadmap
Projects
Archived in project
Status: Now
4 participants