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

Explore the possibility of running the cardano-http-bridge against a local cluster #67

Closed
3 tasks done
KtorZ opened this issue Mar 14, 2019 · 1 comment
Closed
3 tasks done
Assignees

Comments

@KtorZ
Copy link
Member

KtorZ commented Mar 14, 2019

Context

In order to test our wallet backend in a "real-life" scenario, we would need to be able to run a few integration tests where a the wallet server connects to a given chain producer backend in order to retrieve blocks.

For now, our only chain producer is the cardano-http-bridge and, it only connects to mainnet or testnet which is fine for testing a few things, but pretty limited when it comes to submitting transaction and moving test funds from some faucet wallet.

Having the ability to run a demo test cluster in CI and perform a serie of tests against it can be pretty useful.

Decision

First, we want to explore the capabilities of the cardano http bridge and figure out whether we can connect it to a local cluster. If this can be done with reasonable efforts, then we do it.

Acceptance Criteria

  1. We must assess how complex it would be to instrument the cardano-http-bridge to run against a local cluster of node
  2. If simple-enough, we may provide instructions and scripts to setup a local cluster to which the cardano-http-bridge could connect.

Development Plan

  • Look whether it is possible to specify a custom configuration to the http bridge.

    Turns out it is with some minor changes, cf: Allow passing a custom file as a template configuration input-output-hk/cardano-http-bridge#19

  • Experiment connecting to the bridge to a local cluster

    I have tried a few things with the bridge and the local cluster and I am running into some issues. So far, here are my findings:

    • The bridge do use genesis data coming from the 'previous hash' as specified in the configuration. In order to do that, it seems that the bridge looks up some hard-coded initial data in exe-common/genesis. So far, only the data for the testnet, mainnet and staging are available.
    • Therefore, I've tried to spin up a local cluster using the same seed and genesis data. Yet, it seems that the protocol my local cluster uses is slightly different from what the bridge expects (the bridge expects the node to advertise its node id where the node seems to be sending raw data). I have quite figured out the problem here...
  • Have a setup where it is possible to easily spawn a cluster and an http bridge connected to it.

PR

Number Base
#132 master
#134 master
#135 master

QA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants