Skip to content

Commit

Permalink
update scanner packages and ogmios config
Browse files Browse the repository at this point in the history
  • Loading branch information
fatemeh-ra committed Aug 5, 2024
1 parent 3783ae4 commit 1234224
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 101 deletions.
5 changes: 5 additions & 0 deletions .changeset/purple-ducks-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rosen-bridge/watcher': patch
---

Stabalize ogmios connection by adding connection close handler
1 change: 1 addition & 0 deletions config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ cardano:
ogmios:
host: '' # ogmios node host address
port: 1337 # ogmios port
connectionRetrialInterval: 30 # ogmios connection retrial interval (in seconds)
useTls: false # connect to ogmios using https or not
blockfrost:
url: '' # url to connect to blockfrost
Expand Down
186 changes: 93 additions & 93 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,21 @@
},
"dependencies": {
"@emurgo/cip14-js": "^3.0.1",
"@rosen-bridge/address-extractor": "^5.0.5",
"@rosen-bridge/address-extractor": "^5.0.6",
"@rosen-bridge/asset-check": "^0.2.1",
"@rosen-bridge/bitcoin-esplora-scanner": "^0.1.10",
"@rosen-bridge/bitcoin-observation-extractor": "^4.0.1",
"@rosen-bridge/bitcoin-rpc-scanner": "^0.2.4",
"@rosen-bridge/bitcoin-esplora-scanner": "^0.1.12",
"@rosen-bridge/bitcoin-observation-extractor": "^4.0.4",
"@rosen-bridge/bitcoin-rpc-scanner": "^0.2.6",
"@rosen-bridge/health-check": "^5.0.0",
"@rosen-bridge/log-level-check": "^0.1.1",
"@rosen-bridge/minimum-fee": "^2.1.0",
"@rosen-bridge/node-sync-check": "^0.1.1",
"@rosen-bridge/observation-extractor": "^5.0.2",
"@rosen-bridge/observation-extractor": "^5.0.4",
"@rosen-bridge/permit-check": "^0.1.1",
"@rosen-bridge/scanner": "^4.0.5",
"@rosen-bridge/scanner": "^4.1.1",
"@rosen-bridge/scanner-sync-check": "^0.3.0",
"@rosen-bridge/tokens": "^1.2.1",
"@rosen-bridge/watcher-data-extractor": "^7.0.0",
"@rosen-bridge/watcher-data-extractor": "^7.0.2",
"@rosen-bridge/wid-check": "^0.1.1",
"@rosen-bridge/winston-logger": "0.2.1",
"@rosen-clients/cardano-koios": "^2.0.3",
Expand Down
13 changes: 12 additions & 1 deletion src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ class CardanoConfig {
port: number;
initialSlot: number;
initialHash: string;
connectionRetrialInterval: number;
useTls?: boolean;
};
koios?: {
Expand All @@ -324,9 +325,19 @@ class CardanoConfig {
const host = getRequiredString('cardano.ogmios.host');
const port = getRequiredNumber('cardano.ogmios.port');
const initialSlot = getRequiredNumber('cardano.initial.slot');
const connectionRetrialInterval = getRequiredNumber(
'cardano.initial.connectionRetrialInterval'
);
const initialHash = getRequiredString('cardano.initial.hash');
const useTls = config.get<boolean>('cardano.ogmios.useTls');
this.ogmios = { host, port, initialHash, initialSlot, useTls };
this.ogmios = {
host,
port,
initialHash,
initialSlot,
connectionRetrialInterval,
useTls,
};
} else if (this.type === Constants.KOIOS_TYPE) {
const url = getRequiredString('cardano.koios.url');
const interval = getRequiredNumber('cardano.koios.interval');
Expand Down
2 changes: 2 additions & 0 deletions src/utils/scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ class CreateScanner {
dataSource: dataSource,
initialHash: cardanoConfig.ogmios.initialHash,
initialSlot: cardanoConfig.ogmios.initialSlot,
connectionRetrialInterval:
cardanoConfig.ogmios.connectionRetrialInterval * 1000,
},
loggers.scannerLogger
);
Expand Down

0 comments on commit 1234224

Please sign in to comment.