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
Create cardano-node-emulator #831
Conversation
9e707c0
to
33dc4a6
Compare
_currentSlot :: Slot -- ^ The current slot number | ||
_chainCurrentSlot :: Slot -- ^ The current slot number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to rename it because of the conflicting export. Also like it better this way.
toCardanoTxBodyContent p@P.Params{P.pNetworkId} sigs tx@P.Tx{..} = do | ||
toCardanoTxBodyContent networkId protocolParams sigs tx@P.Tx{..} = do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since cardano-node-emulator
depends on plutus-ledger
for now, to avoid the circular dependency issue I decided to drop Params
and other types and inline them directly.
When we will figure the better design of plutus-ledger
, we will continue to use the normal types.
How would you describe the things you left in |
import Control.Monad.Freer.TH (makeEffect) | ||
import Ledger (CardanoTx, Slot) | ||
|
||
data NodeClientEffect r where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm beginning to think that this should stay in plutus-contract
...
This effect seems to be for supporting multiple node backends in the emulator. So by interpreting this effect differently, you can use a real node, or the API provided by cardano-node-emulator
.
In the future, if cardano-node-emulator
uses the same IPC interface as cardano-node
, then this effect would not be necessary anymore.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree! Makes sense.
6d59988
to
fbf6bc7
Compare
@sjoerdvisscher we discussed that with @koslambrou. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
13211c4
to
4733ad7
Compare
Move Params and TimeSlot modules to cardano-node-emulator Move some functions from Validation to CardanoAPI Add changelog files Fix formatting
4733ad7
to
1ae4590
Compare
This PR implements the ADR from #835:
cardano-node-emulator
cabal package;Ledger.TimeSlot
toCardano.Node.Emulator.TimeSlot
Ledger.Params
toCardano.Node.Emulator.Params
Ledger.Generators
toCardano.Node.Emulator.Generators
Ledger.Fee
toCardano.Node.Emulator.Fee
Ledger.Validation
toCardano.Node.Emulator.Validation
Wallet.Emulator.Chain
toCardano.Node.Emulator.Chain
Pre-submit checklist: