diff --git a/CHANGELOG.md b/CHANGELOG.md
index 10d4bcf17..d7fd6be30 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,45 @@ pre: "6. "
math: true
---
+### [Unreleased]
+
+#### Added
+
+- Stake pools returned by `queryLedgerState/stakePools`, and stake pools listed in the genesis configuration, can carry an optional `blsKey` with a `verificationKey` and a `proofOfPossession`. It is present only for pools that registered a BLS key (Dijkstra).
+
+- Evaluation failures now report "Unexpected failure while building the script context: ..." when the ledger cannot build a script context for a transaction, and, in the Dijkstra era, "Couldn't find the script executed for ..." when a redeemer has no matching script.
+
+- New transaction submission errors in the Dijkstra era:
+ - [`MissingRequiredGuards`](https://ogmios.dev/mini-protocols/local-tx-submission#schema-3169/MissingRequiredGuards) (`code=3169`) when the transaction or one of its sub-transactions requires guards that the top-level transaction does not list in its guards. `data.missingGuards` lists them.
+ - [`MalformedGuardDatums`](https://ogmios.dev/mini-protocols/local-tx-submission#schema-3170/MalformedGuardDatums) (`code=3170`) when a required top-level guard has the wrong datum: a guard that resolves to a Plutus script needs a datum, and a key hash or native script guard must not have one. `data.malformedGuards` lists the guards.
+ - [`PointerAddressInCollateralReturn`](https://ogmios.dev/mini-protocols/local-tx-submission#schema-3171/PointerAddressInCollateralReturn) (`code=3171`) when the collateral return output pays to a pointer address, which the Dijkstra era no longer allows. `data.collateralReturn` holds the output.
+ - [`InvalidBlsProofOfPossession`](https://ogmios.dev/mini-protocols/local-tx-submission#schema-3172/InvalidBlsProofOfPossession) (`code=3172`) when a stake pool registration carries a BLS key with an invalid proof of possession. The error gives the pool id and the key.
+ - [`AllInputsAreSpent`](https://ogmios.dev/mini-protocols/local-tx-submission#schema-3173/AllInputsAreSpent) (`code=3173`) when all inputs of the transaction are already spent, which usually means that the transaction is already on chain.
+ - [`WithdrawalsExceedingBalance`](https://ogmios.dev/mini-protocols/local-tx-submission#schema-3174/WithdrawalsExceedingBalance) (`code=3174`) when the total withdrawn from an account across the batch is more than the account balance at the start of the batch. For each account, the error gives the amount withdrawn and the balance.
+ - [`BalancesOutsideIntervals`](https://ogmios.dev/mini-protocols/local-tx-submission#schema-3175/BalancesOutsideIntervals) (`code=3175`) when an account balance does not satisfy an account balance interval that the transaction asserts. For each account, the error gives the balance and the interval, and `data.checkedAgainst` tells whether the check used the balances at the start of the batch or the balances seen by the transaction.
+
+- New transaction submission error [`StakePoolVrfKeyAlreadyRegistered`](https://ogmios.dev/mini-protocols/local-tx-submission#schema-3176/StakePoolVrfKeyAlreadyRegistered) (`code=3176`) when a stake pool registration or update uses a VRF key that another stake pool already uses. `data.stakePool.id` gives the pool and `data.vrfVerificationKeyHash` the VRF key hash. Before, Ogmios reported this failure as [`UnknownStakePool`](https://ogmios.dev/mini-protocols/local-tx-submission#schema-3140/UnknownStakePool) (`code=3140`), which pointed to the wrong cause.
+
+#### Changed
+
+- **⚠️ BREAKING-CHANGE ⚠️**: Ogmios now requires node-to-client version 23, which cardano-node 10.7.1 and later offer. A cardano-node that does not offer it is refused at the handshake. Ogmios then stops with an error that lists the node-to-client versions the cardano-node offers and the versions Ogmios supports, instead of a raw handshake protocol error.
+
+- The message of [`IncompleteWithdrawals`](https://ogmios.dev/mini-protocols/local-tx-submission#schema-3141/IncompleteWithdrawals) (`code=3141`) no longer says that every withdrawal must take the full account balance. That rule holds before the Dijkstra era, and in the Dijkstra era only for transactions in legacy mode.
+
+- In the Dijkstra era, the evaluation error for a pointer address says whether it was found in an input ("Found inputs locked by a (legacy) pointer address") or in an output ("Found outputs to a (legacy) pointer address"). It always said outputs before.
+
+- Bump dependencies to the latest cardano-ledger, ouroboros-consensus and ouroboros-network releases.
+
+#### Fixed
+
+- A failure while encoding the response of `submitTransaction` now returns a JSON-RPC internal error to the client. Before, the websocket connection was closed with no reply.
+
+- In the Dijkstra era, `submitTransaction` now reports why the ledger rejected a transaction, with the same errors as in earlier eras. Before, a Dijkstra rejection closed the websocket connection with no reply. A failure inside a sub-transaction gets the same error as the same failure in a top-level transaction, and the error does not say which sub-transaction failed. A withdrawal from an account that is not registered gets [`UnknownCredential`](https://ogmios.dev/mini-protocols/local-tx-submission#schema-3146/UnknownCredential) (`code=3146`) with the credential of one such account, where earlier eras report [`IncompleteWithdrawals`](https://ogmios.dev/mini-protocols/local-tx-submission#schema-3141/IncompleteWithdrawals) (`code=3141`).
+
+- [`RetirementTooLate`](https://ogmios.dev/mini-protocols/local-tx-submission#schema-3142/RetirementTooLate) (`code=3142`) now reports the right epochs. Before, `data.currentEpoch` and `data.declaredEpoch` were swapped, and `data.firstInvalidEpoch` held the last valid retirement epoch instead of the first invalid one. The ledger also raises this error when the retirement epoch is not after the current epoch, and the message now says so.
+
+- The JSON schema now lists `dijkstra` as an era name where Ogmios can return it, such as the `era` of a block and the eras in an era mismatch error. The schema also describes the `guard` clause of native scripts and the `guard` script purpose, which Dijkstra transactions can contain. The `guard` purpose appears in redeemer pointers and in the list of missing redeemers. Before, such responses did not match the schema. The schema also describes the `maxReferenceScriptsSizePerBlock` and `maxReferenceScriptsSizePerTransaction` protocol parameters of the Dijkstra era, and accepts the stake addresses that Ogmios uses as keys of the withdrawals in a `treasuryWithdrawals` governance action. Before, responses that contained them did not match the schema.
+
### [6.14.0] - 2025-10-16
#### Added
diff --git a/clients/TypeScript/packages/schema/src/index.ts b/clients/TypeScript/packages/schema/src/index.ts
index 04a757b89..9afa18c77 100644
--- a/clients/TypeScript/packages/schema/src/index.ts
+++ b/clients/TypeScript/packages/schema/src/index.ts
@@ -42,7 +42,14 @@ export type Script = Native | Plutus;
/**
* A phase-1 monetary script. Timelocks constraints are only supported since Allegra.
*/
-export type ScriptNative = ClauseSignature | ClauseAny | ClauseAll | ClauseSome | ClauseBefore | ClauseAfter;
+export type ScriptNative =
+ | ClauseSignature
+ | ClauseGuard
+ | ClauseAny
+ | ClauseAll
+ | ClauseSome
+ | ClauseBefore
+ | ClauseAfter;
/**
* A Blake2b 28-byte hash digest, encoded in base16.
*/
@@ -124,6 +131,10 @@ export type MetadatumDetailedSchema =
* An Ed25519 verification key.
*/
export type VerificationKey = string;
+/**
+ * An Ed25519-BIP32 Byron genesis delegate verification key with chain-code.
+ */
+export type ExtendedVerificationKey = string;
/**
* An EdDSA signature.
*/
@@ -141,10 +152,6 @@ export type AddressAttributes = string;
*/
export type RedeemerData = string;
export type BootstrapProtocolId = number;
-/**
- * An Ed25519-BIP32 Byron genesis delegate verification key with chain-code.
- */
-export type ExtendedVerificationKey = string;
export type GenesisHash = "genesis";
export type VrfProof = string;
export type VrfOutput = string;
@@ -220,21 +227,30 @@ export type SubmitTransactionFailure =
| SubmitTransactionFailureReferenceScriptsTooLarge
| SubmitTransactionFailureUnknownVoters
| SubmitTransactionFailureEmptyTreasuryWithdrawal
+ | SubmitTransactionFailureMissingRequiredGuards
+ | SubmitTransactionFailureMalformedGuardDatums
+ | SubmitTransactionFailurePointerAddressInCollateralReturn
+ | SubmitTransactionFailureInvalidBlsProofOfPossession
+ | SubmitTransactionFailureAllInputsAreSpent
+ | SubmitTransactionFailureWithdrawalsExceedingBalance
+ | SubmitTransactionFailureBalancesOutsideIntervals
+ | SubmitTransactionFailureStakePoolVrfKeyAlreadyRegistered
| SubmitTransactionFailureUnexpectedMempoolError
| SubmitTransactionFailureUnrecognizedCertificateType;
-export type Era = "byron" | "shelley" | "allegra" | "mary" | "alonzo" | "babbage" | "conway";
+export type Era = "byron" | "shelley" | "allegra" | "mary" | "alonzo" | "babbage" | "conway" | "dijkstra";
export type ScriptPurpose =
| ScriptPurposeSpend
| ScriptPurposeMint
| ScriptPurposePublish
| ScriptPurposeWithdraw
| ScriptPurposePropose
- | ScriptPurposeVote;
+ | ScriptPurposeVote
+ | ScriptPurposeGuard;
/**
* A Blake2b 28-byte hash digest, encoded in base16.
*/
export type PolicyId = string;
-export type Language = "plutus:v1" | "plutus:v2" | "plutus:v3";
+export type Language = "plutus:v1" | "plutus:v2" | "plutus:v3" | "plutus:v4";
export type Utxo = {
transaction: {
id: TransactionId;
@@ -659,6 +675,10 @@ export interface ClauseSignature {
clause: "signature";
from: DigestBlake2B224;
}
+export interface ClauseGuard {
+ clause: "guard";
+ from: DigestBlake2B224;
+}
export interface ClauseAny {
clause: "any";
from: ScriptNative[];
@@ -681,7 +701,7 @@ export interface ClauseAfter {
slot: Slot;
}
export interface Plutus {
- language: "plutus:v1" | "plutus:v2" | "plutus:v3";
+ language: "plutus:v1" | "plutus:v2" | "plutus:v3" | "plutus:v4";
cbor: string;
}
/**
@@ -741,6 +761,7 @@ export interface StakePoolRegistration {
export interface StakePool {
id: StakePoolId;
vrfVerificationKeyHash: DigestBlake2B256;
+ blsKey?: BlsKey;
owners: DigestBlake2B224[];
cost: ValueAdaOnly;
margin: Ratio;
@@ -749,6 +770,13 @@ export interface StakePool {
metadata?: Anchor;
relays: Relay[];
}
+/**
+ * A BLS12-381 (minimal-signature-size variant) verification key, along with a proof of possession of its signing key.
+ */
+export interface BlsKey {
+ verificationKey: string;
+ proofOfPossession: string;
+}
export interface Anchor {
hash: DigestAny;
url: string;
@@ -897,6 +925,12 @@ export interface ProposedProtocolParameters {
maxReferenceScriptsSize?: {
bytes: UInt64;
};
+ maxReferenceScriptsSizePerBlock?: {
+ bytes: UInt64;
+ };
+ maxReferenceScriptsSizePerTransaction?: {
+ bytes: UInt64;
+ };
maxValueSize?: {
bytes: UInt64;
};
@@ -1115,7 +1149,7 @@ export interface MetadatumMap {
v: MetadatumDetailedSchema;
}
/**
- * A signatory (EdDSA) for the transaction. The fields 'chainCode' and 'addressAttributes' are only present on bootstrap signatures (when spending from a Byron/Bootstrap address).
+ * A signatory (EdDSA) for the transaction. The fields 'chainCode' and 'addressAttributes' are only present on bootstrap signatures (when spending from a Byron/Bootstrap address). On Byron, the 'key' is an Ed25519-BIP32 XPub (key + chain-code) so the chain-code is carried inline; on Shelley and later it is a plain Ed25519 key with the chain-code in the separate 'chainCode' field.
*/
export interface Signatory {
key: VerificationKey | ExtendedVerificationKey;
@@ -1129,7 +1163,7 @@ export interface Redeemer {
validator: RedeemerPointer;
}
export interface RedeemerPointer {
- purpose: "spend" | "mint" | "publish" | "withdraw" | "vote" | "propose";
+ purpose: "spend" | "mint" | "publish" | "withdraw" | "vote" | "propose" | "guard";
index: UInt64;
}
/**
@@ -1195,7 +1229,7 @@ export interface BootstrapVote {
}
export interface BlockPraos {
type: "praos";
- era: "shelley" | "allegra" | "mary" | "alonzo" | "babbage" | "conway";
+ era: "shelley" | "allegra" | "mary" | "alonzo" | "babbage" | "conway" | "dijkstra";
id: DigestBlake2B256;
ancestor: DigestBlake2B256 | GenesisHash;
nonce?: CertifiedVrf;
@@ -1409,6 +1443,10 @@ export interface ScriptPurposeVote {
purpose: "vote";
issuer: VoterGenesisDelegate | VoterConstitutionalCommittee | VoterDelegateRepresentative | VoterStakePoolOperator;
}
+export interface ScriptPurposeGuard {
+ purpose: "guard";
+ script: DigestBlake2B224;
+}
/**
* Extraneous (non-required) redeemers found in the transaction. There are some redeemers that aren't pointing to any script. This could be because you've left some orphan redeemer behind, because they are pointing at the wrong thing or because you forgot to include their associated validator. Either way, the field 'data.extraneousRedeemers' lists the different orphan redeemer pointers.
*/
@@ -1745,7 +1783,7 @@ export interface SubmitTransactionFailureUnknownStakePool {
};
}
/**
- * The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.
+ * Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.
*/
export interface SubmitTransactionFailureIncompleteWithdrawals {
code: 3141;
@@ -1755,7 +1793,7 @@ export interface SubmitTransactionFailureIncompleteWithdrawals {
};
}
/**
- * A stake pool retirement certificate is trying to retire too late in the future. Indeed, there's a maximum delay for stake pool retirement, controlled by a protocol parameter. The field 'data.currentEpoch' indicates the current epoch known of the ledger, 'data.declaredEpoch' refers to the epoch declared in the retirement certificate and 'data.firstInvalidEpoch' is the first epoch considered invalid (too far) for retirement
+ * A stake pool retirement certificate lists an invalid retirement epoch. The epoch must be after the current epoch and before 'data.firstInvalidEpoch'. A protocol parameter sets the maximum delay for retirement. The field 'data.currentEpoch' is the current epoch, 'data.declaredEpoch' is the epoch listed in the certificate, and 'data.firstInvalidEpoch' is the first epoch too far in the future for retirement.
*/
export interface SubmitTransactionFailureRetirementTooLate {
code: 3142;
@@ -2050,6 +2088,111 @@ export interface SubmitTransactionFailureEmptyTreasuryWithdrawal {
code: 3168;
message: string;
}
+/**
+ * Some guards required by the transaction or by its sub-transactions are missing from the top-level transaction. Any credential (key hash or script) listed as a required top-level guard must also appear in the 'guards' of the top-level transaction. The field 'data.missingGuards' lists the required credentials that are absent.
+ */
+export interface SubmitTransactionFailureMissingRequiredGuards {
+ code: 3169;
+ message: string;
+ data: {
+ missingGuards: {
+ from: CredentialOrigin;
+ credential: DigestBlake2B224;
+ }[];
+ };
+}
+/**
+ * Some required top-level guards have a malformed datum. A required guard that resolves to a Plutus script must come with a datum, whereas a guard that is a key hash or resolves to a native script must not have one. The field 'data.malformedGuards' lists the offending credentials.
+ */
+export interface SubmitTransactionFailureMalformedGuardDatums {
+ code: 3170;
+ message: string;
+ data: {
+ malformedGuards: {
+ from: CredentialOrigin;
+ credential: DigestBlake2B224;
+ }[];
+ };
+}
+/**
+ * The collateral return output is sent to a pointer address. Since the Dijkstra era, pointer addresses are no longer allowed in collateral return outputs. The field 'data.collateralReturn' contains the offending output.
+ */
+export interface SubmitTransactionFailurePointerAddressInCollateralReturn {
+ code: 3171;
+ message: string;
+ data: {
+ collateralReturn: TransactionOutput;
+ };
+}
+/**
+ * A stake pool registration carries a BLS key with an invalid proof of possession. The proof must show possession of the signing key that matches the BLS verification key. The field 'data.stakePool.id' indicates the stake pool, and 'data.blsKey' contains the key and proof found in the certificate.
+ */
+export interface SubmitTransactionFailureInvalidBlsProofOfPossession {
+ code: 3172;
+ message: string;
+ data: {
+ stakePool: {
+ id: StakePoolId;
+ };
+ blsKey: BlsKey;
+ };
+}
+/**
+ * All inputs of the transaction are already spent. This usually means that the transaction has already been included in the ledger, so there's no need to submit it again.
+ */
+export interface SubmitTransactionFailureAllInputsAreSpent {
+ code: 3173;
+ message: string;
+}
+/**
+ * Some withdrawals exceed the balance of their account. A withdrawal may take any amount up to the account balance, but the total withdrawn from an account across the whole batch (the top-level transaction and its sub-transactions) must not exceed the balance at the start of the batch. In legacy mode, only withdrawals from sub-transactions count towards that total. The field 'data.excessiveWithdrawals' lists, for each account, the total withdrawn and the balance at the start of the batch.
+ */
+export interface SubmitTransactionFailureWithdrawalsExceedingBalance {
+ code: 3174;
+ message: string;
+ data: {
+ excessiveWithdrawals: {
+ account: RewardAccount;
+ withdrawn: ValueAdaOnly;
+ balance: ValueAdaOnly;
+ }[];
+ };
+}
+/**
+ * Some account balances fall outside the intervals asserted by the transaction. An interval has an inclusive lower bound and an exclusive upper bound, or asserts an exact balance. The field 'data.checkedAgainst' tells which balances were checked: 'batchStart' for the balances at the start of the batch, or 'transaction' for the balances seen by the (sub-)transaction that asserts the interval. The field 'data.balancesOutsideIntervals' lists each account with its balance and the interval it doesn't satisfy.
+ */
+export interface SubmitTransactionFailureBalancesOutsideIntervals {
+ code: 3175;
+ message: string;
+ data: {
+ checkedAgainst: "batchStart" | "transaction";
+ balancesOutsideIntervals: {
+ account: RewardAccount;
+ balance: ValueAdaOnly;
+ interval:
+ | {
+ exact: ValueAdaOnly;
+ }
+ | {
+ lowerBound?: ValueAdaOnly;
+ upperBound?: ValueAdaOnly;
+ };
+ }[];
+ };
+}
+/**
+ * A stake pool registration or update uses a VRF key that another stake pool already uses. Each stake pool needs its own VRF key. The field 'data.stakePool.id' indicates the stake pool, and 'data.vrfVerificationKeyHash' is the hash of the VRF key in use.
+ */
+export interface SubmitTransactionFailureStakePoolVrfKeyAlreadyRegistered {
+ code: 3176;
+ message: string;
+ data: {
+ stakePool: {
+ id: StakePoolId;
+ };
+ vrfVerificationKeyHash: DigestBlake2B256;
+ };
+}
/**
* A transaction was rejected due to custom rules that prevented it from entering the mempool. A justification is given as 'data.error'.
*/
@@ -2797,6 +2940,12 @@ export interface ProtocolParameters {
maxReferenceScriptsSize?: {
bytes: UInt64;
};
+ maxReferenceScriptsSizePerBlock?: {
+ bytes: UInt64;
+ };
+ maxReferenceScriptsSizePerTransaction?: {
+ bytes: UInt64;
+ };
stakePoolVotingThresholds?: StakePoolVotingThresholds;
constitutionalCommitteeMinSize?: UInt16;
constitutionalCommitteeMaxTermLength?: UInt64;
@@ -2949,6 +3098,7 @@ export interface QueryLedgerStateStakePoolsResponse {
export interface StakePoolView {
id: StakePoolId;
vrfVerificationKeyHash?: DigestBlake2B256;
+ blsKey?: BlsKey;
owners?: DigestBlake2B224[];
cost?: ValueAdaOnly;
margin?: Ratio;
diff --git a/docs/content/mini-protocols/local-tx-submission.md b/docs/content/mini-protocols/local-tx-submission.md
index 4a9cd307a..85ff199a6 100644
--- a/docs/content/mini-protocols/local-tx-submission.md
+++ b/docs/content/mini-protocols/local-tx-submission.md
@@ -352,10 +352,26 @@ components:
$ref: "/ogmios.json#/definitions/SubmitTransactionFailure/oneOf/68"
3168/EmptyTreasuryWithdrawal:
$ref: "/ogmios.json#/definitions/SubmitTransactionFailure/oneOf/69"
- 3997/UnexpectedMempoolError:
+ 3169/MissingRequiredGuards:
$ref: "/ogmios.json#/definitions/SubmitTransactionFailure/oneOf/70"
- 3998/UnrecognizedCertificateType:
+ 3170/MalformedGuardDatums:
$ref: "/ogmios.json#/definitions/SubmitTransactionFailure/oneOf/71"
+ 3171/PointerAddressInCollateralReturn:
+ $ref: "/ogmios.json#/definitions/SubmitTransactionFailure/oneOf/72"
+ 3172/InvalidBlsProofOfPossession:
+ $ref: "/ogmios.json#/definitions/SubmitTransactionFailure/oneOf/73"
+ 3173/AllInputsAreSpent:
+ $ref: "/ogmios.json#/definitions/SubmitTransactionFailure/oneOf/74"
+ 3174/WithdrawalsExceedingBalance:
+ $ref: "/ogmios.json#/definitions/SubmitTransactionFailure/oneOf/75"
+ 3175/BalancesOutsideIntervals:
+ $ref: "/ogmios.json#/definitions/SubmitTransactionFailure/oneOf/76"
+ 3176/StakePoolVrfKeyAlreadyRegistered:
+ $ref: "/ogmios.json#/definitions/SubmitTransactionFailure/oneOf/77"
+ 3997/UnexpectedMempoolError:
+ $ref: "/ogmios.json#/definitions/SubmitTransactionFailure/oneOf/78"
+ 3998/UnrecognizedCertificateType:
+ $ref: "/ogmios.json#/definitions/SubmitTransactionFailure/oneOf/79"
{{% /embed-async-api %}}
## API Reference
diff --git a/docs/static/cardano.json b/docs/static/cardano.json
index dd83a8315..cac63b374 100644
--- a/docs/static/cardano.json
+++ b/docs/static/cardano.json
@@ -160,7 +160,7 @@
}
, "era":
{ "type": "string"
- , "enum": [ "shelley", "allegra", "mary", "alonzo", "babbage", "conway" ]
+ , "enum": [ "shelley", "allegra", "mary", "alonzo", "babbage", "conway", "dijkstra" ]
}
, "id": { "$ref": "cardano.json#/definitions/Digest" }
, "ancestor":
@@ -207,6 +207,31 @@
, "maximum": 18446744073709552999
}
+ , "BlsKey":
+ { "title": "BlsKey"
+ , "description": "A BLS12-381 (minimal-signature-size variant) verification key, along with a proof of possession of its signing key."
+ , "type": "object"
+ , "additionalProperties": false
+ , "required":
+ [ "verificationKey"
+ , "proofOfPossession"
+ ]
+ , "properties":
+ { "verificationKey":
+ { "type": "string"
+ , "contentEncoding": "base16"
+ , "minLength": 192
+ , "maxLength": 192
+ }
+ , "proofOfPossession":
+ { "type": "string"
+ , "contentEncoding": "base16"
+ , "minLength": 96
+ , "maxLength": 96
+ }
+ }
+ }
+
, "BootstrapProtocolUpdate":
{ "title": "BootstrapProtocolUpdate"
, "type": "object"
@@ -1032,7 +1057,7 @@
, "Era":
{ "title": "Era"
, "type": "string"
- , "enum": [ "byron", "shelley", "allegra", "mary", "alonzo", "babbage", "conway" ]
+ , "enum": [ "byron", "shelley", "allegra", "mary", "alonzo", "babbage", "conway", "dijkstra" ]
}
, "EraWithGenesis":
@@ -1984,6 +2009,9 @@
, "vrfVerificationKeyHash":
{ "$ref": "cardano.json#/definitions/Digest"
}
+ , "blsKey":
+ { "$ref": "cardano.json#/definitions/BlsKey"
+ }
, "owners":
{ "type": "array"
, "items":
@@ -2039,6 +2067,9 @@
, "vrfVerificationKeyHash":
{ "$ref": "cardano.json#/definitions/Digest"
}
+ , "blsKey":
+ { "$ref": "cardano.json#/definitions/BlsKey"
+ }
, "owners":
{ "type": "array"
, "items":
@@ -2126,6 +2157,8 @@
, "maxBlockHeaderSize": { "$ref": "cardano.json#/definitions/NumberOfBytes" }
, "maxTransactionSize": { "$ref": "cardano.json#/definitions/NumberOfBytes" }
, "maxReferenceScriptsSize": { "$ref": "cardano.json#/definitions/NumberOfBytes" }
+ , "maxReferenceScriptsSizePerBlock": { "$ref": "cardano.json#/definitions/NumberOfBytes" }
+ , "maxReferenceScriptsSizePerTransaction": { "$ref": "cardano.json#/definitions/NumberOfBytes" }
, "maxValueSize": { "$ref": "cardano.json#/definitions/NumberOfBytes" }
, "extraEntropy": { "$ref": "cardano.json#/definitions/Nonce" }
, "stakeCredentialDeposit": { "$ref": "cardano.json#/definitions/Value" }
@@ -2220,6 +2253,8 @@
, "maxExecutionUnitsPerTransaction": { "$ref": "cardano.json#/definitions/ExecutionUnits" }
, "maxExecutionUnitsPerBlock": { "$ref": "cardano.json#/definitions/ExecutionUnits" }
, "maxReferenceScriptsSize": { "$ref": "cardano.json#/definitions/NumberOfBytes" }
+ , "maxReferenceScriptsSizePerBlock": { "$ref": "cardano.json#/definitions/NumberOfBytes" }
+ , "maxReferenceScriptsSizePerTransaction": { "$ref": "cardano.json#/definitions/NumberOfBytes" }
, "stakePoolVotingThresholds": { "$ref": "cardano.json#/definitions/StakePoolVotingThresholds" }
, "constitutionalCommitteeMinSize": { "$ref": "cardano.json#/definitions/UInt16" }
, "constitutionalCommitteeMaxTermLength": { "$ref": "cardano.json#/definitions/UInt64" }
@@ -2294,7 +2329,7 @@
, "properties":
{ "purpose":
{ "type": "string"
- , "enum": [ "spend", "mint", "publish", "withdraw", "vote", "propose" ]
+ , "enum": [ "spend", "mint", "publish", "withdraw", "vote", "propose", "guard" ]
}
, "index":
{ "$ref": "cardano.json#/definitions/UInt64"
@@ -2377,9 +2412,9 @@
{ "title": "RewardTransfer"
, "type": "object"
, "additionalProperties": { "$ref": "cardano.json#/definitions/Value" }
- , "propertyNames": { "pattern": "[0-9a-f]{56}$" }
+ , "propertyNames": { "$ref": "cardano.json#/definitions/RewardAccount" }
, "examples":
- [ { "6d06fe0a5a8cb6d2bcc352581dea626bb5b2f66edf85678b2f2fa7b5": { "ada": { "lovelace": 123456789 } }
+ [ { "stake1ux7pt9adw8z46tgqn2f8fvurrhk325gcm4mf75mkmmxpx6gae9mzv": { "ada": { "lovelace": 123456789 } }
}
]
}
@@ -2467,6 +2502,20 @@
}
}
}
+ , { "type": "object"
+ , "title": "Clause"
+ , "additionalProperties": false
+ , "required": [ "clause", "from" ]
+ , "properties":
+ { "clause":
+ { "type": "string"
+ , "enum": [ "guard" ]
+ }
+ , "from":
+ { "$ref": "cardano.json#/definitions/Digest"
+ }
+ }
+ }
, { "type": "object"
, "title": "Clause"
, "additionalProperties": false
@@ -2637,6 +2686,18 @@
}
}
}
+ , { "title": "ScriptPurpose"
+ , "type": "object"
+ , "additionalProperties": false
+ , "required": [ "purpose", "script" ]
+ , "properties":
+ { "purpose":
+ { "type": "string"
+ , "enum": [ "guard" ]
+ }
+ , "script": { "$ref": "cardano.json#/definitions/Digest" }
+ }
+ }
]
}
diff --git a/docs/static/ogmios.json b/docs/static/ogmios.json
index 51ed384e6..e70131b0c 100644
--- a/docs/static/ogmios.json
+++ b/docs/static/ogmios.json
@@ -3916,7 +3916,7 @@
}
}
, { "title": "SubmitTransactionFailure"
- , "description": "The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals."
+ , "description": "Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn."
, "type": "object"
, "required": [ "code", "message", "data" ]
, "additionalProperties": false
@@ -3934,7 +3934,7 @@
}
}
, { "title": "SubmitTransactionFailure"
- , "description": "A stake pool retirement certificate is trying to retire too late in the future. Indeed, there's a maximum delay for stake pool retirement, controlled by a protocol parameter. The field 'data.currentEpoch' indicates the current epoch known of the ledger, 'data.declaredEpoch' refers to the epoch declared in the retirement certificate and 'data.firstInvalidEpoch' is the first epoch considered invalid (too far) for retirement"
+ , "description": "A stake pool retirement certificate lists an invalid retirement epoch. The epoch must be after the current epoch and before 'data.firstInvalidEpoch'. A protocol parameter sets the maximum delay for retirement. The field 'data.currentEpoch' is the current epoch, 'data.declaredEpoch' is the epoch listed in the certificate, and 'data.firstInvalidEpoch' is the first epoch too far in the future for retirement."
, "type": "object"
, "required": [ "code", "message", "data" ]
, "additionalProperties": false
@@ -4486,6 +4486,226 @@
, "message": { "type": "string" }
}
}
+ , { "title": "SubmitTransactionFailure"
+ , "description": "Some guards required by the transaction or by its sub-transactions are missing from the top-level transaction. Any credential (key hash or script) listed as a required top-level guard must also appear in the 'guards' of the top-level transaction. The field 'data.missingGuards' lists the required credentials that are absent."
+ , "type": "object"
+ , "required": [ "code", "message", "data" ]
+ , "additionalProperties": false
+ , "properties":
+ { "code": { "type": "integer", "enum": [ 3169 ] }
+ , "message": { "type": "string" }
+ , "data":
+ { "type": "object"
+ , "additionalProperties": false
+ , "required": [ "missingGuards" ]
+ , "properties":
+ { "missingGuards":
+ { "type": "array"
+ , "items":
+ { "type": "object"
+ , "additionalProperties": false
+ , "required": [ "from", "credential" ]
+ , "properties":
+ { "from": { "$ref": "cardano.json#/definitions/CredentialOrigin" }
+ , "credential": { "$ref": "cardano.json#/definitions/Digest" }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ , { "title": "SubmitTransactionFailure"
+ , "description": "Some required top-level guards have a malformed datum. A required guard that resolves to a Plutus script must come with a datum, whereas a guard that is a key hash or resolves to a native script must not have one. The field 'data.malformedGuards' lists the offending credentials."
+ , "type": "object"
+ , "required": [ "code", "message", "data" ]
+ , "additionalProperties": false
+ , "properties":
+ { "code": { "type": "integer", "enum": [ 3170 ] }
+ , "message": { "type": "string" }
+ , "data":
+ { "type": "object"
+ , "additionalProperties": false
+ , "required": [ "malformedGuards" ]
+ , "properties":
+ { "malformedGuards":
+ { "type": "array"
+ , "items":
+ { "type": "object"
+ , "additionalProperties": false
+ , "required": [ "from", "credential" ]
+ , "properties":
+ { "from": { "$ref": "cardano.json#/definitions/CredentialOrigin" }
+ , "credential": { "$ref": "cardano.json#/definitions/Digest" }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ , { "title": "SubmitTransactionFailure"
+ , "description": "The collateral return output is sent to a pointer address. Since the Dijkstra era, pointer addresses are no longer allowed in collateral return outputs. The field 'data.collateralReturn' contains the offending output."
+ , "type": "object"
+ , "required": [ "code", "message", "data" ]
+ , "additionalProperties": false
+ , "properties":
+ { "code": { "type": "integer", "enum": [ 3171 ] }
+ , "message": { "type": "string" }
+ , "data":
+ { "type": "object"
+ , "additionalProperties": false
+ , "required": [ "collateralReturn" ]
+ , "properties":
+ { "collateralReturn": { "$ref": "cardano.json#/definitions/TransactionOutput" }
+ }
+ }
+ }
+ }
+ , { "title": "SubmitTransactionFailure"
+ , "description": "A stake pool registration carries a BLS key with an invalid proof of possession. The proof must show possession of the signing key that matches the BLS verification key. The field 'data.stakePool.id' indicates the stake pool, and 'data.blsKey' contains the key and proof found in the certificate."
+ , "type": "object"
+ , "required": [ "code", "message", "data" ]
+ , "additionalProperties": false
+ , "properties":
+ { "code": { "type": "integer", "enum": [ 3172 ] }
+ , "message": { "type": "string" }
+ , "data":
+ { "type": "object"
+ , "additionalProperties": false
+ , "required": [ "stakePool", "blsKey" ]
+ , "properties":
+ { "stakePool":
+ { "type": "object"
+ , "additionalProperties": false
+ , "required": [ "id" ]
+ , "properties":
+ { "id": { "$ref": "cardano.json#/definitions/StakePoolId" }
+ }
+ }
+ , "blsKey": { "$ref": "cardano.json#/definitions/BlsKey" }
+ }
+ }
+ }
+ }
+ , { "title": "SubmitTransactionFailure"
+ , "description": "All inputs of the transaction are already spent. This usually means that the transaction has already been included in the ledger, so there's no need to submit it again."
+ , "type": "object"
+ , "required": [ "code", "message" ]
+ , "additionalProperties": false
+ , "properties":
+ { "code": { "type": "integer", "enum": [ 3173 ] }
+ , "message": { "type": "string" }
+ }
+ }
+ , { "title": "SubmitTransactionFailure"
+ , "description": "Some withdrawals exceed the balance of their account. A withdrawal may take any amount up to the account balance, but the total withdrawn from an account across the whole batch (the top-level transaction and its sub-transactions) must not exceed the balance at the start of the batch. In legacy mode, only withdrawals from sub-transactions count towards that total. The field 'data.excessiveWithdrawals' lists, for each account, the total withdrawn and the balance at the start of the batch."
+ , "type": "object"
+ , "required": [ "code", "message", "data" ]
+ , "additionalProperties": false
+ , "properties":
+ { "code": { "type": "integer", "enum": [ 3174 ] }
+ , "message": { "type": "string" }
+ , "data":
+ { "type": "object"
+ , "additionalProperties": false
+ , "required": [ "excessiveWithdrawals" ]
+ , "properties":
+ { "excessiveWithdrawals":
+ { "type": "array"
+ , "items":
+ { "type": "object"
+ , "additionalProperties": false
+ , "required": [ "account", "withdrawn", "balance" ]
+ , "properties":
+ { "account": { "$ref": "cardano.json#/definitions/RewardAccount" }
+ , "withdrawn": { "$ref": "cardano.json#/definitions/Value" }
+ , "balance": { "$ref": "cardano.json#/definitions/Value" }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ , { "title": "SubmitTransactionFailure"
+ , "description": "Some account balances fall outside the intervals asserted by the transaction. An interval has an inclusive lower bound and an exclusive upper bound, or asserts an exact balance. The field 'data.checkedAgainst' tells which balances were checked: 'batchStart' for the balances at the start of the batch, or 'transaction' for the balances seen by the (sub-)transaction that asserts the interval. The field 'data.balancesOutsideIntervals' lists each account with its balance and the interval it doesn't satisfy."
+ , "type": "object"
+ , "required": [ "code", "message", "data" ]
+ , "additionalProperties": false
+ , "properties":
+ { "code": { "type": "integer", "enum": [ 3175 ] }
+ , "message": { "type": "string" }
+ , "data":
+ { "type": "object"
+ , "additionalProperties": false
+ , "required": [ "checkedAgainst", "balancesOutsideIntervals" ]
+ , "properties":
+ { "checkedAgainst":
+ { "type": "string"
+ , "enum": [ "batchStart", "transaction" ]
+ }
+ , "balancesOutsideIntervals":
+ { "type": "array"
+ , "items":
+ { "type": "object"
+ , "additionalProperties": false
+ , "required": [ "account", "balance", "interval" ]
+ , "properties":
+ { "account": { "$ref": "cardano.json#/definitions/RewardAccount" }
+ , "balance": { "$ref": "cardano.json#/definitions/Value" }
+ , "interval":
+ { "oneOf":
+ [ { "type": "object"
+ , "additionalProperties": false
+ , "required": [ "exact" ]
+ , "properties":
+ { "exact": { "$ref": "cardano.json#/definitions/Value" }
+ }
+ }
+ , { "type": "object"
+ , "additionalProperties": false
+ , "minProperties": 1
+ , "properties":
+ { "lowerBound": { "$ref": "cardano.json#/definitions/Value" }
+ , "upperBound": { "$ref": "cardano.json#/definitions/Value" }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ , { "title": "SubmitTransactionFailure"
+ , "description": "A stake pool registration or update uses a VRF key that another stake pool already uses. Each stake pool needs its own VRF key. The field 'data.stakePool.id' indicates the stake pool, and 'data.vrfVerificationKeyHash' is the hash of the VRF key in use."
+ , "type": "object"
+ , "required": [ "code", "message", "data" ]
+ , "additionalProperties": false
+ , "properties":
+ { "code": { "type": "integer", "enum": [ 3176 ] }
+ , "message": { "type": "string" }
+ , "data":
+ { "type": "object"
+ , "additionalProperties": false
+ , "required": [ "stakePool", "vrfVerificationKeyHash" ]
+ , "properties":
+ { "stakePool":
+ { "type": "object"
+ , "additionalProperties": false
+ , "required": [ "id" ]
+ , "properties":
+ { "id": { "$ref": "cardano.json#/definitions/StakePoolId" }
+ }
+ }
+ , "vrfVerificationKeyHash": { "$ref": "cardano.json#/definitions/Digest" }
+ }
+ }
+ }
+ }
, { "title": "SubmitTransactionFailure"
, "description": "A transaction was rejected due to custom rules that prevented it from entering the mempool. A justification is given as 'data.error'."
, "type": "object"
diff --git a/flake.lock b/flake.lock
index 7e713cff9..9d437a1f8 100644
--- a/flake.lock
+++ b/flake.lock
@@ -3,11 +3,11 @@
"CHaP": {
"flake": false,
"locked": {
- "lastModified": 1789604756,
- "narHash": "sha256-65Tjhgm7StVkrek4aq8pvJ+OGkgREMFRFoIeXzyJyf4=",
+ "lastModified": 1793096209,
+ "narHash": "sha256-0IdpHmkjiA9MFpQdeXAh+sPERPwxUGcbXCyXRe0bnf0=",
"owner": "intersectmbo",
"repo": "cardano-haskell-packages",
- "rev": "24dc50911743edb8dc5389f177385ed19ec6519a",
+ "rev": "ca2eb6262234e31bfcd411d98dc3079943c5fdc2",
"type": "github"
},
"original": {
@@ -171,11 +171,11 @@
"hackageNix": {
"flake": false,
"locked": {
- "lastModified": 1790075659,
- "narHash": "sha256-WNvLM573+7svBUOGn5IHr3fTiF+EEajqU2s0YdIyLaA=",
+ "lastModified": 1793090548,
+ "narHash": "sha256-81r5GAIIsBMVkfPIEq95i9wRSf6vXL1kv0TDeeGHJmY=",
"owner": "input-output-hk",
"repo": "hackage.nix",
- "rev": "ab981f2b2d5ae97f8337ab61554bcc943e197383",
+ "rev": "79009f315865e39a0d4c1e9564536c709456d863",
"type": "github"
},
"original": {
diff --git a/server/cabal.project b/server/cabal.project
index 158e93c57..ca441a789 100644
--- a/server/cabal.project
+++ b/server/cabal.project
@@ -10,18 +10,20 @@ repository cardano-haskell-packages
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee
index-state:
- , hackage.haskell.org 2026-08-14T13:38:07Z
- , cardano-haskell-packages 2026-09-15T00:00:00Z
+ , hackage.haskell.org 2026-10-23T00:00:00Z
+ , cardano-haskell-packages 2026-10-27T09:47:50Z
constraints:
- , any.cardano-node == 11.1.1
+ , any.cardano-ledger-conway >= 1.24
- , any.cardano-ledger-conway >= 1.22.1.0
+ , any.ouroboros-consensus ^>= 5.2
+ , any.ouroboros-network ^>= 2.0
+ , any.small-steps >= 1.2
+ , any.cardano-ledger-core >= 1.22
+ , any.cardano-ledger-alonzo >= 1.17
+ , any.cardano-ledger-dijkstra >= 0.4
+ , any.cardano-diffusion >= 1.3
- , any.ouroboros-consensus ^>= 4.2.0.1
- , any.ouroboros-network ^>= 1.2
-
- , any.io-classes ^>= 1.8
, any.formatting == 7.2.0
, any.text source
@@ -30,10 +32,7 @@ constraints:
, any.blockio +serialblockio
allow-newer:
- *:formatting
- , katip:Win32
- , io-sim:time
- , io-classes:time
+ katip:Win32
packages:
./
diff --git a/server/modules/fast-bech32/test/unit/Data/ByteString/Bech32Spec.hs b/server/modules/fast-bech32/test/unit/Data/ByteString/Bech32Spec.hs
index 6cc72e1a1..0477091ce 100644
--- a/server/modules/fast-bech32/test/unit/Data/ByteString/Bech32Spec.hs
+++ b/server/modules/fast-bech32/test/unit/Data/ByteString/Bech32Spec.hs
@@ -23,7 +23,7 @@ import Test.Hspec
import Test.Hspec.QuickCheck
( prop )
import Test.QuickCheck
- ( Gen, Property, choose, elements, forAll, vector, withMaxSuccess, (===) )
+ ( Gen, Property, choose, elements, forAll, vector, withNumTests, (===) )
import qualified Codec.Binary.Bech32 as Oracle
import qualified Data.ByteString as BS
@@ -32,7 +32,7 @@ import qualified Data.Text as T
spec :: Spec
spec = describe "encodeBech32" $
prop "oracle with existing bech32's library" $
- withMaxSuccess 5000 $
+ withNumTests 5000 $
forAll genBytes $ \bytes ->
forAll genHrp $ prop_matchOracle bytes
diff --git a/server/modules/ouroboros-network-ogmios/src/Cardano/Network/Protocol/NodeToClient.hs b/server/modules/ouroboros-network-ogmios/src/Cardano/Network/Protocol/NodeToClient.hs
index d97b3a675..b8cbaa1b6 100644
--- a/server/modules/ouroboros-network-ogmios/src/Cardano/Network/Protocol/NodeToClient.hs
+++ b/server/modules/ouroboros-network-ogmios/src/Cardano/Network/Protocol/NodeToClient.hs
@@ -30,6 +30,8 @@ module Cardano.Network.Protocol.NodeToClient
, cStateQueryCodec
, cTxMonitorCodec
, nodeToClientV_Latest
+ , nodeToClientVersions
+ , nodeToClientVersionNumber
-- * Running
, runPeer
@@ -67,6 +69,9 @@ import Cardano.Network.Protocol.NodeToClient.Trace
import Cardano.Slotting.Slot
( SlotNo
)
+import Codec.CBOR.Term
+ ( Term (TInt)
+ )
import Control.DeepSeq
( NFData
)
@@ -89,6 +94,9 @@ import Control.Tracer
, contramap
, nullTracer
)
+import Data.Bits
+ ( clearBit
+ )
import Data.ByteString.Lazy
( ByteString
)
@@ -159,6 +167,9 @@ import Ouroboros.Network.Channel
( Channel
, hoistChannel
)
+import Ouroboros.Network.CodecCBORTerm
+ ( CodecCBORTerm (..)
+ )
import Ouroboros.Network.Driver.Simple
( TraceSendRecv
, runPeer
@@ -180,6 +191,7 @@ import Cardano.Network.NodeToClient
, connectTo
, localSnocket
, nodeToClientProtocols
+ , nodeToClientVersionCodec
, withIOManager
)
import Ouroboros.Network.Protocol.ChainSync.ClientPipelined
@@ -290,7 +302,7 @@ connectClient tr client vData addr = liftIO $ withIOManager $ \iocp -> do
where
versions = combineVersions
[ simpleSingletonVersions v vData (client v)
- | v <- [ nodeToClientV_Min .. nodeToClientV_Latest ]
+ | v <- nodeToClientVersions
]
tracers = NetworkConnectTracers
@@ -302,7 +314,19 @@ nodeToClientV_Latest :: NodeToClientVersion
nodeToClientV_Latest = maxBound
nodeToClientV_Min :: NodeToClientVersion
-nodeToClientV_Min = NodeToClientV_17
+nodeToClientV_Min = NodeToClientV_23
+
+-- | Node-to-client versions that Ogmios proposes during the handshake.
+nodeToClientVersions :: [NodeToClientVersion]
+nodeToClientVersions = [ nodeToClientV_Min .. nodeToClientV_Latest ]
+
+-- | Version number as sent in the handshake, without the node-to-client flag
+-- (bit 15). Unknown versions in a handshake refusal use the same numbering.
+nodeToClientVersionNumber :: NodeToClientVersion -> Maybe Int
+nodeToClientVersionNumber v =
+ case encodeTerm nodeToClientVersionCodec v of
+ TInt n -> Just (n `clearBit` 15)
+ _unexpectedTerm -> Nothing
-- | Construct a network client
mkClient
diff --git a/server/ogmios.cabal b/server/ogmios.cabal
index 50956ee16..191e59a61 100644
--- a/server/ogmios.cabal
+++ b/server/ogmios.cabal
@@ -79,6 +79,7 @@ library
Ogmios.Data.Ledger.PredicateFailure.Alonzo
Ogmios.Data.Ledger.PredicateFailure.Babbage
Ogmios.Data.Ledger.PredicateFailure.Conway
+ Ogmios.Data.Ledger.PredicateFailure.Dijkstra
Ogmios.Data.Ledger.PredicateFailure.Mary
Ogmios.Data.Ledger.PredicateFailure.Shelley
Ogmios.Data.Ledger.Rewards
@@ -188,7 +189,6 @@ library
, iproute
, json-rpc
, lens-aeson
- , memory
, mempack
, mtl
, optparse-applicative
@@ -204,6 +204,7 @@ library
, prettyprinter
, profunctors
, prometheus
+ , ram
, relude
, safe
, safe-exceptions
@@ -293,6 +294,7 @@ test-suite unit
Ogmios.App.ProtocolSpec
Ogmios.Data.HealthSpec
Ogmios.Data.JsonSpec
+ Ogmios.Data.Ledger.PredicateFailureSpec
Ogmios.Data.MetricsSpec
Ogmios.OptionsSpec
Test.App.Protocol.Util
@@ -352,6 +354,7 @@ test-suite unit
, base >=4.7 && <5
, bytestring
, cardano-crypto-class
+ , cardano-data
, cardano-ledger-allegra
, cardano-ledger-alonzo
, cardano-ledger-alonzo:testlib
@@ -361,6 +364,8 @@ test-suite unit
, cardano-ledger-conway
, cardano-ledger-conway:testlib
, cardano-ledger-core
+ , cardano-ledger-dijkstra
+ , cardano-ledger-dijkstra:testlib
, cardano-ledger-mary
, cardano-ledger-shelley
, cardano-slotting
diff --git a/server/package.yaml b/server/package.yaml
index 0dc68e05e..36da3ad6f 100644
--- a/server/package.yaml
+++ b/server/package.yaml
@@ -87,7 +87,6 @@ library:
- iproute
- json-rpc
- lens-aeson
- - memory
- mempack
- mtl
- optparse-applicative
@@ -103,6 +102,7 @@ library:
- prettyprinter
- profunctors
- prometheus
+ - ram
- relude
- safe
- safe-exceptions
@@ -150,6 +150,7 @@ tests:
- aeson-pretty
- bytestring
- cardano-crypto-class
+ - cardano-data
- cardano-ledger-allegra
- cardano-ledger-alonzo
- cardano-ledger-alonzo:testlib
@@ -159,6 +160,8 @@ tests:
- cardano-ledger-conway
- cardano-ledger-conway:testlib
- cardano-ledger-core
+ - cardano-ledger-dijkstra
+ - cardano-ledger-dijkstra:testlib
- cardano-ledger-mary
- cardano-ledger-shelley
- cardano-slotting
diff --git a/server/src/Ogmios/App/Health.hs b/server/src/Ogmios/App/Health.hs
index 837f5bd05..394f08244 100644
--- a/server/src/Ogmios/App/Health.hs
+++ b/server/src/Ogmios/App/Health.hs
@@ -97,6 +97,8 @@ import Cardano.Network.Protocol.NodeToClient
, NodeToClientVersion
, connectClient
, mkClient
+ , nodeToClientVersionNumber
+ , nodeToClientVersions
)
import Data.Aeson
( ToJSON (..)
@@ -319,6 +321,16 @@ connectHealthCheckClient tr embed (HealthCheckClient clients) = do
, "it runs on a different network!"
, hint
]
+ HandshakeError (Handshake.VersionMismatch knownVersions unknownVersions) -> do
+ let offeredVersions = sort $ mapMaybe nodeToClientVersionNumber knownVersions <> unknownVersions
+ let supportedVersions = mapMaybe nodeToClientVersionNumber nodeToClientVersions
+ throwIO $ HandshakeException $ unwords
+ [ "Unable to establish the connection with the cardano-node:"
+ , "it has no node-to-client version in common with Ogmios."
+ , "The cardano-node offers versions:", prettyVersions offeredVersions <> "."
+ , "Ogmios supports versions:", prettyVersions supportedVersions <> "."
+ , "Use a more recent cardano-node."
+ ]
e ->
throwIO e
where
@@ -327,6 +339,11 @@ connectHealthCheckClient tr embed (HealthCheckClient clients) = do
prettyNetwork =
networkMagicToNetworkName . NetworkMagic . fromMaybe maxBound . readMaybe @Word32 . toString
+ prettyVersions :: [Int] -> Text
+ prettyVersions = \case
+ [] -> "none"
+ versions -> T.intercalate ", " (show <$> versions)
+
--
-- Ouroboros clients
--
diff --git a/server/src/Ogmios/App/Protocol/TxMonitor.hs b/server/src/Ogmios/App/Protocol/TxMonitor.hs
index db27acbae..b8971cbae 100644
--- a/server/src/Ogmios/App/Protocol/TxMonitor.hs
+++ b/server/src/Ogmios/App/Protocol/TxMonitor.hs
@@ -79,7 +79,7 @@ import Ouroboros.Consensus.Ledger.SupportsMempool
( HasTxId (..)
)
import Ouroboros.Consensus.Node.NetworkProtocolVersion
- ( NodeToClientVersion (..)
+ ( NodeToClientVersion
)
import Ouroboros.Consensus.Shelley.Ledger.Mempool
( TxId (..)
@@ -110,7 +110,7 @@ mkTxMonitorClient
-> NodeToClientVersion
-- ^ Node-to-Client protocol version that was negotiated for this client
-> LocalTxMonitorClient (GenTxId block) (GenTx block) SlotNo m ()
-mkTxMonitorClient defaultWithInternalError TxMonitorCodecs{..} queue yield nodeToClientV =
+mkTxMonitorClient defaultWithInternalError TxMonitorCodecs{..} queue yield _nodeToClientV =
LocalTxMonitorClient clientStIdle
where
await :: m (TxMonitorMessage block)
@@ -176,7 +176,7 @@ mkTxMonitorClient defaultWithInternalError TxMonitorCodecs{..} queue yield nodeT
-- To be removed once the following issue is addressed:
--
-- https://github.com/IntersectMBO/ouroboros-consensus/issues/1009
- loop (inMultipleEras nodeToClientV id)
+ loop (inMultipleEras id)
where
done has = do
yield $ encodeHasTransactionResponse $ toResponse $ HasTransactionResponse{has}
@@ -204,24 +204,18 @@ inMultipleEras
:: forall crypto constraint.
( constraint ~ (MostRecentEra (CardanoBlock crypto) ~ DijkstraEra)
)
- => NodeToClientVersion
- -> Ledger.TxId
+ => Ledger.TxId
-> [GenTxId (CardanoBlock crypto)]
-inMultipleEras nodeToClientV id =
+inMultipleEras id =
-- The list is ordered from the "most probable era", down to the least
-- probable. This hopefully ensures that we do a minimum number of loops
-- for the happy path.
- GenTxIdConway (ShelleyTxId id) :
- if nodeToClientV >= NodeToClientV_16 then
- [ GenTxIdBabbage (ShelleyTxId id)
- , GenTxIdAlonzo (ShelleyTxId id)
- , GenTxIdMary (ShelleyTxId id)
- , GenTxIdDijkstra (ShelleyTxId id)
- ]
- else
- [ GenTxIdAlonzo (ShelleyTxId id)
- , GenTxIdMary (ShelleyTxId id)
- ]
+ [ GenTxIdConway (ShelleyTxId id)
+ , GenTxIdBabbage (ShelleyTxId id)
+ , GenTxIdAlonzo (ShelleyTxId id)
+ , GenTxIdMary (ShelleyTxId id)
+ , GenTxIdDijkstra (ShelleyTxId id)
+ ]
where
-- This line exists as a reminder. It will generate a compiler error
-- when a new era becomes available. From there, one should update
diff --git a/server/src/Ogmios/App/Protocol/TxSubmission.hs b/server/src/Ogmios/App/Protocol/TxSubmission.hs
index 77d9c5ded..cb415959e 100644
--- a/server/src/Ogmios/App/Protocol/TxSubmission.hs
+++ b/server/src/Ogmios/App/Protocol/TxSubmission.hs
@@ -54,6 +54,9 @@ import Cardano.Ledger.Core (
TopTx,
eraName,
)
+import Control.Monad.Class.MonadThrow (
+ MonadEvaluate (..),
+ )
import Control.Monad.Trans.Except (
Except,
)
@@ -94,6 +97,7 @@ import Ogmios.Data.Json (
Json,
MultiEraDecoder (..),
ToJSON,
+ jsonToByteString,
)
import Ogmios.Data.Ledger.ScriptFailure (
EvaluateTransactionError (..),
@@ -184,6 +188,8 @@ import Type.Reflection (
import qualified Codec.Json.Rpc as Rpc
import qualified Data.Aeson as Json
+import qualified Data.Aeson.Encoding as JsonEncoding
+import qualified Data.ByteString.Builder as Builder
import qualified Data.Map.Strict as Map
import qualified Data.Text as T
import qualified Ouroboros.Consensus.HardFork.Combinator as HF
@@ -195,6 +201,7 @@ mkTxSubmissionClient ::
forall m block.
( MonadSTM m
, MonadLog m
+ , MonadEvaluate m
, HasTxId (SerializedTransaction block)
, block ~ CardanoBlock StandardCrypto
) =>
@@ -217,6 +224,14 @@ mkTxSubmissionClient tr defaultWithInternalError TxSubmissionCodecs{..} Executio
await :: m (TxSubmissionMessage block)
await = atomically (readTQueue queue)
+ -- | Encode eagerly, so that an encoder exception becomes an internal error reply instead of
+ -- surfacing in the websocket send. 'yield' stays outside the handler on purpose.
+ yieldEncoded :: Rpc.ToResponse r -> Json -> m ()
+ yieldEncoded toResponse json =
+ defaultWithInternalError (pure Nothing) yield toResponse
+ (Just . JsonEncoding.unsafeToEncoding . Builder.byteString <$> evaluate (jsonToByteString json))
+ >>= traverse_ yield
+
isMostRecentEra era =
T.toLower (toText era) == T.toLower (toText (eraName @(MostRecentEra block)))
@@ -239,28 +254,28 @@ mkTxSubmissionClient tr defaultWithInternalError TxSubmissionCodecs{..} Executio
SubmitFail (ApplyTxErrWrongEra eraMismatch) | isMostRecentEra (ledgerEraName eraMismatch) -> do
case upgradeGenTx transaction of
Left hint -> do
- SubmitTransactionFailedToUpgrade hint
- & toResponse
- & encodeSubmitTransactionResponse
- & yield
+ yieldEncoded toResponse $
+ SubmitTransactionFailedToUpgrade hint
+ & toResponse
+ & encodeSubmitTransactionResponse
clientStIdle
Right upgradedTx ->
pure $ SendMsgSubmitTx upgradedTx $ \result' -> do
clearMempoolOnSuccess result'
- mkSubmitTransactionResponse transaction result'
- & toResponse
- & encodeSubmitTransactionResponse
- & yield
+ yieldEncoded toResponse $
+ mkSubmitTransactionResponse transaction result'
+ & toResponse
+ & encodeSubmitTransactionResponse
clientStIdle
_ -> do
-- NOTE: On successful submission, clear our cached
-- mempool to ensure we always use the latest available
-- mempool snapshot during evaluation.
clearMempoolOnSuccess result
- mkSubmitTransactionResponse transaction result
- & toResponse
- & encodeSubmitTransactionResponse
- & yield
+ yieldEncoded toResponse $
+ mkSubmitTransactionResponse transaction result
+ & toResponse
+ & encodeSubmitTransactionResponse
clientStIdle
MultiEraDecoderErrors errs -> do
SubmitTransactionDeserialisationFailure errs
diff --git a/server/src/Ogmios/App/Server/WebSocket.hs b/server/src/Ogmios/App/Server/WebSocket.hs
index 8f50d6989..fd65578e1 100644
--- a/server/src/Ogmios/App/Server/WebSocket.hs
+++ b/server/src/Ogmios/App/Server/WebSocket.hs
@@ -336,6 +336,7 @@ withOuroborosClients
:: forall m a.
( MonadAsync m
, MonadDisk m
+ , MonadEvaluate m
, MonadLink m
, MonadLog m
, MonadMetrics m
diff --git a/server/src/Ogmios/Data/Json.hs b/server/src/Ogmios/Data/Json.hs
index 9aaa4c590..424f98081 100644
--- a/server/src/Ogmios/Data/Json.hs
+++ b/server/src/Ogmios/Data/Json.hs
@@ -68,6 +68,9 @@ import Cardano.Ledger.Conway
import Cardano.Ledger.Conway.Tx
( unConwayTx
)
+import Cardano.Ledger.Dijkstra
+ ( ApplyTxError (DijkstraApplyTxError)
+ )
import Cardano.Ledger.Dijkstra.Tx
( unDijkstraTx
)
@@ -153,6 +156,7 @@ import qualified Ogmios.Data.Ledger.PredicateFailure.Allegra as Allegra
import qualified Ogmios.Data.Ledger.PredicateFailure.Alonzo as Alonzo
import qualified Ogmios.Data.Ledger.PredicateFailure.Babbage as Babbage
import qualified Ogmios.Data.Ledger.PredicateFailure.Conway as Conway
+import qualified Ogmios.Data.Ledger.PredicateFailure.Dijkstra as Dijkstra
import qualified Ogmios.Data.Ledger.PredicateFailure.Mary as Mary
import qualified Ogmios.Data.Ledger.PredicateFailure.Shelley as Shelley
@@ -232,8 +236,9 @@ encodeSubmitTransactionError reject = \case
(Shelley.encodeLedgerFailure <$> xs)
ApplyTxErrByron{} ->
error "encodeSubmitTransactionError: unsupported Byron transaction."
- ApplyTxErrDijkstra{} ->
- error "encodeSubmitTransactionError: Dijkstra submission errors not yet wired."
+ ApplyTxErrDijkstra (DijkstraApplyTxError xs) ->
+ (encodePredicateFailure reject . pickPredicateFailure)
+ (Dijkstra.encodeMempoolFailure <$> xs)
encodeSerializedTransaction
:: (PraosCrypto crypto, TPraos.PraosCrypto crypto)
diff --git a/server/src/Ogmios/Data/Json/Alonzo.hs b/server/src/Ogmios/Data/Json/Alonzo.hs
index f0327cc5d..7ccb193d5 100644
--- a/server/src/Ogmios/Data/Json/Alonzo.hs
+++ b/server/src/Ogmios/Data/Json/Alonzo.hs
@@ -135,6 +135,12 @@ encodeContextError err = encodeText $ case err of
"Unknown transaction input (missing from UTxO set): " <> Shelley.stringifyTxIn i
Al.TimeTranslationPastHorizon e ->
"Uncomputable slot arithmetic; transaction's validity bounds go beyond the foreseeable end of the current era: " <> e
+ Al.CertificateNotSupported{} ->
+ "A certificate in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
+ Al.PlutusPurposeNotSupported{} ->
+ "A script purpose in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
+ Al.ImpossibleContextError e ->
+ "Unexpected failure while building the script context: " <> e
encodeCostModel ::
Al.CostModel ->
diff --git a/server/src/Ogmios/Data/Json/Babbage.hs b/server/src/Ogmios/Data/Json/Babbage.hs
index 50905c676..c6f545e40 100644
--- a/server/src/Ogmios/Data/Json/Babbage.hs
+++ b/server/src/Ogmios/Data/Json/Babbage.hs
@@ -9,9 +9,6 @@ import Ogmios.Data.Json.Prelude
import Cardano.Ledger.Allegra.Scripts
( Timelock
)
-import Cardano.Ledger.Alonzo.Plutus.TxInfo
- ( TxOutSource (..)
- )
import Cardano.Ledger.Api
( AsIx (..)
)
@@ -21,6 +18,9 @@ import Cardano.Ledger.Binary
import Cardano.Ledger.Compactible
( fromCompact
)
+import Cardano.Ledger.Plutus.TxInfo
+ ( TxOutSource (..)
+ )
import Ouroboros.Consensus.Shelley.Ledger.Block
( ShelleyBlock (..)
)
@@ -41,7 +41,6 @@ import qualified Cardano.Ledger.Shelley.PParams as Sh
import qualified Cardano.Ledger.Mary.Value as Ma
-import qualified Cardano.Ledger.Alonzo.PParams as Al
import qualified Cardano.Ledger.Alonzo.Scripts as Al
import qualified Cardano.Ledger.Alonzo.BlockBody as Al
@@ -103,6 +102,12 @@ encodeContextError err = encodeText $ case err of
"Uncomputable slot arithmetic; transaction's validity bounds go beyond the foreseeable end of the current era: " <> e
Ba.AlonzoContextError (Al.TranslationLogicMissingInput i) ->
"Unknown transaction input (missing from UTxO set): " <> Shelley.stringifyTxIn i
+ Ba.AlonzoContextError (Al.CertificateNotSupported{}) ->
+ "A certificate in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
+ Ba.AlonzoContextError (Al.PlutusPurposeNotSupported{}) ->
+ "A script purpose in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
+ Ba.AlonzoContextError (Al.ImpossibleContextError e) ->
+ "Unexpected failure while building the script context: " <> e
encodeHeader
:: Praos.Header StandardCrypto
diff --git a/server/src/Ogmios/Data/Json/Conway.hs b/server/src/Ogmios/Data/Json/Conway.hs
index 7b2170307..88405c937 100644
--- a/server/src/Ogmios/Data/Json/Conway.hs
+++ b/server/src/Ogmios/Data/Json/Conway.hs
@@ -53,7 +53,6 @@ import qualified Cardano.Ledger.HKD as Ledger
import qualified Cardano.Ledger.Shelley.PParams as Sh
-import qualified Cardano.Ledger.Alonzo.PParams as Al
import qualified Cardano.Ledger.Alonzo.BlockBody as Al
import qualified Cardano.Ledger.Babbage.Core as Ba
@@ -75,6 +74,8 @@ import qualified Cardano.Ledger.Conway.TxInfo as Cn
import Cardano.Ledger.Plutus
( TxOutSource (..)
)
+import qualified Data.Aeson as Json
+
import qualified Ogmios.Data.Json.Allegra as Allegra
import qualified Ogmios.Data.Json.Alonzo as Alonzo
import qualified Ogmios.Data.Json.Babbage as Babbage
@@ -200,14 +201,11 @@ encodeNextEpochChange = fmap encodeObject . \case
encodeContextError
:: ( PlutusPurpose AsIx era ~ Cn.ConwayPlutusPurpose AsIx era
+ , ToJSON (Cn.ConwayContextError era)
)
=> Cn.ConwayContextError era
-> Json
encodeContextError err = encodeText $ case err of
- Cn.CertificateNotSupported{} ->
- "A certificate in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
- Cn.PlutusPurposeNotSupported{} ->
- "A script purpose in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
Cn.CurrentTreasuryFieldNotSupported{} ->
"Unsupported field in transaction: 'treasury'. Use plutus:v3 or higher, or remove this field."
Cn.VotingProceduresFieldNotSupported{} ->
@@ -242,6 +240,28 @@ encodeContextError err = encodeText $ case err of
"Uncomputable slot arithmetic; transaction's validity bounds go beyond the foreseeable end of the current era: " <> e
Cn.BabbageContextError (Ba.AlonzoContextError (Al.TranslationLogicMissingInput i)) ->
"Unknown transaction input (missing from UTxO set): " <> Shelley.stringifyTxIn i
+ Cn.BabbageContextError (Ba.AlonzoContextError (Al.CertificateNotSupported{})) ->
+ "A certificate in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
+ Cn.BabbageContextError (Ba.AlonzoContextError (Al.PlutusPurposeNotSupported{})) ->
+ "A script purpose in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
+ Cn.BabbageContextError (Ba.AlonzoContextError (Al.ImpossibleContextError e)) ->
+ "Unexpected failure while building the script context: " <> e
+ _ ->
+ stringifyUnsupportedContextError err
+
+-- | cardano-ledger-conway 1.24 doesn't export these constructors, so dispatch on the JSON 'kind'.
+stringifyUnsupportedContextError
+ :: ToJSON (Cn.ConwayContextError era)
+ => Cn.ConwayContextError era
+ -> Text
+stringifyUnsupportedContextError err =
+ case at "kind" (Json.toJSON err) of
+ Just (Json.String "CertificateNotSupported") ->
+ "A certificate in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
+ Just (Json.String "PlutusPurposeNotSupported") ->
+ "A script purpose in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
+ _ ->
+ "A certificate or a script purpose in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
encodeConstitution
:: Cn.Constitution era
diff --git a/server/src/Ogmios/Data/Json/Dijkstra.hs b/server/src/Ogmios/Data/Json/Dijkstra.hs
index 8693a7d22..caa65c158 100644
--- a/server/src/Ogmios/Data/Json/Dijkstra.hs
+++ b/server/src/Ogmios/Data/Json/Dijkstra.hs
@@ -25,9 +25,6 @@ import Ogmios.Data.Json.Prelude
import Cardano.Ledger.Alonzo.Plutus.Context (
ContextError,
)
-import Cardano.Ledger.Alonzo.Plutus.TxInfo (
- TxOutSource (..),
- )
import Cardano.Ledger.Api (
AsItem (..),
AsIx (..),
@@ -36,6 +33,9 @@ import Cardano.Ledger.Api (
import Cardano.Ledger.MemoBytes (
getMemoRawType,
)
+import Cardano.Ledger.Plutus.TxInfo (
+ TxOutSource (..),
+ )
import Cardano.Ledger.BaseTypes (
BoundedRational (..),
@@ -54,7 +54,6 @@ import Cardano.Ledger.HKD (
import qualified Cardano.Ledger.HKD as Ledger
-import qualified Cardano.Ledger.Alonzo.PParams as Al
import qualified Cardano.Ledger.Alonzo.Plutus.TxInfo as Al
import qualified Cardano.Ledger.Alonzo.Scripts as Al
import qualified Cardano.Ledger.Babbage.Core as Ba
@@ -653,6 +652,7 @@ encodeGovAction = \case
encodeContextError ::
( PlutusPurpose AsIx era ~ Di.DijkstraPlutusPurpose AsIx era
, ContextError era ~ Di.DijkstraContextError era
+ , ToJSON (Cn.ConwayContextError era)
) =>
Di.DijkstraContextError era ->
Json
@@ -662,16 +662,15 @@ encodeContextError =
stringifyContextError ::
( PlutusPurpose AsIx era ~ Di.DijkstraPlutusPurpose AsIx era
, ContextError era ~ Di.DijkstraContextError era
+ , ToJSON (Cn.ConwayContextError era)
) =>
Di.DijkstraContextError era ->
Text
stringifyContextError err = case err of
- Di.PointerPresentInOutput{} ->
+ Di.PointerPresentInOutput TxOutFromInput{} ->
+ "Found inputs locked by a (legacy) pointer address. Pointer addresses are no longer supported as of Dijkstra."
+ Di.PointerPresentInOutput TxOutFromOutput{} ->
"Found outputs to a (legacy) pointer address. Pointer addresses are no longer supported as of Dijkstra."
- Di.ConwayContextError (Cn.CertificateNotSupported{}) ->
- "A certificate in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
- Di.ConwayContextError (Cn.PlutusPurposeNotSupported{}) ->
- "A script purpose in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
Di.ConwayContextError (Cn.CurrentTreasuryFieldNotSupported{}) ->
"Unsupported field in transaction: 'treasury'. Use plutus:v3 or higher, or remove this field."
Di.ConwayContextError (Cn.VotingProceduresFieldNotSupported{}) ->
@@ -693,20 +692,20 @@ stringifyContextError err = case err of
Di.ConwayContextError (Cn.BabbageContextError (Ba.ReferenceInputsNotSupported{})) ->
"Reference inputs not supported in plutus:v1. Use plutus:v2 or higher."
Di.ConwayContextError (Cn.BabbageContextError (Ba.RedeemerPointerPointsToNothing purpose)) ->
- let (title, ptr) =
- case purpose of
- Di.DijkstraSpending (AsIx ix) -> ("spending input", ix)
- Di.DijkstraMinting (AsIx ix) -> ("minting policy", ix)
- Di.DijkstraCertifying (AsIx ix) -> ("publishing certificate", ix)
- Di.DijkstraWithdrawing (AsIx ix) -> ("withdrawing from account", ix)
- Di.DijkstraVoting (AsIx ix) -> ("voting as voter", ix)
- Di.DijkstraProposing (AsIx ix) -> ("proposing governance proposal", ix)
- Di.DijkstraGuarding (AsIx ix) -> ("guarding script", ix)
+ let (title, ptr) = describePurpose purpose
in "Couldn't find corresponding redeemer for " <> title <> " #" <> show ptr <> ". Verify your transaction's construction."
Di.ConwayContextError (Cn.BabbageContextError (Ba.AlonzoContextError (Al.TimeTranslationPastHorizon e))) ->
"Uncomputable slot arithmetic; transaction's validity bounds go beyond the foreseeable end of the current era: " <> e
Di.ConwayContextError (Cn.BabbageContextError (Ba.AlonzoContextError (Al.TranslationLogicMissingInput i))) ->
"Unknown transaction input (missing from UTxO set): " <> Shelley.stringifyTxIn i
+ Di.ConwayContextError (Cn.BabbageContextError (Ba.AlonzoContextError (Al.CertificateNotSupported{}))) ->
+ "A certificate in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
+ Di.ConwayContextError (Cn.BabbageContextError (Ba.AlonzoContextError (Al.PlutusPurposeNotSupported{}))) ->
+ "A script purpose in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
+ Di.ConwayContextError (Cn.BabbageContextError (Ba.AlonzoContextError (Al.ImpossibleContextError e))) ->
+ "Unexpected failure while building the script context: " <> e
+ Di.ConwayContextError e ->
+ Conway.stringifyUnsupportedContextError e
Di.SubTxContextError txId e ->
"Failed to build the script context of a sub-transaction (id: " <> Shelley.stringifyTxId txId <> "): " <> stringifyContextError e
Di.UnsupportedScriptInSubTx lang txId ->
@@ -719,3 +718,16 @@ stringifyContextError err = case err of
"Script hashes in guards aren't supported in plutus:v1, plutus:v2 nor plutus:v3. Use plutus:v4 or higher."
Di.RequiredTopLevelGuardsNotSupported{} ->
"Required top-level guards aren't supported in plutus:v1, plutus:v2 nor plutus:v3. Use plutus:v4 or higher, or remove them."
+ Di.ScriptHashNotFoundForPurpose purpose ->
+ let (title, ptr) = describePurpose purpose
+ in "Couldn't find the script executed for " <> title <> " #" <> show ptr <> ". Verify your transaction's construction."
+ where
+ describePurpose :: Di.DijkstraPlutusPurpose AsIx era -> (Text, Word32)
+ describePurpose = \case
+ Di.DijkstraSpending (AsIx ix) -> ("spending input", ix)
+ Di.DijkstraMinting (AsIx ix) -> ("minting policy", ix)
+ Di.DijkstraCertifying (AsIx ix) -> ("publishing certificate", ix)
+ Di.DijkstraWithdrawing (AsIx ix) -> ("withdrawing from account", ix)
+ Di.DijkstraVoting (AsIx ix) -> ("voting as voter", ix)
+ Di.DijkstraProposing (AsIx ix) -> ("proposing governance proposal", ix)
+ Di.DijkstraGuarding (AsIx ix) -> ("guarding script", ix)
diff --git a/server/src/Ogmios/Data/Json/Ledger/PredicateFailure.hs b/server/src/Ogmios/Data/Json/Ledger/PredicateFailure.hs
index a280d2372..9be293de6 100644
--- a/server/src/Ogmios/Data/Json/Ledger/PredicateFailure.hs
+++ b/server/src/Ogmios/Data/Json/Ledger/PredicateFailure.hs
@@ -6,17 +6,24 @@ module Ogmios.Data.Json.Ledger.PredicateFailure where
import Ogmios.Data.Json.Prelude
+import Cardano.Ledger.BaseTypes
+ ( Exclusive (..)
+ , Inclusive (..)
+ )
import Ogmios.Data.Ledger
( DiscriminatedEntities (..)
, TxOutInAnyEra (..)
, ValueInAnyEra (..)
)
import Ogmios.Data.Ledger.PredicateFailure
- ( ContextErrorInAnyEra (..)
+ ( AccountBalanceInterval (..)
+ , BalanceSnapshot (..)
+ , ContextErrorInAnyEra (..)
, MultiEraPredicateFailure (..)
, ScriptPurposeIndexInAnyEra (..)
, ScriptPurposeItemInAnyEra (..)
, TagMismatchDescription (..)
+ , VRFVerKeyHash (..)
)
import qualified Codec.Json.Rpc as Rpc
@@ -612,10 +619,11 @@ encodePredicateFailure reject = \case
IncompleteWithdrawals { withdrawals } ->
reject (predicateFailureCode 41)
- "The transaction contains incomplete or invalid rewards withdrawals. When present, \
- \rewards withdrawals must consume rewards in full, there cannot be any leftover. You \
- \may also run into this error if the associatd stake credential is not registered. \
- \The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals."
+ "Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra \
+ \transaction in legacy mode, a withdrawal must take the full balance of its account. \
+ \Before the Dijkstra era, this error also reports a withdrawal from a stake credential \
+ \that is not registered. The field 'data.incompleteWithdrawals' maps each culprit \
+ \reward account to the amount withdrawn."
(pure $ encodeObject
( "incompleteWithdrawals" .=
encodeMap Shelley.stringifyRewardAcnt encodeCoin withdrawals
@@ -624,11 +632,11 @@ encodePredicateFailure reject = \case
InvalidStakePoolRetirementEpoch { currentEpoch, listedEpoch, firstInvalidEpoch } ->
reject (predicateFailureCode 42)
- "A stake pool retirement certificate is trying to retire too late in the future. Indeed, \
- \there's a maximum delay for stake pool retirement, controlled by a protocol parameter. \
- \The field 'data.currentEpoch' indicates the current epoch known of the ledger, \
- \'data.declaredEpoch' refers to the epoch declared in the retirement certificate and \
- \'data.firstInvalidEpoch' is the first epoch considered invalid (too far) for retirement"
+ "A stake pool retirement certificate lists an invalid retirement epoch. The epoch must \
+ \be after the current epoch and before 'data.firstInvalidEpoch'. A protocol parameter \
+ \sets the maximum delay for retirement. The field 'data.currentEpoch' is the current \
+ \epoch, 'data.declaredEpoch' is the epoch listed in the certificate, and \
+ \'data.firstInvalidEpoch' is the first epoch too far in the future for retirement."
(pure $ encodeObject
( "currentEpoch" .=
encodeEpochNo currentEpoch
@@ -977,6 +985,126 @@ encodePredicateFailure reject = \case
"Some proposals contain empty treasury withdrawals, which is pointless and a waste of resources."
Nothing
+ MissingRequiredGuards { missingGuards } ->
+ reject (predicateFailureCode 69)
+ "Some guards required by the transaction or by its sub-transactions are missing from the \
+ \top-level transaction. Any credential (key hash or script) listed as a required top-level \
+ \guard must also appear in the 'guards' of the top-level transaction. The field \
+ \'data.missingGuards' lists the required credentials that are absent."
+ (pure $ encodeObject
+ ( "missingGuards" .=
+ encodeFoldable (encodeObject . Shelley.encodeCredential "credential") missingGuards
+ )
+ )
+
+ MalformedGuardDatums { malformedGuards } ->
+ reject (predicateFailureCode 70)
+ "Some required top-level guards have a malformed datum. A required guard that resolves \
+ \to a Plutus script must come with a datum, whereas a guard that is a key hash or resolves \
+ \to a native script must not have one. The field 'data.malformedGuards' lists the \
+ \offending credentials."
+ (pure $ encodeObject
+ ( "malformedGuards" .=
+ encodeFoldable (encodeObject . Shelley.encodeCredential "credential") malformedGuards
+ )
+ )
+
+ PtrPresentInCollateralReturn { collateralReturn } ->
+ reject (predicateFailureCode 71)
+ "The collateral return output is sent to a pointer address. Since the Dijkstra era, \
+ \pointer addresses are no longer allowed in collateral return outputs. The field \
+ \'data.collateralReturn' contains the offending output."
+ (pure $ encodeObject
+ ( "collateralReturn" .=
+ encodeTxOutInAnyEra collateralReturn
+ )
+ )
+
+ BlsKeyInvalidProofOfPossession { poolId, blsKey } ->
+ reject (predicateFailureCode 72)
+ "A stake pool registration carries a BLS key with an invalid proof of possession. The \
+ \proof must show possession of the signing key that matches the BLS verification key. \
+ \The field 'data.stakePool.id' indicates the stake pool, and 'data.blsKey' contains \
+ \the key and proof found in the certificate."
+ (pure $ encodeObject
+ ( "stakePool" .=
+ encodeSingleton "id" (Shelley.encodePoolId poolId)
+ <> "blsKey" .=
+ Shelley.encodeBlsKey blsKey
+ )
+ )
+
+ AllInputsAreSpent ->
+ reject (predicateFailureCode 73)
+ "All inputs of the transaction are already spent. This usually means that the \
+ \transaction has already been included in the ledger, so there's no need to submit \
+ \it again."
+ Nothing
+
+ WithdrawalsExceedingOriginalBalance { excessiveWithdrawals } ->
+ reject (predicateFailureCode 74)
+ "Some withdrawals exceed the balance of their account. A withdrawal may take any amount \
+ \up to the account balance, but the total withdrawn from an account across the whole \
+ \batch (the top-level transaction and its sub-transactions) must not exceed the balance \
+ \at the start of the batch. In legacy mode, only withdrawals from sub-transactions count \
+ \towards that total. The field 'data.excessiveWithdrawals' lists, for each account, the \
+ \total withdrawn and the balance at the start of the batch."
+ (pure $ encodeObject
+ ( "excessiveWithdrawals" .=
+ encodeMapAsList
+ (\account (withdrawn, balance) -> encodeObject
+ ( "account" .=
+ Shelley.encodeRewardAcnt account
+ <> "withdrawn" .=
+ encodeCoin withdrawn
+ <> "balance" .=
+ encodeCoin balance
+ )
+ )
+ excessiveWithdrawals
+ )
+ )
+
+ BalancesOutsideAccountBalanceIntervals { checkedAgainst, balancesOutsideIntervals } ->
+ reject (predicateFailureCode 75)
+ "Some account balances fall outside the intervals asserted by the transaction. An \
+ \interval has an inclusive lower bound and an exclusive upper bound, or asserts an \
+ \exact balance. The field 'data.checkedAgainst' tells which balances were checked: \
+ \'batchStart' for the balances at the start of the batch, or 'transaction' for the \
+ \balances seen by the (sub-)transaction that asserts the interval. The field \
+ \'data.balancesOutsideIntervals' lists each account with its balance and the interval \
+ \it doesn't satisfy."
+ (pure $ encodeObject
+ ( "checkedAgainst" .=
+ encodeBalanceSnapshot checkedAgainst
+ <> "balancesOutsideIntervals" .=
+ encodeMapAsList
+ (\account (balance, interval) -> encodeObject
+ ( "account" .=
+ Shelley.encodeRewardAcnt account
+ <> "balance" .=
+ encodeCoin balance
+ <> "interval" .=
+ encodeAccountBalanceInterval interval
+ )
+ )
+ balancesOutsideIntervals
+ )
+ )
+
+ StakePoolVrfKeyAlreadyRegistered { poolId, vrfKeyHash } ->
+ reject (predicateFailureCode 76)
+ "A stake pool registration or update uses a VRF key that another stake pool already \
+ \uses. Each stake pool needs its own VRF key. The field 'data.stakePool.id' indicates \
+ \the stake pool, and 'data.vrfVerificationKeyHash' is the hash of the VRF key in use."
+ (pure $ encodeObject
+ ( "stakePool" .=
+ encodeSingleton "id" (Shelley.encodePoolId poolId)
+ <> "vrfVerificationKeyHash" .=
+ Shelley.encodeHash (unVRFVerKeyHash vrfKeyHash)
+ )
+ )
+
-- NOTE: This should match the encoding also used for 'EvaluateTransactionResponse' in
-- Data.Protocol.TxSubmission; hence the code.
UnableToCreateScriptContext { translationError } ->
@@ -1007,6 +1135,26 @@ encodePredicateFailure reject = \case
\likely discoverd a critical bug..."
Nothing
+encodeBalanceSnapshot :: BalanceSnapshot -> Json
+encodeBalanceSnapshot = encodeText . \case
+ BatchStartBalances ->
+ "batchStart"
+ TransactionBalances ->
+ "transaction"
+
+encodeAccountBalanceInterval :: AccountBalanceInterval era -> Json
+encodeAccountBalanceInterval = encodeObject . \case
+ AccountBalanceLowerBound (Inclusive lowerBound) ->
+ "lowerBound" .= encodeCoin lowerBound
+ AccountBalanceUpperBound (Exclusive upperBound) ->
+ "upperBound" .= encodeCoin upperBound
+ AccountBalanceBothBounds (Inclusive lowerBound) (Exclusive upperBound) ->
+ "lowerBound" .= encodeCoin lowerBound
+ <>
+ "upperBound" .= encodeCoin upperBound
+ AccountBalanceExact exact ->
+ "exact" .= encodeCoin exact
+
encodeTagMismatchDescription :: TagMismatchDescription -> Json
encodeTagMismatchDescription = encodeText . \case
PassedUnexpectedly ->
diff --git a/server/src/Ogmios/Data/Json/Query.hs b/server/src/Ogmios/Data/Json/Query.hs
index cb929f670..d3caa9256 100644
--- a/server/src/Ogmios/Data/Json/Query.hs
+++ b/server/src/Ogmios/Data/Json/Query.hs
@@ -470,7 +470,7 @@ instance FromJSON (Query Proxy (CardanoBlock StandardCrypto)) where
"LedgerState/rewardsProvenance" ->
parseQueryLedgerRewardsProvenance id queryParams
"LedgerState/stakePools" ->
- parseQueryLedgerStakePools id id queryParams
+ parseQueryLedgerStakePools (const id) (const id) queryParams
"LedgerState/stakePoolsPerformances" ->
parseQueryLedgerStakePoolsPerformances id queryParams
"LedgerState/tip" ->
@@ -906,7 +906,7 @@ encodeSafeZone = \case
encodeNull
encodeStakePools ::
- Map (Ledger.KeyHash StakePool) (Maybe Ledger.StakePoolParams, StrictMaybe Coin) ->
+ Map (Ledger.KeyHash StakePool) (Maybe (Ledger.StakePoolParams era), StrictMaybe Coin) ->
Json
encodeStakePools =
encodeObject
@@ -2270,11 +2270,11 @@ parseQueryLedgerRewardsProvenance genResult =
parseQueryLedgerStakePools ::
forall crypto f.
() =>
- GenResult crypto f (Map (Ledger.KeyHash StakePool) Ledger.StakePoolParams) ->
- GenResult crypto f (Map (Ledger.KeyHash StakePool) (Maybe Ledger.StakePoolParams, StrictMaybe Coin)) ->
+ (forall era. (Typeable era) => Proxy era -> GenResult crypto f (Map (Ledger.KeyHash StakePool) (Ledger.StakePoolParams era))) ->
+ (forall era. (Typeable era) => Proxy era -> GenResult crypto f (Map (Ledger.KeyHash StakePool) (Maybe (Ledger.StakePoolParams era), StrictMaybe Coin))) ->
Json.Value ->
Json.Parser (QueryInEra f (CardanoBlock crypto))
-parseQueryLedgerStakePools genResultNoStake genResult =
+parseQueryLedgerStakePools genResultNoStakeInEra genResultInEra =
Json.withObject "SomeQuery" $ \obj -> do
includeStake <- obj .:? "includeStake" .!= False
obj .:? "stakePools" >>= \case
@@ -2283,12 +2283,15 @@ parseQueryLedgerStakePools genResultNoStake genResult =
ids <- traverset decodePoolId params
pure (getFilteredStakePools includeStake ids)
where
+ encodeStakePoolsWithoutStake ::
+ Map (Ledger.KeyHash StakePool) (Ledger.StakePoolParams era) ->
+ Json
encodeStakePoolsWithoutStake = encodeStakePools . Map.map (\params -> (Just params, SNothing))
mergeDistrAndParams ::
Map (Ledger.KeyHash StakePool) Coin ->
- Map (Ledger.KeyHash StakePool) Ledger.StakePoolParams ->
- Map (Ledger.KeyHash StakePool) (Maybe Ledger.StakePoolParams, StrictMaybe Coin)
+ Map (Ledger.KeyHash StakePool) (Ledger.StakePoolParams era) ->
+ Map (Ledger.KeyHash StakePool) (Maybe (Ledger.StakePoolParams era), StrictMaybe Coin)
mergeDistrAndParams =
Map.merge
(Map.mapMissing $ \_ distr -> (Nothing, SJust distr))
@@ -2314,7 +2317,7 @@ parseQueryLedgerStakePools genResultNoStake genResult =
(\_ -> LSQ.BlockQuery (QueryIfCurrentConway (GetStakePoolParams ids)))
mergeDistrAndParams
(eraMismatchOrResult encodeStakePools)
- genResult
+ (genResultInEra (Proxy @ConwayEra))
SomeShelleyEra ShelleyBasedEraDijkstra ->
Just
$ SomeCompoundQuery
@@ -2322,31 +2325,49 @@ parseQueryLedgerStakePools genResultNoStake genResult =
(\_ -> LSQ.BlockQuery (QueryIfCurrentDijkstra (GetStakePoolParams ids)))
mergeDistrAndParams
(eraMismatchOrResult encodeStakePools)
- genResult
+ (genResultInEra (Proxy @DijkstraEra))
| otherwise =
- ( \queryDef ->
- Just
- $ SomeStandardQuery
- queryDef
- (eraMismatchOrResult encodeStakePoolsWithoutStake)
- genResultNoStake
- )
- . ( \case
- SomeShelleyEra ShelleyBasedEraShelley ->
- LSQ.BlockQuery $ QueryIfCurrentShelley (GetStakePoolParams ids)
- SomeShelleyEra ShelleyBasedEraAllegra ->
- LSQ.BlockQuery $ QueryIfCurrentAllegra (GetStakePoolParams ids)
- SomeShelleyEra ShelleyBasedEraMary ->
- LSQ.BlockQuery $ QueryIfCurrentMary (GetStakePoolParams ids)
- SomeShelleyEra ShelleyBasedEraAlonzo ->
- LSQ.BlockQuery $ QueryIfCurrentAlonzo (GetStakePoolParams ids)
- SomeShelleyEra ShelleyBasedEraBabbage ->
- LSQ.BlockQuery $ QueryIfCurrentBabbage (GetStakePoolParams ids)
- SomeShelleyEra ShelleyBasedEraConway ->
- LSQ.BlockQuery $ QueryIfCurrentConway (GetStakePoolParams ids)
- SomeShelleyEra ShelleyBasedEraDijkstra ->
- LSQ.BlockQuery $ QueryIfCurrentDijkstra (GetStakePoolParams ids)
- )
+ Just . \case
+ SomeShelleyEra ShelleyBasedEraShelley ->
+ standardStakePoolParams
+ (Proxy @ShelleyEra)
+ (LSQ.BlockQuery $ QueryIfCurrentShelley (GetStakePoolParams ids))
+ SomeShelleyEra ShelleyBasedEraAllegra ->
+ standardStakePoolParams
+ (Proxy @AllegraEra)
+ (LSQ.BlockQuery $ QueryIfCurrentAllegra (GetStakePoolParams ids))
+ SomeShelleyEra ShelleyBasedEraMary ->
+ standardStakePoolParams
+ (Proxy @MaryEra)
+ (LSQ.BlockQuery $ QueryIfCurrentMary (GetStakePoolParams ids))
+ SomeShelleyEra ShelleyBasedEraAlonzo ->
+ standardStakePoolParams
+ (Proxy @AlonzoEra)
+ (LSQ.BlockQuery $ QueryIfCurrentAlonzo (GetStakePoolParams ids))
+ SomeShelleyEra ShelleyBasedEraBabbage ->
+ standardStakePoolParams
+ (Proxy @BabbageEra)
+ (LSQ.BlockQuery $ QueryIfCurrentBabbage (GetStakePoolParams ids))
+ SomeShelleyEra ShelleyBasedEraConway ->
+ standardStakePoolParams
+ (Proxy @ConwayEra)
+ (LSQ.BlockQuery $ QueryIfCurrentConway (GetStakePoolParams ids))
+ SomeShelleyEra ShelleyBasedEraDijkstra ->
+ standardStakePoolParams
+ (Proxy @DijkstraEra)
+ (LSQ.BlockQuery $ QueryIfCurrentDijkstra (GetStakePoolParams ids))
+
+ standardStakePoolParams ::
+ forall era.
+ (Typeable era) =>
+ Proxy era ->
+ LSQ.Query (CardanoBlock crypto) (QueryResult crypto (Map (Ledger.KeyHash StakePool) (Ledger.StakePoolParams era))) ->
+ SomeQuery f (CardanoBlock crypto)
+ standardStakePoolParams proxy queryDef =
+ SomeStandardQuery
+ queryDef
+ (eraMismatchOrResult encodeStakePoolsWithoutStake)
+ (genResultNoStakeInEra proxy)
getAllStakePools includeStake
| includeStake = \case
@@ -2372,7 +2393,7 @@ parseQueryLedgerStakePools genResultNoStake genResult =
(\allPools _ -> LSQ.BlockQuery (QueryIfCurrentConway (GetStakePoolParams allPools)))
(const mergeDistrAndParams)
(eraMismatchOrResult encodeStakePools)
- genResult
+ (genResultInEra (Proxy @ConwayEra))
SomeShelleyEra ShelleyBasedEraDijkstra ->
Just
$ SomeCompound2Query
@@ -2381,58 +2402,59 @@ parseQueryLedgerStakePools genResultNoStake genResult =
(\allPools _ -> LSQ.BlockQuery (QueryIfCurrentDijkstra (GetStakePoolParams allPools)))
(const mergeDistrAndParams)
(eraMismatchOrResult encodeStakePools)
- genResult
+ (genResultInEra (Proxy @DijkstraEra))
| otherwise =
Just . \case
SomeShelleyEra ShelleyBasedEraShelley ->
- SomeCompoundQuery
+ compoundStakePoolParams
+ (Proxy @ShelleyEra)
(LSQ.BlockQuery (QueryIfCurrentShelley GetStakePools))
(LSQ.BlockQuery . QueryIfCurrentShelley . GetStakePoolParams)
- (const identity)
- (eraMismatchOrResult encodeStakePoolsWithoutStake)
- genResultNoStake
SomeShelleyEra ShelleyBasedEraAllegra ->
- SomeCompoundQuery
+ compoundStakePoolParams
+ (Proxy @AllegraEra)
(LSQ.BlockQuery (QueryIfCurrentAllegra GetStakePools))
(LSQ.BlockQuery . QueryIfCurrentAllegra . GetStakePoolParams)
- (const identity)
- (eraMismatchOrResult encodeStakePoolsWithoutStake)
- genResultNoStake
SomeShelleyEra ShelleyBasedEraMary ->
- SomeCompoundQuery
+ compoundStakePoolParams
+ (Proxy @MaryEra)
(LSQ.BlockQuery (QueryIfCurrentMary GetStakePools))
(LSQ.BlockQuery . QueryIfCurrentMary . GetStakePoolParams)
- (const identity)
- (eraMismatchOrResult encodeStakePoolsWithoutStake)
- genResultNoStake
SomeShelleyEra ShelleyBasedEraAlonzo ->
- SomeCompoundQuery
+ compoundStakePoolParams
+ (Proxy @AlonzoEra)
(LSQ.BlockQuery (QueryIfCurrentAlonzo GetStakePools))
(LSQ.BlockQuery . QueryIfCurrentAlonzo . GetStakePoolParams)
- (const identity)
- (eraMismatchOrResult encodeStakePoolsWithoutStake)
- genResultNoStake
SomeShelleyEra ShelleyBasedEraBabbage ->
- SomeCompoundQuery
+ compoundStakePoolParams
+ (Proxy @BabbageEra)
(LSQ.BlockQuery (QueryIfCurrentBabbage GetStakePools))
(LSQ.BlockQuery . QueryIfCurrentBabbage . GetStakePoolParams)
- (const identity)
- (eraMismatchOrResult encodeStakePoolsWithoutStake)
- genResultNoStake
SomeShelleyEra ShelleyBasedEraConway ->
- SomeCompoundQuery
+ compoundStakePoolParams
+ (Proxy @ConwayEra)
(LSQ.BlockQuery (QueryIfCurrentConway GetStakePools))
(LSQ.BlockQuery . QueryIfCurrentConway . GetStakePoolParams)
- (const identity)
- (eraMismatchOrResult encodeStakePoolsWithoutStake)
- genResultNoStake
SomeShelleyEra ShelleyBasedEraDijkstra ->
- SomeCompoundQuery
+ compoundStakePoolParams
+ (Proxy @DijkstraEra)
(LSQ.BlockQuery (QueryIfCurrentDijkstra GetStakePools))
(LSQ.BlockQuery . QueryIfCurrentDijkstra . GetStakePoolParams)
- (const identity)
- (eraMismatchOrResult encodeStakePoolsWithoutStake)
- genResultNoStake
+
+ compoundStakePoolParams ::
+ forall era a.
+ (Typeable era) =>
+ Proxy era ->
+ LSQ.Query (CardanoBlock crypto) (QueryResult crypto a) ->
+ (a -> LSQ.Query (CardanoBlock crypto) (QueryResult crypto (Map (Ledger.KeyHash StakePool) (Ledger.StakePoolParams era)))) ->
+ SomeQuery f (CardanoBlock crypto)
+ compoundStakePoolParams proxy allPoolsQuery paramsQuery =
+ SomeCompoundQuery
+ allPoolsQuery
+ paramsQuery
+ (const identity)
+ (eraMismatchOrResult encodeStakePoolsWithoutStake)
+ (genResultNoStakeInEra proxy)
parseQueryNetworkBlockHeight ::
forall crypto f.
diff --git a/server/src/Ogmios/Data/Json/Shelley.hs b/server/src/Ogmios/Data/Json/Shelley.hs
index 8979bd205..828fbcd12 100644
--- a/server/src/Ogmios/Data/Json/Shelley.hs
+++ b/server/src/Ogmios/Data/Json/Shelley.hs
@@ -149,6 +149,16 @@ encodeBlock opts (ShelleyBlock (Ledger.Block blkHeader txs) headerHash) =
where
TPraos.BHeader hBody _ = blkHeader
+encodeBlsKey ::
+ Ledger.BlsKey ->
+ Json
+encodeBlsKey x =
+ "verificationKey"
+ .= encodeByteStringBase16 (CC.rawEncodeFixedSized (Ledger.blsPubKey x))
+ <> "proofOfPossession"
+ .= encodeByteStringBase16 (CC.rawEncodeFixedSized (Ledger.blsPossessionProof x))
+ & encodeObject
+
encodeCertVRF ::
(CC.VRFAlgorithm alg) =>
CC.CertVRF alg ->
@@ -589,7 +599,7 @@ encodeOutputVRF =
encodeByteStringBase16 . CC.getOutputVRFBytes
encodePoolCert ::
- Sh.PoolCert ->
+ Sh.PoolCert era ->
Series
encodePoolCert = \case
Sh.RegPool params ->
@@ -630,11 +640,15 @@ encodePoolMetadata x =
& encodeObject
encodePoolParams ::
- Ledger.StakePoolParams ->
+ Ledger.StakePoolParams era ->
Series
encodePoolParams x =
"vrfVerificationKeyHash"
.= encodeHash (Ledger.unVRFVerKeyHash $ Ledger.sppVrf x)
+ <> "blsKey"
+ .=? OmitWhenNothing
+ encodeBlsKey
+ (Ledger.sppBlsKey x)
<> "pledge"
.= encodeCoin (Ledger.sppPledge x)
<> "cost"
diff --git a/server/src/Ogmios/Data/Ledger/PredicateFailure.hs b/server/src/Ogmios/Data/Ledger/PredicateFailure.hs
index 4104685e3..42e0606f1 100644
--- a/server/src/Ogmios/Data/Ledger/PredicateFailure.hs
+++ b/server/src/Ogmios/Data/Ledger/PredicateFailure.hs
@@ -6,7 +6,9 @@
module Ogmios.Data.Ledger.PredicateFailure
( module Ogmios.Data.Ledger.PredicateFailure
+ , AccountBalanceInterval (..)
, Addr (..)
+ , BlsKey
, TxAuxDataHash
, Coin
, Credential (..)
@@ -20,6 +22,7 @@ module Ogmios.Data.Ledger.PredicateFailure
, IsPhase2Valid (..)
, KeyHash (..)
, KeyRole (..)
+ , KeyRoleVRF (..)
, Language (..)
, Network (..)
, ProtVer (..)
@@ -34,6 +37,7 @@ module Ogmios.Data.Ledger.PredicateFailure
, TxIn (..)
, TxOutInAnyEra (..)
, VKey (..)
+ , VRFVerKeyHash (..)
, ValidityInterval (..)
, ValueInAnyEra (..)
, Voter (..)
@@ -79,10 +83,15 @@ import Cardano.Ledger.Conway.Governance
import Cardano.Ledger.Credential
( Credential (..)
)
+import Cardano.Ledger.Dijkstra.Scripts
+ ( AccountBalanceInterval (..)
+ )
import Cardano.Ledger.Hashes
( DataHash
+ , KeyRoleVRF (..)
, ScriptHash (..)
, TxAuxDataHash
+ , VRFVerKeyHash (..)
)
import Cardano.Ledger.Keys
( KeyHash (..)
@@ -95,6 +104,9 @@ import Cardano.Crypto.Hash.Class
import Cardano.Ledger.Plutus.Language
( Language (..)
)
+import Cardano.Ledger.State
+ ( BlsKey
+ )
import Cardano.Ledger.TxIn
( TxIn (..)
)
@@ -212,6 +224,18 @@ data MultiEraPredicateFailure
{ malformedScripts :: Set ScriptHash
}
+ -- Guards required by the transaction or its sub-transactions must all be
+ -- listed in the top-level guards.
+ | MissingRequiredGuards
+ { missingGuards :: Set (Credential Guard)
+ }
+
+ -- Required top-level guards carry a datum if, and only if, they resolve to
+ -- a Plutus script.
+ | MalformedGuardDatums
+ { malformedGuards :: Set (Credential Guard)
+ }
+
---------------------------------------------------------------------------
-- Rule → UTXO
---------------------------------------------------------------------------
@@ -334,6 +358,12 @@ data MultiEraPredicateFailure
, maximumSize :: Integer
}
+ -- Since Dijkstra, the collateral return output must not use a pointer
+ -- address.
+ | PtrPresentInCollateralReturn
+ { collateralReturn :: TxOutInAnyEra
+ }
+
---------------------------------------------------------------------------
-- Rule → UTXOS
---------------------------------------------------------------------------
@@ -442,8 +472,8 @@ data MultiEraPredicateFailure
-- Rule → POOL
---------------------------------------------------------------------------
- -- A stake pool must not issue a retirement certificate too far in the
- -- future.
+ -- A stake pool must retire after the current epoch, and not too far in
+ -- the future.
| InvalidStakePoolRetirementEpoch
{ currentEpoch :: EpochNo
, listedEpoch :: EpochNo
@@ -464,6 +494,36 @@ data MultiEraPredicateFailure
, computedMetadataHashSize :: Int
}
+ -- The BLS key of a stake pool registration must come with a valid proof
+ -- of possession.
+ | BlsKeyInvalidProofOfPossession
+ { poolId :: KeyHash StakePool
+ , blsKey :: BlsKey
+ }
+
+ -- A stake pool must not use a VRF key that another stake pool uses.
+ | StakePoolVrfKeyAlreadyRegistered
+ { poolId :: KeyHash StakePool
+ , vrfKeyHash :: VRFVerKeyHash StakePoolVRF
+ }
+
+ ---------------------------------------------------------------------------
+ -- Rule → ENTITIES
+ ---------------------------------------------------------------------------
+
+ -- Withdrawals of the whole batch must not exceed the account balances at
+ -- the start of the batch. Values are (withdrawn, balance).
+ | WithdrawalsExceedingOriginalBalance
+ { excessiveWithdrawals :: Map AccountAddress (Coin, Coin)
+ }
+
+ -- Account balances must fall within the intervals asserted by the
+ -- transaction.
+ | BalancesOutsideAccountBalanceIntervals
+ { checkedAgainst :: BalanceSnapshot
+ , balancesOutsideIntervals :: Map AccountAddress (Coin, AccountBalanceInterval DijkstraEra)
+ }
+
---------------------------------------------------------------------------
-- Rule → DELEG
---------------------------------------------------------------------------
@@ -529,6 +589,14 @@ data MultiEraPredicateFailure
{ unknownConstitutionalCommitteeMember :: Credential ColdCommitteeRole
}
+ ---------------------------------------------------------------------------
+ -- Rule → MEMPOOL
+ ---------------------------------------------------------------------------
+
+ -- All inputs of the transaction are already spent; it has likely been
+ -- included already.
+ | AllInputsAreSpent
+
---------------------------------------------------------------------------
-- Quirks
---------------------------------------------------------------------------
@@ -594,6 +662,8 @@ predicateFailurePriority = \case
InvalidStakePoolRetirementEpoch{} -> 3
StakePoolCostTooLow{} -> 3
+ BlsKeyInvalidProofOfPossession{} -> 3
+ StakePoolVrfKeyAlreadyRegistered{} -> 3
ReferenceScriptsTooLarge{} -> 3
EmptyTreasuryWithdrawal{} -> 3
@@ -602,6 +672,7 @@ predicateFailurePriority = \case
CollateralInputLockedByScript{} -> 4
UnknownStakePool{} -> 4
UnknownGovernanceActions{} -> 4
+ AllInputsAreSpent{} -> 4
ScriptIntegrityHashMismatch{} -> 5
@@ -619,10 +690,12 @@ predicateFailurePriority = \case
InvalidSignatures{} -> 9
MissingSignatures{} -> 9
MissingCostModels{} -> 9
+ MissingRequiredGuards{} -> 9
MissingRedeemers{} -> 10
MissingDatums{} -> 10
MissingScriptWitnesses{} -> 10
+ MalformedGuardDatums{} -> 10
UnableToCreateScriptContext{} -> 11
@@ -636,10 +709,13 @@ predicateFailurePriority = \case
NonAdaValueAsCollateral{} -> 14
MissingCollateralInputs{} -> 14
TooManyCollateralInputs{} -> 14
+ PtrPresentInCollateralReturn{} -> 14
IncompleteWithdrawals{} -> 15
RewardAccountNotEmpty{} -> 15
ForbiddenWithdrawal{} -> 15
+ WithdrawalsExceedingOriginalBalance{} -> 15
+ BalancesOutsideAccountBalanceIntervals{} -> 15
TotalCollateralMismatch{} -> 16
DepositMismatch{} -> 16
@@ -657,3 +733,8 @@ predicateFailurePriority = \case
ValueNotConserved{} -> 20
ValidationTagMismatch{} -> 20
+
+-- | Which account balances an account balance interval was checked against.
+data BalanceSnapshot
+ = BatchStartBalances
+ | TransactionBalances
diff --git a/server/src/Ogmios/Data/Ledger/PredicateFailure/Alonzo.hs b/server/src/Ogmios/Data/Ledger/PredicateFailure/Alonzo.hs
index 746bbc709..7e919733d 100644
--- a/server/src/Ogmios/Data/Ledger/PredicateFailure/Alonzo.hs
+++ b/server/src/Ogmios/Data/Ledger/PredicateFailure/Alonzo.hs
@@ -9,6 +9,9 @@ import Ogmios.Prelude
import Cardano.Ledger.Alonzo.Plutus.Evaluate
( CollectError (..)
)
+import Cardano.Ledger.Alonzo.Scripts
+ ( OrdExUnits (..)
+ )
import Cardano.Ledger.Address
( unWithdrawals
)
@@ -158,7 +161,7 @@ encodeUtxoFailure era encodeUtxosFailure' = \case
{ maximumCollateralInputs = fromIntegral maximumCollateralInputs
, countedCollateralInputs = fromIntegral countedCollateralInputs
}
- Al.ExUnitsTooBigUTxO (Mismatch providedExUnits maximumExUnits) ->
+ Al.ExUnitsTooBigUTxO (Mismatch (OrdExUnits providedExUnits) (OrdExUnits maximumExUnits)) ->
ExecutionUnitsTooLarge { maximumExUnits, providedExUnits }
Al.UtxosFailure e ->
encodeUtxosFailure' e
diff --git a/server/src/Ogmios/Data/Ledger/PredicateFailure/Conway.hs b/server/src/Ogmios/Data/Ledger/PredicateFailure/Conway.hs
index 849627eb4..8c3979fbc 100644
--- a/server/src/Ogmios/Data/Ledger/PredicateFailure/Conway.hs
+++ b/server/src/Ogmios/Data/Ledger/PredicateFailure/Conway.hs
@@ -15,6 +15,15 @@ import Data.Maybe.Strict
import Cardano.Ledger.Address
( unWithdrawals
)
+import Cardano.Ledger.Alonzo.Scripts
+ ( OrdExUnits (..)
+ )
+import Cardano.Ledger.Core
+ ( EraRule
+ )
+import Control.State.Transition
+ ( STS (..)
+ )
import Ogmios.Data.Ledger.PredicateFailure
( DiscriminatedEntities (..)
, MultiEraPredicateFailure (..)
@@ -37,6 +46,7 @@ import Cardano.Ledger.BaseTypes
, mismatchSupplied
)
import qualified Cardano.Ledger.Conway.Rules as Cn
+import qualified Cardano.Ledger.Shelley.Rules as Sh
import qualified Data.List.NonEmpty as NE
import qualified Data.Map as Map
import qualified Data.Map.NonEmpty as NEMap
@@ -50,7 +60,7 @@ encodeLedgerFailure = \case
Cn.ConwayUtxowFailure e ->
encodeUtxowFailure e
Cn.ConwayCertsFailure e ->
- encodeCertsFailure e
+ encodeCertsFailure encodePoolFailure encodeGovCertFailure e
Cn.ConwayGovFailure e ->
encodeGovFailure e
Cn.ConwayWdrlNotDelegatedToDRep ((Set.fromList . toList) -> marginalizedCredentials) ->
@@ -108,42 +118,7 @@ encodeGovFailure = \case
{ alreadyRetiredMembers = Map.keysSet (NEMap.toMap members)
}
Cn.InvalidPrevGovActionId proposal ->
- InvalidPreviousGovernanceAction $
- case Ledger.pProcGovAction proposal of
- Ledger.ParameterChange actionId _ _guardrail ->
- [ ( Ledger.pProcAnchor proposal
- , Ledger.PParamUpdatePurpose
- , Ledger.unGovPurposeId <$> actionId
- )
- ]
- Ledger.HardForkInitiation actionId _ ->
- [ ( Ledger.pProcAnchor proposal
- , Ledger.HardForkPurpose
- , Ledger.unGovPurposeId <$> actionId
- )
- ]
- Ledger.UpdateCommittee actionId _ _ _ ->
- [ ( Ledger.pProcAnchor proposal
- , Ledger.CommitteePurpose
- , Ledger.unGovPurposeId <$> actionId
- )
- ]
- Ledger.NoConfidence actionId ->
- [ ( Ledger.pProcAnchor proposal
- , Ledger.CommitteePurpose
- , Ledger.unGovPurposeId <$> actionId
- )
- ]
- Ledger.NewConstitution actionId _ ->
- [ ( Ledger.pProcAnchor proposal
- , Ledger.ConstitutionPurpose
- , Ledger.unGovPurposeId <$> actionId
- )
- ]
- Ledger.TreasuryWithdrawals _withdrawals _guardrail ->
- []
- Ledger.InfoAction ->
- []
+ encodeInvalidPrevGovActionId proposal
Cn.VotingOnExpiredGovAction (toList -> voters) ->
VotingOnExpiredActions voters
Cn.ProposalCantFollow _ (Mismatch proposedVersion currentVersion) ->
@@ -167,28 +142,78 @@ encodeGovFailure = \case
{ unknownVoters = Ledger.CommitteeVoter <$> toList voters
}
+encodeInvalidPrevGovActionId
+ :: Ledger.ProposalProcedure era
+ -> MultiEraPredicateFailure
+encodeInvalidPrevGovActionId proposal =
+ InvalidPreviousGovernanceAction $
+ case Ledger.pProcGovAction proposal of
+ Ledger.ParameterChange actionId _ _guardrail ->
+ [ ( Ledger.pProcAnchor proposal
+ , Ledger.PParamUpdatePurpose
+ , Ledger.unGovPurposeId <$> actionId
+ )
+ ]
+ Ledger.HardForkInitiation actionId _ ->
+ [ ( Ledger.pProcAnchor proposal
+ , Ledger.HardForkPurpose
+ , Ledger.unGovPurposeId <$> actionId
+ )
+ ]
+ Ledger.UpdateCommittee actionId _ _ _ ->
+ [ ( Ledger.pProcAnchor proposal
+ , Ledger.CommitteePurpose
+ , Ledger.unGovPurposeId <$> actionId
+ )
+ ]
+ Ledger.NoConfidence actionId ->
+ [ ( Ledger.pProcAnchor proposal
+ , Ledger.CommitteePurpose
+ , Ledger.unGovPurposeId <$> actionId
+ )
+ ]
+ Ledger.NewConstitution actionId _ ->
+ [ ( Ledger.pProcAnchor proposal
+ , Ledger.ConstitutionPurpose
+ , Ledger.unGovPurposeId <$> actionId
+ )
+ ]
+ Ledger.TreasuryWithdrawals _withdrawals _guardrail ->
+ []
+ Ledger.InfoAction ->
+ []
+
encodeCertsFailure
- :: Cn.ConwayCertsPredFailure ConwayEra
+ :: forall era.
+ ( PredicateFailure (EraRule "CERT" era) ~ Cn.ConwayCertPredFailure era
+ , PredicateFailure (EraRule "DELEG" era) ~ Cn.ConwayDelegPredFailure era
+ )
+ => (PredicateFailure (EraRule "POOL" era) -> MultiEraPredicateFailure)
+ -> (PredicateFailure (EraRule "GOVCERT" era) -> MultiEraPredicateFailure)
+ -> Cn.ConwayCertsPredFailure era
-> MultiEraPredicateFailure
-encodeCertsFailure = \case
- Cn.WithdrawalsNotInRewardsCERTS ws ->
- IncompleteWithdrawals { withdrawals = unWithdrawals ws }
+encodeCertsFailure encodePoolFailureInEra encodeGovCertFailureInEra = \case
Cn.CertFailure e ->
- encodeCertFailure e
+ encodeCertFailure encodePoolFailureInEra encodeGovCertFailureInEra e
encodeCertFailure
- :: Cn.ConwayCertPredFailure ConwayEra
+ :: forall era.
+ ( PredicateFailure (EraRule "DELEG" era) ~ Cn.ConwayDelegPredFailure era
+ )
+ => (PredicateFailure (EraRule "POOL" era) -> MultiEraPredicateFailure)
+ -> (PredicateFailure (EraRule "GOVCERT" era) -> MultiEraPredicateFailure)
+ -> Cn.ConwayCertPredFailure era
-> MultiEraPredicateFailure
-encodeCertFailure = \case
+encodeCertFailure encodePoolFailureInEra encodeGovCertFailureInEra = \case
Cn.DelegFailure e ->
encodeDelegFailure e
Cn.PoolFailure e ->
- encodePoolFailure e
+ encodePoolFailureInEra e
Cn.GovCertFailure e ->
- encodeGovCertFailure e
+ encodeGovCertFailureInEra e
encodeDelegFailure
- :: Cn.ConwayDelegPredFailure ConwayEra
+ :: Cn.ConwayDelegPredFailure era
-> MultiEraPredicateFailure
encodeDelegFailure = \case
-- NOTE: The discarded coin value here refers to the deposit as set in the
@@ -196,7 +221,7 @@ encodeDelegFailure = \case
-- expected one.
Cn.IncorrectDepositDELEG providedDeposit -> -- !Coin
DepositMismatch { providedDeposit, expectedDeposit = SNothing }
- Cn.StakeKeyRegisteredDELEG knownCredential ->
+ Cn.DelegAccountAlreadyRegistered (Sh.AccountAlreadyRegistered knownCredential) ->
StakeCredentialAlreadyRegistered { knownCredential }
Cn.StakeKeyNotRegisteredDELEG unknownCredential ->
StakeCredentialNotRegistered { unknownCredential }
@@ -242,7 +267,7 @@ encodeUtxoFailure
-> MultiEraPredicateFailure
encodeUtxoFailure = \case
Cn.UtxosFailure e ->
- encodeUtxosFailure e
+ encodeUtxosFailure AlonzoBasedEraConway e
Cn.BadInputsUTxO inputs ->
UnknownUtxoReference (NESet.toSet inputs)
Cn.OutsideValidityIntervalUTxO validityInterval currentSlot ->
@@ -295,7 +320,7 @@ encodeUtxoFailure = \case
{ maximumCollateralInputs = fromIntegral maximumCollateralInputs
, countedCollateralInputs = fromIntegral countedCollateralInputs
}
- Cn.ExUnitsTooBigUTxO (Mismatch providedExUnits maximumExUnits) ->
+ Cn.ExUnitsTooBigUTxO (Mismatch (OrdExUnits providedExUnits) (OrdExUnits maximumExUnits)) ->
ExecutionUnitsTooLarge { maximumExUnits, providedExUnits }
Cn.IncorrectTotalCollateralField computedTotalCollateral declaredTotalCollateral ->
TotalCollateralMismatch { computedTotalCollateral, declaredTotalCollateral }
@@ -313,13 +338,17 @@ encodeUtxoFailure = \case
era = ShelleyBasedEraConway
encodeUtxosFailure
- :: Cn.ConwayUtxosPredFailure ConwayEra
+ :: forall era.
+ ( Era era
+ )
+ => AlonzoBasedEra era
+ -> Cn.ConwayUtxosPredFailure era
-> MultiEraPredicateFailure
-encodeUtxosFailure = \case
+encodeUtxosFailure era = \case
Cn.ValidationTagMismatch validationTag mismatchReason ->
ValidationTagMismatch { validationTag, mismatchReason }
Cn.CollectErrors errors ->
- pickPredicateFailure (encodeCollectErrors AlonzoBasedEraConway (toList errors))
+ pickPredicateFailure (encodeCollectErrors era (toList errors))
encodeUtxowFailure
:: Cn.ConwayUtxowPredFailure ConwayEra
diff --git a/server/src/Ogmios/Data/Ledger/PredicateFailure/Dijkstra.hs b/server/src/Ogmios/Data/Ledger/PredicateFailure/Dijkstra.hs
new file mode 100644
index 000000000..2dc3beaad
--- /dev/null
+++ b/server/src/Ogmios/Data/Ledger/PredicateFailure/Dijkstra.hs
@@ -0,0 +1,511 @@
+-- This Source Code Form is subject to the terms of the Mozilla Public
+-- 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/.
+
+module Ogmios.Data.Ledger.PredicateFailure.Dijkstra where
+
+import Ogmios.Prelude
+
+import Cardano.Ledger.Address
+ ( AccountAddress
+ , DirectDeposits (..)
+ , unWithdrawals
+ )
+import Cardano.Ledger.Alonzo.Scripts
+ ( OrdExUnits (..)
+ )
+import Cardano.Ledger.BaseTypes
+ ( EpochInterval (..)
+ , Mismatch (..)
+ , addEpochInterval
+ , mismatchSupplied
+ )
+import Data.Maybe.Strict
+ ( StrictMaybe (..)
+ )
+import Ogmios.Data.Ledger.PredicateFailure
+ ( BalanceSnapshot (..)
+ , DiscriminatedEntities (..)
+ , MultiEraPredicateFailure (..)
+ , Network
+ , ScriptPurposeIndexInAnyEra (..)
+ , ScriptPurposeItemInAnyEra (..)
+ , TxOutInAnyEra (..)
+ , ValueInAnyEra (..)
+ )
+import Ogmios.Data.Ledger.PredicateFailure.Conway
+ ( encodeCertsFailure
+ , encodeDelegFailure
+ , encodeInvalidPrevGovActionId
+ , encodeUtxosFailure
+ )
+
+import qualified Cardano.Ledger.Api as Ledger
+import qualified Cardano.Ledger.Dijkstra.Rules as Di
+import qualified Data.List.NonEmpty as NE
+import qualified Data.Map as Map
+import qualified Data.Map.NonEmpty as NEMap
+import qualified Data.Set as Set
+import qualified Data.Set.NonEmpty as NESet
+
+encodeMempoolFailure
+ :: Di.DijkstraMempoolPredFailure DijkstraEra
+ -> MultiEraPredicateFailure
+encodeMempoolFailure = \case
+ Di.LedgerFailure e ->
+ encodeLedgerFailure e
+ Di.MempoolFailure mempoolError ->
+ UnexpectedMempoolError { mempoolError }
+ Di.AllInputsAreSpent ->
+ AllInputsAreSpent
+
+encodeLedgerFailure
+ :: Di.DijkstraLedgerPredFailure DijkstraEra
+ -> MultiEraPredicateFailure
+encodeLedgerFailure = \case
+ Di.DijkstraUtxowFailure e ->
+ encodeUtxowFailure e
+ Di.DijkstraEntitiesFailure e ->
+ encodeEntitiesFailure e
+ Di.DijkstraGovFailure e ->
+ encodeGovFailure e
+ Di.DijkstraTreasuryValueMismatch (Mismatch providedWithdrawal computedWithdrawal) ->
+ TreasuryWithdrawalMismatch { providedWithdrawal, computedWithdrawal }
+ Di.DijkstraTxRefScriptsSizeTooBig (Mismatch (toInteger -> measuredSize) (toInteger -> maximumSize)) ->
+ ReferenceScriptsTooLarge { measuredSize, maximumSize }
+ Di.DijkstraSubLedgersFailure e ->
+ encodeSubLedgersFailure e
+
+encodeUtxowFailure
+ :: Di.DijkstraUtxowPredFailure DijkstraEra
+ -> MultiEraPredicateFailure
+encodeUtxowFailure = \case
+ Di.UtxoFailure e ->
+ encodeUtxoFailure e
+ Di.InvalidWitnessesUTXOW wits ->
+ InvalidSignatures (toList wits)
+ Di.MissingVKeyWitnessesUTXOW keys ->
+ MissingSignatures (NESet.toSet keys)
+ Di.MissingScriptWitnessesUTXOW scripts ->
+ MissingScriptWitnesses (NESet.toSet scripts)
+ Di.ScriptWitnessNotValidatingUTXOW scripts ->
+ FailingScript (NESet.toSet scripts)
+ Di.MissingTxBodyMetadataHash hash ->
+ MissingMetadataHash hash
+ Di.MissingTxMetadata hash ->
+ MissingMetadata hash
+ Di.ConflictingMetadataHash (Mismatch providedAuxiliaryDataHash computedAuxiliaryDataHash) ->
+ MetadataHashMismatch { providedAuxiliaryDataHash, computedAuxiliaryDataHash }
+ Di.InvalidMetadata ->
+ InvalidMetadata
+ Di.ExtraneousScriptWitnessesUTXOW scripts ->
+ ExtraneousScriptWitnesses (NESet.toSet scripts)
+ Di.MissingRedeemers redeemers ->
+ let missingRedeemers = ScriptPurposeItemInAnyEra . (era,) . fst <$> toList redeemers
+ in MissingRedeemers { missingRedeemers }
+ Di.MissingRequiredDatums missingDatums _providedDatums ->
+ MissingDatums { missingDatums = NESet.toSet missingDatums }
+ Di.NotAllowedSupplementalDatums extraneousDatums _acceptableDatums ->
+ ExtraneousDatums { extraneousDatums = NESet.toSet extraneousDatums }
+ Di.PPViewHashesDontMatch (Mismatch providedIntegrityHash computedIntegrityHash) ->
+ ScriptIntegrityHashMismatch { providedIntegrityHash, computedIntegrityHash }
+ Di.UnspendableUTxONoDatumHash orphanScriptInputs ->
+ OrphanScriptInputs { orphanScriptInputs = NESet.toSet orphanScriptInputs }
+ Di.ExtraRedeemers redeemers ->
+ let extraneousRedeemers = ScriptPurposeIndexInAnyEra . (era,) <$> toList redeemers
+ in ExtraneousRedeemers { extraneousRedeemers }
+ Di.MalformedScriptWitnesses scripts ->
+ MalformedScripts (NESet.toSet scripts)
+ Di.MalformedReferenceScripts scripts ->
+ MalformedScripts (NESet.toSet scripts)
+ Di.ScriptIntegrityHashMismatch (Mismatch providedIntegrityHash computedIntegrityHash) _ ->
+ ScriptIntegrityHashMismatch { providedIntegrityHash, computedIntegrityHash }
+ Di.MissingRequiredGuards guards ->
+ MissingRequiredGuards { missingGuards = NESet.toSet guards }
+ Di.MalformedGuardDatums guards ->
+ MalformedGuardDatums { malformedGuards = NESet.toSet guards }
+ where
+ era = AlonzoBasedEraDijkstra
+
+encodeUtxoFailure
+ :: Di.DijkstraUtxoPredFailure DijkstraEra
+ -> MultiEraPredicateFailure
+encodeUtxoFailure = \case
+ Di.UtxosFailure e ->
+ encodeUtxosFailure AlonzoBasedEraDijkstra e
+ Di.BadInputsUTxO inputs ->
+ UnknownUtxoReference (NESet.toSet inputs)
+ Di.OutsideValidityIntervalUTxO validityInterval currentSlot ->
+ TransactionOutsideValidityInterval { validityInterval, currentSlot }
+ Di.MaxTxSizeUTxO (Mismatch measuredSize maximumSize) ->
+ TransactionTooLarge
+ { measuredSize = toInteger measuredSize
+ , maximumSize = toInteger maximumSize
+ }
+ Di.InputSetEmptyUTxO ->
+ EmptyInputSet
+ Di.FeeTooSmallUTxO (Mismatch suppliedFee minimumRequiredFee) ->
+ TransactionFeeTooSmall { minimumRequiredFee, suppliedFee }
+ Di.ValueNotConservedUTxO (Mismatch consumed produced) ->
+ let valueConsumed = ValueInAnyEra (era, consumed) in
+ let valueProduced = ValueInAnyEra (era, produced) in
+ ValueNotConserved { valueConsumed, valueProduced }
+ Di.WrongNetwork expectedNetwork invalidAddrs ->
+ let invalidEntities = DiscriminatedAddresses (NESet.toSet invalidAddrs) in
+ NetworkMismatch { expectedNetwork, invalidEntities }
+ Di.OutputBootAddrAttrsTooBig outs ->
+ let culpritOutputs = (\out -> TxOutInAnyEra (era, out)) <$> toList outs in
+ BootstrapAddressAttributesTooLarge { culpritOutputs }
+ Di.OutputTooBigUTxO outs ->
+ let culpritOutputs = (\(_, _, out) -> TxOutInAnyEra (era, out)) <$> toList outs in
+ ValueSizeAboveLimit culpritOutputs
+ Di.InsufficientCollateral providedCollateral minimumRequiredCollateral ->
+ InsufficientCollateral { providedCollateral, minimumRequiredCollateral }
+ Di.ScriptsNotPaidUTxO utxo ->
+ CollateralInputLockedByScript (Map.keys (NEMap.toMap utxo))
+ Di.ExUnitsTooBigUTxO (Mismatch (OrdExUnits providedExUnits) (OrdExUnits maximumExUnits)) ->
+ ExecutionUnitsTooLarge { maximumExUnits, providedExUnits }
+ Di.CollateralContainsNonADA value ->
+ let valueInAnyEra = ValueInAnyEra (era, value) in
+ NonAdaValueAsCollateral valueInAnyEra
+ Di.WrongNetworkInTxBody (Mismatch _providedNetwork expectedNetwork) ->
+ let invalidEntities = DiscriminatedTransaction in
+ NetworkMismatch { expectedNetwork, invalidEntities }
+ Di.OutsideForecast slot ->
+ SlotOutsideForeseeableFuture { slot }
+ Di.TooManyCollateralInputs (Mismatch countedCollateralInputs maximumCollateralInputs) ->
+ TooManyCollateralInputs
+ { maximumCollateralInputs = fromIntegral maximumCollateralInputs
+ , countedCollateralInputs = fromIntegral countedCollateralInputs
+ }
+ Di.NoCollateralInputs ->
+ MissingCollateralInputs
+ Di.IncorrectTotalCollateralField computedTotalCollateral declaredTotalCollateral ->
+ TotalCollateralMismatch { computedTotalCollateral, declaredTotalCollateral }
+ Di.BabbageOutputTooSmallUTxO outs ->
+ let insufficientlyFundedOutputs =
+ (\(out, minAda) -> (TxOutInAnyEra (era, out), Just minAda)) <$> toList outs
+ in InsufficientAdaInOutput { insufficientlyFundedOutputs }
+ Di.BabbageNonDisjointRefInputs xs ->
+ ConflictingInputsAndReferences xs
+ Di.PtrPresentInCollateralReturn out ->
+ PtrPresentInCollateralReturn { collateralReturn = TxOutInAnyEra (era, out) }
+ -- NOTE: A legacy-mode top-level transaction must balance on its own; this
+ -- is reported as a plain value conservation failure.
+ Di.ValueNotConservedInLegacyMode (Mismatch consumed produced) ->
+ let valueConsumed = ValueInAnyEra (era, consumed) in
+ let valueProduced = ValueInAnyEra (era, produced) in
+ ValueNotConserved { valueConsumed, valueProduced }
+ where
+ era = ShelleyBasedEraDijkstra
+
+encodeEntitiesFailure
+ :: Di.EntitiesPredFailure DijkstraEra
+ -> MultiEraPredicateFailure
+encodeEntitiesFailure = \case
+ Di.CertsFailure e ->
+ encodeCertsFailure encodePoolFailure encodeGovCertFailure e
+ Di.WithdrawalAddressesWithWrongNetwork expectedNetwork accounts ->
+ encodeWrongNetworkAccounts expectedNetwork accounts
+ Di.WithdrawalAccountsMissing ws ->
+ encodeUnregisteredAccount "WithdrawalAccountsMissing" (unWithdrawals ws)
+ Di.WithdrawalAccountsMissingFromOriginal ws ->
+ encodeUnregisteredAccount "WithdrawalAccountsMissingFromOriginal" (unWithdrawals ws)
+ Di.WithdrawalAmountsInexactInLegacyMode ws ->
+ IncompleteWithdrawals { withdrawals = mismatchSupplied <$> NEMap.toMap ws }
+ Di.WithdrawalAmountsExceedingOriginalBalance ws ->
+ WithdrawalsExceedingOriginalBalance
+ { excessiveWithdrawals =
+ (\(Mismatch withdrawn balance) -> (withdrawn, balance)) <$> NEMap.toMap ws
+ }
+ Di.DirectDepositAddressesWithWrongNetwork expectedNetwork accounts ->
+ encodeWrongNetworkAccounts expectedNetwork accounts
+ Di.DirectDepositAccountsMissing deposits ->
+ encodeUnregisteredAccount "DirectDepositAccountsMissing" (unDirectDeposits deposits)
+ Di.WrongNetworkInAccountBalanceIntervals expectedNetwork accounts ->
+ encodeWrongNetworkAccounts expectedNetwork accounts
+ Di.MissingAccountsInAccountBalanceIntervals intervals ->
+ encodeUnregisteredAccount "MissingAccountsInAccountBalanceIntervals" (NEMap.toMap intervals)
+ Di.BalancesOutsideAccountBalanceIntervals balances ->
+ BalancesOutsideAccountBalanceIntervals
+ { checkedAgainst = TransactionBalances
+ , balancesOutsideIntervals = NEMap.toMap balances
+ }
+ Di.WrongNetworkInStartingAccountBalanceIntervals expectedNetwork accounts ->
+ encodeWrongNetworkAccounts expectedNetwork accounts
+ Di.MissingAccountsInStartingAccountBalanceIntervals intervals ->
+ encodeUnregisteredAccount "MissingAccountsInStartingAccountBalanceIntervals" (NEMap.toMap intervals)
+ Di.BalancesOutsideStartingAccountBalanceIntervals balances ->
+ BalancesOutsideAccountBalanceIntervals
+ { checkedAgainst = BatchStartBalances
+ , balancesOutsideIntervals = NEMap.toMap balances
+ }
+
+encodeGovFailure
+ :: Di.DijkstraGovPredFailure DijkstraEra
+ -> MultiEraPredicateFailure
+encodeGovFailure = \case
+ Di.GovActionsDoNotExist (toList -> fromList -> governanceActions) ->
+ UnknownGovernanceActions { governanceActions }
+ Di.MalformedProposal _govAction ->
+ InvalidProtocolParametersUpdate
+ Di.ProposalProcedureNetworkIdMismatch rewardAccount expectedNetwork ->
+ NetworkMismatch
+ { expectedNetwork
+ , invalidEntities =
+ DiscriminatedRewardAccounts (Set.singleton rewardAccount)
+ }
+ Di.TreasuryWithdrawalsNetworkIdMismatch rewardAccounts expectedNetwork ->
+ NetworkMismatch
+ { expectedNetwork
+ , invalidEntities =
+ DiscriminatedRewardAccounts (NESet.toSet rewardAccounts)
+ }
+ Di.ProposalDepositIncorrect (Mismatch providedDeposit (SJust -> expectedDeposit)) ->
+ GovernanceProposalDepositMismatch
+ { providedDeposit
+ , expectedDeposit
+ }
+ Di.DisallowedVoters (toList -> voters) ->
+ UnauthorizedVotes voters
+ Di.ConflictingCommitteeUpdate conflictingMembers ->
+ ConflictingCommitteeUpdate
+ { conflictingMembers = NESet.toSet conflictingMembers
+ }
+ Di.ExpirationEpochTooSmall members ->
+ InvalidCommitteeUpdate
+ { alreadyRetiredMembers = Map.keysSet (NEMap.toMap members)
+ }
+ Di.InvalidPrevGovActionId proposal ->
+ encodeInvalidPrevGovActionId proposal
+ Di.VotingOnExpiredGovAction (toList -> voters) ->
+ VotingOnExpiredActions voters
+ Di.ProposalCantFollow _ (Mismatch proposedVersion currentVersion) ->
+ InvalidHardForkVersionBump { proposedVersion, currentVersion }
+ Di.InvalidGuardrailsScriptHash providedHash expectedHash ->
+ ConstitutionGuardrailsHashMismatch { providedHash, expectedHash }
+ Di.DisallowedProposalDuringBootstrap _ ->
+ UnauthorizedGovernanceAction
+ Di.DisallowedVotesDuringBootstrap votes ->
+ UnauthorizedVotes (toList votes)
+ Di.VotersDoNotExist voters ->
+ UnknownVoters (toList voters)
+ Di.ZeroTreasuryWithdrawals _ ->
+ EmptyTreasuryWithdrawal
+ Di.ProposalReturnAccountDoesNotExist (Ledger.AccountAddress _ (Ledger.unAccountId -> unknownCredential)) ->
+ StakeCredentialNotRegistered { unknownCredential }
+ Di.TreasuryWithdrawalReturnAccountsDoNotExist (NE.head -> Ledger.AccountAddress _ (Ledger.unAccountId -> unknownCredential)) ->
+ StakeCredentialNotRegistered { unknownCredential }
+ Di.UnelectedCommitteeVoters voters ->
+ UnknownVoters
+ { unknownVoters = Ledger.CommitteeVoter <$> toList voters
+ }
+
+encodeGovCertFailure
+ :: Di.DijkstraGovCertPredFailure DijkstraEra
+ -> MultiEraPredicateFailure
+encodeGovCertFailure = \case
+ Di.DijkstraDRepAlreadyRegistered knownDelegateRepresentative ->
+ DRepAlreadyRegistered { knownDelegateRepresentative }
+ Di.DijkstraDRepNotRegistered unknownDelegateRepresentative ->
+ DRepNotRegistered { unknownDelegateRepresentative }
+ Di.DijkstraDRepIncorrectDeposit (Mismatch providedDeposit (SJust -> expectedDeposit)) ->
+ DepositMismatch { providedDeposit, expectedDeposit }
+ Di.DijkstraCommitteeHasPreviouslyResigned unknownConstitutionalCommitteeMember ->
+ UnknownConstitutionalCommitteeMember { unknownConstitutionalCommitteeMember }
+ Di.DijkstraDRepIncorrectRefund (Mismatch providedDeposit (SJust -> expectedDeposit)) ->
+ DepositMismatch { providedDeposit, expectedDeposit }
+ Di.DijkstraCommitteeIsUnknown unknownConstitutionalCommitteeMember ->
+ UnknownConstitutionalCommitteeMember { unknownConstitutionalCommitteeMember }
+
+encodePoolFailure
+ :: Di.DijkstraPoolPredFailure DijkstraEra
+ -> MultiEraPredicateFailure
+encodePoolFailure = \case
+ Di.StakePoolNotRegisteredOnKeyPOOL poolId ->
+ UnknownStakePool { poolId }
+ Di.StakePoolRetirementWrongEpochPOOL
+ Mismatch { mismatchSupplied = listedEpoch, mismatchExpected = currentEpoch }
+ Mismatch { mismatchExpected = lastValidEpoch } ->
+ let firstInvalidEpoch = addEpochInterval lastValidEpoch (EpochInterval 1) in
+ InvalidStakePoolRetirementEpoch { currentEpoch, listedEpoch, firstInvalidEpoch }
+ Di.StakePoolCostTooLowPOOL (Mismatch declaredCost minimumPoolCost) ->
+ StakePoolCostTooLow { declaredCost, minimumPoolCost }
+ Di.WrongNetworkPOOL (Mismatch _ expectedNetwork) poolId ->
+ let invalidEntities = DiscriminatedPoolRegistrationCertificate poolId in
+ NetworkMismatch { expectedNetwork, invalidEntities }
+ Di.PoolMedataHashTooBig poolId computedMetadataHashSize ->
+ StakePoolMetadataHashTooLarge { poolId, computedMetadataHashSize }
+ Di.VRFKeyHashAlreadyRegistered poolId vrfKeyHash ->
+ StakePoolVrfKeyAlreadyRegistered { poolId, vrfKeyHash }
+ Di.BlsKeyInvalidProofOfPossession poolId blsKey ->
+ BlsKeyInvalidProofOfPossession { poolId, blsKey }
+
+encodeSubLedgersFailure
+ :: Di.DijkstraSubLedgersPredFailure DijkstraEra
+ -> MultiEraPredicateFailure
+encodeSubLedgersFailure = \case
+ Di.SubLedgerFailure e ->
+ encodeSubLedgerFailure e
+
+-- TODO: sub-transaction failures map like their top-level counterparts; the
+-- failing sub-transaction is not reported.
+encodeSubLedgerFailure
+ :: Di.DijkstraSubLedgerPredFailure DijkstraEra
+ -> MultiEraPredicateFailure
+encodeSubLedgerFailure = \case
+ Di.SubUtxowFailure e ->
+ encodeSubUtxowFailure e
+ Di.SubEntitiesFailure e ->
+ encodeSubEntitiesFailure e
+ Di.SubGovFailure (Di.DijkstraSubGovPredFailure e) ->
+ encodeGovFailure e
+ Di.SubTreasuryValueMismatch (Mismatch providedWithdrawal computedWithdrawal) ->
+ TreasuryWithdrawalMismatch { providedWithdrawal, computedWithdrawal }
+
+encodeSubUtxowFailure
+ :: Di.DijkstraSubUtxowPredFailure DijkstraEra
+ -> MultiEraPredicateFailure
+encodeSubUtxowFailure = \case
+ Di.SubUtxoFailure e ->
+ encodeSubUtxoFailure e
+ Di.SubInvalidWitnessesUTXOW wits ->
+ InvalidSignatures (toList wits)
+ Di.SubMissingVKeyWitnessesUTXOW keys ->
+ MissingSignatures (NESet.toSet keys)
+ Di.SubScriptWitnessNotValidatingUTXOW scripts ->
+ FailingScript (NESet.toSet scripts)
+ Di.SubMissingTxBodyMetadataHash hash ->
+ MissingMetadataHash hash
+ Di.SubMissingTxMetadata hash ->
+ MissingMetadata hash
+ Di.SubConflictingMetadataHash (Mismatch providedAuxiliaryDataHash computedAuxiliaryDataHash) ->
+ MetadataHashMismatch { providedAuxiliaryDataHash, computedAuxiliaryDataHash }
+ Di.SubInvalidMetadata ->
+ InvalidMetadata
+ Di.SubMissingRedeemers redeemers ->
+ let missingRedeemers = ScriptPurposeItemInAnyEra . (era,) . fst <$> toList redeemers
+ in MissingRedeemers { missingRedeemers }
+ Di.SubMissingRequiredDatums missingDatums _providedDatums ->
+ MissingDatums { missingDatums = NESet.toSet missingDatums }
+ Di.SubNotAllowedSupplementalDatums extraneousDatums _acceptableDatums ->
+ ExtraneousDatums { extraneousDatums = NESet.toSet extraneousDatums }
+ Di.SubPPViewHashesDontMatch (Mismatch providedIntegrityHash computedIntegrityHash) ->
+ ScriptIntegrityHashMismatch { providedIntegrityHash, computedIntegrityHash }
+ Di.SubUnspendableUTxONoDatumHash orphanScriptInputs ->
+ OrphanScriptInputs { orphanScriptInputs = NESet.toSet orphanScriptInputs }
+ Di.SubExtraRedeemers redeemers ->
+ let extraneousRedeemers = ScriptPurposeIndexInAnyEra . (era,) <$> toList redeemers
+ in ExtraneousRedeemers { extraneousRedeemers }
+ Di.SubMalformedScriptWitnesses scripts ->
+ MalformedScripts (NESet.toSet scripts)
+ Di.SubMalformedReferenceScripts scripts ->
+ MalformedScripts (NESet.toSet scripts)
+ Di.SubScriptIntegrityHashMismatch (Mismatch providedIntegrityHash computedIntegrityHash) _ ->
+ ScriptIntegrityHashMismatch { providedIntegrityHash, computedIntegrityHash }
+ Di.SubMalformedGuardDatums guards ->
+ MalformedGuardDatums { malformedGuards = NESet.toSet guards }
+ where
+ era = AlonzoBasedEraDijkstra
+
+encodeSubUtxoFailure
+ :: Di.DijkstraSubUtxoPredFailure DijkstraEra
+ -> MultiEraPredicateFailure
+encodeSubUtxoFailure = \case
+ Di.SubBadInputsUTxO inputs ->
+ UnknownUtxoReference (NESet.toSet inputs)
+ Di.SubOutsideValidityIntervalUTxO validityInterval currentSlot ->
+ TransactionOutsideValidityInterval { validityInterval, currentSlot }
+ Di.SubMaxTxSizeUTxO (Mismatch measuredSize maximumSize) ->
+ TransactionTooLarge
+ { measuredSize = toInteger measuredSize
+ , maximumSize = toInteger maximumSize
+ }
+ Di.SubInputSetEmptyUTxO ->
+ EmptyInputSet
+ Di.SubWrongNetwork expectedNetwork invalidAddrs ->
+ let invalidEntities = DiscriminatedAddresses (NESet.toSet invalidAddrs) in
+ NetworkMismatch { expectedNetwork, invalidEntities }
+ Di.SubOutputBootAddrAttrsTooBig outs ->
+ let culpritOutputs = (\out -> TxOutInAnyEra (era, out)) <$> toList outs in
+ BootstrapAddressAttributesTooLarge { culpritOutputs }
+ Di.SubOutputTooBigUTxO outs ->
+ let culpritOutputs = (\(_, _, out) -> TxOutInAnyEra (era, out)) <$> toList outs in
+ ValueSizeAboveLimit culpritOutputs
+ Di.SubWrongNetworkInTxBody (Mismatch _providedNetwork expectedNetwork) ->
+ let invalidEntities = DiscriminatedTransaction in
+ NetworkMismatch { expectedNetwork, invalidEntities }
+ Di.SubOutsideForecast slot ->
+ SlotOutsideForeseeableFuture { slot }
+ Di.SubBabbageOutputTooSmallUTxO outs ->
+ let insufficientlyFundedOutputs =
+ (\(out, minAda) -> (TxOutInAnyEra (era, out), Just minAda)) <$> toList outs
+ in InsufficientAdaInOutput { insufficientlyFundedOutputs }
+ where
+ era = ShelleyBasedEraDijkstra
+
+encodeSubEntitiesFailure
+ :: Di.SubEntitiesPredFailure DijkstraEra
+ -> MultiEraPredicateFailure
+encodeSubEntitiesFailure = \case
+ Di.SubCertsFailure e ->
+ encodeSubCertsFailure e
+ Di.SubWithdrawalAddressesWithWrongNetwork expectedNetwork accounts ->
+ encodeWrongNetworkAccounts expectedNetwork accounts
+ Di.SubWithdrawalAccountsMissing ws ->
+ encodeUnregisteredAccount "SubWithdrawalAccountsMissing" (unWithdrawals ws)
+ Di.SubWithdrawalAccountsMissingFromOriginal ws ->
+ encodeUnregisteredAccount "SubWithdrawalAccountsMissingFromOriginal" (unWithdrawals ws)
+ Di.SubDirectDepositAddressesWithWrongNetwork expectedNetwork accounts ->
+ encodeWrongNetworkAccounts expectedNetwork accounts
+ Di.SubDirectDepositAccountsMissing deposits ->
+ encodeUnregisteredAccount "SubDirectDepositAccountsMissing" (unDirectDeposits deposits)
+ Di.SubBalancesOutsideAccountBalanceIntervals balances ->
+ BalancesOutsideAccountBalanceIntervals
+ { checkedAgainst = TransactionBalances
+ , balancesOutsideIntervals = NEMap.toMap balances
+ }
+ Di.SubMissingAccountsInAccountBalanceIntervals intervals ->
+ encodeUnregisteredAccount "SubMissingAccountsInAccountBalanceIntervals" (NEMap.toMap intervals)
+ Di.SubWrongNetworkInAccountBalanceIntervals expectedNetwork accounts ->
+ encodeWrongNetworkAccounts expectedNetwork accounts
+
+encodeSubCertsFailure
+ :: Di.DijkstraSubCertsPredFailure DijkstraEra
+ -> MultiEraPredicateFailure
+encodeSubCertsFailure = \case
+ Di.SubCertFailure e ->
+ encodeSubCertFailure e
+
+encodeSubCertFailure
+ :: Di.DijkstraSubCertPredFailure DijkstraEra
+ -> MultiEraPredicateFailure
+encodeSubCertFailure = \case
+ Di.SubDelegFailure (Di.DijkstraSubDelegPredFailure e) ->
+ encodeDelegFailure e
+ Di.SubPoolFailure (Di.DijkstraSubPoolPredFailure e) ->
+ encodePoolFailure e
+ Di.SubGovCertFailure (Di.DijkstraSubGovCertPredFailure e) ->
+ encodeGovCertFailure e
+
+encodeWrongNetworkAccounts
+ :: Network
+ -> NESet.NonEmptySet AccountAddress
+ -> MultiEraPredicateFailure
+encodeWrongNetworkAccounts expectedNetwork accounts =
+ let invalidEntities = DiscriminatedRewardAccounts (NESet.toSet accounts) in
+ NetworkMismatch { expectedNetwork, invalidEntities }
+
+-- | Report the first unregistered account only. The ledger never reports an
+-- empty map; the fallback names the ledger failure to keep the mapping total.
+encodeUnregisteredAccount
+ :: Text
+ -> Map AccountAddress a
+ -> MultiEraPredicateFailure
+encodeUnregisteredAccount failureName =
+ maybe
+ (UnexpectedMempoolError { mempoolError = failureName })
+ (\(Ledger.AccountAddress _ (Ledger.unAccountId -> unknownCredential), _) ->
+ StakeCredentialNotRegistered { unknownCredential }
+ )
+ . Map.lookupMin
diff --git a/server/src/Ogmios/Data/Ledger/PredicateFailure/Shelley.hs b/server/src/Ogmios/Data/Ledger/PredicateFailure/Shelley.hs
index e3cca94bd..9fd9b2e46 100644
--- a/server/src/Ogmios/Data/Ledger/PredicateFailure/Shelley.hs
+++ b/server/src/Ogmios/Data/Ledger/PredicateFailure/Shelley.hs
@@ -10,7 +10,9 @@ import Cardano.Ledger.Address
( unWithdrawals
)
import Cardano.Ledger.BaseTypes
- ( Mismatch (..)
+ ( EpochInterval (..)
+ , Mismatch (..)
+ , addEpochInterval
, mismatchSupplied
)
import Cardano.Ledger.Core
@@ -154,8 +156,11 @@ encodePoolFailure
encodePoolFailure = \case
Sh.StakePoolNotRegisteredOnKeyPOOL poolId ->
UnknownStakePool { poolId }
- Sh.StakePoolRetirementWrongEpochPOOL (Mismatch currentEpoch listedEpoch) (Mismatch _ firstInvalidEpoch) ->
- InvalidStakePoolRetirementEpoch { currentEpoch, listedEpoch, firstInvalidEpoch }
+ Sh.StakePoolRetirementWrongEpochPOOL
+ Mismatch { mismatchSupplied = listedEpoch, mismatchExpected = currentEpoch }
+ Mismatch { mismatchExpected = lastValidEpoch } ->
+ let firstInvalidEpoch = addEpochInterval lastValidEpoch (EpochInterval 1) in
+ InvalidStakePoolRetirementEpoch { currentEpoch, listedEpoch, firstInvalidEpoch }
Sh.StakePoolCostTooLowPOOL (Mismatch declaredCost minimumPoolCost) ->
StakePoolCostTooLow { declaredCost, minimumPoolCost }
Sh.WrongNetworkPOOL (Mismatch _ expectedNetwork) poolId ->
@@ -163,17 +168,14 @@ encodePoolFailure = \case
NetworkMismatch { expectedNetwork, invalidEntities }
Sh.PoolMedataHashTooBig poolId computedMetadataHashSize ->
StakePoolMetadataHashTooLarge { poolId, computedMetadataHashSize }
- -- TODO: VRF-key reuse across pool registrations isn't represented
- -- distinctly in MultiEraPredicateFailure; fold into UnknownStakePool
- -- referencing the conflicting poolId for now.
- Sh.VRFKeyHashAlreadyRegistered poolId _vrfKeyHash ->
- UnknownStakePool { poolId }
+ Sh.VRFKeyHashAlreadyRegistered poolId vrfKeyHash ->
+ StakePoolVrfKeyAlreadyRegistered { poolId, vrfKeyHash }
encodeDelegFailure
:: Sh.ShelleyDelegPredFailure era
-> MultiEraPredicateFailure
encodeDelegFailure = \case
- Sh.StakeKeyAlreadyRegisteredDELEG credential ->
+ Sh.DelegAccountAlreadyRegistered (Sh.AccountAlreadyRegistered credential) ->
StakeCredentialAlreadyRegistered credential
Sh.StakeKeyNotRegisteredDELEG credential ->
StakeCredentialNotRegistered credential
diff --git a/server/src/Ogmios/Data/Ledger/Rewards.hs b/server/src/Ogmios/Data/Ledger/Rewards.hs
index fa02bd519..f3becb4b8 100644
--- a/server/src/Ogmios/Data/Ledger/Rewards.hs
+++ b/server/src/Ogmios/Data/Ledger/Rewards.hs
@@ -51,6 +51,7 @@ import Cardano.Ledger.Slot
)
import Cardano.Ledger.State
( ActiveStake (..)
+ , GoSnapShot (..)
, SnapShot (..)
, SnapShots (..)
, StakeWithDelegation (..)
@@ -170,7 +171,7 @@ rewardsProvenance slotsPerEpoch b@(BlocksMade b') es@(EpochState acnt _ ss _) ma
-- against. `ssActiveStake` pairs each staking credential with both its
-- stake and its delegation pool, so there's no separate delegations map.
SnapShot{ssActiveStake, ssTotalActiveStake, ssStakePoolsSnapShot} =
- ssStakeGo ss
+ gsSnapShot (ssStakeGo ss)
Coin reserves =
casReserves acnt
diff --git a/server/test/unit/Ogmios/App/Protocol/TxMonitorSpec.hs b/server/test/unit/Ogmios/App/Protocol/TxMonitorSpec.hs
index 295aa2d99..364716fba 100644
--- a/server/test/unit/Ogmios/App/Protocol/TxMonitorSpec.hs
+++ b/server/test/unit/Ogmios/App/Protocol/TxMonitorSpec.hs
@@ -226,7 +226,7 @@ withTxMonitorClient action seed = do
(recvQ, sendQ) <- atomically $ (,) <$> newTQueue <*> newTQueue
let opts = Rpc.defaultOptions
let innerCodecs = mkTxMonitorCodecs opts encodeGenTxId (encodeTx (MetadataNoSchema, omitOptionalCbor))
- let client = mkTxMonitorClient (defaultWithInternalError (const $ return ()) opts) innerCodecs recvQ (atomically . writeTQueue sendQ) NodeToClientV_16
+ let client = mkTxMonitorClient (defaultWithInternalError (const $ return ()) opts) innerCodecs recvQ (atomically . writeTQueue sendQ) NodeToClientV_23
let codec = codecs defaultSlotsPerEpoch nodeToClientV_Latest & cTxMonitorCodec
withMockChannel (txMonitorMockPeer seed codec) $ \channel -> do
result <- race
diff --git a/server/test/unit/Ogmios/Data/JsonSpec.hs b/server/test/unit/Ogmios/Data/JsonSpec.hs
index 258a3b317..4edbb5ebd 100644
--- a/server/test/unit/Ogmios/Data/JsonSpec.hs
+++ b/server/test/unit/Ogmios/Data/JsonSpec.hs
@@ -13,6 +13,26 @@ module Ogmios.Data.JsonSpec (
import Ogmios.Prelude
+import Cardano.Ledger.Api (
+ AsItem,
+ PlutusPurpose,
+ TxCert,
+ )
+import Cardano.Ledger.BaseTypes (
+ Inject (..),
+ )
+import Cardano.Ledger.Conway (
+ ConwayEra,
+ )
+import Cardano.Ledger.Conway.TxInfo (
+ ConwayContextError,
+ )
+import Cardano.Ledger.Dijkstra (
+ DijkstraEra,
+ )
+import Cardano.Ledger.Dijkstra.TxInfo (
+ DijkstraContextError,
+ )
import Cardano.Network.Protocol.NodeToClient (
Block,
GenTxId,
@@ -264,7 +284,7 @@ import Test.QuickCheck (
property,
quickCheckWithResult,
vectorOf,
- withMaxSuccess,
+ withNumTests,
(===),
)
import Test.QuickCheck.Arbitrary.Generic (
@@ -273,7 +293,10 @@ import Test.QuickCheck.Arbitrary.Generic (
import qualified Ogmios.Data.Json.Alonzo as Alonzo
import qualified Ogmios.Data.Json.Babbage as Babbage
+import qualified Ogmios.Data.Json.Conway as Conway
+import qualified Ogmios.Data.Json.Dijkstra as Dijkstra
+import qualified Cardano.Ledger.Alonzo.Plutus.TxInfo as Al
import qualified Cardano.Ledger.Binary as Binary
import qualified Cardano.Ledger.Plutus.Data as Ledger
import qualified Codec.Json.Rpc as Rpc
@@ -308,7 +331,7 @@ validateToJSON gen encode (n, vectorFilePath) ref = parallel $ do
runIO $ generateTestVectors (n, vectorFilePath) gen encode
refs <- runIO $ unsafeReadSchemaRef ref
specify (toString $ getSchemaRef ref)
- $ withMaxSuccess n
+ $ withNumTests n
$ forAllBlind gen
$ prop_validateToJSON (encodingToValue . encode) refs
@@ -325,7 +348,7 @@ validateFromJSON ::
validateFromJSON gen (encode, decode) (n, vectorFilePath) ref = parallel $ do
runIO $ generateTestVectors (n, vectorFilePath) gen encode
refs <- runIO $ unsafeReadSchemaRef ref
- specify (toString $ getSchemaRef ref) $ withMaxSuccess n $ forAllBlind gen $ \a ->
+ specify (toString $ getSchemaRef ref) $ withNumTests n $ forAllBlind gen $ \a ->
let leftSide = decodeWith decode (jsonToByteString (encode a))
in conjoin
[ prop_validateToJSON (encodingToValue . encode) refs a
@@ -341,6 +364,28 @@ validateFromJSON gen (encode, decode) (n, vectorFilePath) ref = parallel $ do
spec :: Spec
spec = do
+ context "Context errors injected from Alonzo" $ do
+ let certificateMessage = "A certificate in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
+ let purposeMessage = "A script purpose in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."
+ let encoded = encodingToValue . Conway.encodeContextError
+ let encodedDijkstra = encodingToValue . Dijkstra.encodeContextError
+
+ prop "Conway: CertificateNotSupported" $ \(cert :: TxCert ConwayEra) ->
+ encoded (inject (Al.CertificateNotSupported cert) :: ConwayContextError ConwayEra)
+ === Json.String certificateMessage
+
+ prop "Conway: PlutusPurposeNotSupported" $ \(purpose :: PlutusPurpose AsItem ConwayEra) ->
+ encoded (inject (Al.PlutusPurposeNotSupported purpose) :: ConwayContextError ConwayEra)
+ === Json.String purposeMessage
+
+ prop "Dijkstra: CertificateNotSupported" $ \(cert :: TxCert DijkstraEra) ->
+ encodedDijkstra (inject (Al.CertificateNotSupported cert) :: DijkstraContextError DijkstraEra)
+ === Json.String certificateMessage
+
+ prop "Dijkstra: PlutusPurposeNotSupported" $ \(purpose :: PlutusPurpose AsItem DijkstraEra) ->
+ encodedDijkstra (inject (Al.PlutusPurposeNotSupported purpose) :: DijkstraContextError DijkstraEra)
+ === Json.String purposeMessage
+
context "JSON roundtrips" $ do
prop "encodeUtxo / decodeUtxo (Babbage)" $ forAllShrinkBlind genUtxoBabbage shrinkUtxo $ \utxo ->
let encoded = inefficientEncodingToValue (Babbage.encodeUtxo utxo)
@@ -411,12 +456,12 @@ spec = do
specify "Golden: SubmitTransactionFailure<3133>" $ do
json <- decodeFileThrow "SubmitTransactionFailure_1.json"
refs <- unsafeReadSchemaRef "ogmios.json#/properties/SubmitTransactionResponse"
- runQuickCheck $ withMaxSuccess 1 $ prop_validateToJSON identity refs json
+ runQuickCheck $ withNumTests 1 $ prop_validateToJSON identity refs json
specify "Golden: NextTransactionResponse_1" $ do
json <- decodeFileThrow "NextTransactionResponse_1.json"
refs <- unsafeReadSchemaRef "ogmios.json#/properties/NextTransactionResponse"
- runQuickCheck $ withMaxSuccess 1 $ prop_validateToJSON identity refs json
+ runQuickCheck $ withNumTests 1 $ prop_validateToJSON identity refs json
context "Data / BinaryData" $ do
prop "arbitrary"
@@ -595,36 +640,42 @@ spec = do
context "validate local state queries against JSON-schema" $ do
validateLedgerStateQuery
3
+ (SomeShelleyEra ShelleyBasedEraConway)
"epoch"
Nothing
(parseQueryLedgerEpoch genEpochResult)
validateLedgerStateQuery
10
+ (SomeShelleyEra ShelleyBasedEraConway)
"eraStart"
Nothing
(parseQueryLedgerEraStart genBoundResult)
validateLedgerStateQuery
10
+ (SomeShelleyEra ShelleyBasedEraConway)
"eraSummaries"
Nothing
(parseQueryLedgerEraSummaries genInterpreterResult)
validateLedgerStateQuery
10
+ (SomeShelleyEra ShelleyBasedEraConway)
"tip"
Nothing
(parseQueryLedgerTip genPointResultTPraos genPointResultPraos)
validateLedgerStateQuery
0
+ (SomeShelleyEra ShelleyBasedEraConway)
"projectedRewards"
(Just [aesonQQ|{ "stake": [{ "ada": { "lovelace": 14 } } , { "ada": { "lovelace": 42 } }] }|])
(parseQueryLedgerProjectedRewards genNonMyopicMemberRewardsResult)
validateLedgerStateQuery
10
+ (SomeShelleyEra ShelleyBasedEraConway)
"projectedRewards"
( Just
[aesonQQ|
@@ -644,6 +695,7 @@ spec = do
validateLedgerStateQuery
10
+ (SomeShelleyEra ShelleyBasedEraConway)
"rewardAccountSummaries"
( Just
[aesonQQ|
@@ -663,24 +715,28 @@ spec = do
validateLedgerStateQuery
30
+ (SomeShelleyEra ShelleyBasedEraConway)
"protocolParameters"
Nothing
(parseQueryLedgerProtocolParameters genPParamsResult)
validateLedgerStateQuery
10
+ (SomeShelleyEra ShelleyBasedEraConway)
"liveStakeDistribution"
Nothing
(parseQueryLedgerLiveStakeDistribution genPoolDistrResult)
validateLedgerStateQuery
20
+ (SomeShelleyEra ShelleyBasedEraConway)
"utxo"
Nothing
(parseQueryLedgerUtxo genUTxOResult)
validateLedgerStateQuery
0
+ (SomeShelleyEra ShelleyBasedEraConway)
"utxo"
( Just
[aesonQQ|
@@ -696,6 +752,7 @@ spec = do
validateLedgerStateQuery
0
+ (SomeShelleyEra ShelleyBasedEraConway)
"utxo"
( Just
[aesonQQ|
@@ -711,18 +768,21 @@ spec = do
validateLedgerStateQuery
30
+ (SomeShelleyEra ShelleyBasedEraConway)
"rewardsProvenance"
Nothing
(parseQueryLedgerRewardsProvenance genRewardsProvenanceResult)
validateLedgerStateQuery
10
+ (SomeShelleyEra ShelleyBasedEraDijkstra)
"stakePools"
Nothing
(parseQueryLedgerStakePools genPoolParametersResultNoStake genPoolParametersResult)
validateLedgerStateQuery
0
+ (SomeShelleyEra ShelleyBasedEraDijkstra)
"stakePools"
( Just
[aesonQQ|
@@ -738,6 +798,7 @@ spec = do
validateLedgerStateQuery
0
+ (SomeShelleyEra ShelleyBasedEraDijkstra)
"stakePools"
( Just
[aesonQQ|
@@ -748,6 +809,7 @@ spec = do
validateLedgerStateQuery
0
+ (SomeShelleyEra ShelleyBasedEraDijkstra)
"stakePools"
( Just
[aesonQQ|
@@ -760,6 +822,7 @@ spec = do
validateLedgerStateQuery
0
+ (SomeShelleyEra ShelleyBasedEraDijkstra)
"stakePools"
( Just
[aesonQQ|
@@ -772,6 +835,7 @@ spec = do
validateLedgerStateQuery
0
+ (SomeShelleyEra ShelleyBasedEraDijkstra)
"stakePools"
( Just
[aesonQQ|
@@ -787,30 +851,35 @@ spec = do
validateLedgerStateQuery
30
+ (SomeShelleyEra ShelleyBasedEraConway)
"stakePoolsPerformances"
Nothing
(parseQueryLedgerStakePoolsPerformances genStakePoolsPerformancesResult)
validateLedgerStateQuery
10
+ (SomeShelleyEra ShelleyBasedEraConway)
"constitution"
Nothing
(parseQueryLedgerConstitution genConstitutionResult)
validateLedgerStateQuery
10
+ (SomeShelleyEra ShelleyBasedEraConway)
"constitutionalCommittee"
Nothing
(parseQueryLedgerConstitutionalCommittee genCommitteeMembersStateResult)
validateLedgerStateQuery
10
+ (SomeShelleyEra ShelleyBasedEraConway)
"treasuryAndReserves"
Nothing
(parseQueryLedgerTreasuryAndReserves genAccountStateResult)
validateLedgerStateQuery
0
+ (SomeShelleyEra ShelleyBasedEraConway)
"governanceProposals"
( Just
[aesonQQ|{
@@ -830,12 +899,14 @@ spec = do
validateLedgerStateQuery
10
+ (SomeShelleyEra ShelleyBasedEraConway)
"governanceProposals"
Nothing
(parseQueryLedgerGovernanceProposals genGovStateResult)
validateLedgerStateQuery
0
+ (SomeShelleyEra ShelleyBasedEraConway)
"delegateRepresentatives"
( Just
[aesonQQ|
@@ -854,6 +925,7 @@ spec = do
validateLedgerStateQuery
0
+ (SomeShelleyEra ShelleyBasedEraConway)
"delegateRepresentatives"
( Just
[aesonQQ|
@@ -868,6 +940,7 @@ spec = do
validateLedgerStateQuery
0
+ (SomeShelleyEra ShelleyBasedEraConway)
"delegateRepresentatives"
( Just
[aesonQQ|
@@ -882,6 +955,7 @@ spec = do
validateLedgerStateQuery
0
+ (SomeShelleyEra ShelleyBasedEraConway)
"delegateRepresentatives"
( Just
[aesonQQ|
@@ -892,6 +966,7 @@ spec = do
validateLedgerStateQuery
10
+ (SomeShelleyEra ShelleyBasedEraConway)
"delegateRepresentatives"
Nothing
(parseQueryLedgerDelegateRepresentatives genDelegateRepresentativesResult)
@@ -1240,11 +1315,13 @@ the encoding against a JSON-schema.
-}
validateLedgerStateQuery ::
Int ->
+ -- | Era of the saved test vectors
+ SomeShelleyEra ->
Text ->
Maybe Json.Value ->
(Json.Value -> Json.Parser (QueryInEra Gen Block)) ->
SpecWith ()
-validateLedgerStateQuery n subMethod params parser = do
+validateLedgerStateQuery n vectorEra subMethod params parser = do
let category = "LedgerState"
let propName = "Query" <> category <> titleize subMethod
let requestRef = "ogmios.json#/properties/" <> propName
@@ -1253,7 +1330,7 @@ validateLedgerStateQuery n subMethod params parser = do
parallel $ specify (toString propName) $ do
queryRefs <- unsafeReadSchemaRef (SchemaRef requestRef)
runQuickCheck
- $ withMaxSuccess 1
+ $ withNumTests 1
$ prop_validateToJSON
( \_params ->
Json.object
@@ -1268,16 +1345,22 @@ validateLedgerStateQuery n subMethod params parser = do
Left e ->
expectationFailure $ "failed to parse JSON query params: " <> show e
Right queryInEra -> do
+ let testedEras =
+ [ SomeShelleyEra ShelleyBasedEraShelley
+ , SomeShelleyEra ShelleyBasedEraAllegra
+ , SomeShelleyEra ShelleyBasedEraMary
+ , SomeShelleyEra ShelleyBasedEraAlonzo
+ , SomeShelleyEra ShelleyBasedEraBabbage
+ , SomeShelleyEra ShelleyBasedEraConway
+ ]
+
+ -- NOTE: The vector era is always tested, so its vectors are checked too.
let eras =
mapMaybe
(\e -> (e,) <$> queryInEra e)
- [ SomeShelleyEra ShelleyBasedEraShelley
- , SomeShelleyEra ShelleyBasedEraAllegra
- , SomeShelleyEra ShelleyBasedEraMary
- , SomeShelleyEra ShelleyBasedEraAlonzo
- , SomeShelleyEra ShelleyBasedEraBabbage
- , SomeShelleyEra ShelleyBasedEraConway
- ]
+ ( testedEras
+ ++ [vectorEra | not (any (isSameEra vectorEra) testedEras)]
+ )
let nEras = length eras
@@ -1306,7 +1389,7 @@ validateLedgerStateQuery n subMethod params parser = do
error "unexpected effectful query in JSON spec"
SomeStandardQuery _ encodeResult genResult -> do
case era of
- SomeShelleyEra ShelleyBasedEraConway -> do
+ _ | isSameEra era vectorEra -> do
generateTestVectors
(n, toString propName)
(genResult Proxy)
@@ -1314,7 +1397,7 @@ validateLedgerStateQuery n subMethod params parser = do
_someOtherEra ->
pure ()
runQuickCheck
- $ withMaxSuccess iterations
+ $ withNumTests iterations
$ forAllBlind
(genResult Proxy)
( prop_validateToJSON
@@ -1323,7 +1406,7 @@ validateLedgerStateQuery n subMethod params parser = do
)
SomeCompoundQuery _ _ _ encodeResult genResult -> do
case era of
- SomeShelleyEra ShelleyBasedEraConway -> do
+ _ | isSameEra era vectorEra -> do
generateTestVectors
(n, toString propName)
(genResult Proxy)
@@ -1331,7 +1414,7 @@ validateLedgerStateQuery n subMethod params parser = do
_someOtherEra ->
pure ()
runQuickCheck
- $ withMaxSuccess iterations
+ $ withNumTests iterations
$ forAllBlind
(genResult Proxy)
( prop_validateToJSON
@@ -1340,7 +1423,7 @@ validateLedgerStateQuery n subMethod params parser = do
)
SomeCompound2Query _ _ _ _ encodeResult genResult -> do
case era of
- SomeShelleyEra ShelleyBasedEraConway -> do
+ _ | isSameEra era vectorEra -> do
generateTestVectors
(n, toString propName)
(genResult Proxy)
@@ -1348,7 +1431,7 @@ validateLedgerStateQuery n subMethod params parser = do
_someOtherEra ->
pure ()
runQuickCheck
- $ withMaxSuccess iterations
+ $ withNumTests iterations
$ forAllBlind
(genResult Proxy)
( prop_validateToJSON
@@ -1357,7 +1440,7 @@ validateLedgerStateQuery n subMethod params parser = do
)
SomeAdHocQuery _ encodeResult genResult -> do
case era of
- SomeShelleyEra ShelleyBasedEraConway -> do
+ _ | isSameEra era vectorEra -> do
generateTestVectors
(n, toString propName)
(genResult Proxy)
@@ -1365,7 +1448,7 @@ validateLedgerStateQuery n subMethod params parser = do
_someOtherEra ->
pure ()
runQuickCheck
- $ withMaxSuccess iterations
+ $ withNumTests iterations
$ forAllBlind
(genResult Proxy)
( prop_validateToJSON
@@ -1379,11 +1462,15 @@ validateLedgerStateQuery n subMethod params parser = do
. Rpc.Response (Just $ toString method) Nothing
runQuickCheck
- $ withMaxSuccess 1
+ $ withNumTests 1
$ forAllBlind
(pure QueryUnavailableInCurrentEra)
(prop_validateToJSON encodeQueryUnavailableInCurrentEra responseRefs)
+isSameEra :: SomeShelleyEra -> SomeShelleyEra -> Bool
+isSameEra a b =
+ toJSON a == toJSON b
+
{- | Parse a given network query, generate an arbitrary value, encode it and validate
the encoding against a JSON-schema.
-}
@@ -1417,7 +1504,7 @@ validateNetworkQueryTagged n subMethod tag params parser = do
parallel $ specify specName $ do
queryRefs <- unsafeReadSchemaRef (SchemaRef requestRef)
runQuickCheck
- $ withMaxSuccess 1
+ $ withNumTests 1
$ prop_validateToJSON
( \_params ->
Json.object
@@ -1455,7 +1542,7 @@ validateNetworkQueryTagged n subMethod tag params parser = do
(reasonablySized $ genResult Proxy)
(encodeQueryResponse encodeResult)
runQuickCheck
- $ withMaxSuccess n
+ $ withNumTests n
$ forAllBlind
(reasonablySized $ genResult Proxy)
( prop_validateToJSON
@@ -1468,7 +1555,7 @@ validateNetworkQueryTagged n subMethod tag params parser = do
(reasonablySized $ genResult Proxy)
(encodeQueryResponse encodeResult)
runQuickCheck
- $ withMaxSuccess n
+ $ withNumTests n
$ forAllBlind
(reasonablySized $ genResult Proxy)
( prop_validateToJSON
@@ -1481,7 +1568,7 @@ validateNetworkQueryTagged n subMethod tag params parser = do
(reasonablySized $ genResult Proxy)
(encodeQueryResponse encodeResult)
runQuickCheck
- $ withMaxSuccess n
+ $ withNumTests n
$ forAllBlind
(reasonablySized $ genResult Proxy)
( prop_validateToJSON
@@ -1494,7 +1581,7 @@ validateNetworkQueryTagged n subMethod tag params parser = do
(reasonablySized $ genResult Proxy)
(encodeQueryResponse (Right . encodeResult))
runQuickCheck
- $ withMaxSuccess n
+ $ withNumTests n
$ forAllBlind
(reasonablySized $ genResult Proxy)
( prop_validateToJSON
diff --git a/server/test/unit/Ogmios/Data/Ledger/PredicateFailureSpec.hs b/server/test/unit/Ogmios/Data/Ledger/PredicateFailureSpec.hs
new file mode 100644
index 000000000..315d474c4
--- /dev/null
+++ b/server/test/unit/Ogmios/Data/Ledger/PredicateFailureSpec.hs
@@ -0,0 +1,308 @@
+-- This Source Code Form is subject to the terms of the Mozilla Public
+-- 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/.
+
+{-# LANGUAGE QuasiQuotes #-}
+
+module Ogmios.Data.Ledger.PredicateFailureSpec
+ ( spec
+ ) where
+
+import Ogmios.Prelude
+
+import Cardano.Ledger.Address
+ ( AccountAddress (..)
+ , AccountId (..)
+ , Withdrawals (..)
+ )
+import Cardano.Ledger.BaseTypes
+ ( EpochNo (..)
+ , Mismatch (..)
+ , Network (..)
+ )
+import Cardano.Ledger.Coin
+ ( Coin (..)
+ )
+import Cardano.Ledger.Conway
+ ( ApplyTxError (ConwayApplyTxError)
+ )
+import Cardano.Ledger.Credential
+ ( Credential (..)
+ )
+import Cardano.Ledger.Dijkstra
+ ( ApplyTxError (DijkstraApplyTxError)
+ )
+import Cardano.Ledger.Hashes
+ ( VRFVerKeyHash (..)
+ )
+import Cardano.Ledger.Keys
+ ( KeyHash (..)
+ , KeyRole (..)
+ )
+import Cardano.Network.Protocol.NodeToClient
+ ( Block
+ , SubmitTransactionError
+ )
+import Data.Aeson
+ ( (.=)
+ )
+import Data.Aeson.QQ.Simple
+ ( aesonQQ
+ )
+import Ogmios.Data.Json
+ ( Json
+ , encodeSubmitTransactionError
+ , inefficientEncodingToValue
+ )
+import Ouroboros.Consensus.Cardano.Block
+ ( HardForkApplyTxErr (..)
+ )
+import Test.Hspec
+ ( Spec
+ , context
+ , shouldBe
+ , specify
+ )
+
+import qualified Cardano.Ledger.Conway.Rules as Cn
+import qualified Cardano.Ledger.Core as Ledger
+import qualified Cardano.Ledger.Dijkstra.Rules as Di
+import qualified Cardano.Ledger.Shelley.Rules as Sh
+import qualified Codec.Json.Rpc as Rpc
+import qualified Data.Aeson as Json
+import qualified Data.Aeson.Encoding as Encoding
+import qualified Data.Map as Map
+import qualified Data.Map.NonEmpty as NEMap
+import qualified Data.Set.NonEmpty as NESet
+
+spec :: Spec
+spec = do
+ let inConway = ApplyTxErrConway . ConwayApplyTxError
+ let inDijkstra = ApplyTxErrDijkstra . DijkstraApplyTxError . fmap Di.LedgerFailure
+
+ context "Shelley POOL failures, through Conway" $ do
+ specify "retirement in the current epoch" $ do
+ let failure = Sh.StakePoolRetirementWrongEpochPOOL retiringTooEarly retiringTooEarlyLimit
+ encodeSubmissionError (inLedger inConway failure)
+ `shouldBe` retiringTooEarlyError
+
+ specify "retirement one epoch after the limit" $ do
+ let failure = Sh.StakePoolRetirementWrongEpochPOOL retiringTooLate retiringTooLateLimit
+ encodeSubmissionError (inLedger inConway failure)
+ `shouldBe` retiringTooLateError
+
+ specify "VRF key of another stake pool" $ do
+ let failure = Sh.VRFKeyHashAlreadyRegistered poolId vrfKeyHash
+ encodeSubmissionError (inLedger inConway failure)
+ `shouldBe` vrfKeyAlreadyRegisteredError
+
+ context "Conway withdrawals" $ do
+ specify "partial withdrawal" $ do
+ let failure = Cn.ConwayIncompleteWithdrawals (NEMap.singleton accountA partialWithdrawal)
+ encodeSubmissionError (inConway $ pure failure)
+ `shouldBe` partialWithdrawalError
+
+ context "Dijkstra POOL failures" $ do
+ specify "retirement in the current epoch" $ do
+ let failure = Di.StakePoolRetirementWrongEpochPOOL retiringTooEarly retiringTooEarlyLimit
+ encodeSubmissionError (inLedger inDijkstra failure)
+ `shouldBe` retiringTooEarlyError
+
+ specify "retirement one epoch after the limit" $ do
+ let failure = Di.StakePoolRetirementWrongEpochPOOL retiringTooLate retiringTooLateLimit
+ encodeSubmissionError (inLedger inDijkstra failure)
+ `shouldBe` retiringTooLateError
+
+ specify "VRF key of another stake pool" $ do
+ let failure = Di.VRFKeyHashAlreadyRegistered poolId vrfKeyHash
+ encodeSubmissionError (inLedger inDijkstra failure)
+ `shouldBe` vrfKeyAlreadyRegisteredError
+
+ context "Dijkstra withdrawals" $ do
+ specify "missing account" $ do
+ let failure = Di.WithdrawalAccountsMissing withdrawalsFromUnknownAccounts
+ encodeSubmissionError (inLedger inDijkstra failure)
+ `shouldBe` unknownCredentialError
+
+ specify "account missing at the start of the batch" $ do
+ let failure = Di.WithdrawalAccountsMissingFromOriginal withdrawalsFromUnknownAccounts
+ encodeSubmissionError (inLedger inDijkstra failure)
+ `shouldBe` unknownCredentialError
+
+ specify "missing account in a sub-transaction" $ do
+ let failure = Di.SubWithdrawalAccountsMissing withdrawalsFromUnknownAccounts
+ encodeSubmissionError (inLedger inDijkstra failure)
+ `shouldBe` unknownCredentialError
+
+ specify "account missing at the start of the batch, in a sub-transaction" $ do
+ let failure = Di.SubWithdrawalAccountsMissingFromOriginal withdrawalsFromUnknownAccounts
+ encodeSubmissionError (inLedger inDijkstra failure)
+ `shouldBe` unknownCredentialError
+
+ specify "wrong network wins over the missing account it causes" $ do
+ let wrongNetwork = Di.WithdrawalAddressesWithWrongNetwork Testnet (NESet.singleton mainnetAccountA)
+ let missingAccount = Di.WithdrawalAccountsMissing (Withdrawals $ Map.singleton mainnetAccountA (Coin 2))
+ let failures = Ledger.injectFailure @"LEDGER" <$> wrongNetwork :| [missingAccount]
+ encodeSubmissionError (inDijkstra failures)
+ `shouldBe` wrongNetworkError
+
+ specify "partial withdrawal in legacy mode" $ do
+ let failure = Di.WithdrawalAmountsInexactInLegacyMode (NEMap.singleton accountA partialWithdrawal)
+ encodeSubmissionError (inLedger inDijkstra failure)
+ `shouldBe` partialWithdrawalError
+
+ specify "withdrawals above the balance at the start of the batch" $ do
+ let excessiveWithdrawal = Mismatch { mismatchSupplied = Coin 12, mismatchExpected = Coin 10 }
+ let failure = Di.WithdrawalAmountsExceedingOriginalBalance (NEMap.singleton accountA excessiveWithdrawal)
+ encodeSubmissionError (inLedger inDijkstra failure)
+ `shouldBe` excessiveWithdrawalError
+
+--
+-- Helpers
+--
+
+-- | Wrap a single failure of any rule below LEDGER into a submission error.
+inLedger
+ :: forall era failure. (Ledger.InjectRuleFailure "LEDGER" failure era)
+ => (NonEmpty (Ledger.EraRuleFailure "LEDGER" era) -> SubmitTransactionError Block)
+ -> failure era
+ -> SubmitTransactionError Block
+inLedger inEra =
+ inEra . pure . Ledger.injectFailure @"LEDGER"
+
+-- | Keep only the error code and data; messages are free text.
+encodeSubmissionError :: SubmitTransactionError Block -> Json.Value
+encodeSubmissionError =
+ inefficientEncodingToValue . encodeSubmitTransactionError encodeCodeAndData
+ where
+ encodeCodeAndData :: Rpc.FaultCode -> String -> Maybe Json -> Json
+ encodeCodeAndData code _message details =
+ Encoding.pairs $ "code" .= code <> foldMap (Encoding.pair "data") details
+
+--
+-- Fixtures
+--
+
+-- Current epoch 100 and a limit of 110: valid retirement epochs are 101 to 110.
+retiringTooEarly :: Mismatch r EpochNo
+retiringTooEarly =
+ Mismatch { mismatchSupplied = EpochNo 100, mismatchExpected = EpochNo 100 }
+
+retiringTooEarlyLimit :: Mismatch r EpochNo
+retiringTooEarlyLimit =
+ Mismatch { mismatchSupplied = EpochNo 100, mismatchExpected = EpochNo 110 }
+
+retiringTooEarlyError :: Json.Value
+retiringTooEarlyError = [aesonQQ|
+ { "code": 3142
+ , "data": { "currentEpoch": 100, "declaredEpoch": 100, "firstInvalidEpoch": 111 }
+ }
+|]
+
+retiringTooLate :: Mismatch r EpochNo
+retiringTooLate =
+ Mismatch { mismatchSupplied = EpochNo 111, mismatchExpected = EpochNo 100 }
+
+retiringTooLateLimit :: Mismatch r EpochNo
+retiringTooLateLimit =
+ Mismatch { mismatchSupplied = EpochNo 111, mismatchExpected = EpochNo 110 }
+
+retiringTooLateError :: Json.Value
+retiringTooLateError = [aesonQQ|
+ { "code": 3142
+ , "data": { "currentEpoch": 100, "declaredEpoch": 111, "firstInvalidEpoch": 111 }
+ }
+|]
+
+poolId :: KeyHash StakePool
+poolId =
+ KeyHash "11111111111111111111111111111111111111111111111111111111"
+
+vrfKeyHash :: VRFVerKeyHash r
+vrfKeyHash =
+ VRFVerKeyHash "2222222222222222222222222222222222222222222222222222222222222222"
+
+vrfKeyAlreadyRegisteredError :: Json.Value
+vrfKeyAlreadyRegisteredError = [aesonQQ|
+ { "code": 3176
+ , "data":
+ { "stakePool": { "id": "pool1zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zdqn7r6" }
+ , "vrfVerificationKeyHash": "2222222222222222222222222222222222222222222222222222222222222222"
+ }
+ }
+|]
+
+accountA :: AccountAddress
+accountA =
+ AccountAddress Testnet (AccountId credentialA)
+
+accountB :: AccountAddress
+accountB =
+ AccountAddress Testnet (AccountId credentialB)
+
+mainnetAccountA :: AccountAddress
+mainnetAccountA =
+ AccountAddress Mainnet (AccountId credentialA)
+
+credentialA :: Credential Staking
+credentialA =
+ KeyHashObj (KeyHash "33333333333333333333333333333333333333333333333333333333")
+
+credentialB :: Credential Staking
+credentialB =
+ KeyHashObj (KeyHash "44444444444444444444444444444444444444444444444444444444")
+
+-- Account A comes first in the map, whatever the order of the list.
+withdrawalsFromUnknownAccounts :: Withdrawals
+withdrawalsFromUnknownAccounts =
+ Withdrawals $ fromList [ (accountB, Coin 1), (accountA, Coin 2) ]
+
+unknownCredentialError :: Json.Value
+unknownCredentialError = [aesonQQ|
+ { "code": 3146
+ , "data":
+ { "unknownCredential": "33333333333333333333333333333333333333333333333333333333"
+ , "from": "verificationKey"
+ }
+ }
+|]
+
+wrongNetworkError :: Json.Value
+wrongNetworkError = [aesonQQ|
+ { "code": 3124
+ , "data":
+ { "discriminatedType": "rewardAccount"
+ , "invalidEntities": [ "stake1uyenxvenxvenxvenxvenxvenxvenxvenxvenxvenxvenxvczes76j" ]
+ , "expectedNetwork": "testnet"
+ }
+ }
+|]
+
+partialWithdrawal :: Mismatch r Coin
+partialWithdrawal =
+ Mismatch { mismatchSupplied = Coin 5, mismatchExpected = Coin 8 }
+
+partialWithdrawalError :: Json.Value
+partialWithdrawalError = [aesonQQ|
+ { "code": 3141
+ , "data":
+ { "incompleteWithdrawals":
+ { "stake_test1uqenxvenxvenxvenxvenxvenxvenxvenxvenxvenxvenxvc9n6u70": { "ada": { "lovelace": 5 } }
+ }
+ }
+ }
+|]
+
+excessiveWithdrawalError :: Json.Value
+excessiveWithdrawalError = [aesonQQ|
+ { "code": 3174
+ , "data":
+ { "excessiveWithdrawals":
+ [ { "account": "stake_test1uqenxvenxvenxvenxvenxvenxvenxvenxvenxvenxvenxvc9n6u70"
+ , "withdrawn": { "ada": { "lovelace": 12 } }
+ , "balance": { "ada": { "lovelace": 10 } }
+ }
+ ]
+ }
+ }
+|]
diff --git a/server/test/unit/Test/Generators.hs b/server/test/unit/Test/Generators.hs
index 4fdeed2b8..753a1143d 100644
--- a/server/test/unit/Test/Generators.hs
+++ b/server/test/unit/Test/Generators.hs
@@ -18,6 +18,10 @@ import Cardano.Ledger.Alonzo.Genesis
import Cardano.Ledger.Api
( TransactionScriptFailure (..)
)
+import Cardano.Ledger.BaseTypes
+ ( Mismatch (..)
+ , StrictMaybe (SJust)
+ )
import Cardano.Ledger.Coin
( Coin (..)
)
@@ -45,6 +49,10 @@ import Cardano.Ledger.Babbage
import Cardano.Ledger.Conway
( ApplyTxError (ConwayApplyTxError)
)
+import Cardano.Ledger.Dijkstra
+ ( ApplyTxError (DijkstraApplyTxError)
+ , DijkstraEra
+ )
import Cardano.Ledger.Mary
( ApplyTxError (MaryApplyTxError)
)
@@ -76,7 +84,7 @@ import Data.Type.Equality
)
import Cardano.Ledger.State
( ChainAccountState (..)
- , StakePoolParams
+ , StakePoolParams (..)
)
import Ogmios.Data.Json.Query
( DRepSummary (..)
@@ -183,6 +191,8 @@ import Test.Generators.Orphans
import qualified Data.Aeson as Json
import qualified Data.Map as Map
+import qualified Data.Map.NonEmpty as NEMap
+import qualified Data.Set.NonEmpty as NESet
import qualified Ouroboros.Network.Point as Point
@@ -190,6 +200,7 @@ import qualified Cardano.Ledger.Api.Governance as Ledger
import qualified Cardano.Ledger.Block as Ledger
import qualified Cardano.Ledger.Core as Ledger
import qualified Cardano.Ledger.DRep as Ledger
+import qualified Cardano.Ledger.Dijkstra.Rules as Di
import qualified Cardano.Ledger.State as Ledger
import qualified Cardano.Ledger.Api.State.Query as Ledger
@@ -199,7 +210,6 @@ import qualified Cardano.Ledger.TxIn as Ledger
-- FIXME
-- Needed with ouroboros-cardano-consensus==0.18.0.0. Otherwise, use the following:
-import qualified Ouroboros.Consensus.Shelley.Ledger.Query.Types as Consensus
genBlock :: Gen Block
genBlock = oneof
@@ -335,8 +345,41 @@ genHardForkApplyTxErr = frequency
, ( 10, ApplyTxErrAlonzo . AlonzoApplyTxError . pure <$> arbitrary )
, ( 25, ApplyTxErrBabbage . BabbageApplyTxError . pure <$> arbitrary )
, ( 25, ApplyTxErrConway . ConwayApplyTxError . pure <$> arbitrary )
+ , ( 25, ApplyTxErrDijkstra . DijkstraApplyTxError . pure <$> genDijkstraMempoolFailure )
]
+-- | The ledger's own generator rarely yields the newest failures; add them explicitly.
+genDijkstraMempoolFailure :: Gen (Di.DijkstraMempoolPredFailure DijkstraEra)
+genDijkstraMempoolFailure = frequency
+ [ (6, arbitrary)
+ , (3, inLedger . Di.DijkstraUtxowFailure . Di.MissingRequiredGuards <$> genNonEmptySet)
+ , (3, inLedger . Di.DijkstraUtxowFailure . Di.MalformedGuardDatums <$> genNonEmptySet)
+ , (3, inLedger . Di.DijkstraUtxowFailure . Di.UtxoFailure . Di.PtrPresentInCollateralReturn <$> arbitrary)
+ , (3, inLedger . Ledger.injectFailure @"LEDGER" <$> (Di.BlsKeyInvalidProofOfPossession <$> arbitrary <*> arbitrary))
+ , (3, inLedger . Ledger.injectFailure @"LEDGER" <$> (Di.VRFKeyHashAlreadyRegistered <$> arbitrary <*> arbitrary))
+ , (3, pure Di.AllInputsAreSpent)
+ , (3, inLedger . Di.DijkstraEntitiesFailure . Di.WithdrawalAmountsExceedingOriginalBalance
+ <$> genNonEmptyMapWith (Mismatch <$> arbitrary <*> arbitrary))
+ , (3, inLedger . Di.DijkstraEntitiesFailure . Di.BalancesOutsideAccountBalanceIntervals
+ <$> genNonEmptyMapWith ((,) <$> arbitrary <*> arbitrary))
+ , (3, inLedger . Di.DijkstraEntitiesFailure . Di.BalancesOutsideStartingAccountBalanceIntervals
+ <$> genNonEmptyMapWith ((,) <$> arbitrary <*> arbitrary))
+ ]
+ where
+ inLedger = Di.LedgerFailure
+
+ genNonEmptySet :: (Arbitrary a, Ord a) => Gen (NESet.NonEmptySet a)
+ genNonEmptySet = do
+ x <- arbitrary
+ xs <- reasonablySized arbitrary
+ pure $ fromMaybe (NESet.singleton x) (NESet.fromFoldable (x : xs))
+
+ genNonEmptyMapWith :: (Arbitrary k, Ord k) => Gen v -> Gen (NEMap.NonEmptyMap k v)
+ genNonEmptyMapWith genV = do
+ x <- (,) <$> arbitrary <*> genV
+ xs <- reasonablySized (listOf ((,) <$> arbitrary <*> genV))
+ pure $ fromMaybe (uncurry NEMap.singleton x) (NEMap.fromFoldable (x : xs))
+
genEvaluateTransactionResponse :: Gen (EvaluateTransactionResponse Block)
genEvaluateTransactionResponse = frequency
[ (10, EvaluationFailure <$> genEvaluateTransactionError)
@@ -364,6 +407,7 @@ genContextError = oneof
[ ContextErrorInAnyEra . (AlonzoBasedEraAlonzo,) <$> arbitrary
, ContextErrorInAnyEra . (AlonzoBasedEraBabbage,) <$> arbitrary
, ContextErrorInAnyEra . (AlonzoBasedEraConway,) <$> arbitrary
+ , ContextErrorInAnyEra . (AlonzoBasedEraDijkstra,) <$> arbitrary
]
genPreAlonzoEra :: Gen Text
@@ -921,22 +965,46 @@ genAccountStateResult _ = frequency
where
genAccountState = ChainAccountState <$> arbitrary <*> arbitrary
+-- | The ledger's own generator never sets the BLS key; only Dijkstra supports it.
+genBlsKey
+ :: forall era. Typeable era
+ => StakePoolParams era
+ -> Gen (StakePoolParams era)
+genBlsKey params =
+ case testEquality (typeRep @era) (typeRep @DijkstraEra) of
+ Just Refl{} ->
+ oneof
+ [ pure params
+ , (\key -> params { sppBlsKey = SJust key }) <$> arbitrary
+ ]
+ Nothing ->
+ pure params
+
+-- | Mostly non-empty, so that samples exercise the per-pool encoding.
+genNonEmptyMap :: (Arbitrary k, Arbitrary v, Ord k) => Gen (Map k v)
+genNonEmptyMap = frequency
+ [ (1, pure mempty)
+ , (9, Map.fromList <$> reasonablySized (listOf1 arbitrary))
+ ]
+
genPoolParametersResult
- :: forall crypto. (crypto ~ StandardCrypto)
- => Proxy (QueryResult crypto (Map (Ledger.KeyHash StakePool) (Maybe StakePoolParams, StrictMaybe Coin)))
- -> Gen (QueryResult crypto (Map (Ledger.KeyHash StakePool) (Maybe StakePoolParams, StrictMaybe Coin)))
-genPoolParametersResult _ = frequency
+ :: forall crypto era. (crypto ~ StandardCrypto, Typeable era)
+ => Proxy era
+ -> Proxy (QueryResult crypto (Map (Ledger.KeyHash StakePool) (Maybe (StakePoolParams era), StrictMaybe Coin)))
+ -> Gen (QueryResult crypto (Map (Ledger.KeyHash StakePool) (Maybe (StakePoolParams era), StrictMaybe Coin)))
+genPoolParametersResult _ _ = frequency
[ (1, Left <$> genMismatchEraInfo)
- , (10, Right <$> arbitrary)
+ , (10, Right <$> (genNonEmptyMap >>= traverse (\(mparams, stake) -> (, stake) <$> traverse genBlsKey mparams)))
]
genPoolParametersResultNoStake
- :: forall crypto. (crypto ~ StandardCrypto)
- => Proxy (QueryResult crypto (Map (Ledger.KeyHash StakePool) StakePoolParams))
- -> Gen (QueryResult crypto (Map (Ledger.KeyHash StakePool) StakePoolParams))
-genPoolParametersResultNoStake _ = frequency
+ :: forall crypto era. (crypto ~ StandardCrypto, Typeable era)
+ => Proxy era
+ -> Proxy (QueryResult crypto (Map (Ledger.KeyHash StakePool) (StakePoolParams era)))
+ -> Gen (QueryResult crypto (Map (Ledger.KeyHash StakePool) (StakePoolParams era)))
+genPoolParametersResultNoStake _ _ = frequency
[ (1, Left <$> genMismatchEraInfo)
- , (10, Right <$> arbitrary)
+ , (10, Right <$> (genNonEmptyMap >>= traverse genBlsKey))
]
diff --git a/server/test/unit/Test/Generators/Orphans.hs b/server/test/unit/Test/Generators/Orphans.hs
index 65ecd7e2d..9e96a5932 100644
--- a/server/test/unit/Test/Generators/Orphans.hs
+++ b/server/test/unit/Test/Generators/Orphans.hs
@@ -37,6 +37,8 @@ import qualified Test.Cardano.Ledger.Alonzo.Arbitrary as Ledger
import Test.Cardano.Ledger.Conway.Arbitrary
()
+import Test.Cardano.Ledger.Dijkstra.Arbitrary
+ ()
instance Arbitrary ScriptPurposeIndexInAnyEra where
arbitrary = oneof
diff --git a/server/test/vectors/EvaluateTransactionResponse/011.json b/server/test/vectors/EvaluateTransactionResponse/011.json
index 05fea6327..4be03b3a3 100644
--- a/server/test/vectors/EvaluateTransactionResponse/011.json
+++ b/server/test/vectors/EvaluateTransactionResponse/011.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3004,"message":"Unable to create the evaluation context from the given transaction.","data":{"reason":"Uncomputable slot arithmetic; transaction's validity bounds go beyond the foreseeable end of the current era: 𭇂q\u001d("}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3004,"message":"Unable to create the evaluation context from the given transaction.","data":{"reason":"Unknown transaction input (missing from UTxO set): fba18ad262eb27283c488f2992cb3000265122a38d9eb0913462fbb653c7dd72#7"}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/EvaluateTransactionResponse/020.json b/server/test/vectors/EvaluateTransactionResponse/020.json
index 150b06c22..2ed0d2233 100644
--- a/server/test/vectors/EvaluateTransactionResponse/020.json
+++ b/server/test/vectors/EvaluateTransactionResponse/020.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3004,"message":"Unable to create the evaluation context from the given transaction.","data":{"reason":"Uncomputable slot arithmetic; transaction's validity bounds go beyond the foreseeable end of the current era: `癔\u0016\n"}},"id":"S2ArplushiAK"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3004,"message":"Unable to create the evaluation context from the given transaction.","data":{"reason":"A certificate in the transaction isn't supported in neither plutus:v1 nor plutus:v2. Use plutus:v3 or higher."}},"id":"S2ArplushiAK"}
\ No newline at end of file
diff --git a/server/test/vectors/EvaluateTransactionResponse/024.json b/server/test/vectors/EvaluateTransactionResponse/024.json
index 5c961a1d6..da37f680a 100644
--- a/server/test/vectors/EvaluateTransactionResponse/024.json
+++ b/server/test/vectors/EvaluateTransactionResponse/024.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3004,"message":"Unable to create the evaluation context from the given transaction.","data":{"reason":"Uncomputable slot arithmetic; transaction's validity bounds go beyond the foreseeable end of the current era: V+-N/ -dv"}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/030.json b/server/test/vectors/SubmitTransactionResponse/030.json
index 6496a4436..7babe1fd4 100644
--- a/server/test/vectors/SubmitTransactionResponse/030.json
+++ b/server/test/vectors/SubmitTransactionResponse/030.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3111,"message":"Transaction failed because some Plutus scripts are missing their associated datums. 'data.missingDatums' contains a set of data hashes for the missing datums. Ensure all Plutus scripts have an associated datum in the transaction's witness set or, are provided through inline datums in reference inputs.","data":{"missingDatums":["4f5c4f69d504ab96b84c3719775a4416926617a3c9a36fc088977f497961e1de","710909d4e3ad01467a19d8cdc445cd9393d0f628f19c4a0ef4aec6f16f9a47f8","9d762e96eef78e72fb98df683ef637ab58bea2e7ae489abf95673ad94b48eeb8","cdde1da1cdb04b368a4673944b61b8a3a4e72306c4e0248d5cb7b953554c8057","e3e7bf29b879902b0d0595aadccc38b85c54ed448b77c1033ed3087dcdec2001"]}},"id":"kjlQHNBEKQps"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3173,"message":"All inputs of the transaction are already spent. This usually means that the transaction has already been included in the ledger, so there's no need to submit it again."},"id":"kjlQHNBEKQps"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/031.json b/server/test/vectors/SubmitTransactionResponse/031.json
index ad9c5355f..dc313e121 100644
--- a/server/test/vectors/SubmitTransactionResponse/031.json
+++ b/server/test/vectors/SubmitTransactionResponse/031.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qffjm8l0ppqvl62uqavtw7jnnw2zj8d5h802lhk6yd3d6gymxvef":{"ada":{"lovelace":0}},"stake_test17qv48sug5v09n4djkqe0amylqg9qtkzz3vk6qv65s5q0x6gntcqvr":{"ada":{"lovelace":677276}},"stake_test17q3d2pa3rftk8yu2zucvtjk3prgrq05py5pyapx7eyr899srwn94e":{"ada":{"lovelace":15}},"stake_test17pyngjxrwqyg7sdg2ynym4dg9mkf9lmqamfj5kc6gq3jn4se9cme0":{"ada":{"lovelace":239535}},"stake_test17px42cj3pj8palmryltj7xl67q44ae955m7nuuptsdyng0chps9q2":{"ada":{"lovelace":209011}},"stake_test17peakay5glz7wsfdfmnus4w2yld939h7vde6rul33hlc6sqwnds9r":{"ada":{"lovelace":173283}},"stake_test17p6emu0l59s5gsgwxrtxcjvwhnvu2m2t99jwydhefjnkf3gdhd2pv":{"ada":{"lovelace":290659}},"stake_test1uqwyqly29aqttxm5k4wlxe3yp0ul9hykv67gut9n2wx0mkgnsrcgq":{"ada":{"lovelace":7}},"stake_test1uq3mry43xerm6zdmfzzyl5eylq8vapu88lt6phhke9hwhcq38j629":{"ada":{"lovelace":1}},"stake_test1uz2rqsdgk2gpl5qha7xnmpf6lyk5095auy4nu08p50yl94cgw03g3":{"ada":{"lovelace":18}},"stake_test1uzllh494z7tahu0w5tsxzpaxfm6qrfu7f3jd40eagpkl5xsqfzkk6":{"ada":{"lovelace":972489}},"stake_test1urxkfj7tp024k2gcm7rueeprxksppxa4deprc226f3pz8scerl28d":{"ada":{"lovelace":60574}},"stake_test1urgvxae8g07u9lw8kjf8wdy53ndz0q832gdx45kncfn46vqg323p9":{"ada":{"lovelace":788214}},"stake_test1urh0ctffsf50x555dqugrwyr4pm5lrt0f4aud2tua73nj5q387ygn":{"ada":{"lovelace":22490}},"stake17yrjpjj2n3f8mrxy92x709226766x5zmx4pdznd62gdxkxggu985a":{"ada":{"lovelace":24}},"stake1790gr7has7v05kja3y0khtpcetp729ae69daceqsnk35kqg30sfgv":{"ada":{"lovelace":16}},"stake17x50td5z2mdjnxxcdqkzx35qx5hsw2ekyz8xhz3hxlpuvlgmnvdsf":{"ada":{"lovelace":0}},"stake178xrncegah2fgspau94s690g3lgm27fw434grtrqaa9nvaqzzam72":{"ada":{"lovelace":6}},"stake178d0sg64szsk3645kmn2c9cy4rn8z3utmvhs70jcju2asegaan3k8":{"ada":{"lovelace":715348}},"stake178jn2k0v7rn8c3p324hp8kelnkgcdecjn67nku26xr6wfrc8vkhpl":{"ada":{"lovelace":24}},"stake1uyfsu2kmxvc9yzknq5a47aj5xku2hc5j2etdxtlteex977q8uke42":{"ada":{"lovelace":3}},"stake1uxdzjx8fcrjz7y59e3m8yfzlt6hjq7htklsejeqlkc386hqg7gsx5":{"ada":{"lovelace":15}},"stake1uxhqmj7d93swalhpvayh3827q2sktrzh2slygmnmkycz7tsprzmkq":{"ada":{"lovelace":30}},"stake1u8zs62ptafzjy9hq4907ryj4y60y0lskq2zgsdeuz9edyjgv4uys5":{"ada":{"lovelace":26}},"stake1u8xsa9rzvckhrgunuvwurpdae43tpluqjqaej5pwdj03h8cwxyv73":{"ada":{"lovelace":18}},"stake1u8j3cz8ldy8g3s5fa73y0vccp4kje7wjytc8wrqxp6ncltsqks8y2":{"ada":{"lovelace":10}}}}},"id":"PgsfXa54LtQz"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17qffjm8l0ppqvl62uqavtw7jnnw2zj8d5h802lhk6yd3d6gymxvef":{"ada":{"lovelace":0}},"stake_test17qv48sug5v09n4djkqe0amylqg9qtkzz3vk6qv65s5q0x6gntcqvr":{"ada":{"lovelace":677276}},"stake_test17q3d2pa3rftk8yu2zucvtjk3prgrq05py5pyapx7eyr899srwn94e":{"ada":{"lovelace":15}},"stake_test17pyngjxrwqyg7sdg2ynym4dg9mkf9lmqamfj5kc6gq3jn4se9cme0":{"ada":{"lovelace":239535}},"stake_test17px42cj3pj8palmryltj7xl67q44ae955m7nuuptsdyng0chps9q2":{"ada":{"lovelace":209011}},"stake_test17peakay5glz7wsfdfmnus4w2yld939h7vde6rul33hlc6sqwnds9r":{"ada":{"lovelace":173283}},"stake_test17p6emu0l59s5gsgwxrtxcjvwhnvu2m2t99jwydhefjnkf3gdhd2pv":{"ada":{"lovelace":290659}},"stake_test1uqwyqly29aqttxm5k4wlxe3yp0ul9hykv67gut9n2wx0mkgnsrcgq":{"ada":{"lovelace":7}},"stake_test1uq3mry43xerm6zdmfzzyl5eylq8vapu88lt6phhke9hwhcq38j629":{"ada":{"lovelace":1}},"stake_test1uz2rqsdgk2gpl5qha7xnmpf6lyk5095auy4nu08p50yl94cgw03g3":{"ada":{"lovelace":18}},"stake_test1uzllh494z7tahu0w5tsxzpaxfm6qrfu7f3jd40eagpkl5xsqfzkk6":{"ada":{"lovelace":972489}},"stake_test1urxkfj7tp024k2gcm7rueeprxksppxa4deprc226f3pz8scerl28d":{"ada":{"lovelace":60574}},"stake_test1urgvxae8g07u9lw8kjf8wdy53ndz0q832gdx45kncfn46vqg323p9":{"ada":{"lovelace":788214}},"stake_test1urh0ctffsf50x555dqugrwyr4pm5lrt0f4aud2tua73nj5q387ygn":{"ada":{"lovelace":22490}},"stake17yrjpjj2n3f8mrxy92x709226766x5zmx4pdznd62gdxkxggu985a":{"ada":{"lovelace":24}},"stake1790gr7has7v05kja3y0khtpcetp729ae69daceqsnk35kqg30sfgv":{"ada":{"lovelace":16}},"stake17x50td5z2mdjnxxcdqkzx35qx5hsw2ekyz8xhz3hxlpuvlgmnvdsf":{"ada":{"lovelace":0}},"stake178xrncegah2fgspau94s690g3lgm27fw434grtrqaa9nvaqzzam72":{"ada":{"lovelace":6}},"stake178d0sg64szsk3645kmn2c9cy4rn8z3utmvhs70jcju2asegaan3k8":{"ada":{"lovelace":715348}},"stake178jn2k0v7rn8c3p324hp8kelnkgcdecjn67nku26xr6wfrc8vkhpl":{"ada":{"lovelace":24}},"stake1uyfsu2kmxvc9yzknq5a47aj5xku2hc5j2etdxtlteex977q8uke42":{"ada":{"lovelace":3}},"stake1uxdzjx8fcrjz7y59e3m8yfzlt6hjq7htklsejeqlkc386hqg7gsx5":{"ada":{"lovelace":15}},"stake1uxhqmj7d93swalhpvayh3827q2sktrzh2slygmnmkycz7tsprzmkq":{"ada":{"lovelace":30}},"stake1u8zs62ptafzjy9hq4907ryj4y60y0lskq2zgsdeuz9edyjgv4uys5":{"ada":{"lovelace":26}},"stake1u8xsa9rzvckhrgunuvwurpdae43tpluqjqaej5pwdj03h8cwxyv73":{"ada":{"lovelace":18}},"stake1u8j3cz8ldy8g3s5fa73y0vccp4kje7wjytc8wrqxp6ncltsqks8y2":{"ada":{"lovelace":10}}}}},"id":"PgsfXa54LtQz"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/036.json b/server/test/vectors/SubmitTransactionResponse/036.json
index 96f19149f..d6f9894be 100644
--- a/server/test/vectors/SubmitTransactionResponse/036.json
+++ b/server/test/vectors/SubmitTransactionResponse/036.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake1uypqhcjs5geltrsh2wc008mlsy2qke03pjn9mmfpap3xm2s4k2w5n":{"ada":{"lovelace":702396}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake1uypqhcjs5geltrsh2wc008mlsy2qke03pjn9mmfpap3xm2s4k2w5n":{"ada":{"lovelace":702396}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/039.json b/server/test/vectors/SubmitTransactionResponse/039.json
index 08b74faf3..d11d19934 100644
--- a/server/test/vectors/SubmitTransactionResponse/039.json
+++ b/server/test/vectors/SubmitTransactionResponse/039.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qkwjlyhlyh7sh5tzcyp8t3vggmjhnlz80d6lprve3862lskcm620":{"ada":{"lovelace":585143}},"stake_test17qhfa5jh3taqcy3xscjq8nuv6a457pdd7gsqf43vrzc7p6qgq79aa":{"ada":{"lovelace":29}},"stake_test17qhk5ps8utr4kl0makrlzng9yg92jlaqaj9anl0426l0tes4uv4gj":{"ada":{"lovelace":121361}},"stake_test17p973yr4z97egfn36ylkn4pk90lguhtnwxz88rxxmnjj9ysjus2wm":{"ada":{"lovelace":24}},"stake_test17pxxujrmqwxhw78tfxaq2rp6mquwmdngg0k9gs6520djsjcgnfsxh":{"ada":{"lovelace":325442}},"stake_test17r4xf4n36te0t8srzfx2cejjc0aselsjs06elk3yt5snwjs9pg2k2":{"ada":{"lovelace":633369}},"stake_test1uq296eza4l7z66zem6m38jlhv02z7sa6hdn0f9xt5a7ahws050tk3":{"ada":{"lovelace":17}},"stake_test1uqlh9evqzx0qkmke0d8n7uy7fn44zmn3qe4hcgqm9k73dusy5dk2e":{"ada":{"lovelace":4}},"stake_test1up3j62vxm39tfks7fpzmjvprweqlzaenufl39zc755wwsxgusa26h":{"ada":{"lovelace":30}},"stake_test1upcdpv9fpdvsxx30g2zwc9cr4facrcft5gejxkhwhquqg9q2w7tn8":{"ada":{"lovelace":650574}},"stake_test1urwf5qwrr8edc4ef6yzereusqgwm2httmpxqaxa36ykgqzsvpcq7a":{"ada":{"lovelace":554539}},"stake_test1urwtmcf53wkqulaprz4hz9wj3yqnucxpnxrvehct6qk2ekgntk6pn":{"ada":{"lovelace":0}},"stake17ygn8r4n4q7g2632j9kr68yannevvgaydxnvzeqnhnzh00gxeh6r2":{"ada":{"lovelace":6}},"stake179q59vmywwjm5qwxzlqmhptxgltswlky5yqwr4t9j54sdpcws6v37":{"ada":{"lovelace":15}},"stake179tag4xkaff2lrfjc3ptzhjeesr8vtp4naaukadlwldrargn3pay3":{"ada":{"lovelace":169331}},"stake17xltxe437qmqq6v5v6uz37tg029zylqzht8pzhs4p85eejq6swaug":{"ada":{"lovelace":5}},"stake1789ergtkdn9rmudlg7yfh87llcpgh9lrnpeqd8d7jxnaj8gh9nfzh":{"ada":{"lovelace":9}},"stake17882lg5efpl6zxg8j04juwt5d5yvl874htndppvkw2jk33c3xxpxg":{"ada":{"lovelace":602778}},"stake178ty346xl7znj6qrkx8vk0kpc4zg85arkgsgqfeptrhewhskkvdq5":{"ada":{"lovelace":5}},"stake1uyqx70lk2v0qlgfwq8x0x6fcy6zw9f4mu453ddzwtvt8srsyqzwm5":{"ada":{"lovelace":936718}},"stake1uyxf66nl3gnexwwumx9l4ldqcf8j6tfnslat48q9ceq2xvg2v3cvq":{"ada":{"lovelace":54408}},"stake1uywmu39sc7dnz3lxwejsr7kffveusemjuka7akczmpscaagusexj9":{"ada":{"lovelace":828591}},"stake1uyhuvvjscwevjcpdpum8x369w44daks655u2pxky7tn0s8gw8wy5a":{"ada":{"lovelace":609781}},"stake1uy77qz65rr3dz58dfycauud0eykzdxs96ntdds8ltkuduwgtlqyag":{"ada":{"lovelace":687191}},"stake1ux85f6jgzydk7rqv39xlc9dlrwpl8wmcwx728u0kdvzjnpqwhky5j":{"ada":{"lovelace":124727}},"stake1uxkf8kw96rg4tk2862mrlmvanqwxrr5gntp2vxku40pz2zcqctx52":{"ada":{"lovelace":11}},"stake1uxum754su9kx2e6scgr3evukll8axyqmll834hq896n68xcw28gdp":{"ada":{"lovelace":580413}},"stake1u83dfrpze7pcfxpgxfwtl02yg3p7956khf7k2ege847sdqcxlqa49":{"ada":{"lovelace":9}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17qkwjlyhlyh7sh5tzcyp8t3vggmjhnlz80d6lprve3862lskcm620":{"ada":{"lovelace":585143}},"stake_test17qhfa5jh3taqcy3xscjq8nuv6a457pdd7gsqf43vrzc7p6qgq79aa":{"ada":{"lovelace":29}},"stake_test17qhk5ps8utr4kl0makrlzng9yg92jlaqaj9anl0426l0tes4uv4gj":{"ada":{"lovelace":121361}},"stake_test17p973yr4z97egfn36ylkn4pk90lguhtnwxz88rxxmnjj9ysjus2wm":{"ada":{"lovelace":24}},"stake_test17pxxujrmqwxhw78tfxaq2rp6mquwmdngg0k9gs6520djsjcgnfsxh":{"ada":{"lovelace":325442}},"stake_test17r4xf4n36te0t8srzfx2cejjc0aselsjs06elk3yt5snwjs9pg2k2":{"ada":{"lovelace":633369}},"stake_test1uq296eza4l7z66zem6m38jlhv02z7sa6hdn0f9xt5a7ahws050tk3":{"ada":{"lovelace":17}},"stake_test1uqlh9evqzx0qkmke0d8n7uy7fn44zmn3qe4hcgqm9k73dusy5dk2e":{"ada":{"lovelace":4}},"stake_test1up3j62vxm39tfks7fpzmjvprweqlzaenufl39zc755wwsxgusa26h":{"ada":{"lovelace":30}},"stake_test1upcdpv9fpdvsxx30g2zwc9cr4facrcft5gejxkhwhquqg9q2w7tn8":{"ada":{"lovelace":650574}},"stake_test1urwf5qwrr8edc4ef6yzereusqgwm2httmpxqaxa36ykgqzsvpcq7a":{"ada":{"lovelace":554539}},"stake_test1urwtmcf53wkqulaprz4hz9wj3yqnucxpnxrvehct6qk2ekgntk6pn":{"ada":{"lovelace":0}},"stake17ygn8r4n4q7g2632j9kr68yannevvgaydxnvzeqnhnzh00gxeh6r2":{"ada":{"lovelace":6}},"stake179q59vmywwjm5qwxzlqmhptxgltswlky5yqwr4t9j54sdpcws6v37":{"ada":{"lovelace":15}},"stake179tag4xkaff2lrfjc3ptzhjeesr8vtp4naaukadlwldrargn3pay3":{"ada":{"lovelace":169331}},"stake17xltxe437qmqq6v5v6uz37tg029zylqzht8pzhs4p85eejq6swaug":{"ada":{"lovelace":5}},"stake1789ergtkdn9rmudlg7yfh87llcpgh9lrnpeqd8d7jxnaj8gh9nfzh":{"ada":{"lovelace":9}},"stake17882lg5efpl6zxg8j04juwt5d5yvl874htndppvkw2jk33c3xxpxg":{"ada":{"lovelace":602778}},"stake178ty346xl7znj6qrkx8vk0kpc4zg85arkgsgqfeptrhewhskkvdq5":{"ada":{"lovelace":5}},"stake1uyqx70lk2v0qlgfwq8x0x6fcy6zw9f4mu453ddzwtvt8srsyqzwm5":{"ada":{"lovelace":936718}},"stake1uyxf66nl3gnexwwumx9l4ldqcf8j6tfnslat48q9ceq2xvg2v3cvq":{"ada":{"lovelace":54408}},"stake1uywmu39sc7dnz3lxwejsr7kffveusemjuka7akczmpscaagusexj9":{"ada":{"lovelace":828591}},"stake1uyhuvvjscwevjcpdpum8x369w44daks655u2pxky7tn0s8gw8wy5a":{"ada":{"lovelace":609781}},"stake1uy77qz65rr3dz58dfycauud0eykzdxs96ntdds8ltkuduwgtlqyag":{"ada":{"lovelace":687191}},"stake1ux85f6jgzydk7rqv39xlc9dlrwpl8wmcwx728u0kdvzjnpqwhky5j":{"ada":{"lovelace":124727}},"stake1uxkf8kw96rg4tk2862mrlmvanqwxrr5gntp2vxku40pz2zcqctx52":{"ada":{"lovelace":11}},"stake1uxum754su9kx2e6scgr3evukll8axyqmll834hq896n68xcw28gdp":{"ada":{"lovelace":580413}},"stake1u83dfrpze7pcfxpgxfwtl02yg3p7956khf7k2ege847sdqcxlqa49":{"ada":{"lovelace":9}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/041.json b/server/test/vectors/SubmitTransactionResponse/041.json
index 2b356ecdc..f91398b88 100644
--- a/server/test/vectors/SubmitTransactionResponse/041.json
+++ b/server/test/vectors/SubmitTransactionResponse/041.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17z6340fs0z3rxl08jgf0a86whmkz5f8aad0tqrxav8mvemq7f7eyk":{"ada":{"lovelace":4}},"stake_test1uq9ls0cdcrqsrtfuwus4mjqqkzm7grxej8xkxl2a68zcj2stvj735":{"ada":{"lovelace":350455}}}}},"id":"yX4rxv75hBiF"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17z6340fs0z3rxl08jgf0a86whmkz5f8aad0tqrxav8mvemq7f7eyk":{"ada":{"lovelace":4}},"stake_test1uq9ls0cdcrqsrtfuwus4mjqqkzm7grxej8xkxl2a68zcj2stvj735":{"ada":{"lovelace":350455}}}}},"id":"yX4rxv75hBiF"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/042.json b/server/test/vectors/SubmitTransactionResponse/042.json
index 39dba3def..d6b672fd0 100644
--- a/server/test/vectors/SubmitTransactionResponse/042.json
+++ b/server/test/vectors/SubmitTransactionResponse/042.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17p069gscxppf2g0kufdzspxufs6g97l4ekznpmc4knkgkvcg0eu7m":{"ada":{"lovelace":462967}},"stake_test17rvh845v09sp46zmsf07nfuhn4e6ak44e7y7s0kv0p5pjasmpg63j":{"ada":{"lovelace":27}},"stake_test1up70pqxt6mzvwzhyyhekc3ltjnyffvluxf5u0zs9nwpz9wqq85uj9":{"ada":{"lovelace":636906}},"stake_test1urlfhjzhjm54755lmuumn0xz2ax3wmhd0wvu9kl7qx7cy8szg5ed5":{"ada":{"lovelace":18}},"stake179p57huqqu9py6y7cuz26cnx727lhe8550jg4ye6c2arp4qag0dek":{"ada":{"lovelace":110983}},"stake178sxhz2yjxy64hx9rm783lkcrn2nmu63rj0a5g3uxhp6zmgc2w0hl":{"ada":{"lovelace":6}},"stake178s48nnakjn7jlp3ee8cvrpmux89pxqu574ye8u569cf6es8kgr42":{"ada":{"lovelace":652200}},"stake1u9fs7hpec0uljxat5wq45gkqtvhyfyrr0ayu7ergkdmc2kcadep4m":{"ada":{"lovelace":14}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17p069gscxppf2g0kufdzspxufs6g97l4ekznpmc4knkgkvcg0eu7m":{"ada":{"lovelace":462967}},"stake_test17rvh845v09sp46zmsf07nfuhn4e6ak44e7y7s0kv0p5pjasmpg63j":{"ada":{"lovelace":27}},"stake_test1up70pqxt6mzvwzhyyhekc3ltjnyffvluxf5u0zs9nwpz9wqq85uj9":{"ada":{"lovelace":636906}},"stake_test1urlfhjzhjm54755lmuumn0xz2ax3wmhd0wvu9kl7qx7cy8szg5ed5":{"ada":{"lovelace":18}},"stake179p57huqqu9py6y7cuz26cnx727lhe8550jg4ye6c2arp4qag0dek":{"ada":{"lovelace":110983}},"stake178sxhz2yjxy64hx9rm783lkcrn2nmu63rj0a5g3uxhp6zmgc2w0hl":{"ada":{"lovelace":6}},"stake178s48nnakjn7jlp3ee8cvrpmux89pxqu574ye8u569cf6es8kgr42":{"ada":{"lovelace":652200}},"stake1u9fs7hpec0uljxat5wq45gkqtvhyfyrr0ayu7ergkdmc2kcadep4m":{"ada":{"lovelace":14}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/045.json b/server/test/vectors/SubmitTransactionResponse/045.json
index a35cf1f3b..85b00ec7a 100644
--- a/server/test/vectors/SubmitTransactionResponse/045.json
+++ b/server/test/vectors/SubmitTransactionResponse/045.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test1uztvp34kaehl2f480dgpc2vdfrm42uss9w8rxugd5pt9ptq4ux8ep":{"ada":{"lovelace":26}},"stake178qh5c4d6075gy836j5kggapchnrpaw63m2v9yqx7an29zsgz24vz":{"ada":{"lovelace":17}},"stake1u9zea7vls98erp6mj0ztqhxulkm46samnsr3t80f8y4n58g5gdcf2":{"ada":{"lovelace":837412}},"stake1uxtakcsep925e3es6j2yx7pe6e6vv2vt4j9eseanl9vrdnqv4uprh":{"ada":{"lovelace":8}},"stake1u8rf6r8ww4ss78ta4u25u6054975yd2v08mkke6f6k5cstsplnlcx":{"ada":{"lovelace":21}}}}},"id":"893w6VAkYwwz"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test1uztvp34kaehl2f480dgpc2vdfrm42uss9w8rxugd5pt9ptq4ux8ep":{"ada":{"lovelace":26}},"stake178qh5c4d6075gy836j5kggapchnrpaw63m2v9yqx7an29zsgz24vz":{"ada":{"lovelace":17}},"stake1u9zea7vls98erp6mj0ztqhxulkm46samnsr3t80f8y4n58g5gdcf2":{"ada":{"lovelace":837412}},"stake1uxtakcsep925e3es6j2yx7pe6e6vv2vt4j9eseanl9vrdnqv4uprh":{"ada":{"lovelace":8}},"stake1u8rf6r8ww4ss78ta4u25u6054975yd2v08mkke6f6k5cstsplnlcx":{"ada":{"lovelace":21}}}}},"id":"893w6VAkYwwz"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/046.json b/server/test/vectors/SubmitTransactionResponse/046.json
index f67f7ed03..c954d1a02 100644
--- a/server/test/vectors/SubmitTransactionResponse/046.json
+++ b/server/test/vectors/SubmitTransactionResponse/046.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test1urxqnwj32y8crh4kuh5yxkp0pyvxt0rsw05au2ckttv7yusu5lrwh":{"ada":{"lovelace":395948}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test1urxqnwj32y8crh4kuh5yxkp0pyvxt0rsw05au2ckttv7yusu5lrwh":{"ada":{"lovelace":395948}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/048.json b/server/test/vectors/SubmitTransactionResponse/048.json
index 56cd7f9c0..f492479eb 100644
--- a/server/test/vectors/SubmitTransactionResponse/048.json
+++ b/server/test/vectors/SubmitTransactionResponse/048.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test1uqzqt6nxa45utyjetrnggr9ha2n38yw5srgk7kq0lgfyp7sr3qu35":{"ada":{"lovelace":17}},"stake_test1uqgjcjknp37cjru0augrzcx2jmdzsuaunypsqtfxctftzcgpmzwes":{"ada":{"lovelace":17}},"stake_test1uqt4zhl5m662a9u7jrrlxygrts9z9rk5t7xrsx3m5x5rhqqzy0vyf":{"ada":{"lovelace":4}},"stake_test1upfz2080yrdx32nyqj67l37e9sd9kv6kuldex4artwcn0ac9aegk6":{"ada":{"lovelace":20}},"stake_test1up4n68c08klfjductkc433g2dzvpjfmz0l98vf8nxs3twjqzfc6pc":{"ada":{"lovelace":774054}},"stake_test1upa6rgskpffew8jywy250dzwv22vzy590kuzvn0mutsd26c507chr":{"ada":{"lovelace":115}},"stake_test1uzwf3v8md5vl776wwadh0zexm2d3n4s4pp0am93wly8nz6sqqjngt":{"ada":{"lovelace":809953}},"stake17yk9gurrgv2xfswp6ex5wl5lz726xns3fdrrhc0ha85s3rsk24whn":{"ada":{"lovelace":634139}},"stake179v78wxykcem9a0lql6gdrd7g0qxeh4a8n8mk6psfxghncs72x6vq":{"ada":{"lovelace":237327}},"stake1787hfh5tpl6qty6y06cw9wkzgxtk9xlhxx9xdxg0vjj4tegpwdnzp":{"ada":{"lovelace":185774}},"stake1uy05dd94773t7h72erevlskf34f2pmfmjsg3hljng2az0us7cqacd":{"ada":{"lovelace":30114}},"stake1ux6ckd77mj5zj8y5vvhrx59lfth4wamtmv65g7xlxgtxpzq0vcjtm":{"ada":{"lovelace":314053}}}}},"id":"ydj2Cr0gngcy"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3173,"message":"All inputs of the transaction are already spent. This usually means that the transaction has already been included in the ledger, so there's no need to submit it again."},"id":"ydj2Cr0gngcy"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/050.json b/server/test/vectors/SubmitTransactionResponse/050.json
index f2c21d132..e07164e47 100644
--- a/server/test/vectors/SubmitTransactionResponse/050.json
+++ b/server/test/vectors/SubmitTransactionResponse/050.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qqmzscc0xvff4qnl3yt28nrcz69pnawujeel7nm02ttepq8877hg":{"ada":{"lovelace":734382}},"stake_test17qzuam4cgwkrdcsqp3mvz7dv8sqrsxn5k7m9fyfh7y0l5xsqpcws7":{"ada":{"lovelace":1}},"stake_test17qfvlxuenusntzeqw65dqp5esgfzgrwkepqa8fycd0988kqun9hsv":{"ada":{"lovelace":394204}},"stake_test17pzv5wfvus5dmjmazv3ncak9rxlgwdv3r8699hnnt9w656cgcczpy":{"ada":{"lovelace":139078}},"stake_test17z8rcvxgnzww0mqx6v2ahzmpmq0z6556cr28usjcuspxgccwg0ddm":{"ada":{"lovelace":22}},"stake_test17z830cy6ncajd4umydvn2363krua0ue38nqfy3h47ec3nss0uu53r":{"ada":{"lovelace":22}},"stake_test17z8j5wc9e6txm80sjy3j35js6z4zcf8dg0az4ap6ktnrz6cmzamxv":{"ada":{"lovelace":537773}},"stake_test17zhrk55h69u04kxslf7p69ljlq8jpxecmdxrfcad257nllq97ca6g":{"ada":{"lovelace":11}},"stake_test17rxar2gs7lu9htevxz9n7cef7efzzq7j9ca6prlptuvj0nsx6fl42":{"ada":{"lovelace":645708}},"stake_test17r82k9e0jekndtr4k5lglpuknc6zxcw80f7q0v5pnm4yg7gl93dvn":{"ada":{"lovelace":13}},"stake_test17rsxvnh5udv8jwuel79a8m7ldsnvxdwr082jdx6qsf2mt2cqkk980":{"ada":{"lovelace":24}},"stake_test1uqxltfcr4646uj0ysrz66ygakjctu97vt7th9krhj6gld4gjq4cwn":{"ada":{"lovelace":22}},"stake_test1uq3nv4fcvxazxvpf72g69cufuxqut8wlpwfdqqf7mp2y82gvyx8yw":{"ada":{"lovelace":13}},"stake_test1uprzuam6ruxvxjxj6sg88kxhvwmdaz0lm2ey5x4nprf8nssx2yrfd":{"ada":{"lovelace":222557}},"stake_test1uz8x6kqr9m0sa2hkn9393jc3nz07yv3cs26m9lnf7fe846slyxgg7":{"ada":{"lovelace":727272}},"stake_test1uz2vrg6znzn3l2n243csz5pdanp793mj8lx5mqw4s4xt46gjah0yw":{"ada":{"lovelace":0}},"stake17yndr7j4n556y0vrrucvmry88s3utfvledyqaqjsthjq5scxwrzwl":{"ada":{"lovelace":238246}},"stake179v5udrucs9sa0j34wp0zuph8ph5c5p030tj26emsv6t6rgfze4z2":{"ada":{"lovelace":410993}},"stake179m2vcygrxdj78yyy38glfe5t9v674gdh92mruj5kewszmsxavvmt":{"ada":{"lovelace":7}},"stake17xz242h2vnv82525f65plv9skvsfkhkc6vx2exzxms3s8tshyx9zd":{"ada":{"lovelace":575096}},"stake178wwd66ed2eykkxpkats083mhffdzupcldk98pkqlxhkz2qgghh42":{"ada":{"lovelace":742830}},"stake1785nsracp4fz73pa2gz8pwmp0dpm36p86wzxx0aaescffsce0tp0t":{"ada":{"lovelace":12}},"stake1uyus3lyl9rj9hcuk5d2t6pw6u6nuxeg3u2prl7l0vd9qq4gcrxh99":{"ada":{"lovelace":26}},"stake1u93ztvqaxtffmvurz5x0ak4fewrgadql0sjm836535gmfdgl4s0n7":{"ada":{"lovelace":358752}},"stake1u9ccd0x26ypn6t63546u48dnptufxru4454xumezk3pe3lcy7068n":{"ada":{"lovelace":20}},"stake1ux9plk8tzvxfmz3u7c8y6v926l8n6fhzjvjlg8unkvc9znc8cw0rh":{"ada":{"lovelace":12}},"stake1uxsl0klssy69e0qz6njfh3nyp5lwsne0unuam44gqk377zg4mtxy9":{"ada":{"lovelace":6}},"stake1u8tnn3v8d0c0a2dn23uw4lqkypcq84uf6pntynkv9zlevtq53veyy":{"ada":{"lovelace":17}},"stake1u8t5lxecxr93tw0crrqccp3wqlq63r6c3u5l06kq299glqgsphhdm":{"ada":{"lovelace":20}}}}},"id":"cmHaQ3yGsuK0"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3174,"message":"Some withdrawals exceed the balance of their account. A withdrawal may take any amount up to the account balance, but the total withdrawn from an account across the whole batch (the top-level transaction and its sub-transactions) must not exceed the balance at the start of the batch. In legacy mode, only withdrawals from sub-transactions count towards that total. The field 'data.excessiveWithdrawals' lists, for each account, the total withdrawn and the balance at the start of the batch.","data":{"excessiveWithdrawals":[{"account":"stake_test1uzdvusz0yp9plc7cskf7hq8yckzm8jejsu0jaeehplz9z9smae7vz","withdrawn":{"ada":{"lovelace":155117}},"balance":{"ada":{"lovelace":2}}},{"account":"stake_test1urhpmdan0ftkkftxwu7vc5v8hqqjp24aams9m0x2meqvlgq4nje6p","withdrawn":{"ada":{"lovelace":172240}},"balance":{"ada":{"lovelace":570239}}},{"account":"stake1u899j5rzey58gcxvkcnn9ydmh9gxd2dzzjdfg7ht9pcp2hssp5zxt","withdrawn":{"ada":{"lovelace":536545}},"balance":{"ada":{"lovelace":17}}}]}},"id":"cmHaQ3yGsuK0"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/056.json b/server/test/vectors/SubmitTransactionResponse/056.json
index 8fbaf7fd5..bc1e6b127 100644
--- a/server/test/vectors/SubmitTransactionResponse/056.json
+++ b/server/test/vectors/SubmitTransactionResponse/056.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3116,"message":"Some Plutus scripts in the witness set or in an output are invalid. Scripts must be well-formed flat-encoded Plutus scripts, CBOR-encoded. Yes, there's a double binary encoding. The outer-most encoding is therefore just a plain CBOR bytestring. Note that some tools such as the cardano-cli triple encode scripts for some reasons, resulting in a double outer-most CBOR encoding. Make sure that your script are correctly encoded. The field 'data.malformedScripts' lists the hash digests of all the problematic scripts.","data":{"malformedScripts":["1263cf984d3e8969e391066099ae62355af5beab59e5b9dd2e83c254","2ace99d56b72a14ed7c9f62556ef0563e92087f0299157757fc1bf22","49bd85279e0ad63287e1b1f988d134c6221dd3ce750b8306b0dd2dd1","682b3998f66164bd4b60350a2b64ddb0ececdf7d64b4264a8c16574d","76182f12983998dc32a848a52e25ecdcb3917165aece5c118ad30a88","971d5dec6f8e4b4a0e209eebd8133d69b4c6025d35f601ee7a913e3c","9a705a838f7cbe4db80cf520c7e8c0533265540705397c44f50a2ee5","b4a7a9e182105c516c62147b912ef47a44eabdf53ab23ef2ea8c5d72","bf1bc5a64a0a2fea90ee7521174f576362aa5754d1298661355589b9","c5a569ac706a0c256ee3828230c1b70117b6d864fea6df05e0a440cc","d41cb85f7f25093ecdbf6c05f649a816d18f467e912ed8ef8029662d","ee1c10e0a1b37800f14f1a2f0f511ab33b0e57401e444bb806171007"]}},"id":"VJZ9tCUlWkyu"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3173,"message":"All inputs of the transaction are already spent. This usually means that the transaction has already been included in the ledger, so there's no need to submit it again."},"id":"VJZ9tCUlWkyu"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/058.json b/server/test/vectors/SubmitTransactionResponse/058.json
index 0fad585c9..ed7061cb4 100644
--- a/server/test/vectors/SubmitTransactionResponse/058.json
+++ b/server/test/vectors/SubmitTransactionResponse/058.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3113,"message":"The transaction failed because the provided script integrity hash doesn't match the computed one. This is crucial for ensuring the integrity of cost models and Plutus version used during script execution. The field 'data.providedScriptIntegrity' correspond to what was given, if any, and 'data.computedScriptIntegrity' is what was expected. If the latter is null, this means you shouldn't have included a script integrity hash to begin with.","data":{"providedScriptIntegrity":"6c8561540b2c8acb42501ff895089b446db8b74d60916eea35cd178151627f89","computedScriptIntegrity":"a1777fbec52c9691f172a00a00025e1c21f57959cc894fc706f5ca4f73314f91"}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3172,"message":"A stake pool registration carries a BLS key with an invalid proof of possession. The proof must show possession of the signing key that matches the BLS verification key. The field 'data.stakePool.id' indicates the stake pool, and 'data.blsKey' contains the key and proof found in the certificate.","data":{"stakePool":{"id":"pool1546c8yzyylwszfp0u9ezwpnnr3m3zsf95qykq4p0027avdm567a"},"blsKey":{"verificationKey":"b69e47403550fc0ddeff6e13b5996309bfcca7cb17cb02d6c860e5b7458e324a8b1e065e9a7310549f33e3e4d2f6d5c7138a4ca9f37233d4dc612935268fe7e03a0122ef3b1b5f88c0942f2405ac83cfa31c6870bf743bcd88c9265920913848","proofOfPossession":"80220c0f5fba521f7714bc15a20dabf62c814cd8a3727ff8869727bd811d089c441a07027211475844295032a679a6f6"}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/060.json b/server/test/vectors/SubmitTransactionResponse/060.json
index b619df0c9..029c88ec9 100644
--- a/server/test/vectors/SubmitTransactionResponse/060.json
+++ b/server/test/vectors/SubmitTransactionResponse/060.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test1up85txdwk8nms73xle5cddzgzkfawy8zpx77gcu92unpgnsczw4n0":{"ada":{"lovelace":19}},"stake17ync5hlqh4u4zkanmjj65mu495fpw553vs0w784umlz3rzqk9kcmw":{"ada":{"lovelace":198043}}}}},"id":"yMBf6e5JMuLv"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3169,"message":"Some guards required by the transaction or by its sub-transactions are missing from the top-level transaction. Any credential (key hash or script) listed as a required top-level guard must also appear in the 'guards' of the top-level transaction. The field 'data.missingGuards' lists the required credentials that are absent.","data":{"missingGuards":[{"from":"script","credential":"0922c9f33bdbbe4f21e93d7bf6aa77e0811d762f93ed5aa571269e93"},{"from":"script","credential":"5552ab79bbc2f5587d94ac8c7d116961dfc5ef3f68964a1d1f097171"},{"from":"script","credential":"9058dbc12258f743101a6bc0bb0468668a6f37222177b31566aaae50"},{"from":"script","credential":"9b05136bab191f1412d4fc9b11a7f2ddfcb5816b44be037f8353bd85"},{"from":"script","credential":"a24f1561b52b3a41d4fd83654cc65c8b0761676e2fec8f9c5b5f1c8e"},{"from":"script","credential":"b374b6c60793836f2b94701c80df97ebdfe887d66dbe1d9bc376eb81"},{"from":"verificationKey","credential":"a45e822e8748a94ea09e6fc1b0274d2d6c9bbde307f734731e475e18"}]}},"id":"yMBf6e5JMuLv"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/061.json b/server/test/vectors/SubmitTransactionResponse/061.json
index 6888dc229..67f27a9da 100644
--- a/server/test/vectors/SubmitTransactionResponse/061.json
+++ b/server/test/vectors/SubmitTransactionResponse/061.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test1uzramn5nwxp3cxk8m5j544gdedlyljt8uk2q8hrhjtz3z5qntxhre":{"ada":{"lovelace":494314}},"stake1787hew37lkksdz090wge52aaavsz6rvwe64mw6rzlrec7sgp7f630":{"ada":{"lovelace":3}},"stake1uyjx0nledhdz6pee8crqnum38w35q8uaru0h6jxmruhrgkcdsk7ln":{"ada":{"lovelace":15}},"stake1uy48xjl8zdxvxndsv8hwdl3rpacr9twgdnur30gxuaxr22q8eml3q":{"ada":{"lovelace":25}},"stake1u9v85nr97w9dnnjdqv2rr0ns0rnwdtr6x55wtcjmz6csq9c36zv9a":{"ada":{"lovelace":42369}},"stake1uxy8qxmenypktgjcnml7dlgv6xxhgqlqk5lmpfun8kchypqsqhh33":{"ada":{"lovelace":6}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test1uzramn5nwxp3cxk8m5j544gdedlyljt8uk2q8hrhjtz3z5qntxhre":{"ada":{"lovelace":494314}},"stake1787hew37lkksdz090wge52aaavsz6rvwe64mw6rzlrec7sgp7f630":{"ada":{"lovelace":3}},"stake1uyjx0nledhdz6pee8crqnum38w35q8uaru0h6jxmruhrgkcdsk7ln":{"ada":{"lovelace":15}},"stake1uy48xjl8zdxvxndsv8hwdl3rpacr9twgdnur30gxuaxr22q8eml3q":{"ada":{"lovelace":25}},"stake1u9v85nr97w9dnnjdqv2rr0ns0rnwdtr6x55wtcjmz6csq9c36zv9a":{"ada":{"lovelace":42369}},"stake1uxy8qxmenypktgjcnml7dlgv6xxhgqlqk5lmpfun8kchypqsqhh33":{"ada":{"lovelace":6}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/062.json b/server/test/vectors/SubmitTransactionResponse/062.json
index 52e445195..175939c69 100644
--- a/server/test/vectors/SubmitTransactionResponse/062.json
+++ b/server/test/vectors/SubmitTransactionResponse/062.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake17y0l5hnl9xael7k74gtyfhrv3ywgw6ufnxkpkufcl23ulac7z27rv":{"ada":{"lovelace":510723}}}}},"id":"VngwvFxtoC8X"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake17y0l5hnl9xael7k74gtyfhrv3ywgw6ufnxkpkufcl23ulac7z27rv":{"ada":{"lovelace":510723}}}}},"id":"VngwvFxtoC8X"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/064.json b/server/test/vectors/SubmitTransactionResponse/064.json
index f4321c6e4..58c616254 100644
--- a/server/test/vectors/SubmitTransactionResponse/064.json
+++ b/server/test/vectors/SubmitTransactionResponse/064.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17q222xpf845qc6tvvwed8f2mujk3kdz360tl0p7fsafmg9cuqm95v":{"ada":{"lovelace":752484}},"stake_test17qkxxa2rhtq0a7zsltd6hwwf2eg2qv7dvzluc6l7rfvk8dg6kw6rd":{"ada":{"lovelace":24}},"stake_test17qaayk6ple6wparn5rmhknjg8mf07edhayrarsxfl6kvszgfgm7v7":{"ada":{"lovelace":22}},"stake_test17p9g84fez3deuqwwnlwshrq4lafzt6xpfccc00ggak96vrculhxj9":{"ada":{"lovelace":842269}},"stake_test17p00rzkkh5ljkz5pl63ulv0yqd0jp24pjzdeg9dx9me7upc84xz7h":{"ada":{"lovelace":12}},"stake_test17pk7x49ww0mlw7l7pn37vvv5rp9lkdxxrw4c8muqcakcauc7va9p6":{"ada":{"lovelace":708477}},"stake_test17z6uutl8444qmjxpv96wkakg76v0jt2gmuts8nmwqyvhz5cy7w6gr":{"ada":{"lovelace":20}},"stake_test17rt7rhgsjeyrup3z03k67986qj3f34g9r0nfx6mh8093xwgk4w2l2":{"ada":{"lovelace":20}},"stake_test1uqgf0j7dxvgs5r4tea6kjfnwct2cwygp6yv24xa76hpjx9spyje6u":{"ada":{"lovelace":13}},"stake_test1upgqrl0x5xm95evr7dkz9g00vfrnllyzwdtlet0ddvfv5cctxvyu9":{"ada":{"lovelace":6}},"stake_test1upcafxltvjsu0hhl4exddgffhz0vzmt3srnu2gws57lexaqnfa3x0":{"ada":{"lovelace":11}},"stake_test1ur4xrfk8k8awxmczlv8ztt67x842zdz4tmrr3m3cvpt3swsmfj28h":{"ada":{"lovelace":963447}},"stake_test1urc8g93ezatr8uqzqm9ksy079l23v9tawqx3mx2qawelj0sduqqdk":{"ada":{"lovelace":497169}},"stake17yuhzvwyl4jnfdzv6g7jnsfs5emaza5f0exe78pr5a8n2ncg6r9p0":{"ada":{"lovelace":585251}},"stake179qvh5tzrtdz5j0mj73sxj0m20u9fxcfnt0jgd8t3rhy0gcs48nja":{"ada":{"lovelace":597965}},"stake17970f6wkhu9cg5xd7uuwfg4fcs055c6je2ycy8py9kxy0yqjpzdjp":{"ada":{"lovelace":24}},"stake178rrhgtwh6v08agz4rgvtaugpz388278q8n4gm8fc5suycgl8h9qd":{"ada":{"lovelace":748134}},"stake178xng6r8mnqytc7fjtq4a62vysl85cxujr0qgdcmm0wp2jcavf9ke":{"ada":{"lovelace":632915}},"stake178lnqrh6en4rwjxzsn3rt476xuvsxdwgphv3cva5xhvns3gaf3f54":{"ada":{"lovelace":15}},"stake178la3r0s9lj4q2q5msd6g0kc4grl5p4ya8ead6wjvqt7pfqxh37l4":{"ada":{"lovelace":10}},"stake1uy4a838esew6fz9frsqqhlm4648a7fqh92xjytvcq6qsqvge2498c":{"ada":{"lovelace":12}},"stake1u9xp2w4ce7hq0xu9s63pzrqu2gjhhhgt3jcjf872rpc2afgr89q06":{"ada":{"lovelace":17}},"stake1u9aktlr970qt7ng09a5smke084lqnarwdxcpc4xjnt4ajvcky3wj8":{"ada":{"lovelace":5}},"stake1u8tvdqfkt205flx6yzx8kv7lss4dkhrmkxup3lzk45w5mps29tms3":{"ada":{"lovelace":29}},"stake1u8j49pzcxc5s8umlav203439xl8t0chmv0q7m30twk4787q2yr47d":{"ada":{"lovelace":15}},"stake1u8emxgywygmscj8uceg0859ht3nk4jt0yjprrdm0ygq876sxq9wsz":{"ada":{"lovelace":306610}}}}},"id":"qAQMeMr6U1XI"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3171,"message":"The collateral return output is sent to a pointer address. Since the Dijkstra era, pointer addresses are no longer allowed in collateral return outputs. The field 'data.collateralReturn' contains the offending output.","data":{"collateralReturn":{"address":"addr1q8d7ycmmd5wjyh94xfyed6xy30eflvql3wn5fmrewjtffvypywmrl80glzwmdkssr3pc6srhuvanlxalhg30vkpc9srqtj5lhn","value":{"ada":{"lovelace":4187164187661608210},"4a1c412d8e2b3015a7fb7d382808fb7cb721bf93a56e8bb6661cdebe":{"0ef422321ebd4fc29b0f188b99f6fc7fcd7c7cdcaf374ec21b6900":1,"35":5570747617777357299},"8f461954fe2f18fee1dca233f358907e643ff839ed1f995e4bf325e3":{"e6ad435334a0ac47315575cef90cf0c96d58a6f617db5be8b5c50308":1}},"script":{"language":"native","json":{"clause":"any","from":[{"clause":"after","slot":2},{"clause":"guard","from":"6b291e96b9e52c07f68a8cd65deb17efba6d321284fdb1962190755c"}]},"cbor":"82028282040282068201581c6b291e96b9e52c07f68a8cd65deb17efba6d321284fdb1962190755c"}}}},"id":"qAQMeMr6U1XI"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/069.json b/server/test/vectors/SubmitTransactionResponse/069.json
index c0cd87f80..8c7b4aacd 100644
--- a/server/test/vectors/SubmitTransactionResponse/069.json
+++ b/server/test/vectors/SubmitTransactionResponse/069.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3110,"message":"Extraneous (non-required) redeemers found in the transaction. There are some redeemers that aren't pointing to any script. This could be because you've left some orphan redeemer behind, because they are pointing at the wrong thing or because you forgot to include their associated validator. Either way, the field 'data.extraneousRedeemers' lists the different orphan redeemer pointers.","data":{"extraneousRedeemers":[{"index":22691,"purpose":"mint"},{"index":30759,"purpose":"publish"},{"index":20756,"purpose":"spend"}]}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3175,"message":"Some account balances fall outside the intervals asserted by the transaction. An interval has an inclusive lower bound and an exclusive upper bound, or asserts an exact balance. The field 'data.checkedAgainst' tells which balances were checked: 'batchStart' for the balances at the start of the batch, or 'transaction' for the balances seen by the (sub-)transaction that asserts the interval. The field 'data.balancesOutsideIntervals' lists each account with its balance and the interval it doesn't satisfy.","data":{"checkedAgainst":"batchStart","balancesOutsideIntervals":[{"account":"stake_test17q4029v08y0274cqa9g6sspc8an3g4d62km7tjtns9t92zsdz6f82","balance":{"ada":{"lovelace":117448}},"interval":{"exact":{"ada":{"lovelace":1}}}},{"account":"stake_test17z203nz7xdetnwjslg7udjkeqcsh9zrgcdm6vjrdpdw9frgttd0wd","balance":{"ada":{"lovelace":164230}},"interval":{"lowerBound":{"ada":{"lovelace":3}}}},{"account":"stake_test1up6jdwnp4eh4v7d7xafzg6zukvfmzu2csttqfner33ln9ecfjeaje","balance":{"ada":{"lovelace":1}},"interval":{"lowerBound":{"ada":{"lovelace":2}}}},{"account":"stake17yqa5gg2g8rr5mgstqxtzw7k2c0u4pyxdfpmfs7xqt78ngqwt9qr7","balance":{"ada":{"lovelace":3}},"interval":{"exact":{"ada":{"lovelace":833133}}}},{"account":"stake17832hdn62805yp6d4hjev8cmhhkmsqk6t8fht99vzats0zgvjzrug","balance":{"ada":{"lovelace":447606}},"interval":{"lowerBound":{"ada":{"lovelace":25}},"upperBound":{"ada":{"lovelace":0}}}},{"account":"stake1ux423cnrlfvzy09zxqtyx8nufqse7j2rggwpq9t32zvwd7scwa8ms","balance":{"ada":{"lovelace":2}},"interval":{"exact":{"ada":{"lovelace":842387}}}}]}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/071.json b/server/test/vectors/SubmitTransactionResponse/071.json
index e3ce24e1b..167c7c142 100644
--- a/server/test/vectors/SubmitTransactionResponse/071.json
+++ b/server/test/vectors/SubmitTransactionResponse/071.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{}}},"id":"rIWd8vh30N1m"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{}}},"id":"rIWd8vh30N1m"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/072.json b/server/test/vectors/SubmitTransactionResponse/072.json
index d5cc1476d..bd0cffe65 100644
--- a/server/test/vectors/SubmitTransactionResponse/072.json
+++ b/server/test/vectors/SubmitTransactionResponse/072.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3116,"message":"Some Plutus scripts in the witness set or in an output are invalid. Scripts must be well-formed flat-encoded Plutus scripts, CBOR-encoded. Yes, there's a double binary encoding. The outer-most encoding is therefore just a plain CBOR bytestring. Note that some tools such as the cardano-cli triple encode scripts for some reasons, resulting in a double outer-most CBOR encoding. Make sure that your script are correctly encoded. The field 'data.malformedScripts' lists the hash digests of all the problematic scripts.","data":{"malformedScripts":["01140b89f56c22a01b32a06adda358766839ef785d459cf94b9f7a0b","042487fdd8a1eb90f3e848cd4f7dd8c3715d1d52fcc550ff25e38c7a","0454125c88d0f6ab45e74381d2eebaa874c13032311b70ac5cb1b0d7","11c623f09a33244f6536f26997628bd9613acaee9d42cfbf1b428d97","1bb67723e29dd670fad276dbf8607e7f7ce69e99ddb13cbd8b3aaf6c","24f96905c47930c29a998c5ad8646f337a45218f03ba7aa02c7a0f52","43ff3da65a3722929f9d1fa1f1ce0f37132e415046481947adcbeb2c","652564c2fb63587031ab2ec0d0c41a7aa7db683e159a468a5b68cceb","674bc287f3d71cedee38091e823e2c4b10136ae2f581c433cb672bc9","7aa38de014be4954d0bb43d34b92fb77a5099b2517b4a7e6fb93e4b6","87a1b5dba16c8fbc03e293b11f2fd1bed34a96b6c7abdd8f43ab89e6","8c784a8483d3d75eeaee5ff774114673edad77f6bf722cd0b17031aa","8cae6b415a55652626c1369877178f585f1b2462e3fb0650debbd6a8","9940824e39e647fc4bcbe936b02a4683ddab95a5ea26fd13492dc7b5","cb33991fb9549e840a562da9de09a011f08b78b8ba6a97183ad498b5","ded98a95f89e54aeb39366c0750f05c374afb521814dc17f17abd1f9","e156a6309577f13b42dbdd1105cac97d34b87d8364686b567295495a"]}},"id":"JjKM2Flyeki9"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3171,"message":"The collateral return output is sent to a pointer address. Since the Dijkstra era, pointer addresses are no longer allowed in collateral return outputs. The field 'data.collateralReturn' contains the offending output.","data":{"collateralReturn":{"address":"addr1xywwd4qvmc0ly4nkyshvdlwf5h8d0vvqypjlz088929s0m4ymnjd9qzvmgddeexkwj7km59fhpp7fr0c84u5hxds60rq00upuf","value":{"ada":{"lovelace":1},"96c273652b99371d5bf8237efb307034831dca37c7e6b155af207305":{"4c523881":6317068100482902775}},"datumHash":"65936e0cd197d3dedea152b9a286e5c9ac362bd61aa308dc6f6d724545d23be9","script":{"language":"native","json":{"clause":"guard","from":"9576e0c231eba5baef5c60ec96c3b66d3b219e8bb39626e900778d2b"},"cbor":"82068200581c9576e0c231eba5baef5c60ec96c3b66d3b219e8bb39626e900778d2b"}}}},"id":"JjKM2Flyeki9"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/073.json b/server/test/vectors/SubmitTransactionResponse/073.json
index 8bffde5b6..4cd407bf2 100644
--- a/server/test/vectors/SubmitTransactionResponse/073.json
+++ b/server/test/vectors/SubmitTransactionResponse/073.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qzuhrftk5lztx30epjlcjcn7q2gx9n69zyf7wjp8f26hrqudwmq8":{"ada":{"lovelace":657085}},"stake_test17qh5e2g7mjtcpjmv9cufx4tsg4p5d845rta32pe6uwtrkns8jzq4e":{"ada":{"lovelace":632962}},"stake_test17pry7hv7n95f0m7e3zwhmudy3ycqaq37xxyf8d075qr3v7gvnfk9e":{"ada":{"lovelace":958913}},"stake_test17pghwyac0k4tz6feewlcuq4gh9dzcsqkxn4gw8kj8s5d9rsz50cw9":{"ada":{"lovelace":18}},"stake_test17pwv4y99yvz508fzapqk3uq4vrmt6pkpgdhu4ap25z0j7tqv236nl":{"ada":{"lovelace":794225}},"stake_test17pw3ly3w9d34ckhg0lfjp0d234rfkppfzv932pfxja8p4pcastscd":{"ada":{"lovelace":17}},"stake_test17peeg3krhxwspckqwfmmqeu0d28d3r8tzsmp8m7feqmf8vsxqendd":{"ada":{"lovelace":700548}},"stake_test17zc73xswyehxwrhjzetd7rmmh90tsq49293jn404ch038fcc2wetg":{"ada":{"lovelace":15}},"stake_test17r3qnlrwrdl4j0lud6t3wmjf5f38frtq2kpvllmnxvsnunc6hv6nl":{"ada":{"lovelace":518163}},"stake_test1uqtrm8ew5cz4df2qtgxdj8tdpjv6pwkscwazexrk3h04dwsykfg7q":{"ada":{"lovelace":276464}},"stake_test1upfkquky3fpg7d0pw6e5fdhgacxa8kpru5swp46a48ucw8q3cxp2s":{"ada":{"lovelace":270500}},"stake_test1up6rmdlrcncay8wnarvjk2430yxew2nwqenas5qr75csr9g0znjun":{"ada":{"lovelace":214233}},"stake_test1uz90ttnrsm6xkg4hzjdhnf652ksjxwmtdj0h24l68qn2ggqsxm0fl":{"ada":{"lovelace":641257}},"stake_test1uza4q9czr29fey3agznn2mp8lxc79kk74lqqcrl0uf4hk3cn265hw":{"ada":{"lovelace":15}},"stake179uav2te7kuhtxmxk3capp6wmxv2juupvxxydzvhaszk8csucly4u":{"ada":{"lovelace":7}},"stake17xmg3t5xd8e29n3fqstukyt60ufrkw8rnqxdelp9sn4hq4q0k5l2d":{"ada":{"lovelace":4}},"stake1uygty3jw5ely4x04zqldf6g7em6lufjm5uqgvr4s4hgfaxc04n3qr":{"ada":{"lovelace":413793}},"stake1uyu220mu54qsmy0mmgrkhlfwwfxzyrh3edkgtkunejpw4wqueym3x":{"ada":{"lovelace":947388}},"stake1u9px2lql02ahxa2huut7namdttvyj5y9q27vvyv8l0qwf8gt977p9":{"ada":{"lovelace":88294}},"stake1u9fwyamnxd554kphmy6eeeymjmmgggum5lj9azhatvrd67sj83278":{"ada":{"lovelace":239512}},"stake1u92ne9745hkvfykzd203ef0w2n0lt53qrm4zgcm2w0qx82qc94z84":{"ada":{"lovelace":189519}},"stake1u92cswhr02zsad0ejm3xpd87u4zjec0l0crql32smxlstxg6uv64f":{"ada":{"lovelace":11}},"stake1u9jyrc08xmanudd77lnpsp53dn3mc50kg6hak0rthxax0xg4t2fzw":{"ada":{"lovelace":25}},"stake1ux39g0ql954s3qyyz5qgvydksguzr4mjjrlhp0undw9lheqn2qlll":{"ada":{"lovelace":7}},"stake1u8er8yvgcq30kj7ufk059g0dw3pwfnkqv70qymrg0ugce7qzqajxw":{"ada":{"lovelace":24}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17qzuhrftk5lztx30epjlcjcn7q2gx9n69zyf7wjp8f26hrqudwmq8":{"ada":{"lovelace":657085}},"stake_test17qh5e2g7mjtcpjmv9cufx4tsg4p5d845rta32pe6uwtrkns8jzq4e":{"ada":{"lovelace":632962}},"stake_test17pry7hv7n95f0m7e3zwhmudy3ycqaq37xxyf8d075qr3v7gvnfk9e":{"ada":{"lovelace":958913}},"stake_test17pghwyac0k4tz6feewlcuq4gh9dzcsqkxn4gw8kj8s5d9rsz50cw9":{"ada":{"lovelace":18}},"stake_test17pwv4y99yvz508fzapqk3uq4vrmt6pkpgdhu4ap25z0j7tqv236nl":{"ada":{"lovelace":794225}},"stake_test17pw3ly3w9d34ckhg0lfjp0d234rfkppfzv932pfxja8p4pcastscd":{"ada":{"lovelace":17}},"stake_test17peeg3krhxwspckqwfmmqeu0d28d3r8tzsmp8m7feqmf8vsxqendd":{"ada":{"lovelace":700548}},"stake_test17zc73xswyehxwrhjzetd7rmmh90tsq49293jn404ch038fcc2wetg":{"ada":{"lovelace":15}},"stake_test17r3qnlrwrdl4j0lud6t3wmjf5f38frtq2kpvllmnxvsnunc6hv6nl":{"ada":{"lovelace":518163}},"stake_test1uqtrm8ew5cz4df2qtgxdj8tdpjv6pwkscwazexrk3h04dwsykfg7q":{"ada":{"lovelace":276464}},"stake_test1upfkquky3fpg7d0pw6e5fdhgacxa8kpru5swp46a48ucw8q3cxp2s":{"ada":{"lovelace":270500}},"stake_test1up6rmdlrcncay8wnarvjk2430yxew2nwqenas5qr75csr9g0znjun":{"ada":{"lovelace":214233}},"stake_test1uz90ttnrsm6xkg4hzjdhnf652ksjxwmtdj0h24l68qn2ggqsxm0fl":{"ada":{"lovelace":641257}},"stake_test1uza4q9czr29fey3agznn2mp8lxc79kk74lqqcrl0uf4hk3cn265hw":{"ada":{"lovelace":15}},"stake179uav2te7kuhtxmxk3capp6wmxv2juupvxxydzvhaszk8csucly4u":{"ada":{"lovelace":7}},"stake17xmg3t5xd8e29n3fqstukyt60ufrkw8rnqxdelp9sn4hq4q0k5l2d":{"ada":{"lovelace":4}},"stake1uygty3jw5ely4x04zqldf6g7em6lufjm5uqgvr4s4hgfaxc04n3qr":{"ada":{"lovelace":413793}},"stake1uyu220mu54qsmy0mmgrkhlfwwfxzyrh3edkgtkunejpw4wqueym3x":{"ada":{"lovelace":947388}},"stake1u9px2lql02ahxa2huut7namdttvyj5y9q27vvyv8l0qwf8gt977p9":{"ada":{"lovelace":88294}},"stake1u9fwyamnxd554kphmy6eeeymjmmgggum5lj9azhatvrd67sj83278":{"ada":{"lovelace":239512}},"stake1u92ne9745hkvfykzd203ef0w2n0lt53qrm4zgcm2w0qx82qc94z84":{"ada":{"lovelace":189519}},"stake1u92cswhr02zsad0ejm3xpd87u4zjec0l0crql32smxlstxg6uv64f":{"ada":{"lovelace":11}},"stake1u9jyrc08xmanudd77lnpsp53dn3mc50kg6hak0rthxax0xg4t2fzw":{"ada":{"lovelace":25}},"stake1ux39g0ql954s3qyyz5qgvydksguzr4mjjrlhp0undw9lheqn2qlll":{"ada":{"lovelace":7}},"stake1u8er8yvgcq30kj7ufk059g0dw3pwfnkqv70qymrg0ugce7qzqajxw":{"ada":{"lovelace":24}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/074.json b/server/test/vectors/SubmitTransactionResponse/074.json
index 140bfa7ff..65f38d74d 100644
--- a/server/test/vectors/SubmitTransactionResponse/074.json
+++ b/server/test/vectors/SubmitTransactionResponse/074.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17zeyyxy04y5rsscj5w0qvmj8mtzkzk0fpj7a82xa80lnnyql6cnr0":{"ada":{"lovelace":134581}},"stake_test17rlnsy9mwn3pm6jwsgv5k6glw6vhqspzpg95uv6k7m0lvdqxpvzts":{"ada":{"lovelace":1}},"stake17y4ydc05803e7k7hyu8m3jc8j2u852y94hs5vxnmpqfnjqg5wspzs":{"ada":{"lovelace":98776}},"stake17975upm3qmkqy37stk29adfhth2vq3zcuhgmtaex3xhlxpswj759d":{"ada":{"lovelace":12}},"stake17xxpyhnlwuwr89pxk59fdr56sv34axsdxf4x35k4vg476gqxygt97":{"ada":{"lovelace":667450}},"stake17xg3lzh5hplmxdx0spvsn78cgypqa5x5kg0nlav0se6eykc4jltwj":{"ada":{"lovelace":22}},"stake1u9k9khtljkwyg3ka83d7n3w076jx8fr84rswpf9skedzz4cmepzff":{"ada":{"lovelace":854049}}}}},"id":"lLx8WVJw9a4u"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17zeyyxy04y5rsscj5w0qvmj8mtzkzk0fpj7a82xa80lnnyql6cnr0":{"ada":{"lovelace":134581}},"stake_test17rlnsy9mwn3pm6jwsgv5k6glw6vhqspzpg95uv6k7m0lvdqxpvzts":{"ada":{"lovelace":1}},"stake17y4ydc05803e7k7hyu8m3jc8j2u852y94hs5vxnmpqfnjqg5wspzs":{"ada":{"lovelace":98776}},"stake17975upm3qmkqy37stk29adfhth2vq3zcuhgmtaex3xhlxpswj759d":{"ada":{"lovelace":12}},"stake17xxpyhnlwuwr89pxk59fdr56sv34axsdxf4x35k4vg476gqxygt97":{"ada":{"lovelace":667450}},"stake17xg3lzh5hplmxdx0spvsn78cgypqa5x5kg0nlav0se6eykc4jltwj":{"ada":{"lovelace":22}},"stake1u9k9khtljkwyg3ka83d7n3w076jx8fr84rswpf9skedzz4cmepzff":{"ada":{"lovelace":854049}}}}},"id":"lLx8WVJw9a4u"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/076.json b/server/test/vectors/SubmitTransactionResponse/076.json
index 4537fe550..89202e445 100644
--- a/server/test/vectors/SubmitTransactionResponse/076.json
+++ b/server/test/vectors/SubmitTransactionResponse/076.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17q824eg8qaw6m842m43a24ku6fhhdnaq8u7wmfaxlh92rfqdklfcw":{"ada":{"lovelace":305612}},"stake_test17p4f4g5n98wqwyfmz7ghvw49zvharx0ljepx5f9z0zkg4rczj7k6j":{"ada":{"lovelace":1}},"stake_test17r2hm9ad8v88689rz3t4auw5ga3h8uf48vutnvs5xlw7uks9wdn7k":{"ada":{"lovelace":25}},"stake_test17remsgcsptfay5c7xa8e8lz3jwnagjf7wnh4hkq9hw6u69cr284l0":{"ada":{"lovelace":20}},"stake_test17ra6gnyhc5sxsgg5vejmgwvqf8lfq9xfu9myzwr2g0ccdkq9qjc4l":{"ada":{"lovelace":9}},"stake_test1urnameruwhptnhtm3hfhx2wgn8hexdfz8375mv9eaz292zspf9ker":{"ada":{"lovelace":23}},"stake179prlephldp09u7vr9eylq26d9zxauvhaytfm0wp98ktdcsfqsv2m":{"ada":{"lovelace":15}},"stake1uy0fsgyd5th5xmyshn09hm4rm0vat56ddeev0m3hdl92kasj7pltt":{"ada":{"lovelace":118130}},"stake1u83aflfln80d04r96udrrrl42nlx75z7h7menpdfcf0wjtq6e6ts3":{"ada":{"lovelace":860567}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17q824eg8qaw6m842m43a24ku6fhhdnaq8u7wmfaxlh92rfqdklfcw":{"ada":{"lovelace":305612}},"stake_test17p4f4g5n98wqwyfmz7ghvw49zvharx0ljepx5f9z0zkg4rczj7k6j":{"ada":{"lovelace":1}},"stake_test17r2hm9ad8v88689rz3t4auw5ga3h8uf48vutnvs5xlw7uks9wdn7k":{"ada":{"lovelace":25}},"stake_test17remsgcsptfay5c7xa8e8lz3jwnagjf7wnh4hkq9hw6u69cr284l0":{"ada":{"lovelace":20}},"stake_test17ra6gnyhc5sxsgg5vejmgwvqf8lfq9xfu9myzwr2g0ccdkq9qjc4l":{"ada":{"lovelace":9}},"stake_test1urnameruwhptnhtm3hfhx2wgn8hexdfz8375mv9eaz292zspf9ker":{"ada":{"lovelace":23}},"stake179prlephldp09u7vr9eylq26d9zxauvhaytfm0wp98ktdcsfqsv2m":{"ada":{"lovelace":15}},"stake1uy0fsgyd5th5xmyshn09hm4rm0vat56ddeev0m3hdl92kasj7pltt":{"ada":{"lovelace":118130}},"stake1u83aflfln80d04r96udrrrl42nlx75z7h7menpdfcf0wjtq6e6ts3":{"ada":{"lovelace":860567}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/077.json b/server/test/vectors/SubmitTransactionResponse/077.json
index 8aa053b72..42e412ec6 100644
--- a/server/test/vectors/SubmitTransactionResponse/077.json
+++ b/server/test/vectors/SubmitTransactionResponse/077.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3150,"message":"The transaction is attempting to withdraw rewards from stake credentials that do not engage in on-chain governance. Credentials must be associated with a delegate representative (registered, abstain or noConfidence) before associated rewards can be withdrawn. The field 'data.marginalizedCredentials' lists all the affected credentials.","data":{"marginalizedCredentials":["05d37bd176a6aa9362f322504c938e6c657de05aa275942b17ad3bb2","0863795d217eedf413ee39737b2c379a2f86b2fb9d4dd4c305ce53ee","09672b28d15c5bf5cab38bf8af7511c0746fbbcd555efd2de69184f7","15833059d0793ce4f6656bd2502a18f2f882b7dd9e993f11b00fe318","3774ed0058ca94c728dc073c4b452c54a771578006e372cb35fc7fb5","7ca19b7286cdd645e44041140bc90791968f823853a5eef1f0dfb38f","7db8317c554209fb9a394b1009bb79ca8f9073835acf26fced685c8f","83888918af9e8a4bde95db77c2c75ce87b58338db693010ba74e1e6b","8a48fcc90f07a498bf2e9c3591e960cb5bef362c93daa3126a7c764b","8c54ba4f737b80cc9c2e7e8568674648b97ce0f972602428615ec5c9","a7baaef88d7895a3cc9ea445872d6d6d6e3124d70bb59721e03dea6b","adb0d1a9387d2413b5c4d745cd37759b1505a2484f25d462f386703a","d5f0e1cb0892390fd0289ae8593dd4c5dbfaf2c19b05779e73a3b7bd","dd16e4bdb06ba886b209118dac2b1c01b42e13a52414aa251189eaab"]}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3175,"message":"Some account balances fall outside the intervals asserted by the transaction. An interval has an inclusive lower bound and an exclusive upper bound, or asserts an exact balance. The field 'data.checkedAgainst' tells which balances were checked: 'batchStart' for the balances at the start of the batch, or 'transaction' for the balances seen by the (sub-)transaction that asserts the interval. The field 'data.balancesOutsideIntervals' lists each account with its balance and the interval it doesn't satisfy.","data":{"checkedAgainst":"transaction","balancesOutsideIntervals":[{"account":"stake179fts7lsvn7vel8fualgy3hgmt79udflrju7r9j20v62c6c6ry7sn","balance":{"ada":{"lovelace":29}},"interval":{"upperBound":{"ada":{"lovelace":545428}}}}]}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/078.json b/server/test/vectors/SubmitTransactionResponse/078.json
index 6c230e84e..9039865f5 100644
--- a/server/test/vectors/SubmitTransactionResponse/078.json
+++ b/server/test/vectors/SubmitTransactionResponse/078.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17p7q98rh44hd92rtxp9vqc9ju58942a30pvyj9m33ptt8zg0sx2u3":{"ada":{"lovelace":4}},"stake_test17zt4uag9647k09as7l5jpzctnxyhm8l9s4ns66nuvjyhs9cl3f44w":{"ada":{"lovelace":11}},"stake_test17zd2hgrpjsjasflkcnax4gqsq7ck0jy2j09w4h6ugmel8lqf4n4u7":{"ada":{"lovelace":331142}},"stake_test17zhln7xwhatmvqqj8qec0fn6hgjr8292hlf8a99g30jet7sdcfku6":{"ada":{"lovelace":461836}},"stake_test17rltpx55982yqx3pyh7s4lq8vs8a6vfn4rmdzkzpnne4ggq9j3zrk":{"ada":{"lovelace":763462}},"stake_test1up35kftfwdr22eq8egmrd5nt6qtxmq4egtngyytlw9jjkece9x9gx":{"ada":{"lovelace":762810}},"stake_test1urpsfmk77yzmtkwueeea90pvn84vx0yg9rk0qth3kzeqm4ga58943":{"ada":{"lovelace":463143}},"stake_test1urx2s2vzq4gj4uug4fcr45r364wwnu2jjyczuf95vmpfpaq2pnf2g":{"ada":{"lovelace":2}},"stake_test1urjsxv87xaf5a6etctknqx4jn7nr8n7wtf4lcr35q6p6mqckh9n74":{"ada":{"lovelace":954440}},"stake17yw2mhp5ysgp5ls48xj366pw8vjykdwhl06d9w8m6y69mjqsh7h8r":{"ada":{"lovelace":12}},"stake17ywn9keynqe82qyh39utw7e4vdnum28878gc4qfq5x0ccwgkdcvpx":{"ada":{"lovelace":3}},"stake17y3h9nheyjr2nm58pkyyzw06v2ztztd2y2uc63964h75q5q7y9duf":{"ada":{"lovelace":9}},"stake17ychmlqe58frjnht7h8ta92q5lsdgerwel6yyydr5ut5jeg2nt87m":{"ada":{"lovelace":647699}},"stake179ft944m7pz4e938l8dwhudp8lehntdsws97kjt5y4c5j4s6zetds":{"ada":{"lovelace":11}},"stake179nq5vrpclmj5lx8ktnnmcyyy2ujeck34df4pngd7vjx77gvt07mj":{"ada":{"lovelace":945310}},"stake179kl2kht6ekka3aj6sdqy94z55nln02sxnfatewzyrzlwes3yq9n5":{"ada":{"lovelace":754620}},"stake17895k99k9klkxssqeh7qq9a9cv7ypq5w3zkt8hwzchyw3hq0wvu74":{"ada":{"lovelace":403265}},"stake178s8afxvkvzp6nyhy3j9ymraj7853jdhz46a40mtm9ugqwcfc0l7n":{"ada":{"lovelace":14}},"stake1u8ll49cdp7tvsp3dz3mmw9zds2gvq68pdvcnskjuzfcxcaszt8544":{"ada":{"lovelace":27}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17p7q98rh44hd92rtxp9vqc9ju58942a30pvyj9m33ptt8zg0sx2u3":{"ada":{"lovelace":4}},"stake_test17zt4uag9647k09as7l5jpzctnxyhm8l9s4ns66nuvjyhs9cl3f44w":{"ada":{"lovelace":11}},"stake_test17zd2hgrpjsjasflkcnax4gqsq7ck0jy2j09w4h6ugmel8lqf4n4u7":{"ada":{"lovelace":331142}},"stake_test17zhln7xwhatmvqqj8qec0fn6hgjr8292hlf8a99g30jet7sdcfku6":{"ada":{"lovelace":461836}},"stake_test17rltpx55982yqx3pyh7s4lq8vs8a6vfn4rmdzkzpnne4ggq9j3zrk":{"ada":{"lovelace":763462}},"stake_test1up35kftfwdr22eq8egmrd5nt6qtxmq4egtngyytlw9jjkece9x9gx":{"ada":{"lovelace":762810}},"stake_test1urpsfmk77yzmtkwueeea90pvn84vx0yg9rk0qth3kzeqm4ga58943":{"ada":{"lovelace":463143}},"stake_test1urx2s2vzq4gj4uug4fcr45r364wwnu2jjyczuf95vmpfpaq2pnf2g":{"ada":{"lovelace":2}},"stake_test1urjsxv87xaf5a6etctknqx4jn7nr8n7wtf4lcr35q6p6mqckh9n74":{"ada":{"lovelace":954440}},"stake17yw2mhp5ysgp5ls48xj366pw8vjykdwhl06d9w8m6y69mjqsh7h8r":{"ada":{"lovelace":12}},"stake17ywn9keynqe82qyh39utw7e4vdnum28878gc4qfq5x0ccwgkdcvpx":{"ada":{"lovelace":3}},"stake17y3h9nheyjr2nm58pkyyzw06v2ztztd2y2uc63964h75q5q7y9duf":{"ada":{"lovelace":9}},"stake17ychmlqe58frjnht7h8ta92q5lsdgerwel6yyydr5ut5jeg2nt87m":{"ada":{"lovelace":647699}},"stake179ft944m7pz4e938l8dwhudp8lehntdsws97kjt5y4c5j4s6zetds":{"ada":{"lovelace":11}},"stake179nq5vrpclmj5lx8ktnnmcyyy2ujeck34df4pngd7vjx77gvt07mj":{"ada":{"lovelace":945310}},"stake179kl2kht6ekka3aj6sdqy94z55nln02sxnfatewzyrzlwes3yq9n5":{"ada":{"lovelace":754620}},"stake17895k99k9klkxssqeh7qq9a9cv7ypq5w3zkt8hwzchyw3hq0wvu74":{"ada":{"lovelace":403265}},"stake178s8afxvkvzp6nyhy3j9ymraj7853jdhz46a40mtm9ugqwcfc0l7n":{"ada":{"lovelace":14}},"stake1u8ll49cdp7tvsp3dz3mmw9zds2gvq68pdvcnskjuzfcxcaszt8544":{"ada":{"lovelace":27}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/082.json b/server/test/vectors/SubmitTransactionResponse/082.json
index c93e14f14..74fa84c97 100644
--- a/server/test/vectors/SubmitTransactionResponse/082.json
+++ b/server/test/vectors/SubmitTransactionResponse/082.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test1uqydeqxjwds9f8arjphycrafrs8ktcnmfgx46s7krfmttpc4zwtnj":{"ada":{"lovelace":325467}},"stake1uy3ytzj4t8gtvd49hq8878w8cyk9m7lskjdy7rj6w2jtk0qg9m4sp":{"ada":{"lovelace":888737}},"stake1uyagynn47a7ctakqevtdhjz8wgl88ywht25pjyug06zfhdcpuvl3g":{"ada":{"lovelace":709893}},"stake1uxj47wfg83zgz0vnvgxmsp7xrkd59530z2nwqpfyz089r9ca64x8d":{"ada":{"lovelace":26}}}}},"id":"GUYDa0XiVBqV"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3173,"message":"All inputs of the transaction are already spent. This usually means that the transaction has already been included in the ledger, so there's no need to submit it again."},"id":"GUYDa0XiVBqV"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/083.json b/server/test/vectors/SubmitTransactionResponse/083.json
index 6c840ed9b..33e78e1a6 100644
--- a/server/test/vectors/SubmitTransactionResponse/083.json
+++ b/server/test/vectors/SubmitTransactionResponse/083.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3144,"message":"Some hash digest of (optional) stake pool metadata is too long. When registering, stake pools can supply an external metadata file and a hash digest of the content. The hashing algorithm is left open but the output digest must be smaller than 32 bytes. The field 'data.infringingStakePool' indicates which stake pool has an invalid metadata hash and 'data.computedMetadataHashSize' documents the computed hash size.","data":{"infringingStakePool":{"id":"pool1fg6dry2p34jk5uldk66sd5978w8dhmgpc2auptsvc2dqju2qwul"},"computedMetadataHashSize":{"bytes":13}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3175,"message":"Some account balances fall outside the intervals asserted by the transaction. An interval has an inclusive lower bound and an exclusive upper bound, or asserts an exact balance. The field 'data.checkedAgainst' tells which balances were checked: 'batchStart' for the balances at the start of the batch, or 'transaction' for the balances seen by the (sub-)transaction that asserts the interval. The field 'data.balancesOutsideIntervals' lists each account with its balance and the interval it doesn't satisfy.","data":{"checkedAgainst":"transaction","balancesOutsideIntervals":[{"account":"stake_test17qsmme4nguklpq4ulp9avrdyzlmx8xfgn3unhawxz559dvc93aq4h","balance":{"ada":{"lovelace":6}},"interval":{"upperBound":{"ada":{"lovelace":465351}}}},{"account":"stake_test17pt4rjnf9fr8mquw994u90csqz59fgfgscttz9aakvfl6zsgc9nkd","balance":{"ada":{"lovelace":2}},"interval":{"lowerBound":{"ada":{"lovelace":102828}},"upperBound":{"ada":{"lovelace":6}}}},{"account":"stake_test17ruqf6wemdrje7e87capm7njczxp62nyrx6shjplkvsxjjcdyklsg","balance":{"ada":{"lovelace":989418}},"interval":{"exact":{"ada":{"lovelace":624294}}}},{"account":"stake_test1uqv6lkp5tpxn9vp6pj4udkwl2y3eqz929j9v06yyse0a94ql9zmh8","balance":{"ada":{"lovelace":26016}},"interval":{"upperBound":{"ada":{"lovelace":754098}}}},{"account":"stake17yawr2dvrrwzk45crpsy86zmpr020j3cs7k52kpe62t2prcvptdfz","balance":{"ada":{"lovelace":4}},"interval":{"lowerBound":{"ada":{"lovelace":6}},"upperBound":{"ada":{"lovelace":6}}}},{"account":"stake1uy6wak9h90hz6q6mggaq5sachsf940nfg5fyrndrgvm73ngrjgjy9","balance":{"ada":{"lovelace":836646}},"interval":{"exact":{"ada":{"lovelace":596053}}}}]}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/084.json b/server/test/vectors/SubmitTransactionResponse/084.json
index 9359c64a0..3c57b5fbb 100644
--- a/server/test/vectors/SubmitTransactionResponse/084.json
+++ b/server/test/vectors/SubmitTransactionResponse/084.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3166,"message":"The compound size of all reference scripts exceeeds the maximum size allowed by the protocol. Use fewer or smaller scripts to reduce the total size below acceptable limits. The field 'data.measuredReferenceScriptsSize indicates the actual total measured size of your reference scripts, whereas 'data.maximumReferenceScriptsSize indicates the current maximum size enforced by the ledger.","data":{"measuredReferenceScriptsSize":{"bytes":9},"maximumReferenceScriptsSize":{"bytes":0}}},"id":"QAPscgnHQBgQ"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3171,"message":"The collateral return output is sent to a pointer address. Since the Dijkstra era, pointer addresses are no longer allowed in collateral return outputs. The field 'data.collateralReturn' contains the offending output.","data":{"collateralReturn":{"address":"addr1xyxadtza7eqpv0l26gkdzkvg58q42lhfxy8kld8knh6auhrxmdm9u6lamcr3gxx2z60dzsc8ej20vuzgp8favrww7qss9h0a5t","value":{"ada":{"lovelace":5542296480756903360},"0d9a4b6608ae17cbd78b596c221b39ee7b07a559f32305903df10800":{"5df69831eafd70282147890516542f984af50ee4693d67":918578082044859190},"4a1c412d8e2b3015a7fb7d382808fb7cb721bf93a56e8bb6661cdebe":{"090dce7e2171fa755865a08766df79e6aaca736b64bb4e0a":2}},"script":{"language":"native","json":{"clause":"before","slot":14347368},"cbor":"82051a00daec68"}}}},"id":"QAPscgnHQBgQ"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/087.json b/server/test/vectors/SubmitTransactionResponse/087.json
index f33a8b102..d900f1459 100644
--- a/server/test/vectors/SubmitTransactionResponse/087.json
+++ b/server/test/vectors/SubmitTransactionResponse/087.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qzqusv5af2hzxf50u0kx88lxgu9rgacq776hq4l23du64cup5kwh":{"ada":{"lovelace":906717}},"stake_test17q6jhmnrelr8884edcef24hmalc45zek4f6h5q92ecrm5psn2j7us":{"ada":{"lovelace":904694}},"stake_test17p4avrjp98vl4gn8j8f8s09n0nlqgeg8wtv562p49qqqs4gsvzs2k":{"ada":{"lovelace":17}},"stake_test17zjeqhhw0xsyfs5x54pc3vq4wanhvcgmlz5wedcjsfq6xrsd7ywgl":{"ada":{"lovelace":28}},"stake_test17r5q8lsj03mgtxra0fuyefgw0h8nuzqusegvryd3cxhxkssz70lus":{"ada":{"lovelace":188452}},"stake_test1uqxl2957yslfz4un9pje0kkkep0t89cl4h5z3ar79wjhxwg453ekj":{"ada":{"lovelace":14}},"stake_test1uz8edzw342rjx6hka6hxmu6vtfvadtwf949fl2n5zp3r2hqjm8f05":{"ada":{"lovelace":28}},"stake_test1urzpjtxv0pk3kfmpaxjmj86ql7svlnerflx3hys5m0tx8jss0y355":{"ada":{"lovelace":5}},"stake_test1urk7t4jyjkhphm3kftsj2m8fle0gn09mk359hj7tqfyt8mqgvn6dr":{"ada":{"lovelace":66660}},"stake17ytcm53avla7hv3vy669eyzls6kqfn7g85550yd3ecj4nes977u34":{"ada":{"lovelace":17}},"stake17y3qczmrun67dcz307rpdr0xxsmgezlznx34d4hnysm7t4sewvert":{"ada":{"lovelace":398013}},"stake179f8ryavx6nsww7e8k2lffkzvnna7qp6sdmplfauer4d0hqa0dsmm":{"ada":{"lovelace":5}},"stake179awm9uxxd76zw7x8wwm4s8u9p3np38w5vj0q47f2cjw22sd2xggy":{"ada":{"lovelace":21}},"stake17874ffcp6fuvfkrglh2xanzlnxhl8ndprc35kva744pgdack6lmmk":{"ada":{"lovelace":21}},"stake1uymwcv60ej6rslq7mw77h3r503uwpd32veqvrez4gy3mxssqnpqtp":{"ada":{"lovelace":629145}},"stake1u9qawfcdhx8842aaqnv8qepc20ppcvv5fvnzmxud8xdjjjq7ku4h9":{"ada":{"lovelace":460131}},"stake1uxgxn7tv3vh2mqhk7gglshljp5rudzv6kuvzway2xsdtdfcr950qm":{"ada":{"lovelace":177903}},"stake1uxs0zkag8glquv828t8fkrxxcgwvpgvedfz4zk44sekh85gsxk8vj":{"ada":{"lovelace":504728}},"stake1u899ydnrfw679wzjpqar2w59z8355m6403kr8ggdrnzsnfgrpgvtz":{"ada":{"lovelace":17}},"stake1u8e56d04s02rp0p5ql5q5qtsk9gpegkakkxa6h0py7unapckdfuhy":{"ada":{"lovelace":11}},"stake1u86ytregg4aaplauqqx4qypfzxe8jw49d9pmree6gj4u75gxc5gax":{"ada":{"lovelace":27}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3166,"message":"The compound size of all reference scripts exceeeds the maximum size allowed by the protocol. Use fewer or smaller scripts to reduce the total size below acceptable limits. The field 'data.measuredReferenceScriptsSize indicates the actual total measured size of your reference scripts, whereas 'data.maximumReferenceScriptsSize indicates the current maximum size enforced by the ledger.","data":{"measuredReferenceScriptsSize":{"bytes":0},"maximumReferenceScriptsSize":{"bytes":19}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/088.json b/server/test/vectors/SubmitTransactionResponse/088.json
index b28282a82..2eb22db87 100644
--- a/server/test/vectors/SubmitTransactionResponse/088.json
+++ b/server/test/vectors/SubmitTransactionResponse/088.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test1uz227m3th28jgj3440wjvf9nzgyumyu7euh0f39gd2d5wkg0lfvwz":{"ada":{"lovelace":5}},"stake_test1urtfdmdeef4lfmm8w58n58lvxwmgstztgrj7kg0yfh0638c0uaz6y":{"ada":{"lovelace":349836}},"stake_test1urcxmd4ghjyyyehd2pue5kle2ecp3pqj2ysdwv4vdvm77ycrcpfe2":{"ada":{"lovelace":5}},"stake1u9l3vsynv0h03q2zyt37m5x3u5pxmttmd6s5rg0jy3zmvaseyugrq":{"ada":{"lovelace":23}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3175,"message":"Some account balances fall outside the intervals asserted by the transaction. An interval has an inclusive lower bound and an exclusive upper bound, or asserts an exact balance. The field 'data.checkedAgainst' tells which balances were checked: 'batchStart' for the balances at the start of the batch, or 'transaction' for the balances seen by the (sub-)transaction that asserts the interval. The field 'data.balancesOutsideIntervals' lists each account with its balance and the interval it doesn't satisfy.","data":{"checkedAgainst":"transaction","balancesOutsideIntervals":[{"account":"stake_test1uq9fmv7f3xardp8rlrslhng7nfdan0ge86ze38suzccjyqqyh33s2","balance":{"ada":{"lovelace":984074}},"interval":{"upperBound":{"ada":{"lovelace":4}}}},{"account":"stake_test1uqtyan5q46qf0dz9fggtuzerwexr379rvlh6nw85gwdrf2s52drvh","balance":{"ada":{"lovelace":545148}},"interval":{"exact":{"ada":{"lovelace":3}}}},{"account":"stake_test1uqt4ej3vyvjsga83e4rc76mpqhfytpe2tk2pdmn2sglq94s35lapa","balance":{"ada":{"lovelace":331796}},"interval":{"exact":{"ada":{"lovelace":6}}}},{"account":"stake1u9m2fpwuge33fvjm7a08c8hp2lwnf6t2rm77u2wd33pvhkque88kp","balance":{"ada":{"lovelace":11}},"interval":{"lowerBound":{"ada":{"lovelace":821427}}}},{"account":"stake1u8mj5d7y36tmwhxua2rcrfready2hfudcv0q52ksxx6zjxgkh4r3a","balance":{"ada":{"lovelace":148126}},"interval":{"exact":{"ada":{"lovelace":4}}}}]}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/089.json b/server/test/vectors/SubmitTransactionResponse/089.json
index 86f7bf6db..03da849eb 100644
--- a/server/test/vectors/SubmitTransactionResponse/089.json
+++ b/server/test/vectors/SubmitTransactionResponse/089.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17q9elglp34shv8lwhn54t8k4sndx4fg7zdu7znh3kwph3sc299he5":{"ada":{"lovelace":25}},"stake_test17qxzspaan7zz8ws6cltrnvdngye9d5kvq9kkyx8zj755fssmqchfk":{"ada":{"lovelace":84377}},"stake_test17zrwumzrzy4mcnf7d76je72pjc5yzre6lc9uyyd6s8434yq7w8ref":{"ada":{"lovelace":15}},"stake_test1uq8lcy44d4wrxlefpkhsqrdcqr8skswlj5hcpkw90r6wr6cv28pzt":{"ada":{"lovelace":959618}},"stake_test1upd8apgc3zj504f9f49cfg8dc5fx34gqc2gmhpxnru39jmcls7f03":{"ada":{"lovelace":5}},"stake_test1up7vwj36n99aewp9u5lym6hdedyt4lvjct9t4hpn9v9yfpc4crtsq":{"ada":{"lovelace":721904}},"stake_test1urdy56qusdl926xxjz2uyupwq0lfjp8gxgpxvrw3d5v6exsxstvqc":{"ada":{"lovelace":22}},"stake1790dp0lq88tj6j5cmwrpggga238f5swmzdjmwjyxxdp38ycvnwqsp":{"ada":{"lovelace":9}},"stake179lwmwrwxfua79nj5hz6xw4fegjw4uwc49ffvu8qj2caa5g0dq6p5":{"ada":{"lovelace":833402}},"stake17xtezzeef0z40rk4skmf0ym60k8yccsk85nfwwfagjrft0sn0vmst":{"ada":{"lovelace":374932}},"stake178xtjaj5sqfxq6kp52x4clqz982pqr2tqkdqxw2me2w37ds5yg2lz":{"ada":{"lovelace":25}},"stake1788x6hky4fpl9q70ry5xk89fzeszpwytxks5zmfl9l5p9pc6fcwfd":{"ada":{"lovelace":485316}},"stake1uy00s37g7hj3m4nzqej4fmvecchndh4x4nf50slcqqc9r8sl5r7vt":{"ada":{"lovelace":6}},"stake1uy5xemrtga8kyr5u53s99s86smpg6lyenxfdx98g9h489ac45lzqd":{"ada":{"lovelace":30}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17q9elglp34shv8lwhn54t8k4sndx4fg7zdu7znh3kwph3sc299he5":{"ada":{"lovelace":25}},"stake_test17qxzspaan7zz8ws6cltrnvdngye9d5kvq9kkyx8zj755fssmqchfk":{"ada":{"lovelace":84377}},"stake_test17zrwumzrzy4mcnf7d76je72pjc5yzre6lc9uyyd6s8434yq7w8ref":{"ada":{"lovelace":15}},"stake_test1uq8lcy44d4wrxlefpkhsqrdcqr8skswlj5hcpkw90r6wr6cv28pzt":{"ada":{"lovelace":959618}},"stake_test1upd8apgc3zj504f9f49cfg8dc5fx34gqc2gmhpxnru39jmcls7f03":{"ada":{"lovelace":5}},"stake_test1up7vwj36n99aewp9u5lym6hdedyt4lvjct9t4hpn9v9yfpc4crtsq":{"ada":{"lovelace":721904}},"stake_test1urdy56qusdl926xxjz2uyupwq0lfjp8gxgpxvrw3d5v6exsxstvqc":{"ada":{"lovelace":22}},"stake1790dp0lq88tj6j5cmwrpggga238f5swmzdjmwjyxxdp38ycvnwqsp":{"ada":{"lovelace":9}},"stake179lwmwrwxfua79nj5hz6xw4fegjw4uwc49ffvu8qj2caa5g0dq6p5":{"ada":{"lovelace":833402}},"stake17xtezzeef0z40rk4skmf0ym60k8yccsk85nfwwfagjrft0sn0vmst":{"ada":{"lovelace":374932}},"stake178xtjaj5sqfxq6kp52x4clqz982pqr2tqkdqxw2me2w37ds5yg2lz":{"ada":{"lovelace":25}},"stake1788x6hky4fpl9q70ry5xk89fzeszpwytxks5zmfl9l5p9pc6fcwfd":{"ada":{"lovelace":485316}},"stake1uy00s37g7hj3m4nzqej4fmvecchndh4x4nf50slcqqc9r8sl5r7vt":{"ada":{"lovelace":6}},"stake1uy5xemrtga8kyr5u53s99s86smpg6lyenxfdx98g9h489ac45lzqd":{"ada":{"lovelace":30}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/093.json b/server/test/vectors/SubmitTransactionResponse/093.json
index b03cc1fa1..1cf5099bc 100644
--- a/server/test/vectors/SubmitTransactionResponse/093.json
+++ b/server/test/vectors/SubmitTransactionResponse/093.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17p0kymyhmxstmrxsh3nen4s5u06fr4mvhaxwca3w8txws5s69t9fj":{"ada":{"lovelace":23}},"stake_test17psd3rzgtphjfrumysq9gfdgfp3g26cpfcvwf5crq90kfgct3f7v7":{"ada":{"lovelace":15}},"stake_test17pay007yv5n7wtv25faflsphe7c093hw97snctycd0llnygkgr5j2":{"ada":{"lovelace":874557}},"stake_test17zk8w7kd3gtm4salckm52vgw5n8xx2m94hqprx3cxnvlh8css05x0":{"ada":{"lovelace":19}},"stake_test17r8s66ens7huflt997vhlwz0u86jh9nytgc5d58y7vkml9qj0njpa":{"ada":{"lovelace":588715}},"stake_test1uqy7k7y9xykt0qa4rflkankunm4v4eg0w0kny595ktfm44ggy0ar7":{"ada":{"lovelace":26}},"stake_test1uph46lwsjnnvhcxrp7frsm8vpc5j3mu388sxvusepssw00sk67ne6":{"ada":{"lovelace":17}},"stake_test1uz9fd4md5czvgetznu9q6nhjtxrkwzw8axcyuaudcvjqfpcpfzqc2":{"ada":{"lovelace":20}},"stake_test1uzerrysvd7rf0ep0ta8g5aacmc9krl7xexvkkt9nf72hqcg04rswu":{"ada":{"lovelace":30}},"stake_test1ure87meh8zlg2jfxhtluk72gkdc4p4ulpws35lt4mjvnsdsaa4c8y":{"ada":{"lovelace":876599}},"stake1uyp26xzznffrj73x8qn6h94cznle62xf8zt4sjjnt67dzrsan2zxn":{"ada":{"lovelace":854169}},"stake1u920d395q237p05rm8td3f95g48skju2ejq4s4re0egmz0skkpycd":{"ada":{"lovelace":267006}},"stake1u9n07c6zsnc2002wxj3xgrkwzhx98rhapc560tr0nsvpfasmut6sv":{"ada":{"lovelace":3}},"stake1uxskhfnnx9esmsp0j54l5n5d4jtel0m4c5vuan33sa5d7acg6qq7w":{"ada":{"lovelace":99171}},"stake1uxnht6eerp0hafrwe99grlqj0kymt5vrym7xamq3rphl3dgl6066p":{"ada":{"lovelace":28}},"stake1uxlpnly089kd9k2sphkl2c5z5088n4dph45em969tep5mtsj03hqm":{"ada":{"lovelace":776298}},"stake1u86sqtw3ptz3x83z55my885tmjdsk4usam6qpntr5ypk25c4p64wr":{"ada":{"lovelace":460901}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17p0kymyhmxstmrxsh3nen4s5u06fr4mvhaxwca3w8txws5s69t9fj":{"ada":{"lovelace":23}},"stake_test17psd3rzgtphjfrumysq9gfdgfp3g26cpfcvwf5crq90kfgct3f7v7":{"ada":{"lovelace":15}},"stake_test17pay007yv5n7wtv25faflsphe7c093hw97snctycd0llnygkgr5j2":{"ada":{"lovelace":874557}},"stake_test17zk8w7kd3gtm4salckm52vgw5n8xx2m94hqprx3cxnvlh8css05x0":{"ada":{"lovelace":19}},"stake_test17r8s66ens7huflt997vhlwz0u86jh9nytgc5d58y7vkml9qj0njpa":{"ada":{"lovelace":588715}},"stake_test1uqy7k7y9xykt0qa4rflkankunm4v4eg0w0kny595ktfm44ggy0ar7":{"ada":{"lovelace":26}},"stake_test1uph46lwsjnnvhcxrp7frsm8vpc5j3mu388sxvusepssw00sk67ne6":{"ada":{"lovelace":17}},"stake_test1uz9fd4md5czvgetznu9q6nhjtxrkwzw8axcyuaudcvjqfpcpfzqc2":{"ada":{"lovelace":20}},"stake_test1uzerrysvd7rf0ep0ta8g5aacmc9krl7xexvkkt9nf72hqcg04rswu":{"ada":{"lovelace":30}},"stake_test1ure87meh8zlg2jfxhtluk72gkdc4p4ulpws35lt4mjvnsdsaa4c8y":{"ada":{"lovelace":876599}},"stake1uyp26xzznffrj73x8qn6h94cznle62xf8zt4sjjnt67dzrsan2zxn":{"ada":{"lovelace":854169}},"stake1u920d395q237p05rm8td3f95g48skju2ejq4s4re0egmz0skkpycd":{"ada":{"lovelace":267006}},"stake1u9n07c6zsnc2002wxj3xgrkwzhx98rhapc560tr0nsvpfasmut6sv":{"ada":{"lovelace":3}},"stake1uxskhfnnx9esmsp0j54l5n5d4jtel0m4c5vuan33sa5d7acg6qq7w":{"ada":{"lovelace":99171}},"stake1uxnht6eerp0hafrwe99grlqj0kymt5vrym7xamq3rphl3dgl6066p":{"ada":{"lovelace":28}},"stake1uxlpnly089kd9k2sphkl2c5z5088n4dph45em969tep5mtsj03hqm":{"ada":{"lovelace":776298}},"stake1u86sqtw3ptz3x83z55my885tmjdsk4usam6qpntr5ypk25c4p64wr":{"ada":{"lovelace":460901}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/094.json b/server/test/vectors/SubmitTransactionResponse/094.json
index 30cb42f8e..1ebffb892 100644
--- a/server/test/vectors/SubmitTransactionResponse/094.json
+++ b/server/test/vectors/SubmitTransactionResponse/094.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qu9jrlm53vmgds8fvnesn7caue58k32htm6yezary9qy0saxew9p":{"ada":{"lovelace":520507}},"stake_test17qa2rm05tufpufmatkjxcfccnnk6kt9n3sa0ax4umyhdvqs666rnc":{"ada":{"lovelace":14}},"stake_test17ps8wupffs096zunvsdw494qfngejhsry2uu3znzenztdcskdprv8":{"ada":{"lovelace":5}},"stake_test17pmre40y8pkgznpy0mfm3wmsxcua98qqmdrew2yckv5d65c6d0vwu":{"ada":{"lovelace":737636}},"stake_test17pasnnng29l7urwl7tsfncledr64plsagvln6dxuhafvaxqa7sp40":{"ada":{"lovelace":6}},"stake_test17zgcjwpdjmfv7und6j0rk0puhpxghl7v6n9z664h8kmctsq9q0l24":{"ada":{"lovelace":3}},"stake_test17r8hccujlucp4lvqth7zz9sthnwv09tms259dwmp8ajz94qzr6y8q":{"ada":{"lovelace":10}},"stake_test17rdem0z6s8pdhzjsyt0x0ckw887v004ckd2efhgem2s3f0spqwjxf":{"ada":{"lovelace":17}},"stake_test1uqy4f74uyywadvleq2rd8jekyvc7w22kcy3tj4r63vnmsdqgt0syq":{"ada":{"lovelace":64927}},"stake_test1upd2evty3jf34x78dn6ekd2g2hltrm8psqxmgkwhs7skm9c2nq6s6":{"ada":{"lovelace":30}},"stake_test1up4njpsaat4c2c0jg3prjwucpwetpavm8wjpndug4487mtgacrkt5":{"ada":{"lovelace":767251}},"stake_test1upmfwyahlr66scmwnm06y2avm8chkwle3rdsjzsppdtvn9gxsu3fj":{"ada":{"lovelace":12}},"stake_test1uzv335g9dcmty8h8x88v2dv533xzykhqtqpyw944ysc2f3q9uaq76":{"ada":{"lovelace":27}},"stake_test1ur9s0mpzq8shylk8uez4zmvxemkudht4fz2l6myg4qm64gcduvlem":{"ada":{"lovelace":5}},"stake_test1urc0fsvsmt086jnczt0p3j8ylmmwxujazjwgqyhd2qds7wgnxufxx":{"ada":{"lovelace":29}},"stake_test1ur683rxruck3u4uzfqpv6qu2g88xyklvl0cfxe3730uh28cnv7jx5":{"ada":{"lovelace":14}},"stake1798paezr0u3pzcwsx50225h8zh3rp9suxxy2ydrvzrdz4zszmkn4k":{"ada":{"lovelace":19}},"stake179am8mtv3hjye0qg0e9l8rl4nqfengqh44e35hv7ux3cwds8yhwja":{"ada":{"lovelace":973244}},"stake17xs5zerkeggcwwdh9xfmfz622k6ppseqt4u0m9vry092dtct9pur6":{"ada":{"lovelace":28}},"stake178yr5g7jutqw96v3dpc902dla6rge2wl9hxtta3mh3j5r6csshewt":{"ada":{"lovelace":553712}},"stake178m8jkujesy9c2mtu8p9t2dmua34suxav08gwx26vte23rg0vavh0":{"ada":{"lovelace":20}},"stake1uyuy5ysv5kcvg4h5zz0qjrq8ay2cwdxgftvft6chttgkthcr0nz3e":{"ada":{"lovelace":6}},"stake1u989869t7w34ny2f49a589tva2fm3wrlckrv57q8v8rrf3cgdj69p":{"ada":{"lovelace":993098}},"stake1u9wgp9wemw68f3xw54r0rrzhxq0fl29uxlaf93ppvsxkqcgmxjm2z":{"ada":{"lovelace":9}},"stake1u97p3z9mex587pfwjaekpvg4458e8p2rk2c6ce2fazzwz8qylu8y0":{"ada":{"lovelace":683702}},"stake1ux978w5qygpa43s5g54v0t7hj7pspfen7ux4esp565sw6kqyejthy":{"ada":{"lovelace":18}},"stake1u8yw2dangmt8z5x3tpyv3glsc06ph3af293052n8tvefr0s9xejzv":{"ada":{"lovelace":12}}}}},"id":"7gwPoYp5I0uM"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17qu9jrlm53vmgds8fvnesn7caue58k32htm6yezary9qy0saxew9p":{"ada":{"lovelace":520507}},"stake_test17qa2rm05tufpufmatkjxcfccnnk6kt9n3sa0ax4umyhdvqs666rnc":{"ada":{"lovelace":14}},"stake_test17ps8wupffs096zunvsdw494qfngejhsry2uu3znzenztdcskdprv8":{"ada":{"lovelace":5}},"stake_test17pmre40y8pkgznpy0mfm3wmsxcua98qqmdrew2yckv5d65c6d0vwu":{"ada":{"lovelace":737636}},"stake_test17pasnnng29l7urwl7tsfncledr64plsagvln6dxuhafvaxqa7sp40":{"ada":{"lovelace":6}},"stake_test17zgcjwpdjmfv7und6j0rk0puhpxghl7v6n9z664h8kmctsq9q0l24":{"ada":{"lovelace":3}},"stake_test17r8hccujlucp4lvqth7zz9sthnwv09tms259dwmp8ajz94qzr6y8q":{"ada":{"lovelace":10}},"stake_test17rdem0z6s8pdhzjsyt0x0ckw887v004ckd2efhgem2s3f0spqwjxf":{"ada":{"lovelace":17}},"stake_test1uqy4f74uyywadvleq2rd8jekyvc7w22kcy3tj4r63vnmsdqgt0syq":{"ada":{"lovelace":64927}},"stake_test1upd2evty3jf34x78dn6ekd2g2hltrm8psqxmgkwhs7skm9c2nq6s6":{"ada":{"lovelace":30}},"stake_test1up4njpsaat4c2c0jg3prjwucpwetpavm8wjpndug4487mtgacrkt5":{"ada":{"lovelace":767251}},"stake_test1upmfwyahlr66scmwnm06y2avm8chkwle3rdsjzsppdtvn9gxsu3fj":{"ada":{"lovelace":12}},"stake_test1uzv335g9dcmty8h8x88v2dv533xzykhqtqpyw944ysc2f3q9uaq76":{"ada":{"lovelace":27}},"stake_test1ur9s0mpzq8shylk8uez4zmvxemkudht4fz2l6myg4qm64gcduvlem":{"ada":{"lovelace":5}},"stake_test1urc0fsvsmt086jnczt0p3j8ylmmwxujazjwgqyhd2qds7wgnxufxx":{"ada":{"lovelace":29}},"stake_test1ur683rxruck3u4uzfqpv6qu2g88xyklvl0cfxe3730uh28cnv7jx5":{"ada":{"lovelace":14}},"stake1798paezr0u3pzcwsx50225h8zh3rp9suxxy2ydrvzrdz4zszmkn4k":{"ada":{"lovelace":19}},"stake179am8mtv3hjye0qg0e9l8rl4nqfengqh44e35hv7ux3cwds8yhwja":{"ada":{"lovelace":973244}},"stake17xs5zerkeggcwwdh9xfmfz622k6ppseqt4u0m9vry092dtct9pur6":{"ada":{"lovelace":28}},"stake178yr5g7jutqw96v3dpc902dla6rge2wl9hxtta3mh3j5r6csshewt":{"ada":{"lovelace":553712}},"stake178m8jkujesy9c2mtu8p9t2dmua34suxav08gwx26vte23rg0vavh0":{"ada":{"lovelace":20}},"stake1uyuy5ysv5kcvg4h5zz0qjrq8ay2cwdxgftvft6chttgkthcr0nz3e":{"ada":{"lovelace":6}},"stake1u989869t7w34ny2f49a589tva2fm3wrlckrv57q8v8rrf3cgdj69p":{"ada":{"lovelace":993098}},"stake1u9wgp9wemw68f3xw54r0rrzhxq0fl29uxlaf93ppvsxkqcgmxjm2z":{"ada":{"lovelace":9}},"stake1u97p3z9mex587pfwjaekpvg4458e8p2rk2c6ce2fazzwz8qylu8y0":{"ada":{"lovelace":683702}},"stake1ux978w5qygpa43s5g54v0t7hj7pspfen7ux4esp565sw6kqyejthy":{"ada":{"lovelace":18}},"stake1u8yw2dangmt8z5x3tpyv3glsc06ph3af293052n8tvefr0s9xejzv":{"ada":{"lovelace":12}}}}},"id":"7gwPoYp5I0uM"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/095.json b/server/test/vectors/SubmitTransactionResponse/095.json
index e9d637f64..be934c662 100644
--- a/server/test/vectors/SubmitTransactionResponse/095.json
+++ b/server/test/vectors/SubmitTransactionResponse/095.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3153,"message":"The transaction references an unknown delegate representative. To delegate to a representative, it must first register as such. This may be done in the same transaction or in an earlier transaction but cannot happen retro-actively. The field 'data.unknownDelegateRepresentative' indicates what credential is used without being registered.","data":{"unknownDelegateRepresentative":{"type":"registered","from":"verificationKey","id":"a6f368ca314d4c3c98ff330722a80bb47a0c618386b4d026fcd0b762"}}},"id":"XUjuj6gt1B66"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3144,"message":"Some hash digest of (optional) stake pool metadata is too long. When registering, stake pools can supply an external metadata file and a hash digest of the content. The hashing algorithm is left open but the output digest must be smaller than 32 bytes. The field 'data.infringingStakePool' indicates which stake pool has an invalid metadata hash and 'data.computedMetadataHashSize' documents the computed hash size.","data":{"infringingStakePool":{"id":"pool1z8jw8glaggfuc9l0fpu9nn0lxjtl84ah3w0f9tydrf8mz5ufu6y"},"computedMetadataHashSize":{"bytes":6}}},"id":"XUjuj6gt1B66"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/096.json b/server/test/vectors/SubmitTransactionResponse/096.json
index 1a23e5574..c9b8db9b0 100644
--- a/server/test/vectors/SubmitTransactionResponse/096.json
+++ b/server/test/vectors/SubmitTransactionResponse/096.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qgcttgnfzcegrtzueu2dc2hm5m3zdpv0h6mw86ts0qa0qcqk8cnk":{"ada":{"lovelace":412304}},"stake_test17pz74pkkpaln34ehk6cxdultpjtqnxn6psktw9rmhnfyv2crwzlml":{"ada":{"lovelace":830291}},"stake_test17pcsycqgn75frjahp48dwq38dw7s00cavtz6jsfu5kwrcugckdwas":{"ada":{"lovelace":486004}},"stake_test17z3sue9uj03pd26fey7dt463j7hsr6p65z8kjezpkn5unnqd8hpx2":{"ada":{"lovelace":525340}},"stake_test17rxswlc98nrvxm5uzy9fph23m8t83uxhy5ns7zsh04u992cajnkzf":{"ada":{"lovelace":18}},"stake_test1uq4c4ugglnf708rz9x6nph9ahl5l2hp52lvcnw7s23wqmsgpqacj4":{"ada":{"lovelace":228218}},"stake17y9d48gpgyts2cp4876ckzkprgawhsrm5y6m53yufyl9sdgzyt37r":{"ada":{"lovelace":11}},"stake17y83jakp400h2q6feuu6av4hfh4rpet9ztps3cecltw2y0s33v8f2":{"ada":{"lovelace":12}},"stake17yw7esya3et5hm7he0gtaxtfrk7ltggwzadg3pc0deyz64ql8t97g":{"ada":{"lovelace":5}},"stake17yahnpjt9ztphl63syafdn35ul4jk6st5s6xwnupdvk7s9gppec3h":{"ada":{"lovelace":381111}},"stake179pulhp8ry3lh0qc0pg98wluem8ll4qs38543zacmjhxxyqm0gcgf":{"ada":{"lovelace":22}},"stake17x8eztacngvym2a5c9pcmyf8937fgyuydg5t0cwdfqs95sqshh9nn":{"ada":{"lovelace":948836}},"stake17xa96az2w8hwgvmc06nyq2m6rsaa8evljxy4dha9pzwflyc57u33y":{"ada":{"lovelace":10}},"stake178w2qmz406ul2u055fd75at0j5djyq4ey5yya48ly8uxdesuerujt":{"ada":{"lovelace":4}},"stake178mlpxp86e6xmg3hum29ujqd0t7vdeyulgmc8xsjkrt6r9q5zy5u5":{"ada":{"lovelace":419163}},"stake1u9vwfyxa9zn6j9vw3uh5vy4fxyxw59ahxm9xdt3gkz3cn2qq87v3v":{"ada":{"lovelace":10}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3154,"message":"The transaction references an unknown constitutional committee member. This can be either because that member does not actually exist or because it was registered but has resigned. The field 'data.unknownConstitutionalCommitteeMember' indicates what credential is unknown.","data":{"unknownConstitutionalCommitteeMember":{"from":"verificationKey","id":"b6267937340103fc8782fcde44c4294f900f02ef22be506cf5f82ba1"}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/097.json b/server/test/vectors/SubmitTransactionResponse/097.json
index 6644e143d..4e62d4d8c 100644
--- a/server/test/vectors/SubmitTransactionResponse/097.json
+++ b/server/test/vectors/SubmitTransactionResponse/097.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qxweqwkv9ug258lfugrvn0zakt620nf9uerskuag9h8x2scapycw":{"ada":{"lovelace":629775}},"stake_test17pmn3vny6j6kza8l592a6mp2djawffcx80g8y6lrva8ypeced94ef":{"ada":{"lovelace":7}},"stake_test17zjjqg37f28akqrgp6aqjefaxnepz5864e43khkq9w6ztmgnp8aur":{"ada":{"lovelace":12}},"stake_test17zjhx8f9vddxd23rhunlmpqp0rc8y6wpysleancp3eskregcv35e5":{"ada":{"lovelace":152464}},"stake_test17zcdzdjt56uxca5ff9ryldtxn4uchtr27phksmsgfw6pqrqw066zg":{"ada":{"lovelace":22}},"stake_test17rgexr3agykp29qv9ygwckycpe6qve2vhtdlkmn0ugslqkcnv5dd0":{"ada":{"lovelace":10}},"stake_test17rnqwx6xwdwuddhrlq3367tp3nwsl92q8l9kg0n4k63lyngfpfqhg":{"ada":{"lovelace":21}},"stake_test1uqqx448qg9k25yt0fc926r3pkutyq0wfjecu33khrr8jpdswh705a":{"ada":{"lovelace":10}},"stake_test1uq5wakttvjvqn9y7q8qd3hqd6h67wjxnnjkpe045crgssxcjl5ngr":{"ada":{"lovelace":108103}},"stake_test1upvjz9n7la2965rps9w9k9sjq8wnclfez7nkv6flxu9uals9xuzxg":{"ada":{"lovelace":722481}},"stake_test1upwcszn3ccmsuy4m5h472qqw85a3q8jwess5xd2hvv03sxgu55tfk":{"ada":{"lovelace":5}},"stake_test1upa2drs9sp3n606xt8km8nh4q2hze7rz9gecs7lyzqsh79gqpcufp":{"ada":{"lovelace":538533}},"stake_test1uzlu73p5yc3s4zxglq9sj9vhk7n2n8y96nd8c9ksyvar9qc6rtua3":{"ada":{"lovelace":607683}},"stake_test1urxzn72eveumklnsjytd0vt9j6ywfyugt0x80fafwn2talg9654cs":{"ada":{"lovelace":609745}},"stake_test1ur0gw30xjt5tu6elgptws66s9clv56f34flm49w9f4whntgap8stn":{"ada":{"lovelace":850816}},"stake17yqe275q7w0fkjw964fqnv8p7wmnucv3x9my3754f330d5ghet5ty":{"ada":{"lovelace":113209}},"stake179pmklk2aew73twmlvr57ypxcma6dyute6yy5ucagp56npc35yhs8":{"ada":{"lovelace":16}},"stake17xz5v628muc2ds469fdtrdy7l67vkcy90qz6y7d8tf3nhlsvs00wf":{"ada":{"lovelace":24}},"stake17xxfdy7p8pp8xd9vus8l0yxrhrt45gqvvmyvkmwtcq309scdq3flf":{"ada":{"lovelace":244303}},"stake17xgr9lu7t5z4zy00fz8ellkepgul4v04us27m6kdwpxcn0cvt8j27":{"ada":{"lovelace":337691}},"stake1788hpcz7xc6nn927grk0shyskvxr7uc2st9z9l03yeq67ucwx2zq7":{"ada":{"lovelace":996570}},"stake17800amafmaqr0l7xastjlydkshnf4kp7l4jljqp0q2496kqxuxuck":{"ada":{"lovelace":16959}},"stake178lwnzxam985qvpyu8pr5wzaehf9t0vgw78kqtcueflkwychp4ygt":{"ada":{"lovelace":8}},"stake1uywveav83zc6pjcts5yx7ner6awylzrcxmfh69zw3emkktg2nnfum":{"ada":{"lovelace":12}},"stake1u98jxg6vup5ggmeaz267g49tds2867pqpd5xkyl5zyccntqqzthhs":{"ada":{"lovelace":28}},"stake1uxq7hr6yt7ker7pczp9zdz2em72gtuyjq6erf4xvkpvj5kqsnpl20":{"ada":{"lovelace":118525}},"stake1uxyyh2vk6q5qsg0nwjvrte3glkccqkjdgvm485308s9yfrc5d0uwh":{"ada":{"lovelace":25}},"stake1uxvl9mnwx0nyduyaa60vjrhs69n7j6ama62mfeupgxkk5wctt9ghv":{"ada":{"lovelace":11}},"stake1u82qv0kzytw6ajnfsdjf85g5ck5gqx95xke2f65xpuagsfcqmccre":{"ada":{"lovelace":155264}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17qxweqwkv9ug258lfugrvn0zakt620nf9uerskuag9h8x2scapycw":{"ada":{"lovelace":629775}},"stake_test17pmn3vny6j6kza8l592a6mp2djawffcx80g8y6lrva8ypeced94ef":{"ada":{"lovelace":7}},"stake_test17zjjqg37f28akqrgp6aqjefaxnepz5864e43khkq9w6ztmgnp8aur":{"ada":{"lovelace":12}},"stake_test17zjhx8f9vddxd23rhunlmpqp0rc8y6wpysleancp3eskregcv35e5":{"ada":{"lovelace":152464}},"stake_test17zcdzdjt56uxca5ff9ryldtxn4uchtr27phksmsgfw6pqrqw066zg":{"ada":{"lovelace":22}},"stake_test17rgexr3agykp29qv9ygwckycpe6qve2vhtdlkmn0ugslqkcnv5dd0":{"ada":{"lovelace":10}},"stake_test17rnqwx6xwdwuddhrlq3367tp3nwsl92q8l9kg0n4k63lyngfpfqhg":{"ada":{"lovelace":21}},"stake_test1uqqx448qg9k25yt0fc926r3pkutyq0wfjecu33khrr8jpdswh705a":{"ada":{"lovelace":10}},"stake_test1uq5wakttvjvqn9y7q8qd3hqd6h67wjxnnjkpe045crgssxcjl5ngr":{"ada":{"lovelace":108103}},"stake_test1upvjz9n7la2965rps9w9k9sjq8wnclfez7nkv6flxu9uals9xuzxg":{"ada":{"lovelace":722481}},"stake_test1upwcszn3ccmsuy4m5h472qqw85a3q8jwess5xd2hvv03sxgu55tfk":{"ada":{"lovelace":5}},"stake_test1upa2drs9sp3n606xt8km8nh4q2hze7rz9gecs7lyzqsh79gqpcufp":{"ada":{"lovelace":538533}},"stake_test1uzlu73p5yc3s4zxglq9sj9vhk7n2n8y96nd8c9ksyvar9qc6rtua3":{"ada":{"lovelace":607683}},"stake_test1urxzn72eveumklnsjytd0vt9j6ywfyugt0x80fafwn2talg9654cs":{"ada":{"lovelace":609745}},"stake_test1ur0gw30xjt5tu6elgptws66s9clv56f34flm49w9f4whntgap8stn":{"ada":{"lovelace":850816}},"stake17yqe275q7w0fkjw964fqnv8p7wmnucv3x9my3754f330d5ghet5ty":{"ada":{"lovelace":113209}},"stake179pmklk2aew73twmlvr57ypxcma6dyute6yy5ucagp56npc35yhs8":{"ada":{"lovelace":16}},"stake17xz5v628muc2ds469fdtrdy7l67vkcy90qz6y7d8tf3nhlsvs00wf":{"ada":{"lovelace":24}},"stake17xxfdy7p8pp8xd9vus8l0yxrhrt45gqvvmyvkmwtcq309scdq3flf":{"ada":{"lovelace":244303}},"stake17xgr9lu7t5z4zy00fz8ellkepgul4v04us27m6kdwpxcn0cvt8j27":{"ada":{"lovelace":337691}},"stake1788hpcz7xc6nn927grk0shyskvxr7uc2st9z9l03yeq67ucwx2zq7":{"ada":{"lovelace":996570}},"stake17800amafmaqr0l7xastjlydkshnf4kp7l4jljqp0q2496kqxuxuck":{"ada":{"lovelace":16959}},"stake178lwnzxam985qvpyu8pr5wzaehf9t0vgw78kqtcueflkwychp4ygt":{"ada":{"lovelace":8}},"stake1uywveav83zc6pjcts5yx7ner6awylzrcxmfh69zw3emkktg2nnfum":{"ada":{"lovelace":12}},"stake1u98jxg6vup5ggmeaz267g49tds2867pqpd5xkyl5zyccntqqzthhs":{"ada":{"lovelace":28}},"stake1uxq7hr6yt7ker7pczp9zdz2em72gtuyjq6erf4xvkpvj5kqsnpl20":{"ada":{"lovelace":118525}},"stake1uxyyh2vk6q5qsg0nwjvrte3glkccqkjdgvm485308s9yfrc5d0uwh":{"ada":{"lovelace":25}},"stake1uxvl9mnwx0nyduyaa60vjrhs69n7j6ama62mfeupgxkk5wctt9ghv":{"ada":{"lovelace":11}},"stake1u82qv0kzytw6ajnfsdjf85g5ck5gqx95xke2f65xpuagsfcqmccre":{"ada":{"lovelace":155264}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/100.json b/server/test/vectors/SubmitTransactionResponse/100.json
index f0d5a0f66..b5790b504 100644
--- a/server/test/vectors/SubmitTransactionResponse/100.json
+++ b/server/test/vectors/SubmitTransactionResponse/100.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3101,"message":"Some signatures are missing. A signed transaction must carry signatures for all inputs locked by verification keys or a native script. Transaction may also need signatures for each required extra signatories often required by Plutus Scripts. The field 'data.missingSignatories' contains the verification key hashes of expected but missing signatories.","data":{"missingSignatories":["0e5feff591a72a253de794f3ca6a6a52756b4e587872913311115f5c","232b906e43acd983bd67d7af7c58f24e5bbc6f90bea591f6f39a52e9","29bd5578166eef392c54248e6367acc520cd9118e3399f8321ab1f6b","2bd8e08d68f81a206253e379a08b1cfaa71bfee01f4d1d8fa7799dac","2c8bfa545471dcff072aec7414ce211278033e2d943c646502bec4fd","2d9ef53b155ffc3965d33b4f9dee74494f34c260bf32a0729a369b50","520dd1ccc68e6e13719464ad3534a67fef14df7552407379a4aa5dfb","787e02308cc54ae4c1415f7a417f0d432473745dde66b7c6f328f9df","866b3170c21d791a8aaceb3f91bda463633d207558fd22808538d761","8edf802d5ea3124d5d29d520b5948384c4df1555b1d1ec25fe92a06c","a56c9106c5f27aad08112ed8d65da8a1f1344c0203320ff0f48bf0dd","aa363bec9f3d86abeadf47f822c305f44dad923b1bd118e8ea95482f","c08db05bb257f42d5bcb8b83f5863ff3fb2ba416a77c065a458dc5ea","c321ba0b2c1ce22e2701a0cc057e7aac2ff4920678c44c2def5a9c83"]}},"id":"nTPdigs9Kkwk"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3173,"message":"All inputs of the transaction are already spent. This usually means that the transaction has already been included in the ledger, so there's no need to submit it again."},"id":"nTPdigs9Kkwk"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/101.json b/server/test/vectors/SubmitTransactionResponse/101.json
index fe3f707f5..25a114251 100644
--- a/server/test/vectors/SubmitTransactionResponse/101.json
+++ b/server/test/vectors/SubmitTransactionResponse/101.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17p9xxczsyyq65ekmzrqqa4lcakp02554gk9lnedqtmaad7cdfrxs9":{"ada":{"lovelace":26}},"stake_test17zpscr637r245gkgvyj4y3srjpg4g80dz9cnpw936s5g2rqcr5659":{"ada":{"lovelace":961299}},"stake_test17z909vl74g0rhsg4qc6vuvrj2r0aazu6nhte6w3gm79zumsr75ev9":{"ada":{"lovelace":866962}},"stake_test17zd9edkug8ekr52nkq3afsejh5wx50tpxu0x7lejmfg6guc9qkfu9":{"ada":{"lovelace":347766}},"stake_test17zm5e5ncdh0t9urud6md87agm3ejzxepp73we0szafkm90gd3uagu":{"ada":{"lovelace":946192}},"stake_test17rysmkpfde3dpsvltrnpvzh34jpdkqlqvg0dagpwdzjs03s5mn4gk":{"ada":{"lovelace":14}},"stake_test17rw0nvdw5vs9m4tjvhqgd4nx4kmyvrvuyn08fjmz7pn5flqjuy95z":{"ada":{"lovelace":493764}},"stake_test17rlg8w5lsvr4nhdy3h709s8lkmk656hy6uwjmq8hq96c75qr20tfv":{"ada":{"lovelace":1}},"stake_test1uqyza66t83453jawrfwhe7j9m29xhz837vu2lyrtu93l4dcx6rrat":{"ada":{"lovelace":10}},"stake_test1uqf6se52rmm5hdurzg5pkd0gs9z6nd292j690qh9rwc5ytgjpm5wv":{"ada":{"lovelace":11}},"stake_test1upqwk8wmchj9slyf26ta8a2xpre5jcyse23gaxwd928qs8st6ga7p":{"ada":{"lovelace":3}},"stake_test1uzjrwd5hev3udxs25ywkgqsezn5qhgyzhlda23nychgtacqca9f4w":{"ada":{"lovelace":376638}},"stake_test1uz6lyc027g2u0pxq4jk56cjgueaghnt2r3mjgcw06rd4zccmws9xv":{"ada":{"lovelace":29}},"stake_test1urlk7r8a4mk9wksl92892vnkpzngmnhyxqhx52lyh8s4f7c6uhmn7":{"ada":{"lovelace":27}},"stake17yce0y0xengt26mft6awh84qztw6m63qflua3p82cf6tk0cekyt3n":{"ada":{"lovelace":10}},"stake17ylcgw5ga2t3swddnl76hmmsvkru8qjcgzder2w3ljzj4qsjvcljv":{"ada":{"lovelace":29}},"stake179w7nugtgnun5jz4y0txyxdjm3eccqwtuas67lyfv5tfpdchw6nq4":{"ada":{"lovelace":848151}},"stake17x3q42d86qztvs5jttdg3tya5mkwlmgwref7xaym52sdwqgvcqpvh":{"ada":{"lovelace":9}},"stake17xjkeqhm3ff68rder4tshu0qdheukp8eyr6plwxjezdyprczln7h6":{"ada":{"lovelace":8}},"stake178q4q6s03mj2jrgnhzny3gv7nz0le7yhqp6gyz0fyce4ymgrkhxpm":{"ada":{"lovelace":16}},"stake1788vy8d7446xmft5fleye8nka5fncu8qmv6gqk80hc8vxsg6sd4vg":{"ada":{"lovelace":19}},"stake1780t0g4rw54nkc0hwfy76g5f4rzmh8jxqhvwmc9k7f4j6fga4fl72":{"ada":{"lovelace":0}},"stake1785rq8dsg34c7r32dl3e8p2n8dvsmh269apsff65c2n3ztsfeex0a":{"ada":{"lovelace":619000}},"stake1ux2yxl9krrvfkvdtndmws9y0d22n8et7sw5s862cen5nlqs63alrl":{"ada":{"lovelace":805382}},"stake1ux5fgnpj7vhdvg4zq5utnqq2hvc4zuuwagkwz7mzut7c7nqacaf9d":{"ada":{"lovelace":19}},"stake1uxkr09jmzd5alql2e834fwn6rw9ch7atx9vwhlnfspj9m3qx6mda7":{"ada":{"lovelace":13}},"stake1u8775pzzsvske2l7dcqrvq42cevjf83mhcqrlfz7jzju7rcf2mwxw":{"ada":{"lovelace":823217}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17p9xxczsyyq65ekmzrqqa4lcakp02554gk9lnedqtmaad7cdfrxs9":{"ada":{"lovelace":26}},"stake_test17zpscr637r245gkgvyj4y3srjpg4g80dz9cnpw936s5g2rqcr5659":{"ada":{"lovelace":961299}},"stake_test17z909vl74g0rhsg4qc6vuvrj2r0aazu6nhte6w3gm79zumsr75ev9":{"ada":{"lovelace":866962}},"stake_test17zd9edkug8ekr52nkq3afsejh5wx50tpxu0x7lejmfg6guc9qkfu9":{"ada":{"lovelace":347766}},"stake_test17zm5e5ncdh0t9urud6md87agm3ejzxepp73we0szafkm90gd3uagu":{"ada":{"lovelace":946192}},"stake_test17rysmkpfde3dpsvltrnpvzh34jpdkqlqvg0dagpwdzjs03s5mn4gk":{"ada":{"lovelace":14}},"stake_test17rw0nvdw5vs9m4tjvhqgd4nx4kmyvrvuyn08fjmz7pn5flqjuy95z":{"ada":{"lovelace":493764}},"stake_test17rlg8w5lsvr4nhdy3h709s8lkmk656hy6uwjmq8hq96c75qr20tfv":{"ada":{"lovelace":1}},"stake_test1uqyza66t83453jawrfwhe7j9m29xhz837vu2lyrtu93l4dcx6rrat":{"ada":{"lovelace":10}},"stake_test1uqf6se52rmm5hdurzg5pkd0gs9z6nd292j690qh9rwc5ytgjpm5wv":{"ada":{"lovelace":11}},"stake_test1upqwk8wmchj9slyf26ta8a2xpre5jcyse23gaxwd928qs8st6ga7p":{"ada":{"lovelace":3}},"stake_test1uzjrwd5hev3udxs25ywkgqsezn5qhgyzhlda23nychgtacqca9f4w":{"ada":{"lovelace":376638}},"stake_test1uz6lyc027g2u0pxq4jk56cjgueaghnt2r3mjgcw06rd4zccmws9xv":{"ada":{"lovelace":29}},"stake_test1urlk7r8a4mk9wksl92892vnkpzngmnhyxqhx52lyh8s4f7c6uhmn7":{"ada":{"lovelace":27}},"stake17yce0y0xengt26mft6awh84qztw6m63qflua3p82cf6tk0cekyt3n":{"ada":{"lovelace":10}},"stake17ylcgw5ga2t3swddnl76hmmsvkru8qjcgzder2w3ljzj4qsjvcljv":{"ada":{"lovelace":29}},"stake179w7nugtgnun5jz4y0txyxdjm3eccqwtuas67lyfv5tfpdchw6nq4":{"ada":{"lovelace":848151}},"stake17x3q42d86qztvs5jttdg3tya5mkwlmgwref7xaym52sdwqgvcqpvh":{"ada":{"lovelace":9}},"stake17xjkeqhm3ff68rder4tshu0qdheukp8eyr6plwxjezdyprczln7h6":{"ada":{"lovelace":8}},"stake178q4q6s03mj2jrgnhzny3gv7nz0le7yhqp6gyz0fyce4ymgrkhxpm":{"ada":{"lovelace":16}},"stake1788vy8d7446xmft5fleye8nka5fncu8qmv6gqk80hc8vxsg6sd4vg":{"ada":{"lovelace":19}},"stake1780t0g4rw54nkc0hwfy76g5f4rzmh8jxqhvwmc9k7f4j6fga4fl72":{"ada":{"lovelace":0}},"stake1785rq8dsg34c7r32dl3e8p2n8dvsmh269apsff65c2n3ztsfeex0a":{"ada":{"lovelace":619000}},"stake1ux2yxl9krrvfkvdtndmws9y0d22n8et7sw5s862cen5nlqs63alrl":{"ada":{"lovelace":805382}},"stake1ux5fgnpj7vhdvg4zq5utnqq2hvc4zuuwagkwz7mzut7c7nqacaf9d":{"ada":{"lovelace":19}},"stake1uxkr09jmzd5alql2e834fwn6rw9ch7atx9vwhlnfspj9m3qx6mda7":{"ada":{"lovelace":13}},"stake1u8775pzzsvske2l7dcqrvq42cevjf83mhcqrlfz7jzju7rcf2mwxw":{"ada":{"lovelace":823217}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/103.json b/server/test/vectors/SubmitTransactionResponse/103.json
index 384600f0a..9a7e53105 100644
--- a/server/test/vectors/SubmitTransactionResponse/103.json
+++ b/server/test/vectors/SubmitTransactionResponse/103.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qvssrrewxrw6srle7ykfvrq3rqe3zm0j3ps0m2qyjgc6vc2ecqq8":{"ada":{"lovelace":28}},"stake_test17qsc6t7kntkdcp2a4xy4wpepdz2l8azfgfhpd82s3chyvyqsnr88q":{"ada":{"lovelace":36216}},"stake_test17pfze5pdvgn63h93jjsz7l47542ffmfccna8hz8pxkng5cggf8paq":{"ada":{"lovelace":4}},"stake_test17zyhnprxx5k720phxmpcqt2thpss569vrmdnhk36kpjv7zqjk96r7":{"ada":{"lovelace":15}},"stake_test17zld0hzdvq7ecs47apk3qm4mr0332caa00mxajtrzay3lwswxdg9t":{"ada":{"lovelace":26}},"stake_test1upphqdgtnhl3maafc6exenlyzxc9qlqhy72a4jmsc6hyetsvwnftu":{"ada":{"lovelace":15}},"stake_test1urwr4m0wlwxxkcn7gnhlzutra8emkx6mxy8wrlvkh0vky6s4f03kk":{"ada":{"lovelace":4}},"stake_test1ur3p4x7wchplzgfc0h8sw0cvvmeapvudyfgcpjmrcvudncsuqt4ma":{"ada":{"lovelace":7}},"stake179zy65ywqrefc5certza35kyhnvet8q86049k9jefamh7zcgymq29":{"ada":{"lovelace":697365}},"stake1798kt0p9wn27xsdfs9qfzcdn6ky5ncv9uk8jf2ns6c72vrcssrcrp":{"ada":{"lovelace":20}},"stake178y6vhdpasc0fxwyapu42l86ttukx8l7mxhjngkh3nnjqmcchf3c7":{"ada":{"lovelace":550868}},"stake178098h9wut99qtncryjhjumdlmqzgdgqg2uyzxjz9wmqkcghs8el0":{"ada":{"lovelace":968178}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3175,"message":"Some account balances fall outside the intervals asserted by the transaction. An interval has an inclusive lower bound and an exclusive upper bound, or asserts an exact balance. The field 'data.checkedAgainst' tells which balances were checked: 'batchStart' for the balances at the start of the batch, or 'transaction' for the balances seen by the (sub-)transaction that asserts the interval. The field 'data.balancesOutsideIntervals' lists each account with its balance and the interval it doesn't satisfy.","data":{"checkedAgainst":"batchStart","balancesOutsideIntervals":[{"account":"stake_test17qmqw2p746gle89slqjcgu5gmjxewfnw44dmjp0gxlhsj4cg4wjlt","balance":{"ada":{"lovelace":4}},"interval":{"lowerBound":{"ada":{"lovelace":146650}}}},{"account":"stake_test1uqwe579degazg2v6wdsskmw64swnh4ue09ct3c3yugp48ucpnawm7","balance":{"ada":{"lovelace":693345}},"interval":{"lowerBound":{"ada":{"lovelace":3}}}},{"account":"stake_test1uz7l7l9wlhcfffsk0m39vzzqdhruv267zlkw3ck2p6k2nlg4fpnjm","balance":{"ada":{"lovelace":5}},"interval":{"lowerBound":{"ada":{"lovelace":207006}},"upperBound":{"ada":{"lovelace":393364}}}},{"account":"stake1uxx5rw4hehm87llpgkrg580hjwdfg2hpg9ed2prfq6zfwasm998hx","balance":{"ada":{"lovelace":6}},"interval":{"upperBound":{"ada":{"lovelace":572292}}}}]}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/104.json b/server/test/vectors/SubmitTransactionResponse/104.json
index bdcc42d77..bda3ae4a1 100644
--- a/server/test/vectors/SubmitTransactionResponse/104.json
+++ b/server/test/vectors/SubmitTransactionResponse/104.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17pguak6v66n6ud8gy6tqchk6ur76p70hz0y2g2c5gytzxdqu6lpnm":{"ada":{"lovelace":561461}},"stake_test17zsnz8jzx9gn9raevczgzw8gdjk0szfxvsn4rf6lzcdc2kcfadppk":{"ada":{"lovelace":9}},"stake_test17r96np8jwwzkdvehwhalnlswrf3zgxn2ygp4770slpq7mncz0wjqd":{"ada":{"lovelace":308685}},"stake_test1uq853exwrdqmd0pgek4su5npzgfdcp2ygdnvse7ufq504qguukd02":{"ada":{"lovelace":59765}},"stake_test1uqsmrv8vzywrsu32dhu0g3n40du0gp8frc6qjyf9vd3grlcd3srew":{"ada":{"lovelace":11}},"stake_test1uqcj8jtz5jpl2k3nl8tm5t2xm8neu57wz467wh8xrn4a9xs5hff47":{"ada":{"lovelace":306500}},"stake_test1uzdytf0fuzrn2ytlf3kglnrcakg2szxx0znap0dtdlx3m5cfplhlj":{"ada":{"lovelace":714160}},"stake_test1uzd5ur8cznfsqdfy7qvp80as2j4epcypkhdlemq8v9th73gateeq0":{"ada":{"lovelace":9}},"stake_test1uze4c4q0cx6n4tuyd0923vnx60p5sk86fqlc8hv7tw2l58gcwc2pv":{"ada":{"lovelace":22}},"stake_test1ur0kclh0kkelsvs4z45a8uhapugsy3t58u3720f8ysqeuac93dapw":{"ada":{"lovelace":24}},"stake17y083mupk5qedu456ww6szkphruu8a0c34arqngd4hv450s4j6f6h":{"ada":{"lovelace":906524}},"stake1794y2yuq5n584jnnam0g9h46lz30hjkfehf53qqyr0v20qgyrytrr":{"ada":{"lovelace":603180}},"stake178aajvz0kcjgpz0zlnwdj9y73376ufzh4wzzywl0z7t820scrpn3v":{"ada":{"lovelace":1}},"stake1uy45zry2rrh6jcnztrxp8rwu2grma7zf883gkd6pc65nkgs2rsmwk":{"ada":{"lovelace":22}},"stake1u9q8nka4fcvh8t38vf6ntuucx2ax7edhslw9fy03ulle5ackwwz3f":{"ada":{"lovelace":10}},"stake1u8tv08nzaquvu4ulx5eza2945q5ugp98cx95q0ychejvvfg23hc5c":{"ada":{"lovelace":813065}}}}},"id":"W69vAk85v4SJ"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17pguak6v66n6ud8gy6tqchk6ur76p70hz0y2g2c5gytzxdqu6lpnm":{"ada":{"lovelace":561461}},"stake_test17zsnz8jzx9gn9raevczgzw8gdjk0szfxvsn4rf6lzcdc2kcfadppk":{"ada":{"lovelace":9}},"stake_test17r96np8jwwzkdvehwhalnlswrf3zgxn2ygp4770slpq7mncz0wjqd":{"ada":{"lovelace":308685}},"stake_test1uq853exwrdqmd0pgek4su5npzgfdcp2ygdnvse7ufq504qguukd02":{"ada":{"lovelace":59765}},"stake_test1uqsmrv8vzywrsu32dhu0g3n40du0gp8frc6qjyf9vd3grlcd3srew":{"ada":{"lovelace":11}},"stake_test1uqcj8jtz5jpl2k3nl8tm5t2xm8neu57wz467wh8xrn4a9xs5hff47":{"ada":{"lovelace":306500}},"stake_test1uzdytf0fuzrn2ytlf3kglnrcakg2szxx0znap0dtdlx3m5cfplhlj":{"ada":{"lovelace":714160}},"stake_test1uzd5ur8cznfsqdfy7qvp80as2j4epcypkhdlemq8v9th73gateeq0":{"ada":{"lovelace":9}},"stake_test1uze4c4q0cx6n4tuyd0923vnx60p5sk86fqlc8hv7tw2l58gcwc2pv":{"ada":{"lovelace":22}},"stake_test1ur0kclh0kkelsvs4z45a8uhapugsy3t58u3720f8ysqeuac93dapw":{"ada":{"lovelace":24}},"stake17y083mupk5qedu456ww6szkphruu8a0c34arqngd4hv450s4j6f6h":{"ada":{"lovelace":906524}},"stake1794y2yuq5n584jnnam0g9h46lz30hjkfehf53qqyr0v20qgyrytrr":{"ada":{"lovelace":603180}},"stake178aajvz0kcjgpz0zlnwdj9y73376ufzh4wzzywl0z7t820scrpn3v":{"ada":{"lovelace":1}},"stake1uy45zry2rrh6jcnztrxp8rwu2grma7zf883gkd6pc65nkgs2rsmwk":{"ada":{"lovelace":22}},"stake1u9q8nka4fcvh8t38vf6ntuucx2ax7edhslw9fy03ulle5ackwwz3f":{"ada":{"lovelace":10}},"stake1u8tv08nzaquvu4ulx5eza2945q5ugp98cx95q0ychejvvfg23hc5c":{"ada":{"lovelace":813065}}}}},"id":"W69vAk85v4SJ"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/106.json b/server/test/vectors/SubmitTransactionResponse/106.json
index 7afec151e..54ef0426e 100644
--- a/server/test/vectors/SubmitTransactionResponse/106.json
+++ b/server/test/vectors/SubmitTransactionResponse/106.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3142,"message":"A stake pool retirement certificate is trying to retire too late in the future. Indeed, there's a maximum delay for stake pool retirement, controlled by a protocol parameter. The field 'data.currentEpoch' indicates the current epoch known of the ledger, 'data.declaredEpoch' refers to the epoch declared in the retirement certificate and 'data.firstInvalidEpoch' is the first epoch considered invalid (too far) for retirement","data":{"currentEpoch":8972157,"declaredEpoch":11714255,"firstInvalidEpoch":3012367}},"id":"6xXXc0hunapO"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3172,"message":"A stake pool registration carries a BLS key with an invalid proof of possession. The proof must show possession of the signing key that matches the BLS verification key. The field 'data.stakePool.id' indicates the stake pool, and 'data.blsKey' contains the key and proof found in the certificate.","data":{"stakePool":{"id":"pool1wmt5xmlkfr5vkcmlz3wpeylm4amhrl9l8pjh23mgra60yu6ug7n"},"blsKey":{"verificationKey":"a82cdb005cdcde9ea85a69694be246270808d7c32218dc2d81dc0d4ef7c0eb740f8bf89fa977cd0770c1bb124f1a8545068671c5fd3c526030251c2a466eed100f1785ec9cec787287780c6049b19ed58ef09282db87286ef7b0a74d0a86631c","proofOfPossession":"95ceb36bd07504de2bb4414085f8f96619f8b34d43aeb8c87170b774098f5dff1f1426ff4b181c0382529bd2c236505e"}}},"id":"6xXXc0hunapO"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/109.json b/server/test/vectors/SubmitTransactionResponse/109.json
index 0905356a1..e0553bd1c 100644
--- a/server/test/vectors/SubmitTransactionResponse/109.json
+++ b/server/test/vectors/SubmitTransactionResponse/109.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qn3k0wyef0mrm48hd7lu8a7nckd7y50we00hd6922cl0tc32cm07":{"ada":{"lovelace":285451}},"stake_test17q7mgxqv3arn2p0d683jzt0em6mqfwaemev9063qnwg0yys0yvn3c":{"ada":{"lovelace":205139}},"stake_test17psxuz8spdez86dvxng4maadd5nq0x06n7q68f3suk77adq7r2p4a":{"ada":{"lovelace":19}},"stake_test17psgwfarj5vnnjexs9vmpglzzhvs07jh0ppm24u56pkec6cnv7003":{"ada":{"lovelace":409771}},"stake_test1uq9zdx57dmu5hlj9437u4uqp5e8luvepukszjfdfnq8xrhqszm2wu":{"ada":{"lovelace":28}},"stake_test1upzchchr3dmnk93fuu30zauc25rajl5mzg4m0v96l0kne8cs08g9k":{"ada":{"lovelace":18}},"stake_test1updzjp0pplw9pasfv6xfc9qxxx5tth4ycrfe5dz3x8p0umq2t9uej":{"ada":{"lovelace":10}},"stake_test1up5h6auhg5tzc2l2g3dcqz7aefe8cmcxhenyqqd2k3a9sdcszkz5l":{"ada":{"lovelace":1}},"stake_test1upaj6l5gc5a20v069pkk20uk97fa5jgctu84m5gpz4qw26sttxv4e":{"ada":{"lovelace":19}},"stake_test1uzuk2q0lkz9w2sumknhrhlkvawelkh3v376njsv7spay3xgv2ncyh":{"ada":{"lovelace":27}},"stake_test1urtd3rf5su2kx23yd8zpsmd3yjcgklxrnxfutqrqlnksevq2aw88r":{"ada":{"lovelace":16}},"stake_test1urerycwdd6236tu6auxlkhp8sslalag3juz0gwlcw5ya4tgqspafx":{"ada":{"lovelace":16}},"stake_test1ura92zcm5y57lgvdqdxhnylthd285gxa4xh7vzpxlm6m7hczfcjyk":{"ada":{"lovelace":932686}},"stake179cl42kcq0eczy6lqk5vyj5x0jdugq2yru3mtxc75stmklclryde0":{"ada":{"lovelace":566708}},"stake17x63yr6hlzdar6dzvyxhh6vm287trnyjzh59jw3rpx70wjg7k55nw":{"ada":{"lovelace":58692}},"stake1783nusaksjxdfwjyaqe0zu6f0shhlkau0yvs4z3xhkcu7cgtuyfps":{"ada":{"lovelace":6}},"stake1786rfmsel0kawacjzvw7jn43ws92f5z0vd6uf4tvx63mdssqgljvm":{"ada":{"lovelace":743556}},"stake178mazjqtz0v5me6hjqqtdwk8xxhlljg3q8dta7ewj62gpnq2g3cfp":{"ada":{"lovelace":566015}},"stake1u9zpzwkeg3fx5dn3jgsxymg24pll02t7hekf5d7afh7wzngcjcrlp":{"ada":{"lovelace":13}},"stake1u9vphxhrla2fznwt0kxmdcjrv9axgpt0h62g2ww608v5e0ge5hlu9":{"ada":{"lovelace":704775}},"stake1u850j3pfzyfuwl60s30gjl6ffdwttsfq3uay9k2fk8k25gsumldz5":{"ada":{"lovelace":194562}}}}},"id":"kEOMveHtwhYo"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17qn3k0wyef0mrm48hd7lu8a7nckd7y50we00hd6922cl0tc32cm07":{"ada":{"lovelace":285451}},"stake_test17q7mgxqv3arn2p0d683jzt0em6mqfwaemev9063qnwg0yys0yvn3c":{"ada":{"lovelace":205139}},"stake_test17psxuz8spdez86dvxng4maadd5nq0x06n7q68f3suk77adq7r2p4a":{"ada":{"lovelace":19}},"stake_test17psgwfarj5vnnjexs9vmpglzzhvs07jh0ppm24u56pkec6cnv7003":{"ada":{"lovelace":409771}},"stake_test1uq9zdx57dmu5hlj9437u4uqp5e8luvepukszjfdfnq8xrhqszm2wu":{"ada":{"lovelace":28}},"stake_test1upzchchr3dmnk93fuu30zauc25rajl5mzg4m0v96l0kne8cs08g9k":{"ada":{"lovelace":18}},"stake_test1updzjp0pplw9pasfv6xfc9qxxx5tth4ycrfe5dz3x8p0umq2t9uej":{"ada":{"lovelace":10}},"stake_test1up5h6auhg5tzc2l2g3dcqz7aefe8cmcxhenyqqd2k3a9sdcszkz5l":{"ada":{"lovelace":1}},"stake_test1upaj6l5gc5a20v069pkk20uk97fa5jgctu84m5gpz4qw26sttxv4e":{"ada":{"lovelace":19}},"stake_test1uzuk2q0lkz9w2sumknhrhlkvawelkh3v376njsv7spay3xgv2ncyh":{"ada":{"lovelace":27}},"stake_test1urtd3rf5su2kx23yd8zpsmd3yjcgklxrnxfutqrqlnksevq2aw88r":{"ada":{"lovelace":16}},"stake_test1urerycwdd6236tu6auxlkhp8sslalag3juz0gwlcw5ya4tgqspafx":{"ada":{"lovelace":16}},"stake_test1ura92zcm5y57lgvdqdxhnylthd285gxa4xh7vzpxlm6m7hczfcjyk":{"ada":{"lovelace":932686}},"stake179cl42kcq0eczy6lqk5vyj5x0jdugq2yru3mtxc75stmklclryde0":{"ada":{"lovelace":566708}},"stake17x63yr6hlzdar6dzvyxhh6vm287trnyjzh59jw3rpx70wjg7k55nw":{"ada":{"lovelace":58692}},"stake1783nusaksjxdfwjyaqe0zu6f0shhlkau0yvs4z3xhkcu7cgtuyfps":{"ada":{"lovelace":6}},"stake1786rfmsel0kawacjzvw7jn43ws92f5z0vd6uf4tvx63mdssqgljvm":{"ada":{"lovelace":743556}},"stake178mazjqtz0v5me6hjqqtdwk8xxhlljg3q8dta7ewj62gpnq2g3cfp":{"ada":{"lovelace":566015}},"stake1u9zpzwkeg3fx5dn3jgsxymg24pll02t7hekf5d7afh7wzngcjcrlp":{"ada":{"lovelace":13}},"stake1u9vphxhrla2fznwt0kxmdcjrv9axgpt0h62g2ww608v5e0ge5hlu9":{"ada":{"lovelace":704775}},"stake1u850j3pfzyfuwl60s30gjl6ffdwttsfq3uay9k2fk8k25gsumldz5":{"ada":{"lovelace":194562}}}}},"id":"kEOMveHtwhYo"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/113.json b/server/test/vectors/SubmitTransactionResponse/113.json
index 0df336e31..e62c16697 100644
--- a/server/test/vectors/SubmitTransactionResponse/113.json
+++ b/server/test/vectors/SubmitTransactionResponse/113.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3125,"message":"Some outputs have an insufficient amount of Ada attached to them. In fact, any new output created in a system must pay for the resources it occupies. Because user-created assets are worthless (from the point of view of the protocol), those resources must be paid in the form of a Ada deposit. The exact depends on the size of the serialized output: the more assets, the higher the amount. The field 'data.insufficientlyFundedOutputs.[].output' contains a list of all transaction outputs that are insufficiently funded. Starting from the Babbage era, the field 'data.insufficientlyFundedOutputs.[].minimumRequiredValue' indicates the required amount of Lovelace (1e6 Lovelace = 1 Ada) needed for each output.","data":{"insufficientlyFundedOutputs":[{"output":{"address":"addr1qyux4vzu7n8zr5a2evjd8yeh9j8fdqr6xaqgry7k9p733h9asmfhy39jvwmxqsvmtzf6u7nu2ytdpaj9d3er43agz6uqr4he4a","value":{"ada":{"lovelace":8451481098464834283},"8e6ecc6af08d272e73ab308045c9a49604504988b735e971d6926471":{"36":1},"a5cd7af15c8b05a33dd1e320e8f684bb7ee198a597886b1fa613ec12":{"1319f99f664a1c14f40804e1f01f":2}},"datumHash":"a435a18a61564a96815e7fc49e833203474ca654a8f8ca6515aef73109498c8d"},"minimumRequiredValue":{"ada":{"lovelace":531607}}},{"output":{"address":"addr_test1zzf30757m43n3gq62wq82s5tqspvkr5fvggmaqjd2zmxt8hf5gjhtwh873kh2m562j426cnez8arfl7zzlpmsjz66y9qcjdwa3","value":{"ada":{"lovelace":7617639448903543540},"05a801299f9da4f77502ae12f11c733d26013050df8a7051c0b915eb":{"36":1}},"datumHash":"4c0a4c7f0c45c6b47cc5ad501a1f745c5ba91288e1998b53c89c13e8396abb7f","script":{"language":"native","json":{"clause":"any","from":[{"clause":"any","from":[{"clause":"some","atLeast":0,"from":[]},{"clause":"all","from":[{"clause":"signature","from":"b46d20b45ceb2453391b1411de6ed450727c3523cf36e87b2b22918f"},{"clause":"signature","from":"9279fba324e27e03d801f14d03c0b448dfb53da4b2e76b91530c6619"},{"clause":"signature","from":"165b0db00bd7a533b0ec26585503e056f873c7a3d0efad9d7c0da710"},{"clause":"signature","from":"b61b1de9edb04f5b3dccbadbb2b3936d9e1001e0592dddc0b1e09011"}]}]}]},"cbor":"820281820282830300808201848200581cb46d20b45ceb2453391b1411de6ed450727c3523cf36e87b2b22918f8200581c9279fba324e27e03d801f14d03c0b448dfb53da4b2e76b91530c66198200581c165b0db00bd7a533b0ec26585503e056f873c7a3d0efad9d7c0da7108200581cb61b1de9edb04f5b3dccbadbb2b3936d9e1001e0592dddc0b1e09011"}},"minimumRequiredValue":{"ada":{"lovelace":1}}},{"output":{"address":"addr_test1xqglq6e8s7eyzuptaz0yqyr7lcc9wm77thrkdp2080gp7c76wmezs3kllj0n6yk26mr0jp0vc7qlq32eecgdszf07hwsmqkqqh","value":{"ada":{"lovelace":1750711980552433923},"8f461954fe2f18fee1dca233f358907e643ff839ed1f995e4bf325e3":{"ebd0ec59a11e213cc07c025e0441":9218108468162186704}}},"minimumRequiredValue":{"ada":{"lovelace":767763}}},{"output":{"address":"addr1q80w9wqrhq8jc96kgmsd9cwefzz3m6pwyms8cn8z0sc75p7ml489h0at78sgk7esn2v2qa8xsq6zjlqcn2ksdfl376wqr5qnya","value":{"ada":{"lovelace":0},"105a8f1bb56444cacc86378c95421aceeb326b0fb7743e493eb82fd5":{"37":2699620679519603234}},"script":{"language":"plutus:v1","cbor":"450100002261"}},"minimumRequiredValue":{"ada":{"lovelace":24}}},{"output":{"address":"addr1yysw3y8vk8knzkgk778kvss80vj2n5fvcz0wc09syphpq0jgsz2aha678lwdnu0pu9wvyk4jufvxldutrq3gjrhn3p7qq7xvyu","value":{"ada":{"lovelace":3633822810310001507},"48f9b4b0392bb1c9c314804f689736657f786a81d57a4566fe838dbf":{"6d6bb759048366734b0d85e9dfa2bfc753a9acb37d5ce730c5de241ac2":1}},"datumHash":"e33868bc29839729a13c55d0d3cb69bab2ba9853a35fd3c7e9cac39e8ebd5479","script":{"language":"native","json":{"clause":"some","atLeast":1,"from":[{"clause":"some","atLeast":1,"from":[{"clause":"some","atLeast":0,"from":[{"clause":"signature","from":"db073d6edb6c2ccd221571bcc2a55117fbafb51d838760f072cb3db3"},{"clause":"signature","from":"9566203be604d1bef05bc0e73ccbdae145b394a510615b682af0afb5"}]}]}]},"cbor":"8303018183030181830300828200581cdb073d6edb6c2ccd221571bcc2a55117fbafb51d838760f072cb3db38200581c9566203be604d1bef05bc0e73ccbdae145b394a510615b682af0afb5"}},"minimumRequiredValue":{"ada":{"lovelace":15}}},{"output":{"address":"addr_test1xq4ry3yk4r0kd5gpeg42dk7aghr6xvk2vd462ee09gf4zmwhaful7tecmexg4lq4vnx9nu8a09m4qekdnlslfylqkjvqkfqk4m","value":{"ada":{"lovelace":2},"467f58932b54910584a0e8ea25a225e06a14530b2e96e938c53a3f22":{"32":1},"b0c53e2bf180858da4b64eb5598c5615bba7d723d2b604a83b7f9165":{"33":9137028440553870039}},"datumHash":"90e24104b6a6416092c09118dba92fdb4d01d6ae31d82e49d096ed65f1f61491","script":{"language":"native","json":{"clause":"before","slot":9569074},"cbor":"82051a00920332"}},"minimumRequiredValue":{"ada":{"lovelace":29}}}]}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3170,"message":"Some required top-level guards have a malformed datum. A required guard that resolves to a Plutus script must come with a datum, whereas a guard that is a key hash or resolves to a native script must not have one. The field 'data.malformedGuards' lists the offending credentials.","data":{"malformedGuards":[{"from":"verificationKey","credential":"cc2b8e04166ed9a86f607a9efc9a571a2c9c7b59ef54160ad469c137"}]}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/118.json b/server/test/vectors/SubmitTransactionResponse/118.json
index 7a1250603..022888dba 100644
--- a/server/test/vectors/SubmitTransactionResponse/118.json
+++ b/server/test/vectors/SubmitTransactionResponse/118.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17pr7kax4xhkpaqkgddkrgdvcfztwpxfm00lpshxhjadmurqm592qu":{"ada":{"lovelace":20}},"stake_test17pk7sssh2q77n40cm65h4fwev6lljx9635jzeceaxyyv2vchglrwq":{"ada":{"lovelace":26}},"stake_test17pha2g5jw3kx8t3rtuath7zrp33ew8ss3wjyry6ssj8phgs2qgr80":{"ada":{"lovelace":370501}},"stake_test17zzkrd8c33v7yw9qykgp7dar89rw3ap6gf365jpzrplafrs4y6ykn":{"ada":{"lovelace":4}},"stake_test17zrpfpysymzdv9dgmj36uqy79743gv4806upplrr3pgnrhcj680py":{"ada":{"lovelace":29}},"stake_test17z80nay48wyrwlt8299w24yetd78vpv2qslm9qkprgcssrg9s6a6g":{"ada":{"lovelace":7}},"stake_test17r6hj82kd5ay4tfp6ysk0nckmu2va6pa6ldt9fvcyz8n02gakwwuf":{"ada":{"lovelace":29}},"stake_test17r76vn49y5q67l3vxvf9g4f2cw0wj0atr4kkftau75wdpqqpxd0m7":{"ada":{"lovelace":286895}},"stake_test1uqp4wdlrteednc7kvc4795sks3drfl0fwcwxuhqmq36snzqtcvunt":{"ada":{"lovelace":152242}},"stake_test1uqxv3427y37m223480rj23qhktgaxvshqsp5gk0qw49ta5c98vdzz":{"ada":{"lovelace":769675}},"stake_test1uqv8m96pfxqkmsmqvl3xzg6r9zestfp074lr03vhes296qqn55vhc":{"ada":{"lovelace":199430}},"stake_test1uqd4yvd44vwj6jpu3kfcfkukhhfesr7pzefa8qgh6kvuy3qw6qq0h":{"ada":{"lovelace":14}},"stake_test1uq52wpesq43g9tt4dq50uj2xtpstejat6z2ne06erwh38gsam8z8r":{"ada":{"lovelace":497965}},"stake_test1uqkh0f7xrwnqm5qr5krn6ycflngvvvn07ce4t2rsh2w932c0dlxm3":{"ada":{"lovelace":9}},"stake_test1uze4kcpn6tlsded26tkllvff5kkrrfxurus4m3ag830elsslnxupa":{"ada":{"lovelace":467331}},"stake_test1ur6u0l9evf7je59jnn7wh5squsddelv96gtztgwunsxq2ssue90w2":{"ada":{"lovelace":20}},"stake17yq8hjufef8wthxc4n8yv254pwyh9ahc79rk3w99tc9msvq2kzz3g":{"ada":{"lovelace":994087}},"stake17yfytfhfwnhun68kyf6ltg9x36u4hja5dtl6r5rc9808m5grvpk4k":{"ada":{"lovelace":16}},"stake17yv4w87lcq6jxypg83mcmzf5q3p8x8mus0w8nt7zhrzqcdg7mutqk":{"ada":{"lovelace":204736}},"stake17xxhdd9clwsefyqcd566tn2p6r6g0kd56cktjd33ph3g7nsc7pps5":{"ada":{"lovelace":29}},"stake17xjmgsfsvkv020ke3vv3p27zmzygaftrgwzxgrezvsnj60cvtdgan":{"ada":{"lovelace":7}},"stake17x6tcln00sflgkscqmthatn00yxc7xqkankzlpvk66cyqfcqqsrk3":{"ada":{"lovelace":27716}},"stake178vumq77cyvhsf6q32p75sjrt4svkwtts5jkrr7ra0la5kgm7rzfz":{"ada":{"lovelace":5}},"stake17865w8e2lkt3ck0hc4lpzuvyaqr78sqzj5aj2ypwk2csumcse5pv7":{"ada":{"lovelace":14}},"stake1uxzmn3xfcsmkrhq49wexmd3ekd6r8ltt9cldxsjmn4euhacrstydw":{"ada":{"lovelace":17}},"stake1ux0nxh5zsmn8r3r69rx2mgjstnrynfgttrscvlfqpufukuqyvwzjp":{"ada":{"lovelace":863014}},"stake1u839jca5474kw94mxj5axz4cx34vy0af6jzgmvdajp5uv0gfkcqwk":{"ada":{"lovelace":20}},"stake1u8jp7wdy894cyxquwp0derz3qwfrqrwtn56fl9rta8tu9hqnhlugv":{"ada":{"lovelace":30}}}}},"id":"ADGxNV8UC8Sx"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17pr7kax4xhkpaqkgddkrgdvcfztwpxfm00lpshxhjadmurqm592qu":{"ada":{"lovelace":20}},"stake_test17pk7sssh2q77n40cm65h4fwev6lljx9635jzeceaxyyv2vchglrwq":{"ada":{"lovelace":26}},"stake_test17pha2g5jw3kx8t3rtuath7zrp33ew8ss3wjyry6ssj8phgs2qgr80":{"ada":{"lovelace":370501}},"stake_test17zzkrd8c33v7yw9qykgp7dar89rw3ap6gf365jpzrplafrs4y6ykn":{"ada":{"lovelace":4}},"stake_test17zrpfpysymzdv9dgmj36uqy79743gv4806upplrr3pgnrhcj680py":{"ada":{"lovelace":29}},"stake_test17z80nay48wyrwlt8299w24yetd78vpv2qslm9qkprgcssrg9s6a6g":{"ada":{"lovelace":7}},"stake_test17r6hj82kd5ay4tfp6ysk0nckmu2va6pa6ldt9fvcyz8n02gakwwuf":{"ada":{"lovelace":29}},"stake_test17r76vn49y5q67l3vxvf9g4f2cw0wj0atr4kkftau75wdpqqpxd0m7":{"ada":{"lovelace":286895}},"stake_test1uqp4wdlrteednc7kvc4795sks3drfl0fwcwxuhqmq36snzqtcvunt":{"ada":{"lovelace":152242}},"stake_test1uqxv3427y37m223480rj23qhktgaxvshqsp5gk0qw49ta5c98vdzz":{"ada":{"lovelace":769675}},"stake_test1uqv8m96pfxqkmsmqvl3xzg6r9zestfp074lr03vhes296qqn55vhc":{"ada":{"lovelace":199430}},"stake_test1uqd4yvd44vwj6jpu3kfcfkukhhfesr7pzefa8qgh6kvuy3qw6qq0h":{"ada":{"lovelace":14}},"stake_test1uq52wpesq43g9tt4dq50uj2xtpstejat6z2ne06erwh38gsam8z8r":{"ada":{"lovelace":497965}},"stake_test1uqkh0f7xrwnqm5qr5krn6ycflngvvvn07ce4t2rsh2w932c0dlxm3":{"ada":{"lovelace":9}},"stake_test1uze4kcpn6tlsded26tkllvff5kkrrfxurus4m3ag830elsslnxupa":{"ada":{"lovelace":467331}},"stake_test1ur6u0l9evf7je59jnn7wh5squsddelv96gtztgwunsxq2ssue90w2":{"ada":{"lovelace":20}},"stake17yq8hjufef8wthxc4n8yv254pwyh9ahc79rk3w99tc9msvq2kzz3g":{"ada":{"lovelace":994087}},"stake17yfytfhfwnhun68kyf6ltg9x36u4hja5dtl6r5rc9808m5grvpk4k":{"ada":{"lovelace":16}},"stake17yv4w87lcq6jxypg83mcmzf5q3p8x8mus0w8nt7zhrzqcdg7mutqk":{"ada":{"lovelace":204736}},"stake17xxhdd9clwsefyqcd566tn2p6r6g0kd56cktjd33ph3g7nsc7pps5":{"ada":{"lovelace":29}},"stake17xjmgsfsvkv020ke3vv3p27zmzygaftrgwzxgrezvsnj60cvtdgan":{"ada":{"lovelace":7}},"stake17x6tcln00sflgkscqmthatn00yxc7xqkankzlpvk66cyqfcqqsrk3":{"ada":{"lovelace":27716}},"stake178vumq77cyvhsf6q32p75sjrt4svkwtts5jkrr7ra0la5kgm7rzfz":{"ada":{"lovelace":5}},"stake17865w8e2lkt3ck0hc4lpzuvyaqr78sqzj5aj2ypwk2csumcse5pv7":{"ada":{"lovelace":14}},"stake1uxzmn3xfcsmkrhq49wexmd3ekd6r8ltt9cldxsjmn4euhacrstydw":{"ada":{"lovelace":17}},"stake1ux0nxh5zsmn8r3r69rx2mgjstnrynfgttrscvlfqpufukuqyvwzjp":{"ada":{"lovelace":863014}},"stake1u839jca5474kw94mxj5axz4cx34vy0af6jzgmvdajp5uv0gfkcqwk":{"ada":{"lovelace":20}},"stake1u8jp7wdy894cyxquwp0derz3qwfrqrwtn56fl9rta8tu9hqnhlugv":{"ada":{"lovelace":30}}}}},"id":"ADGxNV8UC8Sx"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/124.json b/server/test/vectors/SubmitTransactionResponse/124.json
index 24f8c51e9..417eff897 100644
--- a/server/test/vectors/SubmitTransactionResponse/124.json
+++ b/server/test/vectors/SubmitTransactionResponse/124.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3108,"message":"Invalid metadatum found in transaction metadata. Metadata byte strings must be no longer than 64-bytes and text strings must be no longer than 64 bytes once UTF-8-encoded. Some metadatum in the transaction infringe this rule."},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3169,"message":"Some guards required by the transaction or by its sub-transactions are missing from the top-level transaction. Any credential (key hash or script) listed as a required top-level guard must also appear in the 'guards' of the top-level transaction. The field 'data.missingGuards' lists the required credentials that are absent.","data":{"missingGuards":[{"from":"script","credential":"83057da88b3b86912dc8650f1cce8846cdddf5b7dd52e3824248672d"},{"from":"verificationKey","credential":"68e8540a85735f15ebdac6dea92afe550fd49508211b142ced0b072b"},{"from":"verificationKey","credential":"922ca4631e0396fec459ef470dc54c9c4b01deb8ff002a315cd7dcc5"},{"from":"verificationKey","credential":"9f1b4bfe54c4823cee7a1582ce5f4d5cd25287778e6953389c6bcf1a"},{"from":"verificationKey","credential":"f5215ae520d00579d39ae962e05ce3a953a0a391e959c138b7a63bf7"}]}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/125.json b/server/test/vectors/SubmitTransactionResponse/125.json
index 534e43c97..17ea30441 100644
--- a/server/test/vectors/SubmitTransactionResponse/125.json
+++ b/server/test/vectors/SubmitTransactionResponse/125.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3145,"message":"Trying to re-register some already known credentials. Stake credentials can only be registered once. This is true for both keys and scripts. The field 'data.knownCredential' points to an already known credential that's being re-registered by this transaction.","data":{"from":"verificationKey","knownCredential":"9d30667f9be2c82944c8b593ca8f79bc66667ea15eaa23066853d53a"}},"id":"XCT7BgT3LaLi"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3144,"message":"Some hash digest of (optional) stake pool metadata is too long. When registering, stake pools can supply an external metadata file and a hash digest of the content. The hashing algorithm is left open but the output digest must be smaller than 32 bytes. The field 'data.infringingStakePool' indicates which stake pool has an invalid metadata hash and 'data.computedMetadataHashSize' documents the computed hash size.","data":{"infringingStakePool":{"id":"pool159w0svdgu7rg6pl9xrrre088yn4kzfnv5tm9ly5kfsss78g6xc5"},"computedMetadataHashSize":{"bytes":12}}},"id":"XCT7BgT3LaLi"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/129.json b/server/test/vectors/SubmitTransactionResponse/129.json
index 2b909b896..99806bb24 100644
--- a/server/test/vectors/SubmitTransactionResponse/129.json
+++ b/server/test/vectors/SubmitTransactionResponse/129.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qel79j25tww6tdwshh92ky82s8x3a677pv5g2m6au6aavgqaaenr":{"ada":{"lovelace":279023}},"stake_test17pq85eczeel3g4kahtpszax5wlxenayuh3q6x0m9qh0x5dcga9ld3":{"ada":{"lovelace":793145}},"stake_test17zsmtcdphchv9a0mmchuhv78snl6dxnrl2uptj38ejrtejc8qjsvc":{"ada":{"lovelace":931790}},"stake_test17rf0362rcnud49l6all42kdawc4vjm5c9fwch90pg0jfa5qmp327d":{"ada":{"lovelace":4}},"stake_test17ruaezh0wkpscqfxfhwfh5avmk2m0u33gphkd8k5xsdm7sqeyhls9":{"ada":{"lovelace":475761}},"stake_test17rl4gw4pm80awcweph39mnuxrmcq9gk2tk9mv5v0cn0hejq6w5m87":{"ada":{"lovelace":600726}},"stake_test1uqk5zkkhdhmfuyayw03xmywtx262rnh4493ce76dkkayjxqnkq8lm":{"ada":{"lovelace":91052}},"stake_test1upnsjfux5u9urmk42xptes2j3tjkrvajsk4htpjyvqtwm6gw9qvnv":{"ada":{"lovelace":315405}},"stake_test1uztghw70k4353uclnuce6epgdhnew7px6zsuzqtp2r4u8ccdncykx":{"ada":{"lovelace":26}},"stake_test1uzj7ycjfzmf8rqxsplyktapy63h3xuz5gfyk0ffvccu2j4ctaeta7":{"ada":{"lovelace":14}},"stake_test1uza403zqqcygqqpj7tdpac7j9lvtqh2527cramwgrev8gksuvghjg":{"ada":{"lovelace":612282}},"stake_test1uzaut4ydnw4mqzgh00cl83a9dcwfj8vrfdqdcdqgnteecqs4fxavp":{"ada":{"lovelace":7}},"stake17yz9c3s3lha59amxuxgh9uj54v2fajkq3vgka0ykee7836q8hlg3a":{"ada":{"lovelace":15}},"stake17yt2ft2n0e9e8uzv4gtqrmazfjnzs94pf62rr0m8jgc4gnck2lnut":{"ada":{"lovelace":12}},"stake17yczf250tue5zwe4f6zylq9aslv246vxqw0pmndsmzmvnrc5mrfr3":{"ada":{"lovelace":9}},"stake179wv5nz2wsk0esug9zfddsczk59npvkv9jkfy7kunex7v4sy0wxnq":{"ada":{"lovelace":393579}},"stake17900cl6ntylakgtmxwyu3s552qe2ssanvr2n63t9wmfh7gsykvv6x":{"ada":{"lovelace":155143}},"stake17xz5lspvrjysdt3fetrrar707c3fxvrwah2k4pycg3kj4rqzsffk3":{"ada":{"lovelace":655451}},"stake178xzcm6wzy0ptjhpvyqde3aarxnsreqezd2h66nt7s2tgqgz2qsd7":{"ada":{"lovelace":23}},"stake1uyvykxfna9ckrrlq9lxaweqyexs3xxwzl76crx8fl4ejztgyjjtnz":{"ada":{"lovelace":474937}},"stake1uyesprg8u2vrkjcgu7edxfq5ry5c5kd7tywkgthxlk7wn8g0y7csk":{"ada":{"lovelace":25}},"stake1u85zleqngl4n34l79c82p2jm7ry4c0jcv6579daq0096t5gllhkpu":{"ada":{"lovelace":7}},"stake1u85c2y9e0cmk5fek0kgl9n7tfm3y2vfr9y046c32gy9f5fqzyy36x":{"ada":{"lovelace":25}},"stake1u8uhsch9vlaffghuvpsejxun36dntjt65h28lsfyd7fayysffkhgm":{"ada":{"lovelace":6}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17qel79j25tww6tdwshh92ky82s8x3a677pv5g2m6au6aavgqaaenr":{"ada":{"lovelace":279023}},"stake_test17pq85eczeel3g4kahtpszax5wlxenayuh3q6x0m9qh0x5dcga9ld3":{"ada":{"lovelace":793145}},"stake_test17zsmtcdphchv9a0mmchuhv78snl6dxnrl2uptj38ejrtejc8qjsvc":{"ada":{"lovelace":931790}},"stake_test17rf0362rcnud49l6all42kdawc4vjm5c9fwch90pg0jfa5qmp327d":{"ada":{"lovelace":4}},"stake_test17ruaezh0wkpscqfxfhwfh5avmk2m0u33gphkd8k5xsdm7sqeyhls9":{"ada":{"lovelace":475761}},"stake_test17rl4gw4pm80awcweph39mnuxrmcq9gk2tk9mv5v0cn0hejq6w5m87":{"ada":{"lovelace":600726}},"stake_test1uqk5zkkhdhmfuyayw03xmywtx262rnh4493ce76dkkayjxqnkq8lm":{"ada":{"lovelace":91052}},"stake_test1upnsjfux5u9urmk42xptes2j3tjkrvajsk4htpjyvqtwm6gw9qvnv":{"ada":{"lovelace":315405}},"stake_test1uztghw70k4353uclnuce6epgdhnew7px6zsuzqtp2r4u8ccdncykx":{"ada":{"lovelace":26}},"stake_test1uzj7ycjfzmf8rqxsplyktapy63h3xuz5gfyk0ffvccu2j4ctaeta7":{"ada":{"lovelace":14}},"stake_test1uza403zqqcygqqpj7tdpac7j9lvtqh2527cramwgrev8gksuvghjg":{"ada":{"lovelace":612282}},"stake_test1uzaut4ydnw4mqzgh00cl83a9dcwfj8vrfdqdcdqgnteecqs4fxavp":{"ada":{"lovelace":7}},"stake17yz9c3s3lha59amxuxgh9uj54v2fajkq3vgka0ykee7836q8hlg3a":{"ada":{"lovelace":15}},"stake17yt2ft2n0e9e8uzv4gtqrmazfjnzs94pf62rr0m8jgc4gnck2lnut":{"ada":{"lovelace":12}},"stake17yczf250tue5zwe4f6zylq9aslv246vxqw0pmndsmzmvnrc5mrfr3":{"ada":{"lovelace":9}},"stake179wv5nz2wsk0esug9zfddsczk59npvkv9jkfy7kunex7v4sy0wxnq":{"ada":{"lovelace":393579}},"stake17900cl6ntylakgtmxwyu3s552qe2ssanvr2n63t9wmfh7gsykvv6x":{"ada":{"lovelace":155143}},"stake17xz5lspvrjysdt3fetrrar707c3fxvrwah2k4pycg3kj4rqzsffk3":{"ada":{"lovelace":655451}},"stake178xzcm6wzy0ptjhpvyqde3aarxnsreqezd2h66nt7s2tgqgz2qsd7":{"ada":{"lovelace":23}},"stake1uyvykxfna9ckrrlq9lxaweqyexs3xxwzl76crx8fl4ejztgyjjtnz":{"ada":{"lovelace":474937}},"stake1uyesprg8u2vrkjcgu7edxfq5ry5c5kd7tywkgthxlk7wn8g0y7csk":{"ada":{"lovelace":25}},"stake1u85zleqngl4n34l79c82p2jm7ry4c0jcv6579daq0096t5gllhkpu":{"ada":{"lovelace":7}},"stake1u85c2y9e0cmk5fek0kgl9n7tfm3y2vfr9y046c32gy9f5fqzyy36x":{"ada":{"lovelace":25}},"stake1u8uhsch9vlaffghuvpsejxun36dntjt65h28lsfyd7fayysffkhgm":{"ada":{"lovelace":6}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/130.json b/server/test/vectors/SubmitTransactionResponse/130.json
index d94b8caca..163119c54 100644
--- a/server/test/vectors/SubmitTransactionResponse/130.json
+++ b/server/test/vectors/SubmitTransactionResponse/130.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qaw0t4a0e82gkhj6f3n72pnh4arx3vd0vxz09yyt2uay9cv00cnp":{"ada":{"lovelace":9}},"stake_test17p8m3mqw6vpfxu52hx8vpydtjwssmmh3nrdd5r56y0qvxfckqvy5v":{"ada":{"lovelace":924633}},"stake_test17pugnavmyd3wef4fp4g9sjvxlvmeqltj2ujw3488xvtplkq8unx3x":{"ada":{"lovelace":20}},"stake_test17zfkr8p3ytfkdcls7nayegqdn8j4e9t660kdzf6zqrj85ngvf2kqy":{"ada":{"lovelace":25}},"stake_test17zfhn68gh2fykxgr0n85y5sllyn5gzlhaajy2uurd7gf7ps8kshgg":{"ada":{"lovelace":18}},"stake_test17z20m9ug2rrq33q8qtktysdl06gdwa9g0cac7emdzp0rcjgr0zlz9":{"ada":{"lovelace":5}},"stake_test17zwq3fzz5lmcl8cpy4esulswknhzuj74hk28sck56563n7ghu7hq5":{"ada":{"lovelace":304892}},"stake_test17r4v5ye45thxf36p6he43kv4lcr9ht8gvxlq2rh7tmvmqpccnfcxu":{"ada":{"lovelace":770581}},"stake_test17radjr7ma35dvrwdqvhkjztct5fdlm5fpwg4t6tzae9nr0qwnnvr9":{"ada":{"lovelace":21}},"stake_test1uqy5n7ehxcf04ylj2u9es3gwjzr646k2rmfsl6utmpg83jq7k49f2":{"ada":{"lovelace":38340}},"stake_test1uzf2tkyymlruhqpxgpz70rx8t0xr0y52t4zj0q7glqcygyqs9vlyh":{"ada":{"lovelace":741086}},"stake17yme39g5djh97mvsvxezzp4thjq2j230j6yqrpnlhhsrz5svvujem":{"ada":{"lovelace":166449}},"stake17xwh455e94lh5j258cr7ey0fwpa9te7ffl82zeykp6yvs8qf3da7e":{"ada":{"lovelace":26}},"stake1789wapqfld6zuedcwf83vtnvku6s5kntyd8ra20tl64r8yc9m9t5h":{"ada":{"lovelace":0}},"stake178x8qx2yr9ud4eewq7urt0k0hcyedns7vhy3x8slsmf8rtgasxs06":{"ada":{"lovelace":868662}},"stake178xg2r783zv76cd5w770f8nj3eyyvc3u3k592tlgz2k3u5gu6u32m":{"ada":{"lovelace":25}},"stake178t5fkuu00tjlpw6xmkwwc2cxfj8fwe6hcn9sgznn5z0arsapauu2":{"ada":{"lovelace":945642}},"stake1786qf9vzaaunr36hpydctlkzdrl3ts4kmfky4d7rcsghhhq0llf98":{"ada":{"lovelace":15}},"stake1uydqqd5mvdfnxfeyfmuf424dwat8wa5ny9ulvwx3mh005sqssvn0v":{"ada":{"lovelace":44805}},"stake1uy4nmxsvt3u3yy8z3s24tvxtqefjhzxpw6flm06zck7kcasl7n730":{"ada":{"lovelace":15}},"stake1uy7zwv74xjhptylfmhzz508lus9u6tggawu8xfem3u6ln9c3j67m2":{"ada":{"lovelace":11}},"stake1ux0xmz3ra6j8vcmvt4h5a8kwawtqpzartnllex6kqkctv6qzmw89n":{"ada":{"lovelace":19}},"stake1u8nka5v8g906umd5qg2qh279jdwwe490lpps0596lsazl8clutc5d":{"ada":{"lovelace":69841}},"stake1u8n7xya2wk0p03tnkccgvvsqc3gljawg0yqe3g87pa4yxkctmjyh3":{"ada":{"lovelace":19}},"stake1u8659m5ddxr02xf0q7c0yhh0gr27kdqtc9jsnzf29mccutggs2c62":{"ada":{"lovelace":3}}}}},"id":"xUwtbiTUKo9R"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3145,"message":"Trying to re-register some already known credentials. Stake credentials can only be registered once. This is true for both keys and scripts. The field 'data.knownCredential' points to an already known credential that's being re-registered by this transaction.","data":{"from":"verificationKey","knownCredential":"2d50ce2cfaffe9313936991cd3c61619186026ea7e8dcb63f36bfc28"}},"id":"xUwtbiTUKo9R"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/131.json b/server/test/vectors/SubmitTransactionResponse/131.json
index f31ce311b..50c9043be 100644
--- a/server/test/vectors/SubmitTransactionResponse/131.json
+++ b/server/test/vectors/SubmitTransactionResponse/131.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test1urzlga8ynp5qz03nlfvrcrm9shukd6dhhgxnq3thvlggkvccf66fv":{"ada":{"lovelace":822281}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test1urzlga8ynp5qz03nlfvrcrm9shukd6dhhgxnq3thvlggkvccf66fv":{"ada":{"lovelace":822281}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/134.json b/server/test/vectors/SubmitTransactionResponse/134.json
index 234246ea2..368d04010 100644
--- a/server/test/vectors/SubmitTransactionResponse/134.json
+++ b/server/test/vectors/SubmitTransactionResponse/134.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3166,"message":"The compound size of all reference scripts exceeeds the maximum size allowed by the protocol. Use fewer or smaller scripts to reduce the total size below acceptable limits. The field 'data.measuredReferenceScriptsSize indicates the actual total measured size of your reference scripts, whereas 'data.maximumReferenceScriptsSize indicates the current maximum size enforced by the ledger.","data":{"measuredReferenceScriptsSize":{"bytes":0},"maximumReferenceScriptsSize":{"bytes":7}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3172,"message":"A stake pool registration carries a BLS key with an invalid proof of possession. The proof must show possession of the signing key that matches the BLS verification key. The field 'data.stakePool.id' indicates the stake pool, and 'data.blsKey' contains the key and proof found in the certificate.","data":{"stakePool":{"id":"pool1x0dlxs79u9czskrxey6a2qjrsxg8tvtw7m8uk6yqyz2aj4x0eh8"},"blsKey":{"verificationKey":"95614b37baacf548da537b900d90217da727dfd223371c6842e594b37fcf6542ffb2d491f0dafd0834beb7adabd4e1f9194ffc0b69edd7a3851dbc555a68be2b19e783cb69ea9243ef734e8cc5f8e32904dd279e46cf65805b82862bc1b9de72","proofOfPossession":"8c84fdea955abe3278ef83ac83d79b80230f8b0891bd194684f52cfbcaf078224afa1776425414f8ed8e9dcf83beeee7"}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/135.json b/server/test/vectors/SubmitTransactionResponse/135.json
index 7f25d02fb..9f998cd05 100644
--- a/server/test/vectors/SubmitTransactionResponse/135.json
+++ b/server/test/vectors/SubmitTransactionResponse/135.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3142,"message":"A stake pool retirement certificate is trying to retire too late in the future. Indeed, there's a maximum delay for stake pool retirement, controlled by a protocol parameter. The field 'data.currentEpoch' indicates the current epoch known of the ledger, 'data.declaredEpoch' refers to the epoch declared in the retirement certificate and 'data.firstInvalidEpoch' is the first epoch considered invalid (too far) for retirement","data":{"currentEpoch":4823743,"declaredEpoch":5555302,"firstInvalidEpoch":3142619}},"id":"g1NV2duUeIEx"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3171,"message":"The collateral return output is sent to a pointer address. Since the Dijkstra era, pointer addresses are no longer allowed in collateral return outputs. The field 'data.collateralReturn' contains the offending output.","data":{"collateralReturn":{"address":"EqGAuA8vHnNrPBPucYxi8Uw8sYSY8soErjXE2bZaUo8jPYrDYBjsqFPAjveEmAmZBnFNsueruyXKTnuP2NYa8pnxXpNis3rtcTWSAv9G7PGcuzXaHpuo8is","value":{"ada":{"lovelace":281780055818719038},"245d5a7a06fe18358242e81281cd5ba9e6abe4efc54e7b659f25abae":{"67ef53e4daeabbb8589c1a77":2}}}}},"id":"g1NV2duUeIEx"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/136.json b/server/test/vectors/SubmitTransactionResponse/136.json
index 97c31810b..72a0f6a87 100644
--- a/server/test/vectors/SubmitTransactionResponse/136.json
+++ b/server/test/vectors/SubmitTransactionResponse/136.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17zqq76suajc8v00u0rkcd6pgfvps0vhgg2e6kkvhrl53tvqw67zzk":{"ada":{"lovelace":574073}},"stake_test17rwdnw8y2ql7grp5wvrgzrg4f47uqsv0nllz3rf69mp7fjgx70uud":{"ada":{"lovelace":519272}},"stake_test17rlmsaqdpdk2cdhrqa7rrudc5ejgee9qgmxqlmduu6ef29gsuugf5":{"ada":{"lovelace":830811}},"stake_test1uqf5fkrllzxp8g982n8ev5pwn22pva2vxwh3y2mkk3mcmus6yl2ak":{"ada":{"lovelace":0}},"stake_test1uqdr48cl5n3jzcd8p9gzqzcfwqylrlhwmcrsd4sqhlnprucrn360v":{"ada":{"lovelace":9}},"stake_test1uzw2fcpvkuxe2tck23a6qd5xmzshe5rk3h6tx9jtsxdr5ksfaasd3":{"ada":{"lovelace":21}},"stake_test1uzjw5m27ahgxnwzdkr27zq0q362j6zygr2ca5uqe2n3dwlguehul0":{"ada":{"lovelace":571843}},"stake_test1uzhg9qfud7gxh9uq839h226v9mpp5r874d2xu3f36vjsnnqrs84l7":{"ada":{"lovelace":2}},"stake17y2raj6plelxhc2djyucyeda42z5cngn8ep5k2untw5z44cnpe8dd":{"ada":{"lovelace":644155}},"stake17yh5dyve8en0rp7ss2ewpmelrhxh2rmxj3sfkxnyfpg890q5jthdp":{"ada":{"lovelace":416772}},"stake1796vssyf4qmmk66f2j2wxqwdwlhn98d4rhat9va4fywlpqsgu7an2":{"ada":{"lovelace":205709}},"stake17x6kmwy5w0xcqz799amtctreytuq7am200z80ndlqlur26s89k6ml":{"ada":{"lovelace":5}},"stake178zqjhvf0fqwv6lsgk8wp6k9nhp94h399376ldp568mz7qcf0uars":{"ada":{"lovelace":820838}},"stake178ykkg3x33yeevagskgya07qgn5p0wy99786690ymgv3haclylqqp":{"ada":{"lovelace":308420}},"stake1u9u4cuu0a0e0s5u8ud35lzra5yk9ya7hlaavesmznjj3zvqw4h36n":{"ada":{"lovelace":14}},"stake1uxwsam0mytzn4p3p7vce79z70kqkmk0pjhv3m8s52hxjc4geelepn":{"ada":{"lovelace":293193}},"stake1u8xdhpj05ednqv6jerqpwj7mjkueh9etmwqzyfn2s4jmmkcugjkl9":{"ada":{"lovelace":929844}},"stake1u8dyg4fhwwzuy9409smdkrhuhqdag28nrcdr728dxxrlgygqtecm7":{"ada":{"lovelace":5}},"stake1u832f3y3qh9em73g0v45msk4wapzhuzr4wsfjjf2y24r9wckx8ywu":{"ada":{"lovelace":12409}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17zqq76suajc8v00u0rkcd6pgfvps0vhgg2e6kkvhrl53tvqw67zzk":{"ada":{"lovelace":574073}},"stake_test17rwdnw8y2ql7grp5wvrgzrg4f47uqsv0nllz3rf69mp7fjgx70uud":{"ada":{"lovelace":519272}},"stake_test17rlmsaqdpdk2cdhrqa7rrudc5ejgee9qgmxqlmduu6ef29gsuugf5":{"ada":{"lovelace":830811}},"stake_test1uqf5fkrllzxp8g982n8ev5pwn22pva2vxwh3y2mkk3mcmus6yl2ak":{"ada":{"lovelace":0}},"stake_test1uqdr48cl5n3jzcd8p9gzqzcfwqylrlhwmcrsd4sqhlnprucrn360v":{"ada":{"lovelace":9}},"stake_test1uzw2fcpvkuxe2tck23a6qd5xmzshe5rk3h6tx9jtsxdr5ksfaasd3":{"ada":{"lovelace":21}},"stake_test1uzjw5m27ahgxnwzdkr27zq0q362j6zygr2ca5uqe2n3dwlguehul0":{"ada":{"lovelace":571843}},"stake_test1uzhg9qfud7gxh9uq839h226v9mpp5r874d2xu3f36vjsnnqrs84l7":{"ada":{"lovelace":2}},"stake17y2raj6plelxhc2djyucyeda42z5cngn8ep5k2untw5z44cnpe8dd":{"ada":{"lovelace":644155}},"stake17yh5dyve8en0rp7ss2ewpmelrhxh2rmxj3sfkxnyfpg890q5jthdp":{"ada":{"lovelace":416772}},"stake1796vssyf4qmmk66f2j2wxqwdwlhn98d4rhat9va4fywlpqsgu7an2":{"ada":{"lovelace":205709}},"stake17x6kmwy5w0xcqz799amtctreytuq7am200z80ndlqlur26s89k6ml":{"ada":{"lovelace":5}},"stake178zqjhvf0fqwv6lsgk8wp6k9nhp94h399376ldp568mz7qcf0uars":{"ada":{"lovelace":820838}},"stake178ykkg3x33yeevagskgya07qgn5p0wy99786690ymgv3haclylqqp":{"ada":{"lovelace":308420}},"stake1u9u4cuu0a0e0s5u8ud35lzra5yk9ya7hlaavesmznjj3zvqw4h36n":{"ada":{"lovelace":14}},"stake1uxwsam0mytzn4p3p7vce79z70kqkmk0pjhv3m8s52hxjc4geelepn":{"ada":{"lovelace":293193}},"stake1u8xdhpj05ednqv6jerqpwj7mjkueh9etmwqzyfn2s4jmmkcugjkl9":{"ada":{"lovelace":929844}},"stake1u8dyg4fhwwzuy9409smdkrhuhqdag28nrcdr728dxxrlgygqtecm7":{"ada":{"lovelace":5}},"stake1u832f3y3qh9em73g0v45msk4wapzhuzr4wsfjjf2y24r9wckx8ywu":{"ada":{"lovelace":12409}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/137.json b/server/test/vectors/SubmitTransactionResponse/137.json
index cd1fdd5e5..2ea3f947b 100644
--- a/server/test/vectors/SubmitTransactionResponse/137.json
+++ b/server/test/vectors/SubmitTransactionResponse/137.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17phy3qqyuqxphprx3m0ykwgwhp8f842pp0c3jakyrnjepms44pfkz":{"ada":{"lovelace":26}},"stake_test17zrcsmfvfqs37cclln67qddn3djwt4p80zgpem4hxd63amg2h8v5j":{"ada":{"lovelace":672486}},"stake_test17r2twy4pyx7e4tvzagdqfefg3eq4fcddfyahuh697g537nsy452r2":{"ada":{"lovelace":29}},"stake_test17rs4npyv6gh30vl0lm24p5yqfp4kfc8z58fvdarkyu6gzqc76jtlq":{"ada":{"lovelace":4}},"stake_test17rew790gxk7agcvsrnjwq2q2706tdum78x6zslqpgvfds7sa2j5pv":{"ada":{"lovelace":287339}},"stake_test1uq2gh6fe83kzhg89kd2fy0u5q9f9vn6sv7mh3lvf9svmuss94exqj":{"ada":{"lovelace":167829}},"stake_test1uq5lmqk2gy53jr5l48frzg4tfn9tdyy5dvckv5q469m9ersvjnvag":{"ada":{"lovelace":926472}},"stake_test1uqkd0ctnrmnn7enkq7xddnkcste7ngjum82feh4qvwgj7cg6y6cq4":{"ada":{"lovelace":651651}},"stake_test1upqe98kpn293lg05wdj8cwpsnurpg2l7gzz66282l3vau2cs6txyh":{"ada":{"lovelace":457850}},"stake_test1uz9xsqr8pzh4tha8kxdxz7ztuwy2yweyjv2yup9mjkat5psrhzf0k":{"ada":{"lovelace":4}},"stake_test1uzf3tp5aldtcjgezjagzfqfjxkpzs0hchq9z5sx3pn9y85qz6ltdx":{"ada":{"lovelace":15}},"stake_test1urd9py58gc650ytyzxmx2e2ehfpf2znfz44r024anqg5ddgfjxvpd":{"ada":{"lovelace":214450}},"stake17yxdjkh9dkgh3sf33zvfr8jkxm5eu3n5yhlk48r0xg07hfc7rrx5f":{"ada":{"lovelace":3}},"stake17yx5544sklexareq60fwfzk8v6fyyflz7sw2qa6zkjeutxgg5962f":{"ada":{"lovelace":12}},"stake17y3hjj2plm83mg4wsvlhcx2chsmudp3l38nln8ks90ng2ts85ek8x":{"ada":{"lovelace":983186}},"stake1794s7lzfx70r7usnh5rwnp3p0pffgxxnrg2a82w4cvlgpgs73vndq":{"ada":{"lovelace":29}},"stake17xgsxldeg2h8m6uhakza50q82slpwyyuz83y4j3v5mue2ngpk3yea":{"ada":{"lovelace":766744}},"stake1782lfaqnj69sr052y2j75tr0l9qtju5jpcra37d5kly8k8qrq5paj":{"ada":{"lovelace":12}},"stake178dyaw8xwt5e9l2trdum074ctgldkg0p5vle8wjnc534gaca3vuhe":{"ada":{"lovelace":29}},"stake178l6z98kw550wslydgfvknrnvzjs8z2tljgdyupeqrwh68sm9lgsv":{"ada":{"lovelace":22}},"stake1uxxegegerctuvcjq0k8lpftk8hhe2dlrduzj84p0vt60khsdv5fnv":{"ada":{"lovelace":10}},"stake1uxt9gvt4n6vth2yujjeggh965pvj8z9tpa0q9p9hlfrxrgc9remrq":{"ada":{"lovelace":20}},"stake1u8sp4raeuj5lawrdjn9v92hcf0asu4dhhvduaw4z7qsxttghsn2fg":{"ada":{"lovelace":48632}},"stake1u8n78ekuh8y85d8w6amg8tlmmar5zmmagvlxtqq2w82vhkcnt6xly":{"ada":{"lovelace":902639}}}}},"id":"1MNOuOeabrtE"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17phy3qqyuqxphprx3m0ykwgwhp8f842pp0c3jakyrnjepms44pfkz":{"ada":{"lovelace":26}},"stake_test17zrcsmfvfqs37cclln67qddn3djwt4p80zgpem4hxd63amg2h8v5j":{"ada":{"lovelace":672486}},"stake_test17r2twy4pyx7e4tvzagdqfefg3eq4fcddfyahuh697g537nsy452r2":{"ada":{"lovelace":29}},"stake_test17rs4npyv6gh30vl0lm24p5yqfp4kfc8z58fvdarkyu6gzqc76jtlq":{"ada":{"lovelace":4}},"stake_test17rew790gxk7agcvsrnjwq2q2706tdum78x6zslqpgvfds7sa2j5pv":{"ada":{"lovelace":287339}},"stake_test1uq2gh6fe83kzhg89kd2fy0u5q9f9vn6sv7mh3lvf9svmuss94exqj":{"ada":{"lovelace":167829}},"stake_test1uq5lmqk2gy53jr5l48frzg4tfn9tdyy5dvckv5q469m9ersvjnvag":{"ada":{"lovelace":926472}},"stake_test1uqkd0ctnrmnn7enkq7xddnkcste7ngjum82feh4qvwgj7cg6y6cq4":{"ada":{"lovelace":651651}},"stake_test1upqe98kpn293lg05wdj8cwpsnurpg2l7gzz66282l3vau2cs6txyh":{"ada":{"lovelace":457850}},"stake_test1uz9xsqr8pzh4tha8kxdxz7ztuwy2yweyjv2yup9mjkat5psrhzf0k":{"ada":{"lovelace":4}},"stake_test1uzf3tp5aldtcjgezjagzfqfjxkpzs0hchq9z5sx3pn9y85qz6ltdx":{"ada":{"lovelace":15}},"stake_test1urd9py58gc650ytyzxmx2e2ehfpf2znfz44r024anqg5ddgfjxvpd":{"ada":{"lovelace":214450}},"stake17yxdjkh9dkgh3sf33zvfr8jkxm5eu3n5yhlk48r0xg07hfc7rrx5f":{"ada":{"lovelace":3}},"stake17yx5544sklexareq60fwfzk8v6fyyflz7sw2qa6zkjeutxgg5962f":{"ada":{"lovelace":12}},"stake17y3hjj2plm83mg4wsvlhcx2chsmudp3l38nln8ks90ng2ts85ek8x":{"ada":{"lovelace":983186}},"stake1794s7lzfx70r7usnh5rwnp3p0pffgxxnrg2a82w4cvlgpgs73vndq":{"ada":{"lovelace":29}},"stake17xgsxldeg2h8m6uhakza50q82slpwyyuz83y4j3v5mue2ngpk3yea":{"ada":{"lovelace":766744}},"stake1782lfaqnj69sr052y2j75tr0l9qtju5jpcra37d5kly8k8qrq5paj":{"ada":{"lovelace":12}},"stake178dyaw8xwt5e9l2trdum074ctgldkg0p5vle8wjnc534gaca3vuhe":{"ada":{"lovelace":29}},"stake178l6z98kw550wslydgfvknrnvzjs8z2tljgdyupeqrwh68sm9lgsv":{"ada":{"lovelace":22}},"stake1uxxegegerctuvcjq0k8lpftk8hhe2dlrduzj84p0vt60khsdv5fnv":{"ada":{"lovelace":10}},"stake1uxt9gvt4n6vth2yujjeggh965pvj8z9tpa0q9p9hlfrxrgc9remrq":{"ada":{"lovelace":20}},"stake1u8sp4raeuj5lawrdjn9v92hcf0asu4dhhvduaw4z7qsxttghsn2fg":{"ada":{"lovelace":48632}},"stake1u8n78ekuh8y85d8w6amg8tlmmar5zmmagvlxtqq2w82vhkcnt6xly":{"ada":{"lovelace":902639}}}}},"id":"1MNOuOeabrtE"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/143.json b/server/test/vectors/SubmitTransactionResponse/143.json
index 2cd8fa845..802c97101 100644
--- a/server/test/vectors/SubmitTransactionResponse/143.json
+++ b/server/test/vectors/SubmitTransactionResponse/143.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17pvesps5mercaegyavugahq9ymhykjnhcv9cd9tw38q4h7c95en06":{"ada":{"lovelace":8}},"stake_test17rhp0nm3flrw869fqjlkstqstzpvc3x8lzuuw909wtpnf3gt8ygw2":{"ada":{"lovelace":8}},"stake_test1upr5wd2ezdq5xc0u92zgfsegfd5nrv85508vqmepmklq8agv7zshc":{"ada":{"lovelace":18}},"stake17yde2jnvhy6ushff9rnp0vd26la95uyuynwrek6x7wt92gggrnjjp":{"ada":{"lovelace":657269}},"stake17yjr0hlfyq8l7enx7j2psh6dkykqt20uddc70q7hq3p5fvskug3y5":{"ada":{"lovelace":26}}}}},"id":"fmrT6KFUfhkb"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17pvesps5mercaegyavugahq9ymhykjnhcv9cd9tw38q4h7c95en06":{"ada":{"lovelace":8}},"stake_test17rhp0nm3flrw869fqjlkstqstzpvc3x8lzuuw909wtpnf3gt8ygw2":{"ada":{"lovelace":8}},"stake_test1upr5wd2ezdq5xc0u92zgfsegfd5nrv85508vqmepmklq8agv7zshc":{"ada":{"lovelace":18}},"stake17yde2jnvhy6ushff9rnp0vd26la95uyuynwrek6x7wt92gggrnjjp":{"ada":{"lovelace":657269}},"stake17yjr0hlfyq8l7enx7j2psh6dkykqt20uddc70q7hq3p5fvskug3y5":{"ada":{"lovelace":26}}}}},"id":"fmrT6KFUfhkb"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/148.json b/server/test/vectors/SubmitTransactionResponse/148.json
index b4bdc540a..9be6479ba 100644
--- a/server/test/vectors/SubmitTransactionResponse/148.json
+++ b/server/test/vectors/SubmitTransactionResponse/148.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17q892856q2g7mpypz57tgwewg6fqcrdmnmeg029spsev8hghzgaj4":{"ada":{"lovelace":656916}},"stake_test17qwapnq452jpjadaqrzqatla2zup7lnzjtq525k629q5mhq6vqrnd":{"ada":{"lovelace":911808}},"stake_test17quhx7tlp4cdjkvm6dpc8z54a6snpqthzwtm3ev5tclazts5tkr9j":{"ada":{"lovelace":4}},"stake_test17zycwyt7j5kjhtpafde727ne355hl76x6spjk2uxaz64yzqlkemrj":{"ada":{"lovelace":9}},"stake_test17zgfrk393ct9mrjkjkp2kcyzrh7hr7hvz2wnpxvhwu688msf5yhlu":{"ada":{"lovelace":589388}},"stake_test17z537tdc3c8yknstvf3726zt0ftne8dvusprl9jr24zq5ssn6gt70":{"ada":{"lovelace":1492}},"stake_test1uq2lnemjp6z70ye0u3zg9urkere0ht9523v74prc262sjlgfz8nvg":{"ada":{"lovelace":875463}},"stake_test1uprrxaqs02vqhm69kxps39wuf5qthaz204hecxdnfhd6aqcah4pz7":{"ada":{"lovelace":592751}},"stake_test1upv6v8tdcltry7y5cqrkvpa5fhj3uzuedfy8pegxuv5f27gs4u2n4":{"ada":{"lovelace":29}},"stake_test1uph2q9j0s0zrzjvxxae7s5wcetht3666mzz8ydanc3hkphqwqhsx2":{"ada":{"lovelace":19}},"stake_test1uz9r9pra45daxwyuu4hxlcy8x2a2pjy3qpw6200nwqqnv6c054qcs":{"ada":{"lovelace":1}},"stake_test1uzfwa5feaxgva8j69tj8llcccp33vmpzfv4d6u7cy4r20yqlfs9ye":{"ada":{"lovelace":8}},"stake_test1uzh40kyx0fzlrw35l6xwmkahcqke2pe2le78wnmmnahluvsrgy56v":{"ada":{"lovelace":264483}},"stake_test1uz6j2mx6448498gpntd6atkg3tt8jd0cdxh8z3v36vxs57qs5rn05":{"ada":{"lovelace":17}},"stake_test1urq57z9gellk5p3n9ucuruzenv90jv9cfft9z97rwx422vsjss9qx":{"ada":{"lovelace":6}},"stake_test1urp080feqmpjw8q74sfpsxne7ahtqcgz2xu47jdnu0uexec74ucxc":{"ada":{"lovelace":929367}},"stake_test1urglzhllm44pugla5xlsazsw87llaqyxqyvax959gg4l6vg4dueuj":{"ada":{"lovelace":13}},"stake_test1urfp370cd637e4h7qghgcvw9n8n60f8nnvz9505yw8fuffgnv6zgh":{"ada":{"lovelace":17}},"stake_test1ureeysp26lmpw4uyvr30rn78glpam0thkq33jjqdcd40rxsx7dvpj":{"ada":{"lovelace":186599}},"stake17yq2twysal6ue6gq6ue7zm5ey6uh2uma6p4tjt0an6v9nmcjaq2tq":{"ada":{"lovelace":585400}},"stake17yj5zlw7keqls0axt47cnvgw5vp2gsaysnqshqv3qwl2frsa7qwsv":{"ada":{"lovelace":737939}},"stake17y57s0em62wkk33khp5q3zhw642u6j69wad0twwhp8m8vhqyw5c8h":{"ada":{"lovelace":3}},"stake17846exxy5slzhc70ttel0aht6cjsczqkt6sr5ex2t5axaks93mzkx":{"ada":{"lovelace":14}},"stake178knfy8qtacttmkfpxe07urx8mk288e8kn6ynxkv0knt87cruyje0":{"ada":{"lovelace":987793}},"stake178l4r57txwhfkjsq4zjtd9v08el6wqan98j83jnka44jaqq28q043":{"ada":{"lovelace":811216}},"stake1u9swaylrdkj2t4gnkqlqtwye5g4w09jhvn3pedvakr7e47s60yxak":{"ada":{"lovelace":18}},"stake1u9kzlh7hex2ymekqcawf6vychlwgednx5qfjkvm64yr5yxcsfhmkn":{"ada":{"lovelace":571757}},"stake1u9ujj4e5dw07gvru9np65zlpzfxyjjllmd8r54q08ejgw7ggjgppw":{"ada":{"lovelace":28}},"stake1ux502sle9jfcwvjdrapcjwzkzs8wqe5p75e3wtzr4sfwhzszgysh6":{"ada":{"lovelace":18}},"stake1u8rxaw924qlfm4vf85nqntsh87wjzx0uatd7c8xsk07kwtgc24g05":{"ada":{"lovelace":4}}}}},"id":"AkTcVHPKBCqq"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3176,"message":"A stake pool registration or update uses a VRF key that another stake pool already uses. Each stake pool needs its own VRF key. The field 'data.stakePool.id' indicates the stake pool, and 'data.vrfVerificationKeyHash' is the hash of the VRF key in use.","data":{"stakePool":{"id":"pool16w3xm8udr45a5tlcwyvczzxxu0uludsmdmwdq9tfqvhlxlh3hpg"},"vrfVerificationKeyHash":"cf4cf56a34c89fc6829bcb6f388525d5948f0f06da83dd86a187a8c04c19eac1"}},"id":"AkTcVHPKBCqq"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/150.json b/server/test/vectors/SubmitTransactionResponse/150.json
index 6e046a052..189496a89 100644
--- a/server/test/vectors/SubmitTransactionResponse/150.json
+++ b/server/test/vectors/SubmitTransactionResponse/150.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17q3q08pzfw5gy82lvggugqrzer8ek38858hyeh54lhxpsqqhucl4w":{"ada":{"lovelace":8}},"stake_test17p8w8s3n47cqr8sn90kly8uzsr5d8zezltpkhe7x4dfx46qkrayw6":{"ada":{"lovelace":920813}},"stake_test17z36glhapq68sa3yrhctjldj9xnssa6nn3jz9f3lfq4j9ksy3kpv4":{"ada":{"lovelace":5928}},"stake_test17r8lc4v2ns29qct7acevnzysrfk3eny5e7gxdnwl8khqu0cf7j0p2":{"ada":{"lovelace":5}},"stake_test1upyhx7dtwdus2jlpg8qpuwkt579v73whk8hea0mpv0lw9tq6n6f6p":{"ada":{"lovelace":7}},"stake_test1up2a974yaevzh88a42da4k3npgxwc0t9nsdshjr6rttusaguytlzp":{"ada":{"lovelace":5}},"stake17ygdpt3cjdnvedwckcrr8kfeupx5z4ylku2ft3g3uf2aulcq4tx43":{"ada":{"lovelace":668223}},"stake17y7y75zmfvp7nv6zjusez05s7v802svjarr6smtl8dvadhg6j8kml":{"ada":{"lovelace":536468}},"stake178cqhhfnq34z8w4kpx9m7g2ey9hf0en6fudlxtvaqlf7njqcuvh2k":{"ada":{"lovelace":770524}},"stake1u9sc8w9sntf6v9s7jd0ww0mz45qh4u939hsfugssruvxmyghygpuy":{"ada":{"lovelace":440249}},"stake1ux6u9ngxqd5nlf229zctvcq06s6e8zkh4l5wlxwjtcx442scezh7u":{"ada":{"lovelace":834568}},"stake1u889w2dn3x0p9xl78mja7ccrufs6acn0jmft38sn79ak74gj6w7x8":{"ada":{"lovelace":148215}},"stake1u8geuw8dh4jyah849vaqxdaedsfeazdrftv2ag0mewg82zqwy9a9h":{"ada":{"lovelace":953670}},"stake1u86hmhqda526v3g0ktszrdepmu8khmnrayezau5ycrdcj0ctzmtqe":{"ada":{"lovelace":870596}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17q3q08pzfw5gy82lvggugqrzer8ek38858hyeh54lhxpsqqhucl4w":{"ada":{"lovelace":8}},"stake_test17p8w8s3n47cqr8sn90kly8uzsr5d8zezltpkhe7x4dfx46qkrayw6":{"ada":{"lovelace":920813}},"stake_test17z36glhapq68sa3yrhctjldj9xnssa6nn3jz9f3lfq4j9ksy3kpv4":{"ada":{"lovelace":5928}},"stake_test17r8lc4v2ns29qct7acevnzysrfk3eny5e7gxdnwl8khqu0cf7j0p2":{"ada":{"lovelace":5}},"stake_test1upyhx7dtwdus2jlpg8qpuwkt579v73whk8hea0mpv0lw9tq6n6f6p":{"ada":{"lovelace":7}},"stake_test1up2a974yaevzh88a42da4k3npgxwc0t9nsdshjr6rttusaguytlzp":{"ada":{"lovelace":5}},"stake17ygdpt3cjdnvedwckcrr8kfeupx5z4ylku2ft3g3uf2aulcq4tx43":{"ada":{"lovelace":668223}},"stake17y7y75zmfvp7nv6zjusez05s7v802svjarr6smtl8dvadhg6j8kml":{"ada":{"lovelace":536468}},"stake178cqhhfnq34z8w4kpx9m7g2ey9hf0en6fudlxtvaqlf7njqcuvh2k":{"ada":{"lovelace":770524}},"stake1u9sc8w9sntf6v9s7jd0ww0mz45qh4u939hsfugssruvxmyghygpuy":{"ada":{"lovelace":440249}},"stake1ux6u9ngxqd5nlf229zctvcq06s6e8zkh4l5wlxwjtcx442scezh7u":{"ada":{"lovelace":834568}},"stake1u889w2dn3x0p9xl78mja7ccrufs6acn0jmft38sn79ak74gj6w7x8":{"ada":{"lovelace":148215}},"stake1u8geuw8dh4jyah849vaqxdaedsfeazdrftv2ag0mewg82zqwy9a9h":{"ada":{"lovelace":953670}},"stake1u86hmhqda526v3g0ktszrdepmu8khmnrayezau5ycrdcj0ctzmtqe":{"ada":{"lovelace":870596}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/151.json b/server/test/vectors/SubmitTransactionResponse/151.json
index d07d6f1cd..6e283ef11 100644
--- a/server/test/vectors/SubmitTransactionResponse/151.json
+++ b/server/test/vectors/SubmitTransactionResponse/151.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qzntd942nefnqdzhpqy7lyggtqw3wudsne6qevn35xtrzgt083hk":{"ada":{"lovelace":1}},"stake_test17z3yhn0k8zgs5appuvy77vmr7h37q494pjpwht4wk8ntqjsl5uf8u":{"ada":{"lovelace":778801}},"stake_test17zj3jqh7mtg8dgfjks2e3nnq4jkjuz3f8zwse6szjka8t2sdj03v7":{"ada":{"lovelace":10}},"stake_test17r2rhku9crp7wnm8tul65c2dg5j4af60dtmencz2w9xxj6s7udcrl":{"ada":{"lovelace":519838}},"stake_test17rsj9h3fazsp36nlsvdvuyfj4nktfh929nd57960llf8qlq9f0vzc":{"ada":{"lovelace":804934}},"stake_test1uq938ehvrxlmfxllp6dv9xxrcnygccjuw0mxu2xseg8h2zglgxwn6":{"ada":{"lovelace":29}},"stake_test1uqm23qppd5kv4k60fdvwclhnuu3swnnn3g4dzmtzcug5fqs3699jm":{"ada":{"lovelace":26}},"stake_test1upzygjprljh2w4rqp5rh6lxrn4t2c39ehna0t9s37spfkgsw8gf7z":{"ada":{"lovelace":244964}},"stake_test1uzqdeycp52mnjtw2gnw7v7ml6kfc883t2g4r833x69re09c94rra4":{"ada":{"lovelace":16}},"stake_test1uzt5qp3ljztc0wm3c7c8qzxcehqqpu8nyd3g7n04sk88h7qmxj377":{"ada":{"lovelace":6}},"stake_test1urarw58uays5uduf27shen2ye7quwzcs9k4vkm6vq7ng8pcrxm5mc":{"ada":{"lovelace":18}},"stake17y9vgmcrt756tefeps36gzuduevzwytpjggfrwns7e8xktqrdgp3u":{"ada":{"lovelace":952465}},"stake178rjy4k4u0zdf5v55673mnvt843ayr7x85mcn57faadvl8czs0lql":{"ada":{"lovelace":10}},"stake178vxe2p4jcsay7s9x8a38q3ke3xjeytylrydutqun2v72as8uj352":{"ada":{"lovelace":21}},"stake1uylu76787qv9h9ej8fndekl6wv9hrveu3jv8rpcuhzq5myc54hn8q":{"ada":{"lovelace":309833}},"stake1uxarx62ghafqgtp87m7pk9t7nckaeucc9zthkkacdu96n0cagzet0":{"ada":{"lovelace":269424}},"stake1u8yst2jel79e379p92f2zgq0eywj00zzs6tvz26vnwcj7lqmkj94h":{"ada":{"lovelace":566588}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17qzntd942nefnqdzhpqy7lyggtqw3wudsne6qevn35xtrzgt083hk":{"ada":{"lovelace":1}},"stake_test17z3yhn0k8zgs5appuvy77vmr7h37q494pjpwht4wk8ntqjsl5uf8u":{"ada":{"lovelace":778801}},"stake_test17zj3jqh7mtg8dgfjks2e3nnq4jkjuz3f8zwse6szjka8t2sdj03v7":{"ada":{"lovelace":10}},"stake_test17r2rhku9crp7wnm8tul65c2dg5j4af60dtmencz2w9xxj6s7udcrl":{"ada":{"lovelace":519838}},"stake_test17rsj9h3fazsp36nlsvdvuyfj4nktfh929nd57960llf8qlq9f0vzc":{"ada":{"lovelace":804934}},"stake_test1uq938ehvrxlmfxllp6dv9xxrcnygccjuw0mxu2xseg8h2zglgxwn6":{"ada":{"lovelace":29}},"stake_test1uqm23qppd5kv4k60fdvwclhnuu3swnnn3g4dzmtzcug5fqs3699jm":{"ada":{"lovelace":26}},"stake_test1upzygjprljh2w4rqp5rh6lxrn4t2c39ehna0t9s37spfkgsw8gf7z":{"ada":{"lovelace":244964}},"stake_test1uzqdeycp52mnjtw2gnw7v7ml6kfc883t2g4r833x69re09c94rra4":{"ada":{"lovelace":16}},"stake_test1uzt5qp3ljztc0wm3c7c8qzxcehqqpu8nyd3g7n04sk88h7qmxj377":{"ada":{"lovelace":6}},"stake_test1urarw58uays5uduf27shen2ye7quwzcs9k4vkm6vq7ng8pcrxm5mc":{"ada":{"lovelace":18}},"stake17y9vgmcrt756tefeps36gzuduevzwytpjggfrwns7e8xktqrdgp3u":{"ada":{"lovelace":952465}},"stake178rjy4k4u0zdf5v55673mnvt843ayr7x85mcn57faadvl8czs0lql":{"ada":{"lovelace":10}},"stake178vxe2p4jcsay7s9x8a38q3ke3xjeytylrydutqun2v72as8uj352":{"ada":{"lovelace":21}},"stake1uylu76787qv9h9ej8fndekl6wv9hrveu3jv8rpcuhzq5myc54hn8q":{"ada":{"lovelace":309833}},"stake1uxarx62ghafqgtp87m7pk9t7nckaeucc9zthkkacdu96n0cagzet0":{"ada":{"lovelace":269424}},"stake1u8yst2jel79e379p92f2zgq0eywj00zzs6tvz26vnwcj7lqmkj94h":{"ada":{"lovelace":566588}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/152.json b/server/test/vectors/SubmitTransactionResponse/152.json
index 7a06d2ed2..6a281d625 100644
--- a/server/test/vectors/SubmitTransactionResponse/152.json
+++ b/server/test/vectors/SubmitTransactionResponse/152.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3144,"message":"Some hash digest of (optional) stake pool metadata is too long. When registering, stake pools can supply an external metadata file and a hash digest of the content. The hashing algorithm is left open but the output digest must be smaller than 32 bytes. The field 'data.infringingStakePool' indicates which stake pool has an invalid metadata hash and 'data.computedMetadataHashSize' documents the computed hash size.","data":{"infringingStakePool":{"id":"pool1q2d3qfyn9mhyxmu4mx9rws8au49edz9px988m2qjrpjm7q7w7w8"},"computedMetadataHashSize":{"bytes":17}}},"id":"fcuWettlVwoT"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3174,"message":"Some withdrawals exceed the balance of their account. A withdrawal may take any amount up to the account balance, but the total withdrawn from an account across the whole batch (the top-level transaction and its sub-transactions) must not exceed the balance at the start of the batch. In legacy mode, only withdrawals from sub-transactions count towards that total. The field 'data.excessiveWithdrawals' lists, for each account, the total withdrawn and the balance at the start of the batch.","data":{"excessiveWithdrawals":[{"account":"stake_test17zey734y54tfdhtuucj6gkc6dy2kccvta02t6z5r297pexcmqwvva","withdrawn":{"ada":{"lovelace":354013}},"balance":{"ada":{"lovelace":13}}}]}},"id":"fcuWettlVwoT"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/153.json b/server/test/vectors/SubmitTransactionResponse/153.json
index 035cecf3c..60528c825 100644
--- a/server/test/vectors/SubmitTransactionResponse/153.json
+++ b/server/test/vectors/SubmitTransactionResponse/153.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake1uycu5sucfy9yukuj6wd4sru7fpyw8w753rr0t2apghnjx0q3s08hf":{"ada":{"lovelace":18}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake1uycu5sucfy9yukuj6wd4sru7fpyw8w753rr0t2apghnjx0q3s08hf":{"ada":{"lovelace":18}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/154.json b/server/test/vectors/SubmitTransactionResponse/154.json
index 33e5c793c..192f14d07 100644
--- a/server/test/vectors/SubmitTransactionResponse/154.json
+++ b/server/test/vectors/SubmitTransactionResponse/154.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qje9q8rsn97vuh3cgsvtw4m08rhyhq8mxdhfnwx4qgkgdssgp77m":{"ada":{"lovelace":27}},"stake_test17phx8nqjdfs82cdw6h8e8hzzew4xnpnuuuqsacyxpkkxj4sj02txm":{"ada":{"lovelace":17}},"stake_test17r24dsn066ne4k4pk5unssf6z70t3pleyx8qaaenulqyw7sym4pcd":{"ada":{"lovelace":16}},"stake_test1uql0h3juq8m079u5dj9v7zzsh2ah45037nfurj5nymzg3pc4gx9na":{"ada":{"lovelace":5}},"stake17xnqaylpyzwnypdlmae7dp4yxj3fxq050vmd6sqh94gd56g0atxgc":{"ada":{"lovelace":695595}},"stake1uyer52pytmn00uar4mfqdyamydkaqq69z48u6q7ed2vwa6c03qh7r":{"ada":{"lovelace":368016}},"stake1u9yp3vyfvc58f4qr6awvkdzdynuqr8uu6jah3f3mcm2a9zqak4wh5":{"ada":{"lovelace":562252}},"stake1ux5e9xgw426gatsmsyacq5qq3jn7fncxrur0mpqgqjc9g7sspt7z0":{"ada":{"lovelace":21}}}}},"id":"iIrj8ZzPLd1K"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17qje9q8rsn97vuh3cgsvtw4m08rhyhq8mxdhfnwx4qgkgdssgp77m":{"ada":{"lovelace":27}},"stake_test17phx8nqjdfs82cdw6h8e8hzzew4xnpnuuuqsacyxpkkxj4sj02txm":{"ada":{"lovelace":17}},"stake_test17r24dsn066ne4k4pk5unssf6z70t3pleyx8qaaenulqyw7sym4pcd":{"ada":{"lovelace":16}},"stake_test1uql0h3juq8m079u5dj9v7zzsh2ah45037nfurj5nymzg3pc4gx9na":{"ada":{"lovelace":5}},"stake17xnqaylpyzwnypdlmae7dp4yxj3fxq050vmd6sqh94gd56g0atxgc":{"ada":{"lovelace":695595}},"stake1uyer52pytmn00uar4mfqdyamydkaqq69z48u6q7ed2vwa6c03qh7r":{"ada":{"lovelace":368016}},"stake1u9yp3vyfvc58f4qr6awvkdzdynuqr8uu6jah3f3mcm2a9zqak4wh5":{"ada":{"lovelace":562252}},"stake1ux5e9xgw426gatsmsyacq5qq3jn7fncxrur0mpqgqjc9g7sspt7z0":{"ada":{"lovelace":21}}}}},"id":"iIrj8ZzPLd1K"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/155.json b/server/test/vectors/SubmitTransactionResponse/155.json
index 7d9b75871..4737dc948 100644
--- a/server/test/vectors/SubmitTransactionResponse/155.json
+++ b/server/test/vectors/SubmitTransactionResponse/155.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qe8kry0nx56cwg2z6k2yzuyd2y0c7dp09n7j3eygk39eyspvjfkx":{"ada":{"lovelace":604540}},"stake_test17pdh60cdxr7q5dx9648apx5dz8nhfk8ltxrsqxh7uy70xacj9ejr2":{"ada":{"lovelace":937501}},"stake_test17pah65fymhgu2hqdd09jjgn0s5h5yx5t3p9q0nktr80pk9s6l8wdy":{"ada":{"lovelace":508223}},"stake_test17zsrrz6t9nj000fywvvltmyn4y03c032w8xxz7dkmenmfkc7dj2rh":{"ada":{"lovelace":820257}},"stake_test17rdslpvwt26caz54ngy7ncvy6zxhweqvflh0q3uag0l204qq4uqnd":{"ada":{"lovelace":264928}},"stake_test1upnf7emtn3c3ht2m4yae80gzje27xt5fcq2jgvy5ukdg2fqs77wss":{"ada":{"lovelace":346984}},"stake_test1uzr4w2u736fycs64w0f5qj98t72n02dwzsfcuxxer2fuuwsnqepea":{"ada":{"lovelace":6}},"stake_test1urhrft87rseyk6u5etmprhsf0qk3eymuencaj0t5mukpg7s2p5jgm":{"ada":{"lovelace":15}},"stake179lvcgwd2f62r6k7cmm2hs6f6t03cv9scgwlawm8fm496gg3s0a5j":{"ada":{"lovelace":17}},"stake17x0vwngsdy54fxewm2m98shvx89e08gs0nk9a4s0ey6evxgzs3g4s":{"ada":{"lovelace":612703}},"stake1uy5nrcy5y0fau3q4aj9z4tjn9mt7f59r03m4xrhelmqkhss5nm7zv":{"ada":{"lovelace":846940}},"stake1u9d0pv2q2mplf8ztw2hhenw6642a60nnqnxsz6cf0xylk5sfnevj3":{"ada":{"lovelace":892219}},"stake1uxv2dkg923l5lpzhk75g9fgtq8qrkfe50u4sgf7k6axkzeqw86tzy":{"ada":{"lovelace":19}},"stake1ux5xz3mx5njg427u2tmt6m45zcg79683lcpfqqxgds5zg7qphzghd":{"ada":{"lovelace":22}},"stake1u8y8xjjlu5yga479as6alspkwmu4gd64rgetvzqqr4ln8ac98zuwg":{"ada":{"lovelace":674235}},"stake1u8d6l8sld2wd9sygckuuakm528j2uyhk8w69npqwkuk9mnswhzdhh":{"ada":{"lovelace":1}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17qe8kry0nx56cwg2z6k2yzuyd2y0c7dp09n7j3eygk39eyspvjfkx":{"ada":{"lovelace":604540}},"stake_test17pdh60cdxr7q5dx9648apx5dz8nhfk8ltxrsqxh7uy70xacj9ejr2":{"ada":{"lovelace":937501}},"stake_test17pah65fymhgu2hqdd09jjgn0s5h5yx5t3p9q0nktr80pk9s6l8wdy":{"ada":{"lovelace":508223}},"stake_test17zsrrz6t9nj000fywvvltmyn4y03c032w8xxz7dkmenmfkc7dj2rh":{"ada":{"lovelace":820257}},"stake_test17rdslpvwt26caz54ngy7ncvy6zxhweqvflh0q3uag0l204qq4uqnd":{"ada":{"lovelace":264928}},"stake_test1upnf7emtn3c3ht2m4yae80gzje27xt5fcq2jgvy5ukdg2fqs77wss":{"ada":{"lovelace":346984}},"stake_test1uzr4w2u736fycs64w0f5qj98t72n02dwzsfcuxxer2fuuwsnqepea":{"ada":{"lovelace":6}},"stake_test1urhrft87rseyk6u5etmprhsf0qk3eymuencaj0t5mukpg7s2p5jgm":{"ada":{"lovelace":15}},"stake179lvcgwd2f62r6k7cmm2hs6f6t03cv9scgwlawm8fm496gg3s0a5j":{"ada":{"lovelace":17}},"stake17x0vwngsdy54fxewm2m98shvx89e08gs0nk9a4s0ey6evxgzs3g4s":{"ada":{"lovelace":612703}},"stake1uy5nrcy5y0fau3q4aj9z4tjn9mt7f59r03m4xrhelmqkhss5nm7zv":{"ada":{"lovelace":846940}},"stake1u9d0pv2q2mplf8ztw2hhenw6642a60nnqnxsz6cf0xylk5sfnevj3":{"ada":{"lovelace":892219}},"stake1uxv2dkg923l5lpzhk75g9fgtq8qrkfe50u4sgf7k6axkzeqw86tzy":{"ada":{"lovelace":19}},"stake1ux5xz3mx5njg427u2tmt6m45zcg79683lcpfqqxgds5zg7qphzghd":{"ada":{"lovelace":22}},"stake1u8y8xjjlu5yga479as6alspkwmu4gd64rgetvzqqr4ln8ac98zuwg":{"ada":{"lovelace":674235}},"stake1u8d6l8sld2wd9sygckuuakm528j2uyhk8w69npqwkuk9mnswhzdhh":{"ada":{"lovelace":1}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/157.json b/server/test/vectors/SubmitTransactionResponse/157.json
index 0386948f2..0f9d84e98 100644
--- a/server/test/vectors/SubmitTransactionResponse/157.json
+++ b/server/test/vectors/SubmitTransactionResponse/157.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3150,"message":"The transaction is attempting to withdraw rewards from stake credentials that do not engage in on-chain governance. Credentials must be associated with a delegate representative (registered, abstain or noConfidence) before associated rewards can be withdrawn. The field 'data.marginalizedCredentials' lists all the affected credentials.","data":{"marginalizedCredentials":["2f58e932b1a27092e3a949298ba6e2741a5465dd116ed09e33cb29ba","4f7a0a256e1780d9f075f43020c1a5e02b7bfb6ecabdcfcc6f2f05cf","d55cf9fbafd5ea42340ce1af79bd1c5b52de0a33e5b9087eba072c21","f1c080bf7409b47a812458fc895c1b6d2e565226e8e3de7ed3dcd1ae","f92f8711a4621a9c5ef0ee9f586a833cdd533a517286169b1fda375d"]}},"id":"6ABBg4VbDPNh"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3173,"message":"All inputs of the transaction are already spent. This usually means that the transaction has already been included in the ledger, so there's no need to submit it again."},"id":"6ABBg4VbDPNh"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/158.json b/server/test/vectors/SubmitTransactionResponse/158.json
index 20348befa..988a98de1 100644
--- a/server/test/vectors/SubmitTransactionResponse/158.json
+++ b/server/test/vectors/SubmitTransactionResponse/158.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3144,"message":"Some hash digest of (optional) stake pool metadata is too long. When registering, stake pools can supply an external metadata file and a hash digest of the content. The hashing algorithm is left open but the output digest must be smaller than 32 bytes. The field 'data.infringingStakePool' indicates which stake pool has an invalid metadata hash and 'data.computedMetadataHashSize' documents the computed hash size.","data":{"infringingStakePool":{"id":"pool1gfv7n08hunrwq85nrdln2qkzncqsm39whfx3e8pcklafq9q8vvk"},"computedMetadataHashSize":{"bytes":16}}},"id":"Khun7sXlZ9sk"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3171,"message":"The collateral return output is sent to a pointer address. Since the Dijkstra era, pointer addresses are no longer allowed in collateral return outputs. The field 'data.collateralReturn' contains the offending output.","data":{"collateralReturn":{"address":"addr_test1zpc95rzus2kgymygjqfsfq6nmhk3zexj2zld5g5zhy93mjnn9ww89wjpxpg2u6ydge9gamm5rsuu2lq2s3nkszazsdtq6d4atp","value":{"ada":{"lovelace":1},"245d5a7a06fe18358242e81281cd5ba9e6abe4efc54e7b659f25abae":{"0da3327af0bf29add4":2,"34":1}},"datum":"a0","script":{"language":"native","json":{"clause":"guard","from":"0ab89f243898a566cd4b01614d12781013876dd0374b456886cdc8f5"},"cbor":"82068201581c0ab89f243898a566cd4b01614d12781013876dd0374b456886cdc8f5"}}}},"id":"Khun7sXlZ9sk"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/165.json b/server/test/vectors/SubmitTransactionResponse/165.json
index 548f83714..58dbe14ea 100644
--- a/server/test/vectors/SubmitTransactionResponse/165.json
+++ b/server/test/vectors/SubmitTransactionResponse/165.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3116,"message":"Some Plutus scripts in the witness set or in an output are invalid. Scripts must be well-formed flat-encoded Plutus scripts, CBOR-encoded. Yes, there's a double binary encoding. The outer-most encoding is therefore just a plain CBOR bytestring. Note that some tools such as the cardano-cli triple encode scripts for some reasons, resulting in a double outer-most CBOR encoding. Make sure that your script are correctly encoded. The field 'data.malformedScripts' lists the hash digests of all the problematic scripts.","data":{"malformedScripts":["1e64f3c0ce8c8f2313e8c02818888b020336cd025db8f706273ca066","f0f2c2300e316159e325a16ffdb4706a3c9f73ab2e69290d835c3f1e"]}},"id":"CZoeha8FPKae"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3158,"message":"The transaction is trying to withdraw more funds than specified in a governance action! The field 'data.providedWithdrawal' indicates the amount specified in the transaction, whereas 'data.computedWithdrawal' is the actual amount as computed by the ledger.","data":{"computedWithdrawal":{"ada":{"lovelace":13}},"providedWithdrawal":{"ada":{"lovelace":245259}}}},"id":"CZoeha8FPKae"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/166.json b/server/test/vectors/SubmitTransactionResponse/166.json
index e18f41653..7754ae14f 100644
--- a/server/test/vectors/SubmitTransactionResponse/166.json
+++ b/server/test/vectors/SubmitTransactionResponse/166.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3144,"message":"Some hash digest of (optional) stake pool metadata is too long. When registering, stake pools can supply an external metadata file and a hash digest of the content. The hashing algorithm is left open but the output digest must be smaller than 32 bytes. The field 'data.infringingStakePool' indicates which stake pool has an invalid metadata hash and 'data.computedMetadataHashSize' documents the computed hash size.","data":{"infringingStakePool":{"id":"pool157qa0jxaxvddl5w8usdm685mpwsupure8a9xglfzhk8nzvwa0ax"},"computedMetadataHashSize":{"bytes":17}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3176,"message":"A stake pool registration or update uses a VRF key that another stake pool already uses. Each stake pool needs its own VRF key. The field 'data.stakePool.id' indicates the stake pool, and 'data.vrfVerificationKeyHash' is the hash of the VRF key in use.","data":{"stakePool":{"id":"pool1cc5texzty2n0evsyrnjdn42q95v86z2wz3r92uzs37gwjf0ut0s"},"vrfVerificationKeyHash":"213d95a9b76786bf26a83c38e881351894cb7b2d6e95dcf5b4a489726ca5e76d"}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/167.json b/server/test/vectors/SubmitTransactionResponse/167.json
index 41ea3d8a6..25cc4f935 100644
--- a/server/test/vectors/SubmitTransactionResponse/167.json
+++ b/server/test/vectors/SubmitTransactionResponse/167.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3158,"message":"The transaction is trying to withdraw more funds than specified in a governance action! The field 'data.providedWithdrawal' indicates the amount specified in the transaction, whereas 'data.computedWithdrawal' is the actual amount as computed by the ledger.","data":{"computedWithdrawal":{"ada":{"lovelace":166898}},"providedWithdrawal":{"ada":{"lovelace":25}}}},"id":"2EIuVstOF9yp"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3175,"message":"Some account balances fall outside the intervals asserted by the transaction. An interval has an inclusive lower bound and an exclusive upper bound, or asserts an exact balance. The field 'data.checkedAgainst' tells which balances were checked: 'batchStart' for the balances at the start of the batch, or 'transaction' for the balances seen by the (sub-)transaction that asserts the interval. The field 'data.balancesOutsideIntervals' lists each account with its balance and the interval it doesn't satisfy.","data":{"checkedAgainst":"batchStart","balancesOutsideIntervals":[{"account":"stake_test17zvnvakph26jdtj8ra9twyt9jht50z5wn5gts3vwjrxcvsqs00knn","balance":{"ada":{"lovelace":865272}},"interval":{"exact":{"ada":{"lovelace":661921}}}},{"account":"stake_test17rrjejhd0ytestsa3yw8dhjv9qrsz3xcykhfrdx9ekz7u2q9t5gn2","balance":{"ada":{"lovelace":472399}},"interval":{"lowerBound":{"ada":{"lovelace":16}}}},{"account":"stake_test1uqe76z0wtrm7a0x9eruxfvnemccss0ff7z4a5jye69464rgdvtka7","balance":{"ada":{"lovelace":6}},"interval":{"lowerBound":{"ada":{"lovelace":509133}}}},{"account":"stake1u9j8las0l2hjfvdcsez4ngy6dw7vkq4r6pyht784jcl9xkcr07nzk","balance":{"ada":{"lovelace":5}},"interval":{"lowerBound":{"ada":{"lovelace":616547}}}},{"account":"stake1ux0ehcujal8exeewt2fc7nzl8jy5v9l8ulgukeepcuq5mqgfljeql","balance":{"ada":{"lovelace":2}},"interval":{"upperBound":{"ada":{"lovelace":765625}}}}]}},"id":"2EIuVstOF9yp"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/168.json b/server/test/vectors/SubmitTransactionResponse/168.json
index 5546b4917..6d5198591 100644
--- a/server/test/vectors/SubmitTransactionResponse/168.json
+++ b/server/test/vectors/SubmitTransactionResponse/168.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17ppsnfal09e7p53tag557az8v0g5g8q82gz38x90r5kfs9qcf6d2l":{"ada":{"lovelace":361468}},"stake_test17zq98ks27qh7p5le4wuqg3v3m42sd3r7g8q5wqckng4wyvcvqgwf9":{"ada":{"lovelace":20}},"stake_test17zv8tnzg4jcfvnvzutd0xne8t63uv5w5gerwk29vxmjfswc67kh7z":{"ada":{"lovelace":8}},"stake_test17z4xx5jf4a9uegfm7jq3zxk8eqr3kljjjf2pwq28u60df6c6m3q9g":{"ada":{"lovelace":56943}},"stake_test17z4tsrtf7c4f5ytlfye4ynx0vrw6rq4c8emau2rp5uevrpgljaers":{"ada":{"lovelace":301302}},"stake_test17rzct8h47nuapqf4ev9hglavvdg0g0zmx5a8nram5afgztsc3mwwv":{"ada":{"lovelace":30}},"stake_test17r09vq4hhm6afj5dqj3q3puruj3ff9x4wxhd2u4uxye54scswqc6k":{"ada":{"lovelace":8}},"stake17y5npn68j4w678787l6392hvtcppqnypj8ye4njl96ntyrquvm574":{"ada":{"lovelace":26}},"stake17yucwypa9q6wrdufsz4wcm2gq9gggwjuyelspwnq4wefkqc8ga9jj":{"ada":{"lovelace":696080}},"stake179y94xm0n8z655dfj4072s9ulh8q63m36umdm3qtktcmsuc34gtfe":{"ada":{"lovelace":214499}},"stake179j827d80zpshzuhe7zvm4mw5vkfah7msmjvujquagw77rghqdcst":{"ada":{"lovelace":657048}},"stake17xtz5zcl7gqw5r9v2juvvegc7v7jvh3pp7l8a36uakgfzdg68u8su":{"ada":{"lovelace":14}},"stake178mpm2xffm2lpd4vryk9zgwxr9dyaaqv6dhnkp940v707gcclhx3x":{"ada":{"lovelace":974035}},"stake1uyd2trhgt6f3yr23kkuk0tgxnuxtvlzhaumnd0pp36w0avsqgplfv":{"ada":{"lovelace":202965}},"stake1uxaz28cnevpjzkghezqxxjxygthy4jnq9z5t7dnf5taqezcxhqqsr":{"ada":{"lovelace":4}},"stake1u8wvzexf6f6lkxa3e43zpu7syacnzgcun78lcm4z0j98zkc36jcel":{"ada":{"lovelace":20}}}}},"id":"BSw0zsOBwzeX"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17ppsnfal09e7p53tag557az8v0g5g8q82gz38x90r5kfs9qcf6d2l":{"ada":{"lovelace":361468}},"stake_test17zq98ks27qh7p5le4wuqg3v3m42sd3r7g8q5wqckng4wyvcvqgwf9":{"ada":{"lovelace":20}},"stake_test17zv8tnzg4jcfvnvzutd0xne8t63uv5w5gerwk29vxmjfswc67kh7z":{"ada":{"lovelace":8}},"stake_test17z4xx5jf4a9uegfm7jq3zxk8eqr3kljjjf2pwq28u60df6c6m3q9g":{"ada":{"lovelace":56943}},"stake_test17z4tsrtf7c4f5ytlfye4ynx0vrw6rq4c8emau2rp5uevrpgljaers":{"ada":{"lovelace":301302}},"stake_test17rzct8h47nuapqf4ev9hglavvdg0g0zmx5a8nram5afgztsc3mwwv":{"ada":{"lovelace":30}},"stake_test17r09vq4hhm6afj5dqj3q3puruj3ff9x4wxhd2u4uxye54scswqc6k":{"ada":{"lovelace":8}},"stake17y5npn68j4w678787l6392hvtcppqnypj8ye4njl96ntyrquvm574":{"ada":{"lovelace":26}},"stake17yucwypa9q6wrdufsz4wcm2gq9gggwjuyelspwnq4wefkqc8ga9jj":{"ada":{"lovelace":696080}},"stake179y94xm0n8z655dfj4072s9ulh8q63m36umdm3qtktcmsuc34gtfe":{"ada":{"lovelace":214499}},"stake179j827d80zpshzuhe7zvm4mw5vkfah7msmjvujquagw77rghqdcst":{"ada":{"lovelace":657048}},"stake17xtz5zcl7gqw5r9v2juvvegc7v7jvh3pp7l8a36uakgfzdg68u8su":{"ada":{"lovelace":14}},"stake178mpm2xffm2lpd4vryk9zgwxr9dyaaqv6dhnkp940v707gcclhx3x":{"ada":{"lovelace":974035}},"stake1uyd2trhgt6f3yr23kkuk0tgxnuxtvlzhaumnd0pp36w0avsqgplfv":{"ada":{"lovelace":202965}},"stake1uxaz28cnevpjzkghezqxxjxygthy4jnq9z5t7dnf5taqezcxhqqsr":{"ada":{"lovelace":4}},"stake1u8wvzexf6f6lkxa3e43zpu7syacnzgcun78lcm4z0j98zkc36jcel":{"ada":{"lovelace":20}}}}},"id":"BSw0zsOBwzeX"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/169.json b/server/test/vectors/SubmitTransactionResponse/169.json
index 7d6eb8ff7..5d40fc952 100644
--- a/server/test/vectors/SubmitTransactionResponse/169.json
+++ b/server/test/vectors/SubmitTransactionResponse/169.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3146,"message":"The transaction references an unknown stake credential. For example, to delegate to a stake pool, you must first register the stake key or script used for delegation. This may be done in the same transaction or in an earlier transaction but cannot happen retro-actively. The field 'data.unknownCredential' indicates what credential is used without being registered.","data":{"from":"script","unknownCredential":"c859fa755b95eb02a0899d76f6cf9b4e81ba5b160ccba24d0382cf65"}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3172,"message":"A stake pool registration carries a BLS key with an invalid proof of possession. The proof must show possession of the signing key that matches the BLS verification key. The field 'data.stakePool.id' indicates the stake pool, and 'data.blsKey' contains the key and proof found in the certificate.","data":{"stakePool":{"id":"pool1wvh7p53j6hkf5f8s872c7m2f2qmlp9nnmannae7qfj7yz4uzwgp"},"blsKey":{"verificationKey":"b742336b7fe829b32c292b1b86feda396730085eb45ec5b582999cc6947581e23f70a45ff070c1358af09cef72c3402e0b3e99f39f35720f2f782f250599f771445c2b1e4a17c71d09fe631fd69eed8c716619753606e561f2f333239b107e5a","proofOfPossession":"b5206e725233f3738eac93c3eee05266fb8553309a10e5c2fc4b866074442d948bfb2583846fa160dfe2de265e1282fe"}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/174.json b/server/test/vectors/SubmitTransactionResponse/174.json
index 9f2935b9d..3417742c3 100644
--- a/server/test/vectors/SubmitTransactionResponse/174.json
+++ b/server/test/vectors/SubmitTransactionResponse/174.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qegnklmat0usam3d874s0c0zunx23v7vx4y58j3lu05h4qqrcnfk":{"ada":{"lovelace":948109}},"stake_test17qmh0r7rs4ugld4p94g68376uxyl7eq3w7y7slex666jr5gfe2wz5":{"ada":{"lovelace":292449}},"stake_test17qayf54uu5428egp9vhgfqwxlemsdsux80c0f8al2kuxdcc5euhzp":{"ada":{"lovelace":758900}},"stake_test17z3n7enh562kwxl9e2l4fztnt03rpm6tn3vqypgcrujglrcma5n53":{"ada":{"lovelace":625354}},"stake_test17zj3ghsq47vr0l5t4e7j4v3756tr3fvg4a32wem3wyf2fqquhnuds":{"ada":{"lovelace":670687}},"stake_test17zuw2jg7hesugf827yad6k5pypqhna5atr83pq0jlelp9lqxjlwzc":{"ada":{"lovelace":13}},"stake_test17za8nt9fkclld854jjhj68nqy47urhwcszw2pm59ctsyafg4mrwtd":{"ada":{"lovelace":27}},"stake_test17rsv48zmnzym9ceskawanh7ukejz8s2te0xh447j0nq3vzgp3em8c":{"ada":{"lovelace":76977}},"stake_test1uq0h7flckeg4as20dxkpk4ql2034mhsjth0g5sq3n4j5qysk2de3n":{"ada":{"lovelace":865052}},"stake_test1uqum2pcd6ua0kqegtwdfn8jzq3juj403q5xcjqhn7p9t4kg83uelr":{"ada":{"lovelace":212312}},"stake_test1uqlem6jy55ua8hcq3vw8r8g9yp05y5ut0y02xmjn3r0f5tqfv7h0h":{"ada":{"lovelace":28}},"stake_test1upudk5f0mqgu0460zyc5gds4vvn22fhqyp7hgylrjxtqeachpqc3c":{"ada":{"lovelace":1}},"stake_test1upl9yjlfxmzzn8nh4lfwapar7fx35rhksyhad8sx2g6df6qmz6cw2":{"ada":{"lovelace":26}},"stake_test1uz5djzdfm07u9908uzf4r384mj7hwzy2et0g5zrfchzelvga983pm":{"ada":{"lovelace":13}},"stake_test1uzcagvz4spc4e2fcajcwhjpkmehw4fnjntdl5g43ww9wmzqxfpw9t":{"ada":{"lovelace":571760}},"stake_test1urehd6jtynvl50h90j3d024y5wf6eveh5u9c99jh54anjcsujrkn3":{"ada":{"lovelace":2}},"stake_test1uraxweue2zekkuzg4ryz8wqy6zdwrp2a9j99axgnllh8xhsjhvwzw":{"ada":{"lovelace":30}},"stake17yscuxrkulr7f24ejz64j5vvu4ky74skmy70tdd5jq0q69gdglj9h":{"ada":{"lovelace":596854}},"stake17y6rtkv789q7w6m6akmz6lvnuwnrc62m7uwwrktvvz3q29czeex29":{"ada":{"lovelace":11}},"stake17yaeug9nprjd5x40m7mjcyt5pwh0zvs66ufql5307vz7phs6sd0cf":{"ada":{"lovelace":819283}},"stake17yl5rfmgdnmz94jnnvvz8dgjgym6tx4uvsf475k2vwjql6qd79xww":{"ada":{"lovelace":991577}},"stake1783r03ralavfudxgdpnf9ahw5hpx0fm29qcc5llfly45ztct9aeq2":{"ada":{"lovelace":3}},"stake1787lvz9lj72gn7awfvsfus87nsy7vt8a7laq382y85ht5yqtnpvt7":{"ada":{"lovelace":993906}},"stake1uyx3g5gmu8cccs95fc9jlw4enx4mky97pxqf5nwtfzn2r5ckq0ezp":{"ada":{"lovelace":2}},"stake1u9zwutr5vl6ll5m4mn46e502rd37wp4kzgp9am2c4feuwngccghxp":{"ada":{"lovelace":25}},"stake1u9gn5mwc8jpdddp3e3h5rzafw3w5swrz3vdk9r0s54lanms2gndev":{"ada":{"lovelace":410013}},"stake1ux45vc6zh3vanddx0d7rp9w85w89y7trwhyp9adfjqwg7pcftckwp":{"ada":{"lovelace":58468}},"stake1ux4k0n0c7gcnusj8mfq4xxvhxas04z2qp0r67cn7wrunpfcn4ucmk":{"ada":{"lovelace":278287}},"stake1u8rtvqhh6gk9rqrpgrlatha2ymmcevka6h6dycelup6g50cnpmjnx":{"ada":{"lovelace":798728}},"stake1u8xhmwzruccszymp837zwgvsx2m5r6j7zcdqc8xs2nzkdgckng2rr":{"ada":{"lovelace":25}},"stake1u8wnah3qahpv0pjlkwrs322mada6yfkf3d0svmm42nllt0qmswe27":{"ada":{"lovelace":13}}}}},"id":"DIwwyFUZktKv"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17qegnklmat0usam3d874s0c0zunx23v7vx4y58j3lu05h4qqrcnfk":{"ada":{"lovelace":948109}},"stake_test17qmh0r7rs4ugld4p94g68376uxyl7eq3w7y7slex666jr5gfe2wz5":{"ada":{"lovelace":292449}},"stake_test17qayf54uu5428egp9vhgfqwxlemsdsux80c0f8al2kuxdcc5euhzp":{"ada":{"lovelace":758900}},"stake_test17z3n7enh562kwxl9e2l4fztnt03rpm6tn3vqypgcrujglrcma5n53":{"ada":{"lovelace":625354}},"stake_test17zj3ghsq47vr0l5t4e7j4v3756tr3fvg4a32wem3wyf2fqquhnuds":{"ada":{"lovelace":670687}},"stake_test17zuw2jg7hesugf827yad6k5pypqhna5atr83pq0jlelp9lqxjlwzc":{"ada":{"lovelace":13}},"stake_test17za8nt9fkclld854jjhj68nqy47urhwcszw2pm59ctsyafg4mrwtd":{"ada":{"lovelace":27}},"stake_test17rsv48zmnzym9ceskawanh7ukejz8s2te0xh447j0nq3vzgp3em8c":{"ada":{"lovelace":76977}},"stake_test1uq0h7flckeg4as20dxkpk4ql2034mhsjth0g5sq3n4j5qysk2de3n":{"ada":{"lovelace":865052}},"stake_test1uqum2pcd6ua0kqegtwdfn8jzq3juj403q5xcjqhn7p9t4kg83uelr":{"ada":{"lovelace":212312}},"stake_test1uqlem6jy55ua8hcq3vw8r8g9yp05y5ut0y02xmjn3r0f5tqfv7h0h":{"ada":{"lovelace":28}},"stake_test1upudk5f0mqgu0460zyc5gds4vvn22fhqyp7hgylrjxtqeachpqc3c":{"ada":{"lovelace":1}},"stake_test1upl9yjlfxmzzn8nh4lfwapar7fx35rhksyhad8sx2g6df6qmz6cw2":{"ada":{"lovelace":26}},"stake_test1uz5djzdfm07u9908uzf4r384mj7hwzy2et0g5zrfchzelvga983pm":{"ada":{"lovelace":13}},"stake_test1uzcagvz4spc4e2fcajcwhjpkmehw4fnjntdl5g43ww9wmzqxfpw9t":{"ada":{"lovelace":571760}},"stake_test1urehd6jtynvl50h90j3d024y5wf6eveh5u9c99jh54anjcsujrkn3":{"ada":{"lovelace":2}},"stake_test1uraxweue2zekkuzg4ryz8wqy6zdwrp2a9j99axgnllh8xhsjhvwzw":{"ada":{"lovelace":30}},"stake17yscuxrkulr7f24ejz64j5vvu4ky74skmy70tdd5jq0q69gdglj9h":{"ada":{"lovelace":596854}},"stake17y6rtkv789q7w6m6akmz6lvnuwnrc62m7uwwrktvvz3q29czeex29":{"ada":{"lovelace":11}},"stake17yaeug9nprjd5x40m7mjcyt5pwh0zvs66ufql5307vz7phs6sd0cf":{"ada":{"lovelace":819283}},"stake17yl5rfmgdnmz94jnnvvz8dgjgym6tx4uvsf475k2vwjql6qd79xww":{"ada":{"lovelace":991577}},"stake1783r03ralavfudxgdpnf9ahw5hpx0fm29qcc5llfly45ztct9aeq2":{"ada":{"lovelace":3}},"stake1787lvz9lj72gn7awfvsfus87nsy7vt8a7laq382y85ht5yqtnpvt7":{"ada":{"lovelace":993906}},"stake1uyx3g5gmu8cccs95fc9jlw4enx4mky97pxqf5nwtfzn2r5ckq0ezp":{"ada":{"lovelace":2}},"stake1u9zwutr5vl6ll5m4mn46e502rd37wp4kzgp9am2c4feuwngccghxp":{"ada":{"lovelace":25}},"stake1u9gn5mwc8jpdddp3e3h5rzafw3w5swrz3vdk9r0s54lanms2gndev":{"ada":{"lovelace":410013}},"stake1ux45vc6zh3vanddx0d7rp9w85w89y7trwhyp9adfjqwg7pcftckwp":{"ada":{"lovelace":58468}},"stake1ux4k0n0c7gcnusj8mfq4xxvhxas04z2qp0r67cn7wrunpfcn4ucmk":{"ada":{"lovelace":278287}},"stake1u8rtvqhh6gk9rqrpgrlatha2ymmcevka6h6dycelup6g50cnpmjnx":{"ada":{"lovelace":798728}},"stake1u8xhmwzruccszymp837zwgvsx2m5r6j7zcdqc8xs2nzkdgckng2rr":{"ada":{"lovelace":25}},"stake1u8wnah3qahpv0pjlkwrs322mada6yfkf3d0svmm42nllt0qmswe27":{"ada":{"lovelace":13}}}}},"id":"DIwwyFUZktKv"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/175.json b/server/test/vectors/SubmitTransactionResponse/175.json
index dd5639c02..eba8ed604 100644
--- a/server/test/vectors/SubmitTransactionResponse/175.json
+++ b/server/test/vectors/SubmitTransactionResponse/175.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qh8r9rlrezlysq2zfcnmxgcf9evx2ln5szulf05w3pnzdq7p5wyr":{"ada":{"lovelace":178483}},"stake_test17qhw9adpcesfujah8tzq94esphgh8jdcnvswt80nly6lnjcuxy25t":{"ada":{"lovelace":26}},"stake_test17ql0379fkwefqfuk3wm6vhay57tyfe0xw3uhehv253yeqdqwv8e09":{"ada":{"lovelace":376368}},"stake_test17pz0zgt0a426cv6j4d6awt5s07hj565kmueqhegkhgw4gpqnt50ws":{"ada":{"lovelace":470273}},"stake_test17p4l8g7tecl60m6muywf2vzgju9zj2zydx3uj0h4j89dd0qdsh08u":{"ada":{"lovelace":10}},"stake_test17rgmqa6jl5srkrxd90hwv04l9jua76f4mu33u6svrnyta8srlupm8":{"ada":{"lovelace":887598}},"stake_test1uqprsqskgyz6wc8kksaqy9tw9g7ty576c8gjzca9gz0r7eqh5pvya":{"ada":{"lovelace":337004}},"stake_test1upw8x7tq0sv3uc6f6hzanhrhlp8nx0cgnvwn6rqslwr29ychz95dz":{"ada":{"lovelace":666472}},"stake_test1upszjcwwh02v8qw07yf6tfhfspv9prsvunvq2znsf8wrkpcht3ar9":{"ada":{"lovelace":10}},"stake_test1upu7jv0zxlp2q72gutalggtqda8agnsglrwes0e4pl0c2eqzdztkp":{"ada":{"lovelace":880599}},"stake_test1uz48dcexqq7r0wf96cd7gnrjrjzav0f4nv20nlap7ztggyq6wgxky":{"ada":{"lovelace":2}},"stake_test1uzupdhknvph49yzp888mxlqee67fxkdhgxxlflmy7ws0gegjqh95g":{"ada":{"lovelace":8}},"stake_test1urzgl2umsguv735wwfldvtxhlctvd4uhgefqyk78xzxfgmg924tzx":{"ada":{"lovelace":226347}},"stake_test1urvvl3urm3zaqq6mwnx3lc8h9demkynrdt4tc4rpf7dejnc6lnf6e":{"ada":{"lovelace":167056}},"stake17yftlk4fsz668kwm27yjzxdfchevqr9ep7l05v6g5vvwjgqem07cg":{"ada":{"lovelace":20}},"stake17ys2lnzq9kahdhwpy0ypaxhx2qu76l0wdt5th5rcarqk0wqeyeujq":{"ada":{"lovelace":1}},"stake179jxq6l72xdx4tp8eptxd73krext97a9j7yknpjz8zyzh3gjh6hde":{"ada":{"lovelace":4}},"stake17x5u6dapqklxxnuecf4qeslvyxvdw7p3ph9r602pkp203asq527yt":{"ada":{"lovelace":11587}},"stake1ux6t8ag2eu7hjkrfmsgvn4s9elqufyrcgdgfnygtd8gc3qqmp5r6x":{"ada":{"lovelace":23}},"stake1uxurd37rnf953hsk07wn099s3nn9gft42wcdn73zxc99psqc2u0mu":{"ada":{"lovelace":708732}}}}},"id":"g8XC3FTQJT3x"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17qh8r9rlrezlysq2zfcnmxgcf9evx2ln5szulf05w3pnzdq7p5wyr":{"ada":{"lovelace":178483}},"stake_test17qhw9adpcesfujah8tzq94esphgh8jdcnvswt80nly6lnjcuxy25t":{"ada":{"lovelace":26}},"stake_test17ql0379fkwefqfuk3wm6vhay57tyfe0xw3uhehv253yeqdqwv8e09":{"ada":{"lovelace":376368}},"stake_test17pz0zgt0a426cv6j4d6awt5s07hj565kmueqhegkhgw4gpqnt50ws":{"ada":{"lovelace":470273}},"stake_test17p4l8g7tecl60m6muywf2vzgju9zj2zydx3uj0h4j89dd0qdsh08u":{"ada":{"lovelace":10}},"stake_test17rgmqa6jl5srkrxd90hwv04l9jua76f4mu33u6svrnyta8srlupm8":{"ada":{"lovelace":887598}},"stake_test1uqprsqskgyz6wc8kksaqy9tw9g7ty576c8gjzca9gz0r7eqh5pvya":{"ada":{"lovelace":337004}},"stake_test1upw8x7tq0sv3uc6f6hzanhrhlp8nx0cgnvwn6rqslwr29ychz95dz":{"ada":{"lovelace":666472}},"stake_test1upszjcwwh02v8qw07yf6tfhfspv9prsvunvq2znsf8wrkpcht3ar9":{"ada":{"lovelace":10}},"stake_test1upu7jv0zxlp2q72gutalggtqda8agnsglrwes0e4pl0c2eqzdztkp":{"ada":{"lovelace":880599}},"stake_test1uz48dcexqq7r0wf96cd7gnrjrjzav0f4nv20nlap7ztggyq6wgxky":{"ada":{"lovelace":2}},"stake_test1uzupdhknvph49yzp888mxlqee67fxkdhgxxlflmy7ws0gegjqh95g":{"ada":{"lovelace":8}},"stake_test1urzgl2umsguv735wwfldvtxhlctvd4uhgefqyk78xzxfgmg924tzx":{"ada":{"lovelace":226347}},"stake_test1urvvl3urm3zaqq6mwnx3lc8h9demkynrdt4tc4rpf7dejnc6lnf6e":{"ada":{"lovelace":167056}},"stake17yftlk4fsz668kwm27yjzxdfchevqr9ep7l05v6g5vvwjgqem07cg":{"ada":{"lovelace":20}},"stake17ys2lnzq9kahdhwpy0ypaxhx2qu76l0wdt5th5rcarqk0wqeyeujq":{"ada":{"lovelace":1}},"stake179jxq6l72xdx4tp8eptxd73krext97a9j7yknpjz8zyzh3gjh6hde":{"ada":{"lovelace":4}},"stake17x5u6dapqklxxnuecf4qeslvyxvdw7p3ph9r602pkp203asq527yt":{"ada":{"lovelace":11587}},"stake1ux6t8ag2eu7hjkrfmsgvn4s9elqufyrcgdgfnygtd8gc3qqmp5r6x":{"ada":{"lovelace":23}},"stake1uxurd37rnf953hsk07wn099s3nn9gft42wcdn73zxc99psqc2u0mu":{"ada":{"lovelace":708732}}}}},"id":"g8XC3FTQJT3x"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/179.json b/server/test/vectors/SubmitTransactionResponse/179.json
index e049e07fb..2a1e69dd2 100644
--- a/server/test/vectors/SubmitTransactionResponse/179.json
+++ b/server/test/vectors/SubmitTransactionResponse/179.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3162,"message":"The new proposed version for a hard-fork isn't a valid version bump. The version (major, minor, patch) follows strict rules which can be summarized as follow: (1) the new triplet must be greater than the current one in the usual order of priorities (i.e. 'major' -> 'minor' -> 'patch'), (2) 'minor' must be 0 if 'major' is bumped, (3) 'minor' can only be bumped in increments of 1 and only if 'major' isn't bumped and (4) 'major' can only be bumped in increments of 1. The field 'data.proposedVersion' indicates the (invalid) version in the submitted proposal whereas 'data.currentVersion' indicates the current protocol version.","data":{"proposedVersion":{"major":5,"minor":6481},"currentVersion":{"major":5,"minor":10172}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3171,"message":"The collateral return output is sent to a pointer address. Since the Dijkstra era, pointer addresses are no longer allowed in collateral return outputs. The field 'data.collateralReturn' contains the offending output.","data":{"collateralReturn":{"address":"addr_test1qrspzhxntvtzytvlxdhdhgrery4a55rv3jy78ntw00fpz0k920wn9zv9v5ktp06eyyhkssuqz7w0qhcvgap89ns5ah3sa9kuqw","value":{"ada":{"lovelace":1},"52795e0013034c19661fcfebc6d501267e65c3f282a60a437040eaf8":{"2d4f6ff5ed242144d2a650404520ecbca7":4779809343643456910}},"datumHash":"deca66d6fdde349bcce6cd6b1e100a67c9f91cd5c19c13a4058ee4c148b836ff"}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/180.json b/server/test/vectors/SubmitTransactionResponse/180.json
index 4bb5ba624..84ee416df 100644
--- a/server/test/vectors/SubmitTransactionResponse/180.json
+++ b/server/test/vectors/SubmitTransactionResponse/180.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3166,"message":"The compound size of all reference scripts exceeeds the maximum size allowed by the protocol. Use fewer or smaller scripts to reduce the total size below acceptable limits. The field 'data.measuredReferenceScriptsSize indicates the actual total measured size of your reference scripts, whereas 'data.maximumReferenceScriptsSize indicates the current maximum size enforced by the ledger.","data":{"measuredReferenceScriptsSize":{"bytes":0},"maximumReferenceScriptsSize":{"bytes":2}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3173,"message":"All inputs of the transaction are already spent. This usually means that the transaction has already been included in the ledger, so there's no need to submit it again."},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/182.json b/server/test/vectors/SubmitTransactionResponse/182.json
index 30fb4c1a1..0f242a64b 100644
--- a/server/test/vectors/SubmitTransactionResponse/182.json
+++ b/server/test/vectors/SubmitTransactionResponse/182.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17qyzzy0edvv8hvgr8k9lu3nzr6nue3xjff42h6qegzdagescmlqzy":{"ada":{"lovelace":910561}},"stake_test17qed3mrkx4ymkrh6t22chsem4j5jkk3fkawg58tjjg6plhq7dm3vv":{"ada":{"lovelace":252413}},"stake_test17pfrcx9uygaa5e9fv5vjnmz4774k30466f5gzy5c73wm46cp3ettx":{"ada":{"lovelace":16}},"stake_test17zy6fzfzts2qhl7efyvev8ul68cyvvxv5hdeuxxmpt0mggcqhsnjk":{"ada":{"lovelace":22}},"stake_test17zt5r6qqar007xksknu84678tv9m779g9c69yuf4k7yh5csdw875x":{"ada":{"lovelace":26}},"stake_test1uqdepsg9h5z43899j6jvxlqcskf39y2hgcxqznatzraxnygrnwpyk":{"ada":{"lovelace":642560}},"stake_test1upmrgg7vwa8wevcyrk2c68mgxepkaqdjnjnxkknl8s3gs9qajltc6":{"ada":{"lovelace":27}},"stake_test1urjytw8e6x2mqt6qk94lf407gf55ax9fyaasl6sukme3l6qvyjrjr":{"ada":{"lovelace":24}},"stake1798w5lrtnquncewz8nkqh6twmtlely5f8pdjxzyrs5g2wagjtt8xq":{"ada":{"lovelace":15}},"stake179c6fnsnkxh6293fqf3vu83ws8m3spcjqdwsge5tu58sr4s78ltge":{"ada":{"lovelace":22}},"stake17xqtz32upd8sw79tnwnk54wjm7tk26mkxrcrxmxzxpn0magpquwvn":{"ada":{"lovelace":26}},"stake1785sq0v3yznha97nfak6r30vmyek3kg770g2ynd58050w8c4f7sqk":{"ada":{"lovelace":30}},"stake1784c3hzyun8jzwnwdmr2zmtpr6uafy5222ld0a9v578dazgghcgw7":{"ada":{"lovelace":27}},"stake178eqamftya4a4aal0tyx9f9ualvk8penq6hkghmppukkhfcsh4dyl":{"ada":{"lovelace":709488}},"stake178axan2qs2smh9le235p27suywnhx0427f5lrrn283r5fuqksxzhy":{"ada":{"lovelace":28}},"stake1uygp9gwd7xcx2gz7vhsujnqydwml74nq9x9m3hzy944w2hsd8wmu8":{"ada":{"lovelace":943890}},"stake1uxcnrlrjgkt9sxm6cmx9jtmx2gak3yze2hug7u5yyl2xxcguh64ln":{"ada":{"lovelace":17}},"stake1u8zaj5mqq09ux370z6kggmehk0nncww876cdvett4uhvzrgzw59au":{"ada":{"lovelace":202450}},"stake1u8fqjweyn0nz6rmr2dc0l6hdz4zckt2n7p8fycczpljt2qgmczg3h":{"ada":{"lovelace":27}},"stake1u85le9tp43ly4d52g3u3s8uq5yzd2hhk56ake2686u8qgsq2nm59e":{"ada":{"lovelace":20}}}}},"id":"RkyRMWy0EA8S"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17qyzzy0edvv8hvgr8k9lu3nzr6nue3xjff42h6qegzdagescmlqzy":{"ada":{"lovelace":910561}},"stake_test17qed3mrkx4ymkrh6t22chsem4j5jkk3fkawg58tjjg6plhq7dm3vv":{"ada":{"lovelace":252413}},"stake_test17pfrcx9uygaa5e9fv5vjnmz4774k30466f5gzy5c73wm46cp3ettx":{"ada":{"lovelace":16}},"stake_test17zy6fzfzts2qhl7efyvev8ul68cyvvxv5hdeuxxmpt0mggcqhsnjk":{"ada":{"lovelace":22}},"stake_test17zt5r6qqar007xksknu84678tv9m779g9c69yuf4k7yh5csdw875x":{"ada":{"lovelace":26}},"stake_test1uqdepsg9h5z43899j6jvxlqcskf39y2hgcxqznatzraxnygrnwpyk":{"ada":{"lovelace":642560}},"stake_test1upmrgg7vwa8wevcyrk2c68mgxepkaqdjnjnxkknl8s3gs9qajltc6":{"ada":{"lovelace":27}},"stake_test1urjytw8e6x2mqt6qk94lf407gf55ax9fyaasl6sukme3l6qvyjrjr":{"ada":{"lovelace":24}},"stake1798w5lrtnquncewz8nkqh6twmtlely5f8pdjxzyrs5g2wagjtt8xq":{"ada":{"lovelace":15}},"stake179c6fnsnkxh6293fqf3vu83ws8m3spcjqdwsge5tu58sr4s78ltge":{"ada":{"lovelace":22}},"stake17xqtz32upd8sw79tnwnk54wjm7tk26mkxrcrxmxzxpn0magpquwvn":{"ada":{"lovelace":26}},"stake1785sq0v3yznha97nfak6r30vmyek3kg770g2ynd58050w8c4f7sqk":{"ada":{"lovelace":30}},"stake1784c3hzyun8jzwnwdmr2zmtpr6uafy5222ld0a9v578dazgghcgw7":{"ada":{"lovelace":27}},"stake178eqamftya4a4aal0tyx9f9ualvk8penq6hkghmppukkhfcsh4dyl":{"ada":{"lovelace":709488}},"stake178axan2qs2smh9le235p27suywnhx0427f5lrrn283r5fuqksxzhy":{"ada":{"lovelace":28}},"stake1uygp9gwd7xcx2gz7vhsujnqydwml74nq9x9m3hzy944w2hsd8wmu8":{"ada":{"lovelace":943890}},"stake1uxcnrlrjgkt9sxm6cmx9jtmx2gak3yze2hug7u5yyl2xxcguh64ln":{"ada":{"lovelace":17}},"stake1u8zaj5mqq09ux370z6kggmehk0nncww876cdvett4uhvzrgzw59au":{"ada":{"lovelace":202450}},"stake1u8fqjweyn0nz6rmr2dc0l6hdz4zckt2n7p8fycczpljt2qgmczg3h":{"ada":{"lovelace":27}},"stake1u85le9tp43ly4d52g3u3s8uq5yzd2hhk56ake2686u8qgsq2nm59e":{"ada":{"lovelace":20}}}}},"id":"RkyRMWy0EA8S"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/185.json b/server/test/vectors/SubmitTransactionResponse/185.json
index 250596ffe..d90911841 100644
--- a/server/test/vectors/SubmitTransactionResponse/185.json
+++ b/server/test/vectors/SubmitTransactionResponse/185.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17q085emy5dz8wgqlzuexdfeu9v9rw8uc78lulh3h2h8h6tqfqrvue":{"ada":{"lovelace":146498}},"stake_test17q594m2ng3q2lvpff83hyds6thvkdr59hlte8z94n2kwucgmgqs54":{"ada":{"lovelace":19}},"stake_test17pxydlqqyjl3prr6azspaxe0rmprcwnj3gc3kurldck240gtpthz7":{"ada":{"lovelace":26}},"stake_test17p8u3dp7y3rlhgh849amsnjv73zzjzz0q03scccxum9jl5sm5t3as":{"ada":{"lovelace":30}},"stake_test17p2jryl9wn9ufk98j0twjkyzwjq0awwhqlxqqhqz3stuw5qg8ca9t":{"ada":{"lovelace":775998}},"stake_test17pd4d7pa8d5lujlsqhe3kythv54qpegh4a3xxfkenck3a0gu482hk":{"ada":{"lovelace":22}},"stake_test17pc509wal32dfkuqrztyqqdxjpe4kgnxspnph7sjuulcrfq3lys75":{"ada":{"lovelace":13}},"stake_test17pmfatqg2ps8v0xu6lc69jgzj9h07u03755x36lgjy3qfmc2rjysh":{"ada":{"lovelace":5}},"stake_test17zn88lww89cv5cjc7kja5ark2axg59vz2mq4my9ysnyx2qs0k3usk":{"ada":{"lovelace":432981}},"stake_test1upwqrredejsq3dv2kvcnt9nxpn003u27r9luxwe4l3g35wg2exzy7":{"ada":{"lovelace":5}},"stake_test1upmfm8uuypxe38rahaszw6pxfdjmxxprdnwug2w68tz5cesghe9u2":{"ada":{"lovelace":673297}},"stake_test1uzxk0nfcglg75hqjg804xuetunthsvmlt7w87x6yggy2ygqfmy2gf":{"ada":{"lovelace":12}},"stake_test1uzts2ga674g7ll3t5ngdg008x3premhp5atn27fxu8rn9vgfvampg":{"ada":{"lovelace":6}},"stake_test1uzsd398eqdsq6tl0f5xrdvdrn84xcdt77xmg0xqcl0z5eychcvryg":{"ada":{"lovelace":11}},"stake_test1uzcwmyfd7yxsdzvuz3qxev2shmysjkrd3elwwjv83xhm3wsfwkej3":{"ada":{"lovelace":29}},"stake_test1uzmtegav745fsu6umh5dnshld48ukxu8rk5ptzs0uae0spq9sjqfy":{"ada":{"lovelace":20}},"stake_test1uzaqj37k8exk2nhmm9el2e8fyv9rnjeyuckukjxxmlnppcs73qu6a":{"ada":{"lovelace":11}},"stake17808p9vxqte4m35e747vs6sjd0f8dafu9tcuc8y733txqvchdkv6t":{"ada":{"lovelace":669486}},"stake178nl4cqmpxa2cft2cv2eslttd4a62x6sq0a49gcd8a9zgjqvks628":{"ada":{"lovelace":495817}},"stake1u9dpkll9msdtjushw6t2a49zyfns8uv52vz2r6nl34e8qvqkjd562":{"ada":{"lovelace":1}},"stake1uxpsz0h43my68vq55wxz4nyendhfw3den4s5dafrvh9yhlge242y7":{"ada":{"lovelace":2}},"stake1u8vjcvqx4eh6nmm7pkmg3c7dsrae8xh83ypm8m9xvg9etkqneehpw":{"ada":{"lovelace":782637}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17q085emy5dz8wgqlzuexdfeu9v9rw8uc78lulh3h2h8h6tqfqrvue":{"ada":{"lovelace":146498}},"stake_test17q594m2ng3q2lvpff83hyds6thvkdr59hlte8z94n2kwucgmgqs54":{"ada":{"lovelace":19}},"stake_test17pxydlqqyjl3prr6azspaxe0rmprcwnj3gc3kurldck240gtpthz7":{"ada":{"lovelace":26}},"stake_test17p8u3dp7y3rlhgh849amsnjv73zzjzz0q03scccxum9jl5sm5t3as":{"ada":{"lovelace":30}},"stake_test17p2jryl9wn9ufk98j0twjkyzwjq0awwhqlxqqhqz3stuw5qg8ca9t":{"ada":{"lovelace":775998}},"stake_test17pd4d7pa8d5lujlsqhe3kythv54qpegh4a3xxfkenck3a0gu482hk":{"ada":{"lovelace":22}},"stake_test17pc509wal32dfkuqrztyqqdxjpe4kgnxspnph7sjuulcrfq3lys75":{"ada":{"lovelace":13}},"stake_test17pmfatqg2ps8v0xu6lc69jgzj9h07u03755x36lgjy3qfmc2rjysh":{"ada":{"lovelace":5}},"stake_test17zn88lww89cv5cjc7kja5ark2axg59vz2mq4my9ysnyx2qs0k3usk":{"ada":{"lovelace":432981}},"stake_test1upwqrredejsq3dv2kvcnt9nxpn003u27r9luxwe4l3g35wg2exzy7":{"ada":{"lovelace":5}},"stake_test1upmfm8uuypxe38rahaszw6pxfdjmxxprdnwug2w68tz5cesghe9u2":{"ada":{"lovelace":673297}},"stake_test1uzxk0nfcglg75hqjg804xuetunthsvmlt7w87x6yggy2ygqfmy2gf":{"ada":{"lovelace":12}},"stake_test1uzts2ga674g7ll3t5ngdg008x3premhp5atn27fxu8rn9vgfvampg":{"ada":{"lovelace":6}},"stake_test1uzsd398eqdsq6tl0f5xrdvdrn84xcdt77xmg0xqcl0z5eychcvryg":{"ada":{"lovelace":11}},"stake_test1uzcwmyfd7yxsdzvuz3qxev2shmysjkrd3elwwjv83xhm3wsfwkej3":{"ada":{"lovelace":29}},"stake_test1uzmtegav745fsu6umh5dnshld48ukxu8rk5ptzs0uae0spq9sjqfy":{"ada":{"lovelace":20}},"stake_test1uzaqj37k8exk2nhmm9el2e8fyv9rnjeyuckukjxxmlnppcs73qu6a":{"ada":{"lovelace":11}},"stake17808p9vxqte4m35e747vs6sjd0f8dafu9tcuc8y733txqvchdkv6t":{"ada":{"lovelace":669486}},"stake178nl4cqmpxa2cft2cv2eslttd4a62x6sq0a49gcd8a9zgjqvks628":{"ada":{"lovelace":495817}},"stake1u9dpkll9msdtjushw6t2a49zyfns8uv52vz2r6nl34e8qvqkjd562":{"ada":{"lovelace":1}},"stake1uxpsz0h43my68vq55wxz4nyendhfw3den4s5dafrvh9yhlge242y7":{"ada":{"lovelace":2}},"stake1u8vjcvqx4eh6nmm7pkmg3c7dsrae8xh83ypm8m9xvg9etkqneehpw":{"ada":{"lovelace":782637}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/188.json b/server/test/vectors/SubmitTransactionResponse/188.json
index 862011148..325b0fe01 100644
--- a/server/test/vectors/SubmitTransactionResponse/188.json
+++ b/server/test/vectors/SubmitTransactionResponse/188.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17pkcl4tmqsc3fa4tl8r2n602gsceka2y6wgm5jwxt0kgjnqqkzjgs":{"ada":{"lovelace":714277}},"stake_test17zqtf9a7szwlr70wqld7y93gjddv9s0k6tscagu7nudsyec2j8jxd":{"ada":{"lovelace":272839}},"stake_test17zjgxvad2m3t2y3rucdeaplzjeydl0vr20jwm59eyjcjd6cahpz0p":{"ada":{"lovelace":109267}},"stake_test1upgg5pxceg46enkycakdnknte0yuy0qlxc7328547yuch7sr7ps0l":{"ada":{"lovelace":23}},"stake_test1up3lv6fmacqmhs39wdu9myttyzz8egmwkqetwtfj5v70fqqseg5dc":{"ada":{"lovelace":13}},"stake17xlekv6mjrd5m3t9ja9a8zssehrjja7900zl5mc0t50hqygk93rkv":{"ada":{"lovelace":326760}},"stake1785f2zsml693mzygrp8tnkt3l2ce8ldgjjy4nwjggezavkg8pysqv":{"ada":{"lovelace":16}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17pkcl4tmqsc3fa4tl8r2n602gsceka2y6wgm5jwxt0kgjnqqkzjgs":{"ada":{"lovelace":714277}},"stake_test17zqtf9a7szwlr70wqld7y93gjddv9s0k6tscagu7nudsyec2j8jxd":{"ada":{"lovelace":272839}},"stake_test17zjgxvad2m3t2y3rucdeaplzjeydl0vr20jwm59eyjcjd6cahpz0p":{"ada":{"lovelace":109267}},"stake_test1upgg5pxceg46enkycakdnknte0yuy0qlxc7328547yuch7sr7ps0l":{"ada":{"lovelace":23}},"stake_test1up3lv6fmacqmhs39wdu9myttyzz8egmwkqetwtfj5v70fqqseg5dc":{"ada":{"lovelace":13}},"stake17xlekv6mjrd5m3t9ja9a8zssehrjja7900zl5mc0t50hqygk93rkv":{"ada":{"lovelace":326760}},"stake1785f2zsml693mzygrp8tnkt3l2ce8ldgjjy4nwjggezavkg8pysqv":{"ada":{"lovelace":16}}}}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/189.json b/server/test/vectors/SubmitTransactionResponse/189.json
index 108aae5f9..e3a6636c6 100644
--- a/server/test/vectors/SubmitTransactionResponse/189.json
+++ b/server/test/vectors/SubmitTransactionResponse/189.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3150,"message":"The transaction is attempting to withdraw rewards from stake credentials that do not engage in on-chain governance. Credentials must be associated with a delegate representative (registered, abstain or noConfidence) before associated rewards can be withdrawn. The field 'data.marginalizedCredentials' lists all the affected credentials.","data":{"marginalizedCredentials":["04078392197e739b4d9be0c7a1d90f2a7d461ea2cd71d17276a26895","140e567bfaa5ec134b4ca5d9f202b744d5276ba682bbfbbaf9614f67","30c49f8f2ee40c46c564abd945b747f07a733d363d14fec129299140","361b5d58b2e7a0bb3ef88217f5a18b52831ed5bae23ff72c6ed8688c","39e66a769055fde9366d154b9f593035a95254068018ae8f865b8601","3af2b494d75496f8e55af9138fb09b3ce8fa493bf2191caca0326307","5944dd2737800e0ce06fa66fcc3971c31b683f7f1cfef2ea077f8baf","646f83e35c4806a7b991fd2a16d33e0f3b8846d883e90fabf7be8a27","66294d5c227c19a4faed00f7071c2b42eb348f55c9b112d53d738cc1","703567380f27502eae96ad9249b14a017e452ce2ae388789f54d1a8f","77b730d9bb29adc6e2be2b3fb8d460b8cec56cb0221987a18a98804a","7d9db68934faa970cf9f684e40ef106391536724638346c9977f3cd3","8b2b127745467588fbf7d19e04ed3cae57bdba16f422050a079efe85","9921ff69c2cf49169f43f6ad81d42534286483488da425f33f479960","9cc58d64fe369d8cbe8636d9539f86d18c1d568d9fef22e2a80a14c5","b10b834f77758111ea4761d9f2451ca7ff20f43e24d6a3e6ed3fda7f","b9bfde6cfab5066c2cf65ab457bd2aa852be0dcfc55c32af6807cad2","c015c83e0e1d7c414b21a0a6ae97852a0b22bf84b9778c9f505b48b1","cc0b0e3191c7a1cbaf825cf078ab37fbab2776b335931a03409a4728","cd71020297b8c956f7427b9b4e329fb3d1df5c964d60dd07a82967ac","d23a4b90a951c07c14a32231472c4f91f33de6829eee6dfbcbe812f9","d79f3e40cb428b7b2ec87e063cd951a72ebc79d89bb28ec3457567bc","e81cb076ce4fcfe4fb294c1dcc077e06dfb29a911090b7f93edcc684","f672917af40df16a074d7ba86c20bf1c09fb349ccda203e5718cd38c","f9945ff7dd53e17b8265db94e15cd633bf314d4db0230e4a202ce8ed"]}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3175,"message":"Some account balances fall outside the intervals asserted by the transaction. An interval has an inclusive lower bound and an exclusive upper bound, or asserts an exact balance. The field 'data.checkedAgainst' tells which balances were checked: 'batchStart' for the balances at the start of the batch, or 'transaction' for the balances seen by the (sub-)transaction that asserts the interval. The field 'data.balancesOutsideIntervals' lists each account with its balance and the interval it doesn't satisfy.","data":{"checkedAgainst":"transaction","balancesOutsideIntervals":[{"account":"stake_test17zmyzg4n2e29vqtsxv02kxxftakwqkf4gtkysrxj62smghsqzfd6a","balance":{"ada":{"lovelace":411921}},"interval":{"lowerBound":{"ada":{"lovelace":6}}}},{"account":"stake_test1urvs82rtvqsm5mzg4krw4vu8ux4gt9a90pmzc27vp78l6uqwlwy3h","balance":{"ada":{"lovelace":912087}},"interval":{"exact":{"ada":{"lovelace":29}}}},{"account":"stake178467ath80yhxqmk5azse9a4apjq7akgd8ttgl50c88z2nszdcnyp","balance":{"ada":{"lovelace":0}},"interval":{"exact":{"ada":{"lovelace":348542}}}},{"account":"stake1u9952v37zm8le88nppf2g5teparey9m4vn6f8p2c0d5dlngwzvwwh","balance":{"ada":{"lovelace":592996}},"interval":{"lowerBound":{"ada":{"lovelace":6}}}}]}},"id":null}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/190.json b/server/test/vectors/SubmitTransactionResponse/190.json
index bb59deb9c..c19e97b8d 100644
--- a/server/test/vectors/SubmitTransactionResponse/190.json
+++ b/server/test/vectors/SubmitTransactionResponse/190.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test1uqklvkm3kp3gkehnrpld2zx3mgdn6a2yl7rjuyxfw8lw3xqe5tmpt":{"ada":{"lovelace":979405}},"stake17y29kxx9w26593e4g7zu9vxrmwpr5w48xztx8mevf432pegfsskh7":{"ada":{"lovelace":93965}}}}},"id":"jK8K7c49rdF9"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test1uqklvkm3kp3gkehnrpld2zx3mgdn6a2yl7rjuyxfw8lw3xqe5tmpt":{"ada":{"lovelace":979405}},"stake17y29kxx9w26593e4g7zu9vxrmwpr5w48xztx8mevf432pegfsskh7":{"ada":{"lovelace":93965}}}}},"id":"jK8K7c49rdF9"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/191.json b/server/test/vectors/SubmitTransactionResponse/191.json
index b79d6c60a..fb4275746 100644
--- a/server/test/vectors/SubmitTransactionResponse/191.json
+++ b/server/test/vectors/SubmitTransactionResponse/191.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17p5xwyncmca5sk5p386uy6ud034ekfpzkgjjeedn6y5nkgqwm0ual":{"ada":{"lovelace":666889}},"stake_test17r0v4lt74fvdu4a0gel3kvrt7zee94jx3fq57tlkzzyyrcqyy2e2c":{"ada":{"lovelace":323465}},"stake_test17rjv7d6nvg9d2lkc9zxzjcyvpuk6hynmttx9rm95kh0m5qcu9xuty":{"ada":{"lovelace":27}},"stake_test17raq5gge7pfkwg3nsn9jkywm0wu7f3s703l34z7qk89dvncx3jfhm":{"ada":{"lovelace":966576}},"stake_test1upnktvcj9xpgmylym75qfaezp75tv02f5af0uzndmuqjefq00sf2f":{"ada":{"lovelace":710408}},"stake_test1uzzrjszzwc7fh4vuk49hrru8hth40ct8pncfrfnuyky6hsqclq3ja":{"ada":{"lovelace":9}},"stake_test1uz4uc4yk7dyayd6pwd42eqlqp8te2m857rjwj9kxm4ghqzqhkhz2h":{"ada":{"lovelace":9}},"stake17ymmgr8r6pa2rq9w632n8nnt78qd5ce2nrsq2w2lak3ae2g0pp0wx":{"ada":{"lovelace":18}},"stake17y7jumz54h80k3y7lngua268ys30vapkcn6rry4n933cn8cst3hg5":{"ada":{"lovelace":25}},"stake179vgtvfdg5vwla0j05fk9gyvnat7d0nmavh839ldc3rrrkqp8xgru":{"ada":{"lovelace":346999}},"stake179w08ytssquy68a8q2u579nxgef6jj6vm24tquqlxxcs2lgmtavc2":{"ada":{"lovelace":10}},"stake17xhk2lrdt9vlskl0j4qmp5vxzs37vxp4l0kqa20x2mxmx4gm0zwnp":{"ada":{"lovelace":178300}},"stake178zyr0xqsweck9xudfskxugql6jx0das7fesu9925hher6stadhqc":{"ada":{"lovelace":37234}},"stake178f66xkerll08jxza9sak8vyjvfd7mwju9v06lqqxvqdvuseuy69f":{"ada":{"lovelace":451854}},"stake178nthcexln86elr9gp35mnmgc5aru23a2l4r9s53qju40sqzczf7r":{"ada":{"lovelace":99740}},"stake1uy682pzlv2s83r79zczvwkh0c6nm4l22y2wz84cud4pzv4q5sssr8":{"ada":{"lovelace":25}},"stake1u9kul6dnjy9lstcy2fc6udcw7p2ut77vhqr7hh3m9030gushgf8y8":{"ada":{"lovelace":734793}},"stake1u9uvfevchqt0clrjjy3td8lt7um8e3ga7dnvhg4cprgnavsywfqf0":{"ada":{"lovelace":84295}},"stake1u8k78xh5gpct89w25zp82qdpgq99vv0tdy8yqhkelaqpgaqrr94f7":{"ada":{"lovelace":882558}}}}},"id":"4bqj1QDf1XUR"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3152,"message":"Trying to re-register some already known delegate representative. Delegate representatives can only be registered once. The field 'data.knownDelegateRepresentatives' points to an already known credential that's being re-registered by this transaction.","data":{"knownDelegateRepresentative":{"type":"registered","from":"verificationKey","id":"3b02848f0b8a694381badabe59e6292abf5282300f5ee28ce2db266e"}}},"id":"4bqj1QDf1XUR"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/195.json b/server/test/vectors/SubmitTransactionResponse/195.json
index 0e81be9bb..1e89fd32f 100644
--- a/server/test/vectors/SubmitTransactionResponse/195.json
+++ b/server/test/vectors/SubmitTransactionResponse/195.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3163,"message":"The provided constitution guardrails hash doesn't match the expected on defined in the constitution. Some governance actions such as treasury withdrawals or protocol parameters updates must correctly refer to the constitution guardrails hash digest. The latter can be 'null'. The field 'data.providedHash' indicates the hash provided in the proposal, and the field 'data.expectedHash' the one specified in the constitution","data":{"providedHash":"9388c4ee487524377ac6a19ec6b75bbd88e835f2e5cf3688112c2f00","expectedHash":null}},"id":"sKSu3HqSwMjK"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3172,"message":"A stake pool registration carries a BLS key with an invalid proof of possession. The proof must show possession of the signing key that matches the BLS verification key. The field 'data.stakePool.id' indicates the stake pool, and 'data.blsKey' contains the key and proof found in the certificate.","data":{"stakePool":{"id":"pool1pdfqdrz378avvgwd837smc4cm5n4tvm0tqz9cdupu675wwcgnuz"},"blsKey":{"verificationKey":"b01d824114f4ed03616bafa2b3ee44cd088a8b2ad03f10583766c5b57ab66db6e5066eca032d690fa4f1aff1a32aee591074e993534446b6227a5f02cadb701652a61e984dbfbdbb5e6a74d270d36b824c3043f5aa64acbe1e81bff226749356","proofOfPossession":"a804a66c39ee5b0f71e71035ce5779ee5e9d91a4a3995d5e0fb3940c56197447bd4dad3663584df1c3fe65e8ab4663c6"}}},"id":"sKSu3HqSwMjK"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/196.json b/server/test/vectors/SubmitTransactionResponse/196.json
index c90a555b4..f46bc9657 100644
--- a/server/test/vectors/SubmitTransactionResponse/196.json
+++ b/server/test/vectors/SubmitTransactionResponse/196.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17p39nly9w942c78vvuh8p9aywahcuyqkjsn5axzxge0p57cw5nnv9":{"ada":{"lovelace":26}},"stake_test17z05tzwqshe2jnlfsnnpjrx7nvlw6mczqm9cner8kasswtgfj82t0":{"ada":{"lovelace":344597}},"stake_test17zmg3q27h47rtse5a9fnf2w9gh9lfdl8uztfjygdzyqy3gg05atnt":{"ada":{"lovelace":512181}},"stake_test17r6txtg0kfks07w7jf8pfkvjfxr3j83mp6qn6r57knvmvng7h7wmq":{"ada":{"lovelace":104540}}}}},"id":"s4bptWusTUV1"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17p39nly9w942c78vvuh8p9aywahcuyqkjsn5axzxge0p57cw5nnv9":{"ada":{"lovelace":26}},"stake_test17z05tzwqshe2jnlfsnnpjrx7nvlw6mczqm9cner8kasswtgfj82t0":{"ada":{"lovelace":344597}},"stake_test17zmg3q27h47rtse5a9fnf2w9gh9lfdl8uztfjygdzyqy3gg05atnt":{"ada":{"lovelace":512181}},"stake_test17r6txtg0kfks07w7jf8pfkvjfxr3j83mp6qn6r57knvmvng7h7wmq":{"ada":{"lovelace":104540}}}}},"id":"s4bptWusTUV1"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/198.json b/server/test/vectors/SubmitTransactionResponse/198.json
index e0c34e98c..98cf9d53f 100644
--- a/server/test/vectors/SubmitTransactionResponse/198.json
+++ b/server/test/vectors/SubmitTransactionResponse/198.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3998,"message":"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..."},"id":"vZPTGdZkmCYu"}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3997,"message":"A transaction was rejected due to custom rules that prevented it from entering the mempool. A justification is given as 'data.error'.","data":{"error":"\u0007E𗷻\u001bjb<\u000c^\u0011Lm?巜F,e1_bp"}},"id":"vZPTGdZkmCYu"}
\ No newline at end of file
diff --git a/server/test/vectors/SubmitTransactionResponse/199.json b/server/test/vectors/SubmitTransactionResponse/199.json
index 22d899912..7a66e7115 100644
--- a/server/test/vectors/SubmitTransactionResponse/199.json
+++ b/server/test/vectors/SubmitTransactionResponse/199.json
@@ -1 +1 @@
-{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"The transaction contains incomplete or invalid rewards withdrawals. When present, rewards withdrawals must consume rewards in full, there cannot be any leftover. You may also run into this error if the associatd stake credential is not registered. The field 'data.incompleteWithdrawals' contains a map of culprit withdrawals.","data":{"incompleteWithdrawals":{"stake_test17q3en8v6a8elf8p566gchjze6tegr7g0lvey88d73jc3augxu54mf":{"ada":{"lovelace":132250}},"stake_test17qcywyd2246rx88dr5p4vv2umm7slurpkjjs2h55053jkxcvk2nus":{"ada":{"lovelace":27}},"stake_test17pefzypups0jeflfv4c7pq6v758py6zswv88las82h5qrpq095ng5":{"ada":{"lovelace":15}},"stake_test17zyj208gln5kr32589rxst3h4c6uzxrsg2pc06ykj3ensnqky0cmc":{"ada":{"lovelace":8}},"stake_test17z9rj7rsl7ejsn8fcvav4rm8xvlett84qqlhtmpnrkf2ers7nuhy7":{"ada":{"lovelace":547546}},"stake_test17z62ysm5grqe5dqhypxwx3zxnng7a5yx2vs0lnymzyzg7ncuevhd6":{"ada":{"lovelace":2}},"stake_test17zaxnx5pjm3t6wk4y7sa7ajrrf29v6p4xy9h7fysreq72xs32jy7y":{"ada":{"lovelace":27}},"stake_test17rm6hnzjaf34a473g9kql70lpf2rfac609p05vzm9xqyyucmlxc2p":{"ada":{"lovelace":981845}},"stake_test1uqpf7gexgg7sh4qfl5sfd2t0v5cy54mlxpfd8tlfaprrpeck30x3g":{"ada":{"lovelace":957275}},"stake_test1uqyga5pdx3y50j8r28nc96tltny44kwc3mem77ka62ff4rsh3z6p6":{"ada":{"lovelace":10}},"stake_test1uphan2gnx7y98xvutdc6f22n86xvyzwqh5c6nemq0kt4p5s7s79mh":{"ada":{"lovelace":16}},"stake_test1urk5kp74ljn56s40sk6du79xzukdnct3pfcd55r0pkf3w3gc8cavr":{"ada":{"lovelace":19}},"stake_test1uremuytfq39tp5g6awdhu48p29sw5s9caw257ue8gng0z8quegu4p":{"ada":{"lovelace":524567}},"stake17yka6gwahntth877l7ztrmzqp9r43mp5d26h55e2wdnxrhqawvnze":{"ada":{"lovelace":347271}},"stake179zp42gsa7c47x94p8569paangrw4xth4f84nahu50tgghqzecsr5":{"ada":{"lovelace":15}},"stake1799z5uzyl93ln4yuf9v5ehu08yp5r6e4msw3wfzk5mfr33s7edd9q":{"ada":{"lovelace":5}},"stake179cspjerdadxkvgtf03w9m5nh750nzfklgjveynkvjlx6acptfc6z":{"ada":{"lovelace":624159}},"stake17x60u6hknpuvqg0xq64nmge7hyp5e39yq2agjcuygs650rsw8r5da":{"ada":{"lovelace":366276}},"stake178qhadl4fh4vzqkjuy8hvlf5nc3yp5dqzk48ud9frrmuraq7p4s34":{"ada":{"lovelace":3}},"stake178rhgsmq36egjj92r2njrf7jhpgy4p8gnjerkrvhzhhe25gmeccnm":{"ada":{"lovelace":604358}},"stake178ewlghmlu69gnkekqc95l2cf80ws34xjp0h0evnmjl6yvquz48hg":{"ada":{"lovelace":2}},"stake1uyw22aak39k4qy5teg7kr57ajcf6c8a6uldwrljgsktu03sp3mz7r":{"ada":{"lovelace":20}},"stake1uy79yt6zt7fqrw60cwam8tc8489x87p0qskr05zlj98w07ckqftpa":{"ada":{"lovelace":28}},"stake1u9v3p5m5g3rmpjz3nedrx2d52yf3rtpm89ddztk0whga5rqrss5lz":{"ada":{"lovelace":29}},"stake1u9cd29akqrqpxvzt2cz0mu256vvenutmcgv2ukr8y5wcx6cvdeqc0":{"ada":{"lovelace":2}},"stake1uxvdgu75c2wuvt6qxydcqpggqduump84dayqr0s5wgmjsfc7aju2c":{"ada":{"lovelace":45643}},"stake1u8q9twwp3ddw6y3wzn2fezj6f4heu9gjl64tc0sn7ls36sqcv3dhy":{"ada":{"lovelace":424460}},"stake1u89rdfpff89ynzdsrc7lp5p2dkvch2c3n4n648th7n63nwc3km5az":{"ada":{"lovelace":287486}},"stake1u88ygavcz6gmgfng8a7szs8qkfj25y59q6xcm75s5d7zljq9nj0t6":{"ada":{"lovelace":16}},"stake1u8d3hzztaztq2un6gx4nhqjxayy5kueryhykrwex95l7efg60es2r":{"ada":{"lovelace":317235}},"stake1u8uwqa3efgc2f0rvnurq7234d2cczcnyh6ynpxef0fpmuxcrqcv4h":{"ada":{"lovelace":59605}}}}},"id":null}
\ No newline at end of file
+{"jsonrpc":"2.0","method":"submitTransaction","error":{"code":3141,"message":"Some withdrawals are incomplete or invalid. Before the Dijkstra era, and for a Dijkstra transaction in legacy mode, a withdrawal must take the full balance of its account. Before the Dijkstra era, this error also reports a withdrawal from a stake credential that is not registered. The field 'data.incompleteWithdrawals' maps each culprit reward account to the amount withdrawn.","data":{"incompleteWithdrawals":{"stake_test17q3en8v6a8elf8p566gchjze6tegr7g0lvey88d73jc3augxu54mf":{"ada":{"lovelace":132250}},"stake_test17qcywyd2246rx88dr5p4vv2umm7slurpkjjs2h55053jkxcvk2nus":{"ada":{"lovelace":27}},"stake_test17pefzypups0jeflfv4c7pq6v758py6zswv88las82h5qrpq095ng5":{"ada":{"lovelace":15}},"stake_test17zyj208gln5kr32589rxst3h4c6uzxrsg2pc06ykj3ensnqky0cmc":{"ada":{"lovelace":8}},"stake_test17z9rj7rsl7ejsn8fcvav4rm8xvlett84qqlhtmpnrkf2ers7nuhy7":{"ada":{"lovelace":547546}},"stake_test17z62ysm5grqe5dqhypxwx3zxnng7a5yx2vs0lnymzyzg7ncuevhd6":{"ada":{"lovelace":2}},"stake_test17zaxnx5pjm3t6wk4y7sa7ajrrf29v6p4xy9h7fysreq72xs32jy7y":{"ada":{"lovelace":27}},"stake_test17rm6hnzjaf34a473g9kql70lpf2rfac609p05vzm9xqyyucmlxc2p":{"ada":{"lovelace":981845}},"stake_test1uqpf7gexgg7sh4qfl5sfd2t0v5cy54mlxpfd8tlfaprrpeck30x3g":{"ada":{"lovelace":957275}},"stake_test1uqyga5pdx3y50j8r28nc96tltny44kwc3mem77ka62ff4rsh3z6p6":{"ada":{"lovelace":10}},"stake_test1uphan2gnx7y98xvutdc6f22n86xvyzwqh5c6nemq0kt4p5s7s79mh":{"ada":{"lovelace":16}},"stake_test1urk5kp74ljn56s40sk6du79xzukdnct3pfcd55r0pkf3w3gc8cavr":{"ada":{"lovelace":19}},"stake_test1uremuytfq39tp5g6awdhu48p29sw5s9caw257ue8gng0z8quegu4p":{"ada":{"lovelace":524567}},"stake17yka6gwahntth877l7ztrmzqp9r43mp5d26h55e2wdnxrhqawvnze":{"ada":{"lovelace":347271}},"stake179zp42gsa7c47x94p8569paangrw4xth4f84nahu50tgghqzecsr5":{"ada":{"lovelace":15}},"stake1799z5uzyl93ln4yuf9v5ehu08yp5r6e4msw3wfzk5mfr33s7edd9q":{"ada":{"lovelace":5}},"stake179cspjerdadxkvgtf03w9m5nh750nzfklgjveynkvjlx6acptfc6z":{"ada":{"lovelace":624159}},"stake17x60u6hknpuvqg0xq64nmge7hyp5e39yq2agjcuygs650rsw8r5da":{"ada":{"lovelace":366276}},"stake178qhadl4fh4vzqkjuy8hvlf5nc3yp5dqzk48ud9frrmuraq7p4s34":{"ada":{"lovelace":3}},"stake178rhgsmq36egjj92r2njrf7jhpgy4p8gnjerkrvhzhhe25gmeccnm":{"ada":{"lovelace":604358}},"stake178ewlghmlu69gnkekqc95l2cf80ws34xjp0h0evnmjl6yvquz48hg":{"ada":{"lovelace":2}},"stake1uyw22aak39k4qy5teg7kr57ajcf6c8a6uldwrljgsktu03sp3mz7r":{"ada":{"lovelace":20}},"stake1uy79yt6zt7fqrw60cwam8tc8489x87p0qskr05zlj98w07ckqftpa":{"ada":{"lovelace":28}},"stake1u9v3p5m5g3rmpjz3nedrx2d52yf3rtpm89ddztk0whga5rqrss5lz":{"ada":{"lovelace":29}},"stake1u9cd29akqrqpxvzt2cz0mu256vvenutmcgv2ukr8y5wcx6cvdeqc0":{"ada":{"lovelace":2}},"stake1uxvdgu75c2wuvt6qxydcqpggqduump84dayqr0s5wgmjsfc7aju2c":{"ada":{"lovelace":45643}},"stake1u8q9twwp3ddw6y3wzn2fezj6f4heu9gjl64tc0sn7ls36sqcv3dhy":{"ada":{"lovelace":424460}},"stake1u89rdfpff89ynzdsrc7lp5p2dkvch2c3n4n648th7n63nwc3km5az":{"ada":{"lovelace":287486}},"stake1u88ygavcz6gmgfng8a7szs8qkfj25y59q6xcm75s5d7zljq9nj0t6":{"ada":{"lovelace":16}},"stake1u8d3hzztaztq2un6gx4nhqjxayy5kueryhykrwex95l7efg60es2r":{"ada":{"lovelace":317235}},"stake1u8uwqa3efgc2f0rvnurq7234d2cczcnyh6ynpxef0fpmuxcrqcv4h":{"ada":{"lovelace":59605}}}}},"id":null}
\ No newline at end of file