geniusyield / atlas

Application backend for Plutus smart contracts on Cardano
https://atlas-app.io
Apache License 2.0
65 stars 18 forks source link

Config: Network ID is not in line with the Cardano Node config #249

Closed 4TT1L4 closed 10 months ago

4TT1L4 commented 11 months ago

Problem:

Solution:

4TT1L4 commented 11 months ago

The accepted Network ID strings are listed in the NetowrkId.hs: https://github.com/geniusyield/atlas/blob/556418d9aaa767f250357f9b48c28e4160149807/src/GeniusYield/Types/NetworkId.hs#L105-L111

The problem is that the cardano node expects the network ID as "preprod", without the "testnet-" prefix. It would make things a bit easier, if atlas accepted the same networkId string as well, so we could just pass "preprod".

The current difference in the accepted network ID strings causes a bit of trouble when using Atlas with a local Cardano node.

For exampe see the following docker-compose file of the GY Smart Order Router:

Since the Cardano Node and Atlas uses different strings for the preprod testnet, we need to use a different value for these two components. It would make things easier, if both accepted the same values. This is the motivation for this issue.

4TT1L4 commented 11 months ago

This change is also necessary, so we could implement some simplification in the SOR docker-compose config: