Skip to content

Commit

Permalink
upgrade to cardano-node==8.11.0-pre
Browse files Browse the repository at this point in the history
  • Loading branch information
KtorZ committed Jun 5, 2024
1 parent 36654a4 commit 6fd2a41
Show file tree
Hide file tree
Showing 103 changed files with 307 additions and 117 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ jobs:
os: [ linux ]
arch: [ x86_64 ]
network: [ preview ]
cardano-node: [ 8.10.1-pre ]
cardano-node: [ 8.11.0-pre, 8.9.3 ]

runs-on: ${{ matrix.os == 'linux' && 'ubuntu-22.04' }}
steps:
Expand Down Expand Up @@ -404,8 +404,8 @@ jobs:
os: [ linux ]
target: [ cardano-node-ogmios ]
network: [ mainnet, preprod, preview, sanchonet ]
cardano-node: [ 8.10.1-pre ]
cardano-node-latest: [ 8.10.1-pre ]
cardano-node: [ 8.11.0-pre, 8.9.3 ]
cardano-node-latest: [ 8.9.3 ]
arch: [ x86_64 ]
steps:
- name: 📥 Checkout repository
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/network-synchronization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
strategy:
matrix:
network: [ preview ]
ogmios_version: [ v6.3.0 ]
cardano_node_version: [ 8.10.1-pre ]
ogmios_version: [ v6.4.0 ]
cardano_node_version: [ 8.11.0-pre ]

runs-on: ubuntu-latest
steps:
Expand Down
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@ layout: changelog
pre: "<b>5. </b>"
---

### [6.4.0] - 2024-05-07

#### Added

- Integrated with `cardano-node==8.11.1-pre`.

