Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
3afba80
Add v0.4.0 changelog
Feb 26, 2019
5eb3fcd
Use WaitForExit for signal waiting logic, and make cql -web wait for …
Feb 26, 2019
2ac3733
Remove trailing dot in cgo include statement
Feb 26, 2019
c7470b7
Add CORS to observer api
Feb 26, 2019
595b43b
Wait for signal if web mode is enabled
Feb 26, 2019
6ee542e
Update comment in WaitForExit
Feb 26, 2019
9ab6bc0
Add missing error check in addBlock
Feb 26, 2019
6bf90a5
Fix bin/cql -web and -dsn flag interference
Feb 26, 2019
1be7a59
Ctrl + C to stop explorer
auxten Feb 26, 2019
f4b2050
Merge pull request #267 from CovenantSQL/bugfix/observer_cors_and_dae…
Feb 26, 2019
a1dda7c
Remove cql-observer bin file and all related code.
laodouya Feb 26, 2019
4e7b1c3
Remove cmd/explorer binary.
laodouya Feb 26, 2019
0a12c85
Add cql test file for building test binary.
laodouya Feb 26, 2019
9b75215
Change cql.test test case listen dir.
laodouya Feb 26, 2019
4e32f5d
Remove make runner target.
laodouya Feb 27, 2019
3a1cf7b
Upgrade travis go version to 1.11.x
laodouya Feb 27, 2019
2e4563a
Merge pull request #268 from CovenantSQL/feature/remove_observer
auxten Feb 27, 2019
2c7b406
Add param for test old client.
laodouya Feb 25, 2019
bb59b5f
Add start_bp_miner for makefile, Add test old clinet task.
laodouya Feb 25, 2019
572160f
Fix test old client case missing param set bug.
laodouya Feb 25, 2019
a5e6baa
Try using build docker with docker command.
laodouya Feb 26, 2019
5061e5c
Revert compatibility test docker build.
laodouya Feb 27, 2019
b767b94
Let testnet_client only run testnet.
laodouya Feb 27, 2019
459bd53
Add test old clinet to current bp miner test.
laodouya Feb 27, 2019
b0972cc
Make bp miner bin before compatibility test.
laodouya Feb 27, 2019
5435557
Make compatibility test bp and miner running background
laodouya Feb 27, 2019
b5232b8
Fix bp miner not running background.
laodouya Feb 27, 2019
223975c
Fix compatibility test, wait for miner start.
laodouya Feb 27, 2019
24a2a9e
Increase integration miner client init stable coin count.
laodouya Feb 28, 2019
cdb9222
Increase compatibility test wait bp miner time.
laodouya Feb 28, 2019
5a00d66
Disable other ci test.
laodouya Feb 28, 2019
8349f4c
Fail compatibility test if dsn not created.
laodouya Feb 28, 2019
70d1914
Fix compatibility test miner config.
laodouya Feb 28, 2019
2978a94
Revert "Disable other ci test."
laodouya Feb 28, 2019
bf1eafd
Add ci build stage, reuse build result in test stage.
laodouya Feb 28, 2019
fbdbda4
Add old bp, old miner case for compatibility test.
laodouya Feb 28, 2019
9197878
Rename gitlab ci task name.
laodouya Feb 28, 2019
1112e67
Fix compatibility miner bin name wrong.
laodouya Feb 28, 2019
61085a6
Seperate logs for different compatibility test case.
laodouya Feb 28, 2019
2d080b5
Update prev bin version to v0.4.0
laodouya Feb 28, 2019
e2a5551
Use a independent cache folder for each ci jobs.
laodouya Feb 28, 2019
2c757ac
Redirect compatibility test bp, miner stdout to files.
laodouya Feb 28, 2019
0607ef2
Create job cache dir if not exist for gitlabci.
laodouya Feb 28, 2019
5c299e2
Use CI_PIPELINE_IID instead of CI_JOB_ID for transfer cache dir.
laodouya Feb 28, 2019
10a16c7
Seperate cache bin dir and log dir.
laodouya Feb 28, 2019
7a95e63
Remove all cache folder while ci success.
laodouya Feb 28, 2019
7aef69d
Combine ci cleanup process.
laodouya Feb 28, 2019
3451b40
Use independent config file for compatibility test.
laodouya Feb 28, 2019
6df3c8b
Fix transaction directives, add commit to query sanitizer ignore list
Feb 28, 2019
895721b
Merge pull request #269 from CovenantSQL/feature/compatibility
leventeliu Feb 28, 2019
daf1532
Merge branch 'develop' into bugfix/isolation_level
Feb 28, 2019
29620e1
Add MainChain Explorer, SQLChain Explorer, Forum in readme
Feb 28, 2019
5390718
Merge branch 'develop' of github.com:CovenantSQL/CovenantSQL into dev…
Feb 28, 2019
8e0d4e8
Merge branch 'develop' into bugfix/isolation_level
leventeliu Feb 28, 2019
cb2330a
Add test case for isolation level
leventeliu Mar 1, 2019
2f8f5df
Merge pull request #270 from CovenantSQL/bugfix/isolation_level
Mar 1, 2019
25e3f59
Ignore nofile setrlimit in non-linux environment
Mar 1, 2019
896e060
Test begin/commit and error rollback in non read-uncommitted isolatio…
Mar 1, 2019
6d9e584
Merge pull request #271 from CovenantSQL/bugfix/isolation_level
Mar 1, 2019
2d0717c
Add logging http debug handler
Mar 4, 2019
1d346be
Enable log level switcher in cql-minerd and cqld
Mar 4, 2019
a8e9d47
Add test for utils/log/debug package
Mar 5, 2019
ad00f30
Update README.md
auxten Mar 5, 2019
d49e01a
Merge branch 'develop' into feature/log_debugger
xq262144 Mar 5, 2019
43c4547
Merge pull request #272 from CovenantSQL/feature/log_debugger
Mar 5, 2019
309be06
Combine cql-adapter to cql command.
laodouya Mar 5, 2019
80b62bf
Update docker service cql-adapter command.
laodouya Mar 5, 2019
b65cbe1
Fix adapter init driver twice.
laodouya Mar 5, 2019
6aff416
Combine delete path func.
laodouya Mar 5, 2019
5cd3d8b
Refactor runKeygen func.
laodouya Mar 5, 2019
b7dba16
Merge pull request #273 from CovenantSQL/feature/merge_adapter
leventeliu Mar 6, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 60 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
image: covenantsql/build

