Safe Haskell | None |
---|---|
Language | Haskell2010 |
Different approaches to batching.
For now we do not support perfect batching because operation size evaluation
(as well as gas consumption evaluation) is not implemented yet.
The only non-trivial batching implementation we provide is
mbSeparateLambdas
.
Synopsis
- data SlBatchType
- data SlBatchInfo = SlBatchInfo {
- slbiType :: SlBatchType
- slbiActions :: [Text]
- mbSeparateLambdas :: MigrationBatching [] SlBatchInfo
Separate-lambdas batching
data SlBatchType Source #
Type of batch.
SlbtData | Addition of any type of data. |
SlbtLambda | Addition of code. |
SlbtCustom | Several joined actions of different types. |
SlbtUnknown | No information to chooseType about batching.
This means that the given action does not contain |
Instances
Eq SlBatchType Source # | |
Defined in Lorentz.UStore.Migration.Batching (==) :: SlBatchType -> SlBatchType -> Bool # (/=) :: SlBatchType -> SlBatchType -> Bool # | |
Show SlBatchType Source # | |
Defined in Lorentz.UStore.Migration.Batching showsPrec :: Int -> SlBatchType -> ShowS # show :: SlBatchType -> String # showList :: [SlBatchType] -> ShowS # |
data SlBatchInfo Source #
SlBatchInfo | |
|
Instances
Buildable SlBatchInfo Source # | |
Defined in Lorentz.UStore.Migration.Batching build :: SlBatchInfo -> Builder # |
mbSeparateLambdas :: MigrationBatching [] SlBatchInfo Source #
Puts all data updates in one batch, and all lambdas in separate batches, one per batch.
The reason for such behaviour is that in production contracts amount of changed data (be it in contract initialization or contract upgrade) is small, while stored entrypoints are huge and addition of even one entrypoint often barely fits into gas limit.