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

config option to choose local cardano-node for transactions #102

Closed
peterVG opened this issue Oct 18, 2022 · 3 comments
Closed

config option to choose local cardano-node for transactions #102

peterVG opened this issue Oct 18, 2022 · 3 comments

Comments

@peterVG
Copy link
Contributor

peterVG commented Oct 18, 2022

Currently you can change the Network setting from Network.TESTNET to Network.MAINNET.

Firstly, it's not clear which "Testnet" version this if referring to. It looks like its the "legacy" (broken) testnet still being run by IOG but could (should) be the PREVIEW and/or the PREPROD network. It would be nice if you choose explicitely.

Secondly, it would be nice not to rely on a third-party API like Blockfrost for chain data but instead use your own copy from your cardano-node db. Can we add a config option to PyCardano to use a local node for its read/write transactions?

@cffls
Copy link
Collaborator

cffls commented Oct 19, 2022

When the library was created, there were only one testnet and mainnet, so I simply used Network to distinguish the network. Network type is not intended to identify the chain, it should be only used to create cardano address. I could probably remove Network type from the parameter of BlockFrost chain context. Also, if you want to use a specific network in BlockFrost, you can pass the API url to base_url param, see this post here: https://github.com/cffls/pycardano/discussions/83#discussioncomment-3549922

An alternative to Blockfrost chain context we have implemented is Ogmios chain context, which allows you to run everything locally without depending on a thrid-party API. This is an example where we use Ogmios chain context to get and submit transactions to a local chain.

@peterVG
Copy link
Contributor Author

peterVG commented Oct 19, 2022

Cool. Thanks for the explanation. I will check out the Ogmios option.

@cffls
Copy link
Collaborator

cffls commented Oct 24, 2022

Closing this issue as the solution has been suggested.

@cffls cffls closed this as completed Oct 24, 2022
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