-
Notifications
You must be signed in to change notification settings - Fork 88
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
Bump to cardano-api-8.20 #1075
Bump to cardano-api-8.20 #1075
Conversation
fe5f227
to
a92c73c
Compare
Transactions CostsSizes and execution budgets for Hydra protocol transactions. Note that unlisted parameters are currently using
Script summary
Cost of Init Transaction
Cost of Commit TransactionThis is using ada-only outputs for better comparability.
Cost of CollectCom Transaction
Cost of Close Transaction
Cost of Contest Transaction
Cost of Abort TransactionSome variation because of random mixture of still initial and already committed outputs.
Cost of FanOut TransactionInvolves spending head output and burning head tokens. Uses ada-only UTxO for better comparability.
End-To-End Benchmark ResultsThis page is intended to collect the latest end-to-end benchmarks results produced by Hydra's Continuous Integration system from the latest Please take those results with a grain of salt as they are currently produced from very limited cloud VMs and not controlled hardware. Instead of focusing on the absolute results, the emphasis should be on relative results, eg. how the timings for a scenario evolve as the code changes. Generated at 2023-09-21 11:11:24.915811904 UTC 3-nodes ScenarioA rather typical setup, with 3 nodes forming a Hydra head.
Baseline ScenarioThis scenario represents a minimal case and as such is a good baseline against which to assess the overhead introduced by more complex setups. There is a single hydra-node d with a single client submitting single input and single output transactions with a constant UTxO set of 1.
|
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.
Thanks for wading through the dependency swamp!
IMO only two things MUST be done:
- Not undo the previous fix of querying
ChainTip
instead from point - Update the
CHANGELOG.md
where at least the fact of new script hashes is warranted to be a**BREAKING**
entry.
This PR would be even better if it would have a high-level description of the changes (see also our Contribution Guidelines)
Also, there are many imports changing from Hydra.Cardano.API (ProtocolParameters)
to Cardano.Ledger.Core (PParams)
just to refer to the type (which result in additional dependencies on packages). I saw that the cardano-api does re-export PParams
and we could make that easily accessible through hydra-cardano-api
.
@@ -110,7 +109,7 @@ import Hydra.Cardano.Api.Prelude ( | |||
LedgerEra, | |||
Map, | |||
StandardCrypto, | |||
ledgerEraVersion, | |||
ledgerEraVersion, Proposal, VotingProcedures, LedgerProtocolParameters, |
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.
Please run fourmolu
to format imports.
try (newLedgerEnv defaultPParams) >>= \case | ||
Left (err :: ProtocolParametersConversionException) -> | ||
error $ "Failed to create ledger env from fixture: " <> show err | ||
Right env -> pure env |
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.
It's great to see this code removed!
newLedgerEnv :: MonadThrow m => ProtocolParameters -> m (Ledger.LedgerEnv LedgerEra) | ||
newLedgerEnv protocolParams = do | ||
case toLedgerPParams (shelleyBasedEra @Era) protocolParams of | ||
Left err -> throwIO $ ProtocolParametersConversionException err |
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.
Should: remove now unused ProtocolParametersConversionException
Should: update the haddock of this function to not mention any exception throwing.
@@ -86,6 +83,7 @@ import Test.QuickCheck (choose) | |||
import Test.QuickCheck.Gen (chooseWord64) | |||
import UntypedPlutusCore (UnrestrictedProgram (..)) | |||
import qualified UntypedPlutusCore as UPLC | |||
import Hydra.Cardano.Api.Prelude (LedgerProtocolParameters(..)) |
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.
Should: not import this from Hydra.Cardano.Api.Prelude
, but from Hydra.Cardano.Api
hydra-node/hydra-node.cabal
Outdated
@@ -133,6 +134,7 @@ library | |||
, base16-bytestring | |||
, bech32 | |||
, bytestring | |||
, cardano-api:{internal} |
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.
We should not depend on cardano-api
here, but instead only via hydra-cardano-api
. Also, what are we using from the internal
library?
import qualified Data.Set as Set | ||
import Ouroboros.Consensus.HardFork.Combinator.AcrossEras (EraMismatch) | ||
import Test.QuickCheck (oneof) | ||
import Cardano.Api.ProtocolParameters (LedgerProtocolParameters(LedgerProtocolParameters)) |
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.
Should: import this via hydra-cardano-api
as this is our "anti corruption layer"
hydra-node/src/Hydra/Chain/Direct.hs
Outdated
systemStart <- querySystemStart networkId nodeSocket QueryTip | ||
walletUTxO <- Ledger.unUTxO . toLedgerUTxO <$> queryUTxO networkId nodeSocket (QueryAt point) [address] | ||
pparams <- queryProtocolParameters networkId nodeSocket (QueryAt point) | ||
systemStart <- querySystemStart networkId nodeSocket (QueryAt point) |
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.
Must: change this back to using QueryTip
as we just fixed it.
This likely was due to a rebase conflict.
@@ -6,6 +6,7 @@ import Hydra.Prelude | |||
|
|||
import Data.Default (def) | |||
import qualified Data.Map as Map | |||
import Hydra.Cardano.Api.Prelude (LedgerProtocolParameters(..)) |
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.
import Hydra.Cardano.Api.Prelude (LedgerProtocolParameters(..)) | |
import Hydra.Cardano.Api (LedgerProtocolParameters(..)) |
pattern ReferenceScriptNone, | ||
pattern ScriptWitness, | ||
pattern TxInsCollateral, | ||
pattern TxOut, | ||
) | ||
import Hydra.Cardano.Api.Prelude (toAlonzoExUnits, LedgerProtocolParameters (LedgerProtocolParameters)) |
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.
import Hydra.Cardano.Api.Prelude (toAlonzoExUnits, LedgerProtocolParameters (LedgerProtocolParameters)) | |
import Hydra.Cardano.Api (toLedgerExUnits, LedgerProtocolParameters (LedgerProtocolParameters)) |
nix/hydra/project.nix
Outdated
@@ -21,6 +21,7 @@ let | |||
# Reason: haskell.nix modules/overlays neds to be last | |||
# https://github.com/input-output-hk/haskell.nix/issues/1954 | |||
haskellNix.overlay | |||
iohk-nix.overlays.haskell-nix-crypto |
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.
This sounds like a duplicate to the above iohk-nix.overlays.crypto
. Are both needed? If yes, a comment should explain why.
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.
@locallycompact Note that I changed this in https://github.com/input-output-hk/hydra/tree/5e38c1ab6c6c4e3f913cfc4d7ee3b308f525b842/
I think the static muslc build would fail if we re-order the overlays this way (see comment).
I also fixed the comments. It seems that haskell-nix-crypto
is just containing pkg-config reconfiguration via haskell.nix. The libs are in the crypto
overlay.
The CI errors are actually interesting: https://github.com/input-output-hk/hydra/pull/1075/checks?check_run_id=16878199862 We do write a placeholder version into the binaries and it seems that the darwin build of some library resulted in another occurrence of the same placeholder! (I'm so glad I have put this check) To fix you should update to something (still) unique here and here. |
886b770
to
f35ba41
Compare
f35ba41
to
260441c
Compare
plutus: 1.7 -> 1.9 Drop BundledProtocolParameters and ProtocolParameters in favour of PParams LedgerEra
260441c
to
ab2362a
Compare
d0f760c
to
f30809a
Compare
Maybe not needed anymore, but this honors the comment just above in project.nix which was put in place to fix static muslc builds.
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 pushed two comments to address some nitpicks I would have had and (I think) a fix to the static muslc builds (which we would have run into after merging..)
Approved now
.~ Prices | ||
{ prSteps = fromJust $ boundRational $ 721 % 10000000 | ||
, prMem = fromJust $ boundRational $ 577 % 10000 | ||
} |
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.
@locallycompact Note that I removed some redundant parenthesis here
nix/hydra/project.nix
Outdated
@@ -21,6 +21,7 @@ let | |||
# Reason: haskell.nix modules/overlays neds to be last | |||
# https://github.com/input-output-hk/haskell.nix/issues/1954 | |||
haskellNix.overlay | |||
iohk-nix.overlays.haskell-nix-crypto |
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.
@locallycompact Note that I changed this in https://github.com/input-output-hk/hydra/tree/5e38c1ab6c6c4e3f913cfc4d7ee3b308f525b842/
I think the static muslc build would fail if we re-order the overlays this way (see comment).
I also fixed the comments. It seems that haskell-nix-crypto
is just containing pkg-config reconfiguration via haskell.nix. The libs are in the crypto
overlay.
cardano-api: 8.11 -> 8.20.0
plutus: 1.7 -> 1.9
Drop BundledProtocolParameters and ProtocolParameters in favour of PParams LedgerEra