Skip to content

Commit 0dad7ce

Browse files
committed
Add transit state config
1 parent 4d9ae01 commit 0dad7ce

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## Description
44

5-
This service is responsible for sending proof verification transaction, paying fees instead of a user.
5+
This service listens to `RootUpdated` events and saves it to database.
6+
See [endpoint doc](https://rarimo.github.io/proof-verification-relayer/#tag/State/operation/GetState) to get signed state data.
7+
Send signed state to [on-chain replicator](https://github.com/rarimo/passport-voting-contracts/blob/master/contracts/replication/RegistrationSMTReplicator.sol#L32).
68

79
## Install
810

@@ -15,6 +17,16 @@ This service is responsible for sending proof verification transaction, paying f
1517
./main run service
1618
```
1719

20+
## Configuration
21+
22+
### Transit state mode
23+
24+
Use [config_transit_state.yaml](config_transit_state.yaml) and set:
25+
26+
- `private_key` of your signer on smart contract
27+
- `address` of your state replica
28+
- `db_url` Postgres database to store state roots
29+
1830
## Documentation
1931

2032
We do use openapi:json standard for API. We use swagger for documenting our API.

config_transit_state.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
network:
2+
rpc: "https://l2.rarimo.com/"
3+
vault_address: "http://127.0.0.1:8200"
4+
vault_mount_path: "secret_data"
5+
gas_multiplier: 1.23
6+
private_key: without '0x' # For security purposes this key may be omitted and flow with Vault would be used
7+
8+
replicator:
9+
address: 0xabc # address of your contract
10+
source_smt: 0x479F84502Db545FA8d2275372E0582425204A879
11+
root_prefix: Rarimo root
12+
13+
db:
14+
url: db_url # set your database
15+
16+
contracts:
17+
register2:
18+
address: "0x479F84502Db545FA8d2275372E0582425204A879"
19+
block: 830 # Block is optional field for contract listeners, default value is 0 if nothing set
20+
21+
log:
22+
level: debug
23+
disable_sentry: true
24+
25+
pinger:
26+
blocks_distance: 1000
27+
timeout: 5s # timeout to ping logs when 'subscribed' via http
28+
normal_period: 15s
29+
min_abnormal_period: 20s
30+
max_abnormal_period: 50s
31+
32+
listener:
33+
addr: :8000
34+
35+
cop:
36+
disabled: true
37+
endpoint: "http://..."
38+
upstream: "http://..."
39+
service_name: proof-verification-relayer
40+
service_port: 80

0 commit comments

Comments
 (0)