Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ jobs:
matrix:
os: [ubuntu-20.04]
network: [testnet]
cardanoNodeVersion: [1.33.0]
cardanoNodeVersion: [1.34.1]

runs-on: ${{ matrix.os }}
steps:
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,33 @@ chapter: false
pre: "<b>6. </b>"
---

### [5.3.0] - UNRELEASED

#### Added

> ##### 🏢 Server
>
> - `NextTx` can now take an (optional) extra argument `{ "fields": "all" }` to instrument the server in returning not only a transaction id in `NextTxResponse`, but a full transaction. See [#190](https://github.com/CardanoSolutions/ogmios/issues/190).

#### Changed

> ##### 🏢 Server
>
> - Upgrade internal dependencies to `cardano-node@1.34.1`

> ##### 🚗 TypeScript Client
>
> - ⚠️ Some schema type interface renaming:
> - `Tx` → `TxByron`
> - `BlockBodyShelley` → `TxShelley`
> - `BlockBodyAllegra` → `TxAllegra`
> - `BlockBodyMary` → `TxMary`
> - `BlockBodyAlonzo` → `TxAlonzo`

#### Removed

> N/A

### [5.2.0] - 2022-02-15

#### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,14 @@ describe('TxSubmission', () => {
it('successfully evaluates execution units of well-formed tx', async () => {
const result = await TxSubmission.evaluateTx(
context,
('84a6008282582078e963207a3fa50f5db363439a246d9c5631d398c7b7' +
'397435b6ec133432a64701825820db7dbf9eaa6094982ed4b9b735ce27' +
'5345f348194a7e8e9200fec7d1cad008eb010d81825820db7dbf9eaa60' +
'94982ed4b9b735ce275345f348194a7e8e9200fec7d1cad008eb010181' +
'825839004a294f1ef53b30cdbf7caf17798422a90227224f9fbf037fcf' +
'6c47a5bc2ec1952d1189886fe018214eed45f83ab04171c41f373d530c' +
'a7a61a3bb94e8002000e800b58206df8859ec92c3ff6bc0e2964793789' +
'e44e4c5abbcc9ff6f2387b94f4c2020e6ea303814e4d01000033222220' +
'0512001200110481800581840000182a820000f5f6'
('84A6008282582078E963207A3FA50F5DB363439A246D9C5631D398C7B7397435B6EC1' +
'33432A647018258207D67D80BC5B3BADCAF02375E428A39AEA398DD0438F26899A1B2' +
'65C6AC87EB6B000D81825820DB7DBF9EAA6094982ED4B9B735CE275345F348194A7E8' +
'E9200FEC7D1CAD008EB010181825839004A294F1EF53B30CDBF7CAF17798422A90227' +
'224F9FBF037FCF6C47A5BC2EC1952D1189886FE018214EED45F83AB04171C41F373D5' +
'30CA7A61A3BB94E8002000E800B58206DF8859EC92C3FF6BC0E2964793789E44E4C5A' +
'BBCC9FF6F2387B94F4C2020E6EA303814E4D010000332222200512001200110481800' +
'581840000182A820000F5F6'
)
)
expect(result).toEqual({
Expand Down Expand Up @@ -121,15 +120,14 @@ describe('TxSubmission', () => {

const result = await TxSubmission.evaluateTx(
context,
('84a6008282582078e963207a3fa50f5db363439a246d9c5631d398c7b7' +
'397435b6ec133432a64701825820db7dbf9eaa6094982ed4b9b735ce27' +
'5345f348194a7e8e9200fec7d1cad008eb010d81825820db7dbf9eaa60' +
'94982ed4b9b735ce275345f348194a7e8e9200fec7d1cad008eb010181' +
'825839004a294f1ef53b30cdbf7caf17798422a90227224f9fbf037fcf' +
'6c47a5bc2ec1952d1189886fe018214eed45f83ab04171c41f373d530c' +
'a7a61a3bb94e8002000e800b58206df8859ec92c3ff6bc0e2964793789' +
'e44e4c5abbcc9ff6f2387b94f4c2020e6ea303814e4d01000033222220' +
'0512001200110481800581840000182a820000f5f6'
('84A6008282582078E963207A3FA50F5DB363439A246D9C5631D398C7B7397435B6EC1' +
'33432A647018258207D67D80BC5B3BADCAF02375E428A39AEA398DD0438F26899A1B2' +
'65C6AC87EB6B000D81825820DB7DBF9EAA6094982ED4B9B735CE275345F348194A7E8' +
'E9200FEC7D1CAD008EB010181825839004A294F1EF53B30CDBF7CAF17798422A90227' +
'224F9FBF037FCF6C47A5BC2EC1952D1189886FE018214EED45F83AB04171C41F373D5' +
'30CA7A61A3BB94E8002000E800B58206DF8859EC92C3FF6BC0E2964793789E44E4C5A' +
'BBCC9FF6F2387B94F4C2020E6EA303814E4D010000332222200512001200110481800' +
'581840000182A820000F5F6'
),
additionalUtxoSet
)
Expand Down
39 changes: 21 additions & 18 deletions clients/TypeScript/packages/schema/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ export interface Ogmios {
* CBOR-serialized signed transaction, in base64 (or base16)
*/
evaluate: string;
additionalUtxoSet?: Utxo;
};
/**
* An arbitrary JSON value that will be mirrored back in the response.
Expand Down Expand Up @@ -587,7 +588,9 @@ export interface Ogmios {
version: "1.0";
servicename: "ogmios";
methodname: "NextTx";
args?: {};
args?: {
fields?: "all";
};
/**
* An arbitrary JSON value that will be mirrored back in the response.
*/
Expand All @@ -603,7 +606,7 @@ export interface Ogmios {
version: "1.0";
servicename: "ogmios";
methodname: "NextTx";
result: TxId | Null;
result: TxId | TxAlonzo | Null;
/**
* Any value that was set by a client request in the 'mirror' field.
*/
Expand Down Expand Up @@ -1050,11 +1053,7 @@ export interface StandardBlock {
softwareVersion: SoftwareVersion;
};
body: {
txPayload: {
id: TxId;
body: Tx;
witness: TxWitness[];
}[];
txPayload: TxByron[];
dlgPayload: DlgCertificate[];
updatePayload: {
proposal: Null | UpdateProposalByron;
Expand Down Expand Up @@ -1093,9 +1092,13 @@ export interface SoftwareVersion {
appName: string;
number: UInt32;
}
export interface Tx {
inputs: TxIn[];
outputs: TxOut[];
export interface TxByron {
id: TxId;
body: {
inputs: TxIn[];
outputs: TxOut[];
};
witness: TxWitness[];
}
export interface TxIn {
txId: TxId;
Expand Down Expand Up @@ -1181,7 +1184,7 @@ export interface Shelley {
shelley: BlockShelley;
}
export interface BlockShelley {
body?: BlockBodyShelley[];
body?: TxShelley[];
headerHash?: DigestBlake2BBlockHeader;
header?: {
blockHeight: BlockNo;
Expand All @@ -1198,7 +1201,7 @@ export interface BlockShelley {
signature: IssuerSignature;
};
}
export interface BlockBodyShelley {
export interface TxShelley {
id: DigestBlake2BBlockBody;
body: {
inputs: TxIn[];
Expand Down Expand Up @@ -1405,7 +1408,7 @@ export interface Allegra {
allegra: BlockAllegra;
}
export interface BlockAllegra {
body?: BlockBodyAllegra[];
body?: TxAllegra[];
headerHash?: DigestBlake2BBlockHeader;
header?: {
blockHeight: BlockNo;
Expand All @@ -1422,7 +1425,7 @@ export interface BlockAllegra {
signature: IssuerSignature;
};
}
export interface BlockBodyAllegra {
export interface TxAllegra {
id: DigestBlake2BBlockBody;
body: {
inputs: TxIn[];
Expand Down Expand Up @@ -1452,7 +1455,7 @@ export interface Mary {
mary: BlockMary;
}
export interface BlockMary {
body?: BlockBodyMary[];
body?: TxMary[];
headerHash?: DigestBlake2BBlockHeader;
header?: {
blockHeight: BlockNo;
Expand All @@ -1469,7 +1472,7 @@ export interface BlockMary {
signature: IssuerSignature;
};
}
export interface BlockBodyMary {
export interface TxMary {
id: DigestBlake2BBlockBody;
body: {
inputs: TxIn[];
Expand All @@ -1496,7 +1499,7 @@ export interface Alonzo {
alonzo: BlockAlonzo;
}
export interface BlockAlonzo {
body?: BlockBodyAlonzo[];
body?: TxAlonzo[];
headerHash?: DigestBlake2BBlockHeader;
header?: {
blockHeight: BlockNo;
Expand All @@ -1513,7 +1516,7 @@ export interface BlockAlonzo {
signature: IssuerSignature;
};
}
export interface BlockBodyAlonzo {
export interface TxAlonzo {
id: DigestBlake2BBlockBody;
body: {
inputs: TxIn[];
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.5"

services:
cardano-node:
image: inputoutput/cardano-node:1.33.0
image: inputoutput/cardano-node:1.34.1
command: [
"run",
"--config", "/config/config.json",
Expand Down
20 changes: 19 additions & 1 deletion docs/content/mini-protocols/local-tx-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,31 @@ At any moment, it is also possible to interleave a `SizeAndCapacity` query to ge
The _capacity_ refers to the maximum size of the mempool. It is currently defined as twice the network block size and can be adjusted via protocol updates.
{{% /notice %}}

## Retrieve Full Transactions

Since `5.3.0`, Ogmios can also return full transactions as a result of `NextTx`. This must be however explicitly requested from clients by providing an extra (optional) argument to each `NextTx` request:


```json
{
"type": "jsonwsp/request",
"version": "1.0",
"servicename": "ogmios",
"methodname": "NextTx",
"args": {
"fields": "all"
}
}
```
`"fields"` accept only one value (`"all"`) and can be omitted. When present, `NextTxResponse` will contain a full transaction as `"result"`. When omitted, the latter only contains a transaction id.

# Important Notes

Some important notes to keep in mind regarding the management of the mempool:

### About Transaction Locality

This protocol gives access to transactions that are submitted locally, by the connected client via the local-tx-submission protocol. It **does not** provide access to transactions broadcast from peers. It is entire local.
This protocol gives access to transactions that are submitted locally, by the connected client via the local-tx-submission protocol. In case of block producing nodes (i.e. stake pools), transactions pulled from peers may also be available.

### About Transaction Observability

Expand Down
Loading