- A new transaction submission / evaluation error:
- [`UnauthorizedGovernanceAction`](https://ogmios.dev/mini-protocols/local-tx-submission#schema-3165/UnauthorizedGovernanceAction) (`code=3165`).

#### Changed

- The `data.providedCollateral` and `data.computedTotalCollateral` from submission errors with code `3128` and `3135` can now be _negative_ Ada values.

#### Removed

- N/A

---
---


### [6.3.0] - 2024-05-07

#### Added
Expand All @@ -14,7 +35,8 @@ pre: "<b>5. </b>"

- A new ledger state query [`queryLedgerState/constitutionalCommittee`](https://ogmios.dev/api/#operation-publish-/?QueryLedgerStateConstitutionalCommittee).

- A new transaction submission error: [ConflictingInputsAndReferences](https://ogmios.dev/mini-protocols/local-tx-submission#schema-3164/ConflictingInputsAndReferences) (`code=3164`).
- A new transaction submission error:
- [`ConflictingInputsAndReferences`](https://ogmios.dev/mini-protocols/local-tx-submission#schema-3164/ConflictingInputsAndReferences) (`code=3164`).

- The server now reports (log) unexpected failures happening during protocol execution instead of only replying to clients with an error. See [#383](https://github.com/CardanoSolutions/ogmios/pull/383).

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

ARG CARDANO_NODE_IMAGE=ghcr.io/intersectmbo/cardano-node:8.9.2
ARG CARDANO_NODE_IMAGE=ghcr.io/intersectmbo/cardano-node:8.9.3

# #
# --------------------------- BUILD (ogmios) --------------------------------- #
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.5"

services:
cardano-node:
image: ghcr.io/intersectmbo/cardano-node:8.9.0
image: ghcr.io/intersectmbo/cardano-node:8.9.3
command: [
"run",
"--config", "/config/config.json",
Expand Down
2 changes: 2 additions & 0 deletions docs/content/mini-protocols/local-tx-submission.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ components:
$ref: "/ogmios.json#/definitions/SubmitTransactionFailure/oneOf/64"
3164/ConflictingInputsAndReferences:
$ref: "/ogmios.json#/definitions/SubmitTransactionFailure/oneOf/65"
3165/UnauthorizedGovernanceAction:
$ref: "/ogmios.json#/definitions/SubmitTransactionFailure/oneOf/66"
3998/UnrecognizedCertificateType:
$ref: "/ogmios.json#/definitions/SubmitTransactionFailure/oneOf/62"
{{% /embed-async-api %}}
Expand Down
14 changes: 12 additions & 2 deletions docs/static/ogmios.json
Original file line number Diff line number Diff line change
Expand Up @@ -3173,7 +3173,7 @@
, "additionalProperties": false
, "required": [ "providedCollateral", "minimumRequiredCollateral" ]
, "properties":
{ "providedCollateral": { "$ref": "cardano.json#/definitions/Value<AdaOnly>" }
{ "providedCollateral": { "$ref": "cardano.json#/definitions/Value<Delta>" }
, "minimumRequiredCollateral": { "$ref": "cardano.json#/definitions/Value<AdaOnly>" }
}
}
Expand Down Expand Up @@ -3298,7 +3298,7 @@
, "required": [ "declaredTotalCollateral", "computedTotalCollateral" ]
, "properties":
{ "declaredTotalCollateral": { "$ref": "cardano.json#/definitions/Value<AdaOnly>" }
, "computedTotalCollateral": { "$ref": "cardano.json#/definitions/Value<AdaOnly>" }
, "computedTotalCollateral": { "$ref": "cardano.json#/definitions/Value<Delta>" }
}
}
}
Expand Down Expand Up @@ -3907,6 +3907,16 @@
}
}
}
, { "title": "SubmitTransactionFailure<UnauthorizedGovernanceAction>"
, "description": "The ledger is still in a bootstrapping phase. During that phase, only protocol parameters changes, hard fork initiations and info actions are authorized. The transaction contains other types of governance action and was therefore rejected"
, "type": "object"
, "required": [ "code", "message" ]
, "additionalProperties": false
, "properties":
{ "code": { "type": "integer", "enum": [ 3164 ] }
, "message": { "type": "string" }
}
}
, { "title": "SubmitTransactionFailure<UnrecognizedCertificateType>"
, "description": "Unrecognized certificate type. This error is a placeholder due to how internal data-types are modeled. If you ever run into this, please report the issue as you've likely discoverd a critical bug..."
, "type": "object"
Expand Down
21 changes: 13 additions & 8 deletions server/cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,22 @@ repository cardano-haskell-packages

index-state:
, hackage.haskell.org 2024-03-26T06:28:59Z
, cardano-haskell-packages 2024-04-11T09:29:53Z
, cardano-haskell-packages 2024-05-14T16:00:00Z

constraints:
, any.cardano-node == 8.10.1
, any.cardano-ledger-conway == 1.13.1.0
, any.ouroboros-consensus == 0.17.0.0
, any.ouroboros-consensus-cardano == 0.15.0.0
, any.ouroboros-consensus-diffusion == 0.15.0.0
, any.ouroboros-network == 0.14.0.0
, any.cardano-node == 8.11.0
, any.cardano-ledger-core == 1.12.0.0
, any.cardano-ledger-conway == 1.14.0.0
, any.ouroboros-consensus == 0.18.0.0
, any.ouroboros-consensus-cardano == 0.16.0.0
, any.ouroboros-consensus-diffusion == 0.16.0.0
, any.ouroboros-network == 0.16.0.0
, any.plutus-core == 1.27.0.0
, any.plutus-ledger-api == 1.27.0.0
, any.formatting == 7.2.0
, any.text source
, any.io-classes-mtl < 0.1.2.0
, any.wai-extra < 3.1.15

allow-newer:
*:formatting
Expand Down Expand Up @@ -100,7 +105,7 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/CardanoSolutions/cardano-ledger
tag: 837089f9b253c8a51b93a039b7e656e8ca5b6b70
tag: f67155670677399e98205ed64dd202735b0c9be4
subdir:
eras/alonzo/impl
eras/babbage/impl
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion server/modules/ouroboros-network-ogmios/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ library:
- network-mux
- ouroboros-consensus
- ouroboros-consensus-diffusion
- ouroboros-consensus-protocol
- ouroboros-consensus-cardano
- ouroboros-network
- ouroboros-network-api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ import Ouroboros.Consensus.Network.NodeToClient
import Ouroboros.Consensus.Node.NetworkProtocolVersion
( SupportedNetworkProtocolVersion (..)
)
import Ouroboros.Consensus.Protocol.Praos.Translate
()
import Ouroboros.Consensus.Shelley.Ledger.Config
( CodecConfig (..)
)
Expand Down
1 change: 1 addition & 0 deletions server/ogmios.cabal

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions server/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ library:
- prettyprinter
- profunctors
- prometheus
- reflection
- relude
- safe
- safe-exceptions
Expand Down
2 changes: 1 addition & 1 deletion server/src/Ogmios/Data/Json/Alonzo.hs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ encodeCostModel
:: Al.CostModel
-> Json
encodeCostModel =
encodeList encodeInteger . Al.getCostModelParams
encodeList (encodeInteger . toInteger) . Al.getCostModelParams

encodeCostModels
:: Al.CostModels
Expand Down
11 changes: 9 additions & 2 deletions server/src/Ogmios/Data/Json/Ledger/PredicateFailure.hs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ encodePredicateFailure reject = \case
\'data.minimumRequiredCollateral' indicates the minimum amount expected by the ledger"
(pure $ encodeObject
( "providedCollateral" .=
encodeCoin providedCollateral
Shelley.encodeDeltaCoin providedCollateral
<> "minimumRequiredCollateral" .=
encodeCoin minimumRequiredCollateral
)
Expand Down Expand Up @@ -539,7 +539,7 @@ encodePredicateFailure reject = \case
( "declaredTotalCollateral" .=
encodeCoin declaredTotalCollateral
<> "computedTotalCollateral" .=
encodeCoin computedTotalCollateral
Shelley.encodeDeltaCoin computedTotalCollateral
)
)

Expand Down Expand Up @@ -934,6 +934,13 @@ encodePredicateFailure reject = \case
)
)

