@cardano-ogmios/client
Advanced tools
Changelog
[4.0.0] - 2021-09-06
alonzo
block type, with various additions related to Alonzo.New state-queries:
Query | Description
--- | ---
poolIds
| The list of all pool identifiers currently registered and active.
poolParameters
| Stake pool parameters submitted with registration certificates.
poolsRanking
| Retrieve stake pools ranking (a.k.a desirabilities).
rewardsProvenance
| Get details about rewards calculation for the ongoing epoch.
Added missing properties in Byron's protocol parameters update. Somehow, an additionalProperties: true
had slipped through and caused the tests to pass with an incomplete schema.
Nested logs are now also structured, in particular those coming from the Handshake
or TxSubmission
protocols. Before, any message from these layers where actually plain strings with unintelligible gibberish. Now, the submitted transaction payload is shown encoded as hexadecimals and errors are also serialized to json using the same model / codec as the one used for websockets. The handshake is also more verbose now clearly showing what version is being requested and what the node replies / select. All in all, better logs.
The Dockerfile now includes a build definition for building cardano-node
and ogmios
into the same image, which is the default and suggested mode of operation. To build an image with only Ogmios, use the build --target ogmios
. Docker Hub now hosts two image repositories: cardanosolutions/cardano-node-ogmios
and cardanosolutions/ogmios
.
Docker Hub images are now tagged with a network suffix (e.g. -mainnet
). In the case of mainnet, the -mainnet
suffix is optional, and points to the same build as the defaults.
A new repository for hosting Cardano configurations of various services was created and is now used in Ogmios. Configuration for cardano-node (and therefore Ogmios) or, network genesis can be found in input-output-hk/cardano-configurations. Configurations are updated automatically by a nightly job to be always up-to-date. They can be pulled into projects as git submodules.
New possible errors from the transaction submission (stemming from the Alonzo integration):
collateralHasNonAdaAssets
collateralIsScript
collateralTooSmall
collectErrors
datumsMismatch
executionUnitsTooLarge
extraDataMismatch
extraRedeemers
mirNegativeTransferNotCurrentlyAllowed
mirProducesNegativeUpdate
mirTransferNotCurrentlyAllowed
missingDatumHashesForInputs
missingRequiredDatums
missingRequiredRedeemers
missingRequiredSignatures
outsideForecast
poolMetadataHashTooBig
tooManyCollateralInputs
unspendableDatums
unspendableScriptInputs
validationTagMismatch
![TypeScript][] Compatibility with aforementioned server additions.
![TypeScript][] The ChainSyncClient
now implements an in-memory queue to ensure requestNext
responses are processed sequentially when there are async operations in the message handlers. This behaviour can be bypassed where sequential processsing is not required, by setting the new construction option sequential
to false
.
![TypeScript][] The StateQueryClient
can now re-acquire new points at will, useful for long-running clients for which previously acquired points may expire.
![TypeScript][] The TypeScript client is now fully documented!
⚠️ The utxo
query can now accept a list TxIn
as argument, and still supports list of Address
. Note that lists can't be heterogeneous and it's not possible to mix TxIn
and Address
.
⚠️ Asset quantities and transaction metadata's integers are now parsed as native BigInt
.
The memory
and steps
JSON representations for prices
are no longer coins, but ratio (represented as strings in the API).
The moveInstantaneousRewards
certificates have a new optional field value
and not only a rewards
map as before. When value
is present, it signifies that rewards are moved to the other pot.
Auxiliary data's scriptPreImages
in Allegra & Mary has been replaced with a field scripts
which has one field native
. The value of native
corresponds to what used to be the value of scriptPreImages
. In Alonzo, scripts
may also have another field plutus
with a serialized Plutus script.
Transactions witnesses' address
has been renamed into signatures
, and the structure of the object has been changed to be a map from public keys to signatures (instead of an object with two field key
& signature
).
Transactions witnesses' script
has been renamed into scripts
.
Transaction submission errors' networkMismatch
now returns an invalidEntities
list of object in the form of { "type": ..., "entity": }
where type
is a text tag designating the type of entity for which there is a network identifier mismatch. Values can be address
, rewardAccount
and since Alonzo transactionBody
. The entity
field contains some details specific to the type of entity. Before, it used to be two distinct fields invalidAddresses
and invalidRewardAccounts
.
Empty transaction metadata are no longer materialized by an object with two null fields ({ "hash": null, "body": null }
). Empty transaction metadata are now equal to null
.
map
metadatum in transactions' metadata are no longer materialized as a list of list of singleton objects: [[{ "k": ... }, { "v": ... }], ...]
but instead, as a list of object with two fields k
and v
: [{ "k": ..., "v": ...}, ...]
. This was an oversight from the encoder which was never intended to end up that way but happened to slip in because the schema for metadatum was not specified / documented (and therefore, also escaped testing). This is now documented properly.
The TxOut
(and thus Utxo) model definitions have been unified and harmonized across all eras. That is, pre-Mary eras now also wrap Ada values in an object with a field "coins": ...
. This reduces the discrepancy between eras for there's now a single TxOut representation valid across all eras. Some fields are however optional and only present in some eras (e.g. datum
starting from Alonzo)
⚠️ ![TypeScript][] State queries (resp. the StateQueryClient
) now automatically runs queries against the last known tip if no explicit point is provided. It used to acquire a point on the first query which would eventually become too old. The behavior is now equivalent to acquiring a new point on every query!
⚠️ ![TypeScript][] SubmitTx
no-longer returns Byron errors. Consequently, submit errors are no longer scoped under errors.byron
or errors.shelley
but simply errors
.
⚠️ ![TypeScript][] Fixed proposedProtocolParameters
query. All fields are actually required AND, more importantly, it can now return either Shelley protocol parameters or, Alonzo protocol parameters.
![TypeScript][] The ChainSyncClientMessageHandlers
methods now must return a promise.
![TypeScript][] Various reworks and renaming of the TypeScript types
AssetQuantity
is now a native bigint
Int
are now native bigint
DelegationsAndRewards
renamed into DelegationsAndRewardsByAccounts
DelegationsAndRewards1
renamed into DelegationsAndRewards
NonMyopicMemberRewards1
renamed into NonMyopicMemberRewards
TxTooLarge1
renamed into TxTooLarge
FeeTooSmall1
renamed into FeeTooSmall
NetworkMismatch1
renamed into NetworkMismatch
Proposal
renamed into UpdateProposalShelley
Utxo1
, Utxo2
, UtxoMary
have been unified into a single Utxo
type. Refer to server breaking changes for details.Tip
& Point
renamed into TipOrOrigin
and PointOrOrigin
. As a consequence, Tip1
and Point1
are now simply Tip
and Point
.NullX
merged into a single Null
typeledgerTip1
to GetLedgerTip
and so forth for all queries.datumsMismatch
, a previously introduced error from the transaction submission has been removed / replaced.
SubmitTx
can no longer return SubmitTxError[Byron]
. All the child error types have been removed accordingly, namely:
UtxoValidationError
TxValidationError
LovelaceError
![TypeScript][] ChainSyncClient
no longer exposes a requestNext function. Instead you must invoke the callback provided as the second argument in each of rollBackward and rollForward handlers.
![TypeScript][] ChainSyncClient
no longer exposes JSON-WSP reflection as there would be unexpected results given the first n messages would all share the same reflected value.
Changelog
[3.2.0] - 2021-05-09
ogmios.compact.v1
. When enabled,
Ogmios will omit fields such as witnesses, proofs and signatures from responses to make responses smaller.SubmitTx
failures:
Allegra:
expiredUtxo
is replaced by outsideOfValidityInterval
triesToForgeAda
Mary:
valueNotConserved.consumed
is now a Value
(instead of a DeltaCoin
)valueNotConserved.produced
is now a Value
(instead of a DeltaCoin
)outputTooSmall
items are now of type TxOut[Mary]
tooManyAssetsInOutput
/health
endpoint now returns two additional pieces of information:
networkSynchronization
percentage to indicate how far Ogmios / the node is from the network.currentEra
value to indicate the corresponding Cardano era Ogmios / the node is currently running in.cabal.project
to enable cabal support as well).Dockerfile
, but cache from DockerHub can be leveraged to reduce overall build time when building
from scratch.points
→ point
), and introduce more automated test
to catch this kind of errors more easily.ø