stages:
- build
- test
- cleanup

variables:
REVIEWDOG_VERSION: 0.9.11
REVIEWDOG_GITLAB_API_TOKEN: $REVIEWDOG_TOKEN
CODECOV_TOKEN: $CODECOV_TOKEN
UNITTESTTAGS: linux sqlite_omit_load_extension
CACHE_DIR: /CovenantSQL_bins
PIPELINE_CACHE: $CACHE_DIR/$CI_PIPELINE_IID
BIN_CACHE: $CACHE_DIR/$CI_PIPELINE_IID/bin
PREV_VERSION: v0.4.0
# gitlabci bins: 192.168.2.100:/srv/gitlab-runner/config/CovenantSQL_bins

before_script:
# Setup dependency management tool
Expand All @@ -23,12 +33,23 @@ before_script:
- ulimit -n 8192
# - curl -fSL https://github.com/haya14busa/reviewdog/releases/download/$REVIEWDOG_VERSION/reviewdog_linux_amd64 -o ~/bin/reviewdog && chmod +x ~/bin/reviewdog

test-my-project:
build:
stage: build
script:
- set -x
- make clean
- make use_all_cores
- mkdir -p ${BIN_CACHE}
- cp bin/* ${BIN_CACHE}/

unit-test:
stage: test
script:
- make clean
- cp ${BIN_CACHE}/* bin/
- ./alltest.sh

compatibility-testnet:
testnet-compatibility:
stage: test
script:
- set -o errexit
Expand All @@ -37,7 +58,43 @@ compatibility-testnet:
- branch=$(git branch -rv |grep $commit | awk '{print $1}')
- if [[ $branch =~ "/beta_" ]]; then exit 0; fi
- make clean
- make -j8 client
- cp ${BIN_CACHE}/* bin/
- go test -tags "$UNITTESTTAGS" -bench=^BenchmarkTestnetMiner2$ -benchtime=5s -run ^$ ./cmd/cql-minerd/
- set -x
- ./test/testnet_client/run.sh

old-client-compatibility:
stage: test
script:
- set -o errexit
- set -o pipefail
- set -x
- make clean
- cp ${BIN_CACHE}/* bin/
- ./test/compatibility/specific_old.sh client

old-bp-compatibility:
stage: test
script:
- set -o errexit
- set -o pipefail
- set -x
- make clean
- cp ${BIN_CACHE}/* bin/
- ./test/compatibility/specific_old.sh bp

old-miner-compatibility:
stage: test
script:
- set -o errexit
- set -o pipefail
- set -x
- make clean
- cp ${BIN_CACHE}/* bin/
- ./test/compatibility/specific_old.sh miner

cleanup_cache:
stage: cleanup
script:
- rm -r ${PIPELINE_CACHE}
when: on_success
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env:
- REVIEWDOG_VERSION=0.9.11
language: go
go:
- '1.10.x'
- '1.11.x'

os:
- linux
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Changelog

## [v0.4.0](https://github.com/CovenantSQL/CovenantSQL/tree/v0.4.0) (2019-02-25)

[Full Changelog](https://github.com/CovenantSQL/CovenantSQL/compare/v0.3.0...v0.4.0)

**Merged pull requests:**

- Use minimum assertion instead of exact version [\#265](https://github.com/CovenantSQL/CovenantSQL/pull/265) ([leventeliu](https://github.com/leventeliu))
- Promote beta branch [\#264](https://github.com/CovenantSQL/CovenantSQL/pull/264) ([leventeliu](https://github.com/leventeliu))
- Add imports format script and format all codes [\#263](https://github.com/CovenantSQL/CovenantSQL/pull/263) ([leventeliu](https://github.com/leventeliu))
- Add listen flag for adapter [\#262](https://github.com/CovenantSQL/CovenantSQL/pull/262) ([auxten](https://github.com/auxten))
- Use rpc broadcast for dht node info synchronization instead of kayak [\#261](https://github.com/CovenantSQL/CovenantSQL/pull/261) ([xq262144](https://github.com/xq262144))
- Merge observer and explorer into cql [\#260](https://github.com/CovenantSQL/CovenantSQL/pull/260) ([auxten](https://github.com/auxten))
- Add transaction hash as return value in create/drop [\#259](https://github.com/CovenantSQL/CovenantSQL/pull/259) ([leventeliu](https://github.com/leventeliu))
- Combine createRandomBlock functions into one. [\#258](https://github.com/CovenantSQL/CovenantSQL/pull/258) ([laodouya](https://github.com/laodouya))
- Improve unit test cover ratio [\#257](https://github.com/CovenantSQL/CovenantSQL/pull/257) ([laodouya](https://github.com/laodouya))
- Refactor observer synchronization to pull mode [\#256](https://github.com/CovenantSQL/CovenantSQL/pull/256) ([xq262144](https://github.com/xq262144))
- Refactor observer synchronization to pull mode [\#255](https://github.com/CovenantSQL/CovenantSQL/pull/255) ([xq262144](https://github.com/xq262144))
- Fix SQLChain forks [\#254](https://github.com/CovenantSQL/CovenantSQL/pull/254) ([xq262144](https://github.com/xq262144))
- Update beta with develop updates [\#253](https://github.com/CovenantSQL/CovenantSQL/pull/253) ([xq262144](https://github.com/xq262144))
- Improve unit test cover ratio. [\#251](https://github.com/CovenantSQL/CovenantSQL/pull/251) ([laodouya](https://github.com/laodouya))
- Add blocks cache limit for block producers [\#249](https://github.com/CovenantSQL/CovenantSQL/pull/249) ([leventeliu](https://github.com/leventeliu))
- Support pprof http handler in BlockProducer [\#248](https://github.com/CovenantSQL/CovenantSQL/pull/248) ([xq262144](https://github.com/xq262144))
- Unit all docker client config to same private.key [\#247](https://github.com/CovenantSQL/CovenantSQL/pull/247) ([laodouya](https://github.com/laodouya))
- Make observer API writeTimeout = 10 \* readTimeout [\#246](https://github.com/CovenantSQL/CovenantSQL/pull/246) ([auxten](https://github.com/auxten))

## [v0.3.0](https://github.com/CovenantSQL/CovenantSQL/tree/v0.3.0) (2019-01-30)

[Full Changelog](https://github.com/CovenantSQL/CovenantSQL/compare/v0.2.0...v0.3.0)
Expand Down
65 changes: 12 additions & 53 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use_all_cores:

BUILDER := covenantsql/covenantsql-builder
IMAGE := covenantsql/covenantsql
OB_IMAGE := covenantsql/covenantsql-observer

GIT_COMMIT ?= $(shell git rev-parse --short HEAD)
GIT_DIRTY ?= $(shell test -n "`git status --porcelain`" && echo "+CHANGES" || true)
Expand All @@ -41,7 +40,7 @@ builder: status
-f docker/builder.Dockerfile \
.

runner: builder
docker: builder
docker build \
--tag $(IMAGE):$(VERSION) \
--tag $(IMAGE):latest \
Expand All @@ -50,24 +49,11 @@ runner: builder
-f docker/Dockerfile \
.

observer_docker: builder
docker build \
--tag $(OB_IMAGE):$(VERSION) \
--tag $(OB_IMAGE):latest \
--build-arg COMMIT=$(COMMIT) \
--build-arg VERSION=$(VERSION) \
-f docker/observer.Dockerfile \
.

docker: runner observer_docker

docker_clean: status
docker rmi -f $(BUILDER):latest
docker rmi -f $(IMAGE):latest
docker rmi -f $(OB_IMAGE):latest
docker rmi -f $(BUILDER):$(VERSION)
docker rmi -f $(IMAGE):$(VERSION)
docker rmi -f $(OB_IMAGE):$(VERSION)


save: status
Expand All @@ -89,27 +75,19 @@ logs:
docker-compose logs -f --tail=10

push_testnet:
docker tag $(OB_IMAGE):$(VERSION) $(OB_IMAGE):testnet
docker push $(OB_IMAGE):testnet
docker tag $(IMAGE):$(VERSION) $(IMAGE):testnet
docker push $(IMAGE):testnet

push_bench:
docker tag $(OB_IMAGE):$(VERSION) $(OB_IMAGE):bench
docker push $(OB_IMAGE):bench
docker tag $(IMAGE):$(VERSION) $(IMAGE):bench
docker push $(IMAGE):bench

push_staging:
docker tag $(OB_IMAGE):$(VERSION) $(OB_IMAGE):staging
docker push $(OB_IMAGE):staging
docker tag $(IMAGE):$(VERSION) $(IMAGE):staging
docker push $(IMAGE):staging


push:
docker push $(OB_IMAGE):$(VERSION)
docker push $(OB_IMAGE):latest
docker push $(IMAGE):$(VERSION)
docker push $(IMAGE):latest

Expand Down Expand Up @@ -162,18 +140,6 @@ bin/cql-minerd:
-o bin/cql-minerd \
github.com/CovenantSQL/CovenantSQL/cmd/cql-minerd

bin/cql-observer.test:
$(GOTEST) \
-ldflags "$(ldflags_role_client)" \
-o bin/cql-observer.test \
github.com/CovenantSQL/CovenantSQL/cmd/cql-observer

bin/cql-observer:
$(GOBUILD) \
-ldflags "$(ldflags_role_client)" \
-o bin/cql-observer \
github.com/CovenantSQL/CovenantSQL/cmd/cql-observer

bin/cql-utils:
$(GOBUILD) \
-ldflags "$(ldflags_role_client_simple_log)" \
Expand All @@ -186,18 +152,19 @@ bin/cql:
-o bin/cql \
github.com/CovenantSQL/CovenantSQL/cmd/cql

bin/cql.test:
$(GOTEST) \
-ldflags "$(ldflags_role_client)" \
-o bin/cql.test \
github.com/CovenantSQL/CovenantSQL/cmd/cql


bin/cql-fuse:
$(GOBUILD) \
-ldflags "$(ldflags_role_client_simple_log)" \
-o bin/cql-fuse \
github.com/CovenantSQL/CovenantSQL/cmd/cql-fuse

bin/cql-adapter:
$(GOBUILD) \
-ldflags "$(ldflags_role_client)" \
-o bin/cql-adapter \
github.com/CovenantSQL/CovenantSQL/cmd/cql-adapter

bin/cql-mysql-adapter:
$(GOBUILD) \
-ldflags "$(ldflags_role_client)" \
Expand All @@ -210,27 +177,19 @@ bin/cql-faucet:
-o bin/cql-faucet \
github.com/CovenantSQL/CovenantSQL/cmd/cql-faucet

bin/cql-explorer:
$(GOBUILD) \
-ldflags "$(ldflags_role_client)" \
-o bin/cql-explorer \
github.com/CovenantSQL/CovenantSQL/cmd/cql-explorer

bp: bin/cqld.test bin/cqld

miner: bin/cql-minerd.test bin/cql-minerd

observer: bin/cql-observer.test bin/cql-observer

client: bin/cql-utils bin/cql bin/cql-fuse bin/cql-adapter bin/cql-mysql-adapter bin/cql-faucet bin/cql-explorer
client: bin/cql-utils bin/cql bin/cql.test bin/cql-fuse bin/cql-mysql-adapter bin/cql-faucet

all: bp miner observer client
all: bp miner client

clean:
rm -rf bin/cql*
rm -f *.cover.out
rm -f coverage.txt

.PHONY: status start stop logs push push_testnet clean \
bin/cqld.test bin/cqld bin/cql-minerd.test bin/cql-minerd bin/cql-utils bin/cql-observer bin/cql-observer.test \
bin/cql bin/cql-fuse bin/cql-adapter bin/cql-mysql-adapter bin/cql-faucet bin/cql-explorer
bin/cqld.test bin/cqld bin/cql-minerd.test bin/cql-minerd bin/cql-utils \
bin/cql bin/cql.test bin/cql-fuse bin/cql-mysql-adapter bin/cql-faucet
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@

[中文简介](https://github.com/CovenantSQL/CovenantSQL/blob/develop/README-zh.md)

CovenantSQL is a decentralized, crowdsourcing SQL database on blockchain with features:
CovenantSQL is a GDPR-compliant SQL database running on Open Internet without central coordination:

- **GDPR-compliant**: Zero pain to be GDPR-compliant.
- **SQL**: most SQL-92 support.
- **Decentralize**: decentralize with our consensus algorithm DH-RPC & Kayak.
- **Privacy**: access with granted permission and Encryption Pass.
Expand Down Expand Up @@ -107,10 +108,14 @@ Watch us or [![follow on Twitter](https://img.shields.io/twitter/url/https/twitt
## TestNet

- [Quick Start](https://developers.covenantsql.io)
- [MainChain Explorer](http://scan.covenantsql.io)
- [SQLChain Explorer](https://explorer.dbhub.org)
- [Demo & Forum](https://demo.covenantsql.io/forum/)

## Contact

- [mail us](mailto:[email protected])
- [Mail](mailto:[email protected])
- [Forum](https://demo.covenantsql.io/forum/)
- <a href="https://twitter.com/intent/follow?screen_name=CovenantLabs">
<img src="https://img.shields.io/twitter/url/https/twitter.com/fold_left.svg?style=social&label=Follow%20%40CovenantLabs"
alt="follow on Twitter"></a>
Expand Down
3 changes: 0 additions & 3 deletions alltest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ set -o pipefail
set -o nounset

main() {
make clean
make -j6 bp miner observer

go test -tags "$UNITTESTTAGS" -race -failfast -parallel 16 -cpu 16 -coverprofile main.cover.out $(go list ./... | grep -v CovenantSQL/api)
go test -tags "$UNITTESTTAGS" -race -failfast -parallel 16 -cpu 16 -coverpkg ./api/...,./rpc/jsonrpc -coverprofile api.cover.out ./api/...

Expand Down
9 changes: 2 additions & 7 deletions bin/docker-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ blockproducer)
exec /app/cqld -config "${COVENANT_CONF}" -metric-web "${METRIC_WEB_ADDR}" "${@}"
;;
observer)
MAGIC_DOLLAR='$' envsubst < /etc/nginx/conf.d/servers/explorer.conf.template > /etc/nginx/conf.d/default.conf
nginx -g 'daemon off;' </dev/null &
exec /app/cql-observer -config "${COVENANT_CONF}" -listen "${COVENANTSQL_OBSERVER_ADDR}"
exec /app/cql -config "${COVENANT_CONF}" -web "${COVENANTSQL_OBSERVER_ADDR}" "${@}"
;;
adapter)
exec /app/cql-adapter -config "${COVENANT_CONF}" "${@}"
exec /app/cql -config "${COVENANT_CONF}" -adapter "${COVENANTSQL_ADAPTER_ADDR}" "${@}"
;;
mysql-adapter)
exec /app/cql-mysql-adapter -config "${COVENANT_CONF}" "${@}"
Expand All @@ -28,8 +26,5 @@ cli)
faucet)
exec /app/cql-faucet -config ${COVENANT_CONF} "${@}"
;;
explorer)
exec /app/cql-explorer -config ${COVENANT_CONF} "${@}"
;;
esac

Loading