Skip to content

Commit

Permalink
repo sync
Browse files Browse the repository at this point in the history
  • Loading branch information
jingshi-ant committed Dec 4, 2023
1 parent 313796a commit e7165c0
Show file tree
Hide file tree
Showing 139 changed files with 15,622 additions and 767 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.4.1
6.4.0
5 changes: 5 additions & 0 deletions .ci/broker-docker-compose/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
BROKER_PORTS=8880,8881,8882
MYSQL_PORT=3306
POSTGRES_PORT=7777
SCQL_IMAGE_TAG=latest
PROJECT_CONF={"protocol":"SEMI2K","field":"FM64"}
9 changes: 9 additions & 0 deletions .ci/broker-docker-compose/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
docker-compose.yaml
docker-compose.yml
engine/*/conf/authorized_profile.json
engine/*/conf/ed25519key.pem
engine/*/conf/gflags.conf
broker/conf/*/party_info.json
broker/conf/*/config.yml
broker/conf/*/private_key.pem
regtest.yml
28 changes: 28 additions & 0 deletions .ci/broker-docker-compose/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Startup

```bash
# export `SCDB_PORTS` and `MYSQL_PORT` and `PROTOCOLS` defined in `.ci/docker-compose/.env`
export $(grep -v '^#' .ci/broker-docker-compose/.env | xargs)

(cd .ci/broker-docker-compose && python setup.py)

# You could specify project name via flag `-p project_name` to
# avoid container name conflict in multi-user environments.
(cd .ci/broker-docker-compose && docker compose -p broker-test up -d)
```

# Run test

```bash

(cd .ci/broker-docker-compose && bash run_test.sh)

```

# End test

```bash

docker compose -p broker-test down

```
25 changes: 25 additions & 0 deletions .ci/broker-docker-compose/broker/conf/alice/config.yml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
intra_server:
host: 0.0.0.0
protocol: http
port: 8080
inter_server:
protocol: http
port: 8081
log_level: debug
party_code: alice
party_info_file: "/home/admin/configs/party_info.json"
private_pem_path: "/home/admin/configs/private_key.pem"
intra_host: broker-alice:8080
engine:
timeout: 120s
protocol: http
content_type: application/json
uris:
- for_peer: engine-alice:8003
storage:
type: mysql
conn_str: "root:${MYSQL_ROOT_PASSWORD}@tcp(mysql:3306)/brokera?charset=utf8mb4&parseTime=True&loc=Local&interpolateParams=true"
max_idle_conns: 10
max_open_conns: 300
conn_max_idle_time: 2m
conn_max_lifetime: 5m
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"participants": [
{
"party_code": "alice",
"endpoint": "http://broker-alice:8081",
"pubkey": "${ALICE_PUBKEY}"
},
{
"party_code": "bob",
"endpoint": "http://broker-bob:8081",
"pubkey": "${BOB_PUBKEY}"
},
{
"party_code": "carol",
"endpoint": "http://broker-carol:8081",
"pubkey": "${CAROL_PUBKEY}"
}
]
}
25 changes: 25 additions & 0 deletions .ci/broker-docker-compose/broker/conf/bob/config.yml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
intra_server:
host: 0.0.0.0
protocol: http
port: 8080
inter_server:
protocol: http
port: 8081
log_level: debug
party_code: bob
party_info_file: "/home/admin/configs/party_info.json"
private_pem_path: "/home/admin/configs/private_key.pem"
intra_host: broker-bob:8080
engine:
timeout: 120s
protocol: http
content_type: application/json
uris:
- for_peer: engine-bob:8003
storage:
type: mysql
conn_str: "root:${MYSQL_ROOT_PASSWORD}@tcp(mysql:3306)/brokerb?charset=utf8mb4&parseTime=True&loc=Local&interpolateParams=true"
max_idle_conns: 10
max_open_conns: 300
conn_max_idle_time: 2m
conn_max_lifetime: 5m
19 changes: 19 additions & 0 deletions .ci/broker-docker-compose/broker/conf/bob/party_info.json.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"participants": [
{
"party_code": "alice",
"endpoint": "http://broker-alice:8081",
"pubkey": "${ALICE_PUBKEY}"
},
{
"party_code": "bob",
"endpoint": "http://broker-bob:8081",
"pubkey": "${BOB_PUBKEY}"
},
{
"party_code": "carol",
"endpoint": "http://broker-carol:8081",
"pubkey": "${CAROL_PUBKEY}"
}
]
}
25 changes: 25 additions & 0 deletions .ci/broker-docker-compose/broker/conf/carol/config.yml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
intra_server:
host: 0.0.0.0
protocol: http
port: 8080
inter_server:
protocol: http
port: 8081
log_level: debug
party_code: carol
party_info_file: "/home/admin/configs/party_info.json"
private_pem_path: "/home/admin/configs/private_key.pem"
intra_host: broker-carol:8080
engine:
timeout: 120s
protocol: http
content_type: application/json
uris:
- for_peer: engine-carol:8003
storage:
type: mysql
conn_str: "root:${MYSQL_ROOT_PASSWORD}@tcp(mysql:3306)/brokerc?charset=utf8mb4&parseTime=True&loc=Local&interpolateParams=true"
max_idle_conns: 10
max_open_conns: 300
conn_max_idle_time: 2m
conn_max_lifetime: 5m
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"participants": [
{
"party_code": "alice",
"endpoint": "http://broker-alice:8081",
"pubkey": "${ALICE_PUBKEY}"
},
{
"party_code": "bob",
"endpoint": "http://broker-bob:8081",
"pubkey": "${BOB_PUBKEY}"
},
{
"party_code": "carol",
"endpoint": "http://broker-carol:8081",
"pubkey": "${CAROL_PUBKEY}"
}
]
}
601 changes: 601 additions & 0 deletions .ci/broker-docker-compose/csv/bob_tbl_0.csv

Large diffs are not rendered by default.

601 changes: 601 additions & 0 deletions .ci/broker-docker-compose/csv/bob_tbl_1.csv

Large diffs are not rendered by default.

601 changes: 601 additions & 0 deletions .ci/broker-docker-compose/csv/bob_tbl_2.csv

Large diffs are not rendered by default.

Loading

0 comments on commit e7165c0

Please sign in to comment.