UnauthorizedGovernanceAction ->
reject (predicateFailureCode 65)
"The ledger is still in a bootstrapping phase. During that phase, only protocol \
\parameters changes, hard fork initiations and info actions are authorized. The \
\transaction contains other types of governance actions and was, therefore, rejected"
Nothing

-- NOTE: This should match the encoding also used for 'EvaluateTransactionResponse' in
-- Data.Protocol.TxSubmission; hence the code.
UnableToCreateScriptContext { translationError } ->
Expand Down
10 changes: 9 additions & 1 deletion server/src/Ogmios/Data/Json/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ import Codec.Serialise
import Data.Aeson
( (.!=)
)
import Data.Reflection
( give
)
import Ogmios.Data.EraTranslation
( MostRecentEra
, MultiEraTxOut (..)
Expand Down Expand Up @@ -178,6 +181,7 @@ import Ouroboros.Consensus.HardFork.Combinator.Ledger.Query
)
import Ouroboros.Consensus.HardFork.History.EraParams
( EraParams (..)
, EraParamsFormat (..)
, SafeZone (..)
)
import Ouroboros.Consensus.HardFork.History.Qry
Expand Down Expand Up @@ -490,9 +494,13 @@ encodeInterpreter
:: forall crypto eras. (eras ~ CardanoEras crypto)
=> Interpreter eras
-> Json
encodeInterpreter (deserialise @(Summary eras) . serialise -> Summary eraSummaries) =
encodeInterpreter (coerceInterpreter -> Summary eraSummaries) =
encodeFoldable encodeEraSummary eraSummaries

coerceInterpreter :: forall crypto eras. (eras ~ CardanoEras crypto) => Interpreter eras -> Summary eras
coerceInterpreter =
give EraParamsWithoutGenesisWindow (deserialise . serialise . give EraParamsWithoutGenesisWindow)

encodeMismatchEraInfo
:: MismatchEraInfo (CardanoEras crypto)
-> Json
Expand Down
11 changes: 9 additions & 2 deletions server/src/Ogmios/Data/Ledger/PredicateFailure.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module Ogmios.Data.Ledger.PredicateFailure
, Coin
, Credential (..)
, DataHash
, DeltaCoin
, DiscriminatedEntities (..)
, EpochNo (..)
, ExUnits (..)
Expand Down Expand Up @@ -71,6 +72,7 @@ import Cardano.Ledger.BaseTypes
)
import Cardano.Ledger.Coin
( Coin (..)
, DeltaCoin
)
import Cardano.Ledger.Conway.Governance
( GovActionId (..)
Expand Down Expand Up @@ -276,7 +278,7 @@ data MultiEraPredicateFailure crypto
-- When scripts are present, transaction must include a collateral amount
-- greater than a certain percentage of the script execution units.
| InsufficientCollateral
{ providedCollateral :: Coin
{ providedCollateral :: DeltaCoin
, minimumRequiredCollateral :: Coin
}

Expand Down Expand Up @@ -316,7 +318,7 @@ data MultiEraPredicateFailure crypto
-- Declared total collateral must match actual delta between collateral
-- inputs and collateral return
| TotalCollateralMismatch
{ computedTotalCollateral :: Coin
{ computedTotalCollateral :: DeltaCoin
, declaredTotalCollateral :: Coin
}

Expand Down Expand Up @@ -394,6 +396,10 @@ data MultiEraPredicateFailure crypto
, expectedHash :: StrictMaybe (ScriptHash crypto)
}

-- During the bootstrapping phase, actions can only be parameter change,
-- hard-fork initation or info.
| UnauthorizedGovernanceAction

---------------------------------------------------------------------------
-- Rule → PPUP
---------------------------------------------------------------------------
Expand Down Expand Up @@ -545,6 +551,7 @@ predicateFailurePriority = \case
InvalidMIRTransfer{} -> 1
InvalidHardForkVersionBump{} -> 1
UnrecognizedCertificateType{} -> 1
UnauthorizedGovernanceAction{} -> 1

EmptyInputSet{} -> 2
MintingOrBurningAda{} -> 2
Expand Down
Loading

0 comments on commit 6fd2a41

Please sign in to comment.