Skip to content

Commit

Permalink
Merge branch 'dev' into 'master'
Browse files Browse the repository at this point in the history
Fix collateral box creation

See merge request ergo/rosen-bridge/watcher!273
  • Loading branch information
vorujack committed Jun 11, 2024
2 parents 7de7968 + 4c0b977 commit 02fef70
Show file tree
Hide file tree
Showing 63 changed files with 14,553 additions and 7,905 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@rosen-bridge/changeset-formatter",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "dev",
"updateInternalDependencies": "patch",
"ignore": []
}
2 changes: 2 additions & 0 deletions .changeset/silly-dryers-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
15 changes: 15 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ stages:
- test
- installation_18
- coverage
- changeset

installation_16:
image: node:16.19.1
Expand Down Expand Up @@ -81,3 +82,17 @@ coverage:
coverage_report:
coverage_format: cobertura
path: coverage/cobertura-coverage.xml

changeset:
image: node:18.14.0
stage: changeset
needs: ['coverage']
cache:
key: $CI_COMMIT_REF_NAME
policy: pull
paths:
- node_modules
before_script:
- git fetch origin dev
script:
- npx changeset status --since=origin/dev
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# @rosen-bridge/watcher

## 3.0.0

### Major Changes

- Update minimum-fee to v1

### Minor Changes

- Upgrade health check package to latest
- Add bitcoin network
- Integrate rpc scanner for bitcoin network

### Patch Changes

- Update typeorm version to 0.3.20
- Update minimum-fee and health-check packages

## 2.1.0

### Minor Changes

- Support Raspberry Pi from version 3 and above

## 2.0.2

### Patch Changes

- fix unlock api response schema
- add salt to the apiKey to prevent precomputed hash attacks
- solve mocha test coverage hanging problem

## 2.0.1

### Patch Changes

- Update scanner sync critical threshold and limit the watcher not to work with scanner `Broken` status.
- Fix `commitmentTimeoutConfirmation` in default config
- Use the repo box value instead of min box value in lock and unlock transactions

## 2.0.0

### Major Changes

- update watcher according to contract v3

### Patch Changes

- add version to /info api
4 changes: 4 additions & 0 deletions config/dataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ import {
} from '@rosen-bridge/observation-extractor';
import {
BlockEntity,
ExtractorStatusEntity,
migrations as scannerMigrations,
} from '@rosen-bridge/scanner';
import {
CommitmentEntity,
EventTriggerEntity,
migrations as watcherDataExtractorMigrations,
PermitEntity,
CollateralEntity,
} from '@rosen-bridge/watcher-data-extractor';
import { DataSource } from 'typeorm';
import { getConfig } from '../src/config/config';
Expand All @@ -35,7 +37,9 @@ const dbConfigs = {
CommitmentEntity,
EventTriggerEntity,
PermitEntity,
CollateralEntity,
ObservationEntity,
ExtractorStatusEntity,
TokenEntity,
TxEntity,
ObservationStatusEntity,
Expand Down
24 changes: 21 additions & 3 deletions config/default.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
---
network: '' # which scanner network used in this watcher ergo/cardano
network: '' # which scanner network used in this watcher ergo/cardano/bitcoin
observation:
confirmation: 60 # number of required block confirmations to create the commitment after observing an event
validThreshold: 12960 # observations that have not been triggered won't be processed after this period (in blocks)
bitcoin:
type: '' # options: esplora, rpc
initial:
height: -1 # initial height of scanning
esplora:
interval: 180 # esplora scanning interval (in seconds)
timeout: 10 # esplora request timeout (in seconds)
url: 'https://blockstream.info' # esplora url
rpc:
interval: 180 # rpc scanning interval (in seconds)
timeout: 10 # rpc request timeout (in seconds)
url: '' # rpc url
cardano:
type: '' # options: koios, ogmios, blockfrost
initial:
Expand Down Expand Up @@ -38,7 +50,7 @@ ergo:
transaction:
timeout: 10 # will remove invalid transactions from process queue after this period (in blocks)
confirmation: 4 # required block confirmations for sent transactions
commitmentTimeoutConfirmation: 4320 # required block confirmations for a commitment to redeem
commitmentTimeoutConfirmation: 720 # required block confirmations for a commitment to redeem
interval:
scanner: 180 # scanner update interval (in seconds)
revenue: 120 # revenue update interval (in seconds)
Expand All @@ -48,6 +60,9 @@ ergo:
creation: 120 # commitment creation interval (in seconds)
reveal: 180 # commitment reveal interval (in seconds)
redeem: 120 # commitment reveal interval (in seconds)
wid:
status: 120 # wid status check interval (in seconds)
minimumFee: 300
path:
addresses: config/rosen # addresses path
# tokens: config/rosen/tokens.json # default tokens path.
Expand Down Expand Up @@ -78,7 +93,7 @@ healthCheck:
ergCriticalThreshold: 100000000 # minimum required erg balance
ergoScanner:
warnDifference: 2 # warning difference between existing and scanned blocks height
criticalDifference: 100 # critical difference between existing and scanned blocks height
criticalDifference: 10 # critical difference between existing and scanned blocks height
ergoNode:
maxHeightDifference: 2 # maximum difference between header height and full height
maxBlockTime: 30 # maximum time to see a new block in minutes
Expand All @@ -87,6 +102,9 @@ healthCheck:
cardanoScanner:
warnDifference: 2 # warning difference between existing and scanned blocks height
criticalDifference: 600 # critical difference between existing and scanned blocks height
bitcoinScanner:
warnDifference: 2 # warning difference between existing and scanned blocks height
criticalDifference: 10 # critical difference between existing and scanned blocks height
permit:
warnCommitmentCount: 4 # warning remaining permits for creating commitment
criticalCommitmentCount: 0 # critical remaining permits for creating commitment
Expand Down
Loading

0 comments on commit 02fef70

Please sign in to comment.