Skip to content

Commit f3fcfce

Browse files
authored
Merge pull request #15 from leapdao/feat/exit-challenger
Exit challenger service
2 parents 190c704 + 273175a commit f3fcfce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+13808
-85
lines changed

README.md

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,29 @@
1-
# challenge-services
1+
## challenge-services
22

3-
> A JavaScript tool to ensure validity of a LeapDAO plasma chain.
3+
> A JavaScript tools to ensure validity of a LeapDAO plasma chain.
44
5-
## Configuration
5+
### Content
66

7-
To create a config, do the following:
7+
This repository contains tools to provide MVP Plasma challenge games.
8+
Each tool is in its own subdirectory with README file. Tools can be run separately or together, depending on your needs.
89

9-
```
10-
$ cp config/default_template.json config/default.json
11-
```
12-
13-
Fill in all the relevant information. The template file contains a rough
14-
documentation of the fields.
15-
16-
This service uses a redis instance to store its local block height and uses it
17-
as a queue (rsmq).
18-
19-
In `config/crontab`, define the frequency with which the service should scan
20-
for new blocks.
10+
## Tools
2111

22-
## Installation
12+
### Event-scanner
13+
Event-scanner scans Ethereum network for contract events (configurable) and push these events into message queues for other services to consume.
14+
Redis-server is used for message queues.
2315

24-
1. To build and run the container: `docker-compose up --build`
16+
### Exit-challenger
17+
Exit-challenger automatically monitors all the exits on Plasma chain and submits challenges for the invalid ones. By running this tool you help Plasma to stay secure and earn ETH on a side.
2518

26-
## Running the service in the cloud
27-
28-
For internal purposes, this repository includes a file called
29-
`docker-compose-aws.yml`. This can be used to run the service on an AWS EC2
30-
instance. A `containrrr/watchtower` services was added to continously update
31-
the challenge-services instance in case a new version is a available in the
32-
container repository. To run this file, do
33-
34-
```
35-
$ docker-compose --file docker-compose-aws.yml up -d
36-
```
19+
Exit-challenger relies on event-scanner to deliver exit events (`ExitStarted` events from `ExitHandler` contract).
3720

38-
## Contribute and Test
3921

40-
Before running the tests, you'll have to run through the configuration described
41-
above.
22+
## Clone repo
4223

4324
```
4425
$ git clone [email protected]:leapdao/challenge-services.git
4526
$ cd challenge-services
46-
$ npm i
47-
$ npm run test
4827
```
4928

5029
## License
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

event-scanner/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# challenge-services
2+
3+
> A JavaScript tool to ensure validity of a LeapDAO plasma chain.
4+
5+
## Configuration
6+
7+
To create a config, do the following:
8+
9+
```
10+
$ cp config/default_template.json config/default.json
11+
```
12+
13+
Fill in all the relevant information. The template file contains a rough
14+
documentation of the fields.
15+
16+
This service uses a redis instance to store its local block height and uses it
17+
as a queue (rsmq).
18+
19+
In `config/crontab`, define the frequency with which the service should scan
20+
for new blocks.
21+
22+
## Installation
23+
24+
1. To build and run the container: `docker-compose up --build`
25+
26+
## Running the service in the cloud
27+
28+
For internal purposes, this repository includes a file called
29+
`docker-compose-aws.yml`. This can be used to run the service on an AWS EC2
30+
instance. A `containrrr/watchtower` services was added to continously update
31+
the challenge-services instance in case a new version is a available in the
32+
container repository. To run this file, do
33+
34+
```
35+
$ docker-compose --file docker-compose-aws.yml up -d
36+
```
37+
38+
## Contribute and Test
39+
40+
Before running the tests, you'll have to run through the configuration described
41+
above.
42+
43+
```
44+
$ git clone [email protected]:leapdao/challenge-services.git
45+
$ cd challenge-services
46+
$ npm i
47+
$ npm run test
48+
```
49+
50+
## License
51+
52+
MIT
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)