Simulate operations more accurately in morley-client
Clarification and motivation
We have this:
dumbOp :: TransactionOperation
dumbOp = TransactionOperation
{ toKind = "transaction"
, toSource = genesisAddress1
, toFee = 50000
, toCounter = 0
, toGasLimit = 800000
, toStorageLimit = 60000
, toAmount = 0
, toDestination = genesisAddress2
, toParameters = ParametersInternal
{ piEntrypoint = "default"
, piValue = toExpression (VUnit :: Value 'TUnit)
}
}
Many things are hardcoded here. There is at least one obvious bug: we set gas limit to 800000
(and don't override it later) which is much less than the current protocol gas limit in Tezos. Instead of hard coding gas limit we should somehow take it from the blockchain. Maybe there are some other values that should be taken from the blockchain.
Note that we also construct dumb OriginationOperation
in Morley.Client.Action.Origination
, we should fix things there as well.
Acceptance criteria
- During operation simulation in
morley-client
we use current gas limit, not hardcoded one. - Other dumb values are examined. If they have the same problem, it's fixed for them as well. Overall simulation should be as accurate as possible.
Edited by Ivan Gromakovskii