Comments (6)
Works great. For those interested:
docker run --rm \
--name ogmios \
-p 1337:1337 \
-v ${PWD}/private-testnet:/testnet \
cardanosolutions/ogmios:latest \
--node-socket /testnet/node-bft1/node.sock \
--node-config /testnet/configuration.yaml \
--host 0.0.0.0
from cardano-private-testnet-setup.
Small-note: Ogmios should fully work with any Cardano network so long as the network runs a version of Cardano. That is, a combination of all the existing eras (Byron; Shelley; Allegra; Mary; Alonzo; Babbage...). In principle, you can create a private cluster of nodes that only run one of those eras, or a subset of them. This won't however work with Ogmios.
from cardano-private-testnet-setup.
well played on ^ guys 👏🏾
A few additional words from the SecOps land here now for future us.
Always be extremely wary when using someone else's images directly, especially if :latest
tag is used, and ever more so especially when things like real ledger is involved.
I'm well aware we're talking testnets here only, but a caution to anyone who's going to arrive here later to copy pasta this into their very much actual project is due:
Please make sure you understand and trust the containers you use, and make sure to checksum-target images used even if you do
ie.
cardanosolutions/ogmios:latest
-> cardanosolutions/ogmios@sha256:7a34a2abceadf66853d028c5099881c49df64907beba518fcc61e772fd4dbe46
which might be harder to work with - especially with rolling updates - but is a must for critical applications.
Cheers.
from cardano-private-testnet-setup.
I bet it is. I just skimmed Ogmios getting started and they show a way to run ogmios in docker container by pointing at your node socket and node config.
- Here is the link to example.
- In the example parameters for
node-config
, you could supply the/path/to/private-testnet/configuration.yaml
instead of theconfig.json
. I believe they are interchangeable.
- In the example parameters for
I also notice that the cardano graph-ql project uses Ogmios bridge and cardano-db-sync as the backend data source.
In my opinion, using graphql would be ideal, b/c it abstracts away using SQL that is specific to the database.
- I see an issue is logged in the cardano-graphql repo, which describes running against a private testnet.
If you have time to investigate getting Ogmios or GraphQl running against a private testnet, that would make for some great documentation to add to this guide!
from cardano-private-testnet-setup.
Excellent advice, @grzegorznowak! I have been using latest
tags on some other projects, and you made me realize I need to be more careful.
from cardano-private-testnet-setup.
One addition, it seems that other ports than 1337 do not work. I raised this issue on the official Ogmios github: CardanoSolutions/ogmios#221.
Here's a minimal working example in Typescript to connect to the Ogmios container
import { createInteractionContext, } from '@cardano-ogmios/client';
import { InteractionContext } from '@cardano-ogmios/client';
const config = {
connection: {
host: 'localhost',
port: 1337,
tls: false
}
}
const context: InteractionContext = await createInteractionContext(
err => console.error(err),
() => console.log("Connection closed."),
{ connection: config.connection }
)
console.log(context)
Should be able to create the InteractionContext for the private testnet now (and use other libraries compatible with Ogmios, eg Pycardano, to build and submit transactions)
from cardano-private-testnet-setup.
Related Issues (11)
- CI | integration-test the automate.sh script
- cardano-db-sync workaround HOT 9
- Ops | PoC db-sync tests
- Instructions to stop the nodes HOT 1
- query private testnet HOT 6
- Change Major Protocol Version to 6 HOT 10
- Update scripts for Babbage HOT 2
- node config errors HOT 16
- Ops | Wrap the devnet with podman container HOT 1
- Solution to garbage collection/memory issues HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cardano-private-testnet-setup.