-
Notifications
You must be signed in to change notification settings - Fork 11
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
Sam/expose budget multiplier #119
Conversation
src/BotPlutusInterface/ExBudget.hs
Outdated
@@ -37,19 +41,49 @@ estimateBudget pabConf txFile = do | |||
Raw rp -> deserialiseRaw rp | |||
Signed sp -> fmap CAPI.getTxBody <$> deserialiseSigned sp | |||
|
|||
pparamsRes <- QueryNode.queryProtocolParams debugNodeInf |
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.
Not sure which way is better, but protocol params can be pulled from PABConfig
.
(slot <-> time
conversions now use pparams from PABConfig
).
It feels like getting them from PABConfig
will be safer as cardano-cli
will use that also.
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.
Ah, I saw this ticket and assumed we wanted to move over to using the node for everything over time #112
I can switch to params if we'd prefer?
I bellieve if the cli uses params that don't match the node, it'll fail regardless, no?
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 bellieve if the cli uses params that don't match the node, it'll fail regardless, no?
Can't say with confidence =)
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 love cardano :)
src/BotPlutusInterface/ExBudget.hs
Outdated
getScaledBudget maxUnits scaler budget = | ||
if fst scalers >= 1 && snd scalers >= 1 | ||
then Right $ fmap (fmap $ scaleBudget scalers) budget | ||
else Left $ BudgetEstimationError "Exceeded global transaction budget" |
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 think it could be helpful if current maximum and calculated budgets will be printed together with the error message.
…ll/bot-plutus-interface into sam/expose-budget-multiplier
No description provided.