Skip to content

Commit

Permalink
Merge Develop (#576)
Browse files Browse the repository at this point in the history
* fix builds

* rename COC for github (#382)

* Hardcode External IP (#386)

* Hardcode External IP

* Hardcode External IP

* Add Connect timeout to p2p conns (#387)

* Add Connect timeout to p2p conns

* add exported comment

* Added timeout for eth read operations (#388)

* Added timeout for read operations

* fix unit test

* manual group import

* Flatten Core document and P2P packages (#385)

* Fix Gopkg github repo URLs (#393)

* Fix github links

* try http

* Upgrading to Go 1.11.x (#391)

* Identity Config cleanup (#396)

* identity cleanup

* 20byte for secp

* some test

* clean up anchors (#398)

1. Better comments
2. renamed `NewAnchorID` -> `ToAnchorID` since this is conversion but not a creation
3. renamed `NewDocRoot` -> `ToDocumentRoot` since this is conversion
4. renamed `NewRandomDocRoot` -> `RandomDocumentRoot` 
5. Unexported `anchorCommittedWatcher`, `anchorConfirmationTask`

* refactor identity (#399)

1. Unexported constants
2. Unexported Worker Task
3. unexported `ethereumIdentity`

* Refactor geth (#397)

1. Minor changes to how we increment nonce and added more tests for the nonce increment
2. Mutex for accounts for read and write
3. Unported `GethClient`
4. Removed definitions that are not used in the interface

* fix the race condition with config (#401)

Fixes #389 
Fixes #362 

Turns out both the issues were due to `config.Config` variable being accessed at the same time. #389, it is accessed in `notification.Send` and in #362 it is accessed to set Config to nil in `config/test_bootstrapper.go`.

All the tests share a global namespace and since they are run in parallel and each time the `config/test_boostrapper` is run in each test, which is updating `config.Config`, the race condition happens. Added a functions to set and get config with mutex.

* Hex convert webhook fields (#409)

* Hex convert webhook fields

* Hex convert webhook fields

* Test

* Updated Precise proof with hex value (#414)

* Add api logs (#413)

* Add api logs

* Review comments

* Adding notification sample to config example (#416)

* NFT: added events/workers, latest contract version, using centrifuge/go-ethereum (#400)

* Fix problem with creating ids

* Worker for watching NFT minting events

* Worker for watching NFT minting events

* added correct encoding for worker

* formatting

* updated to latest paymentObligation contract version

* correct collaborators passing

* latest centrifuge contracts & using centrifuge/go-ethereum

* fixed dependencies except contracts

* added latest contracts

* reset integration test config

* formatting

* fixed unit tests for nft minting

* reduced scope of public variables

* formatting

* reduced public functions in nft package

* add additional nil checks for data in the payload (#424)

Fixes #419 

Functional tests will be done once this is merged to develop

* First Step config (#422)

* First Phase config

* cleanup

*  First batch of removing global config access (#441)

* First Phase config

* cleanup

* global removal

* nft: added format checks for collaborator proofField (#442)

* added collaborators field check

* improved regex performance

* NFT: using passed registryAddress for dynamic contract binding (#443)

* added generic registry address support

* remove global dependencies for p2p layer (#446)

* remove global dependencies for p2p layer

* add p2p boostrap

* remove test checks

* use ctx from args

* fix tests

* check for startup errors

* better tests

* remove debug point

* fix tests

* Fix/p2p test (#449)

* fix the deadlock

* dont propagte shutdown error

* propagate the ctx

* NFT: added tests for minting confirmation task (#445)

added tests for checking the correct parsing of the arguments

* NFT: removed type parameter from endpoint (#448)

* removed type from nft endpoint

* find service based on documentID

* added tests for findService

* fixed findService test

* fixed unit tests for type field

* deactivated the test case

* NFT: usage of depositAddress parameter (#456)

* removed usage of identity contract address for mint method

* remove global registry service (#457)

Removes global service registry

* Refactor stateful methods into identity.Service interface (#410)

* Refactor stateful methods into ethereum.Client interface

* State save tests fail

* Fixing processor tests

* More tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Missing build tag

* identity.go coverage (#463)

* identity.go coverage

* correct test

* add status mapping in PO (#462)

Fixes #455

* remove global anchor repo (#464)

Fixes #459

* add missing registry (#466)

Fixes the functional tests

* Fix unit tests (#467)

* Remove global configuration usage (#460)

* First Phase config

* cleanup

* global removal

* added contextHeader

* avoid cyclic deps

* hell

* hell 2

* pass duration param queue + fix unit tests

* remove global config var

* Remove global + queue timeout param

* fix tests + config interface

* comments

* Fix unit tests

* package Configs

* fix missing po config (#470)

* Kovan/fixes (#471)

Changes:
- Create default config for Kovan
- Minor changes to createconfig to support txpoolaccess option
- logging fixes
- Use go-ethereum with kovan fixes

Fixes https://github.com/centrifuge/roadmap/issues/61

* Remove usage of identity.IDService (#473)

* Remove usage of identity.IDService

* Fix test

* Fix test

* Pprof/endpoint (#476)

* add pprof port to config

* add pprof end points

* review changes

* Remove PaymentObligation global (var po *ethereumPaymentObligation) (#478)

* Remove PaymentObligation global

* Fmt

* Include prefix precise proof (#477)

* include prefix precise proof

* comment out test

* Queue implements Server and removing the queue.Queue global (#469)

* Queue implements Server and removing the queue.Queue global

* Looks good

* Fix tests

* Fix problem with init

* More queue init fixes

* More queue init fixes

* Fix tests

* Fix tests

* Fix tests

* Lock for qs.stop

* Fix race conditions

* Fix problems and review comments

* Fix problems and review comments

* Fix problems and review comments

* Fix problems and review comments

* Lock

* Lock

* Lock

* model test

* Add linting checks (#479)

Changes:
- Added gometalinter
- following checks are enabled: goimport, vet, staticcheck, nakedret

Following changes are suggested by these linters. We still need to add few more linters which we can do on a regular basis.

Fixes #475

* Fixing merging issue with an earlier pr (#480)

* Fixing merging issue with earlier pr

* Fix

* Fix cmds that were broken (#494)

* Fix cmds that were broken

* Imports

* Remove storage.levelDBInstance global (#524)

* Remove storage.levelDBInstance global

* fix tests

* fix tests

* imports

* Rename `go-centrifuge` to `centrifuge` (#525)

Fixes #493

* use http jsonrpc (#522)

* NFT: unlimited amount of proofs and no collaborator extra field (#526)

* added new gobinding and refactored for handler tests

* refactored nft servic tests

* refactored integration tests

* formatting

* Integration testing framework(Testworld) first iteration (#512)

* Fixing merging issue with earlier pr

* V1

* Peer init works

* Remove storage.levelDBInstance global

* Testworld mods

* fix tests

* fix tests

* imports

* First working hosts

* First successful Testworld tests

* Added Robert and the park hosts in a nicer way

* Fix linting issues

* Fix gitignore

* Review comments

* Fix create an already updated version for first time (#527)

* updated paymentObligation addresses for rinkeby and kovan (#530)

* use internal error for context (#531)

* NFT: fixed incorrect tokenID size (#532)

* NFT: fixed incorrect tokenID size

* better comments

* Testworld iteration 2 - cleanup and more golang based env setup (#529)

* Added Testworld readme

* Load config from file

* Testworld cleanup

* Add missing build tag

* Fix lint issues

* Adjust the way smart contract addresses are loaded for other networks

* Added kovan faq

* Minor update to the readme

* Review comments

* Clean gitignore

* Fixing unnecessary for loops that I have written around selects (#533)

* Fix unnecessary for loops that I have written around selects

* Remove resolved TODO

* Add update collaborator test (#535)

* Add update collaborator test

* Add update collaborator test

* removed defaultRegistry address from service (#536)

* update kovan boot nodes (#538)

* remove envs from yml (#540)

* Generic db implementation (#534)

Fixes #503 

Note:
This is just the implementation. Further PRs should handle integration to Invoice and PO

* integration test: added node time out test & improved test framework (#539)

* added cancel func to host

* added utils func and basic setup for timeout test

* formatting

* finished nodeTime test

* improved existing testcases

* removed uncommented code

* added testSuite to hostManager

* restart alice after shutdown

* added own node for timeout

* added timeout after re-start

* added restart method

* increased timeout

* Update README.md (#545)

* Added node defaults to default config (#541)

* Testworld: detect when host is live instead of waiting arbitrarily (#546)

* Minor adjustments

* Detect when host is live instead of waiting arbitrarily

* move to original geth (#547)

* Fix p2p timeouts and make Testworld parallel and faster (#548)

* Fix timeouts and make Testworld faster

* Fix test

* Make tests parallel

* Remove unnecessary iteration in test scripts

* Test script update

* Make tests parrallel and work

* Make tests parrallel and work

* Fix for migrate bash script (#549)

* Errors/internal (#543)

Fixes #537 

Note: This only adds internal errors. We need to add client and peerError later

* Tenant config model (#544)

* Node and Tenant config models

* Node and Tenant config models

* Test update

* Fix mistake

* Review comments

* use config interface (#552)

We seem to using config structure when we have an interface. This PR should take care of using interfaces everywhere

* Spaces

* added integration tests for NFT (#555)

* added NFT successful test case to integration tests

* added error tests for NFT

*  Migrate documents package to use new errors (#553)

* Migrate documents package to use new errors

* typeerror -> typederror

* Fix failing tests

* Fix fmt errors

* Fix error name

* Fix error name

*  Migrate invoice service to new repo (#554)

* Migrate documents package to use new errors

* typeerror -> typederror

* Fix failing tests

* Migrate invoice service to new repo

* Fix fmt errors

* Migrate new repository to new errors

* Fix test

* Fix test

* Fix lint issue

* Fix error name

* Fix error name

* added testworld tests for proofs (#556)

* added testworld tests for proofs

* added proof check for bob

*  Migrate po service to new repo (#557)

* Migrate documents package to use new errors

* typeerror -> typederror

* Fix failing tests

* Migrate invoice service to new repo

* Fix fmt errors

* Migrate new repository to new errors

* Fix test

* Fix test

* Fix lint issue

* Fix error name

* Fix error name

* Migrate PO service to new repository

* Remove legacy repo (#558)

* Migrate documents package to use new errors

* typeerror -> typederror

* Fix failing tests

* Migrate invoice service to new repo

* Fix fmt errors

* Migrate new repository to new errors

* Fix test

* Fix test

* Fix lint issue

* Fix error name

* Fix error name

* Migrate PO service to new repository

* Remove legacy repo

* added support for PO tests to testworld (#566)

* added testworld tests for proofs

* simple tests refactored

* added PO basic tests

* updated all PO tests

* included tests for NFT

* correct travis config

* fixed nft for PO

* fixed linting and pararell collaborator timeout

* deactivate unstable testcase

* Fixing some possible bugs because of colliding variable names with packages (#568)

*  Remove fmt.Errorf in favour of errors.New (#559)

* Migrate documents package to use new errors

* typeerror -> typederror

* Fix failing tests

* Migrate invoice service to new repo

* Fix fmt errors

* Migrate new repository to new errors

* Fix test

* Fix test

* Fix lint issue

* Fix error name

* Fix error name

* Migrate PO service to new repository

* Remove legacy repo

* Remove fmt.Errorf in favour of errors.New

* Fix problems

* Fix lint

* Missed stuff

* Make tests into a table and parallel (#569)

* Make tests into a table and parallel

* Make tests into a table and parallel

* Make tests into a table and parallel

* Config repository  (#560)

* Config Repositories

* fmt

* fix test

* move config around

* fmt

* fmt

* fmt

* try higher timeout

* Introduce Teddy and Dolores

* Revert "Introduce Teddy and Dolores"

This reverts commit 1a5dbf7.

* Skip timeout tests on CI to avoid resource problems (#570)

* go version 1.11.3 bug, lock to 1.11.2 (#571)

* move to 1.11.4 (#573)
  • Loading branch information
mikiquantum committed Dec 17, 2018
1 parent 7a90e75 commit f5c58aa
Show file tree
Hide file tree
Showing 222 changed files with 9,553 additions and 5,608 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ coverage/
coverage.txt
*.swp
*.swo
testworld/peerconfigs/*
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: go
go:
- 1.10.x
- 1.11.4

# Maybe this helps with building branches in a fork
go_import_path: github.com/centrifuge/go-centrifuge
Expand All @@ -11,9 +11,6 @@ services:
env:
matrix:
- DEPCACHEDIR=/tmp/depcache IMAGE_NAME=centrifugeio/go-centrifuge PROTOTOOL_VERSION=0.4.0 PROTOTOOL_BIN=~/bin/0.4.0/prototool
global:
- secure: XDK6tU10HRQOLqYBquB69KJ0ZcA/avqWZ3o73ET+RurApvlYqEY1YA1FtPs2+vY9BlvvzN0c7v9RoxIqwYsYl7m/qoZHBcl4gpjCcFJtjPqpudkrigFZmb5voSelqKXdh4UmwQa4hQPq4W002eju82FHXEtdFSThNi1jAPMitLEmFhG22JoKda2M810HbPqrBctye6RD/2ZSsSLMZQgeTDkwvU5FFDzO2qfKQqtYrMqfpvcqTsfqr6vpUyZyaOVsr2AzLtu3qLB9UBSHw98yOoSsTpZ+rg6d2X5PWn8ndOKSyswelHoPCdNjTwPOxRie+P7tEClr90LtdWrtXbQDxp0j6dutP0FQALv38sSioazag0sDePl6yjGvSH9s8UgvnpSIHUZsS+ZxntVEOSNnxzP+wFwP05XEpzd5XL+dn9CjH8PtXOX+lv+KHc8NGHeKdnw/eiwD5eikW13V9u6Fm2ZyAOeLSqXb+m0Hfj0+OirUnisZII1dO2AAWbigop7tk0xn/UPQQaT/TEREdhM9cSXhQOyHB4UoHac7zipbDKtBveJPbaGNe9iRqPaLViPO9XwUAHkOGrNv8gl+WaNzrmiOFgWpVg7KUUxzKu5n2QyuNZb5H27+u4RpUbv6qTQiU0VhSW9F2xcwgHLVoJGSDVwyOM1XuTidX/aTQ/G0pZQ=
- secure: Id6nD7LQ//FySnKgFAae4Gi60JEnpXw1lWARfcJbYOVIH7usbyKm+lHyyCb9tsj5eJmdHovpzd4ZO52arMdDbvzGmnBHbWMXhjJe7oGJNgJ4ifI0GTSCCHOshox5kzhom3OekjOs5QZgcg/DN0Aflt5JkJY+PQy0KGqSo449uvB86QMesrDI2FVZlCL/a81HaSRIB9UhWfgyQrpEY6CqmIQtWY4MTHPnb1YegG04OKrUVdmD0iPbN3diDciiS5xCXi4JyiP+hSbUbnAakEr071CptRaGiJXkCkMK28AUvn5ox6xffDNeA2snDfE36EUUZYLkcs89fUKAp8Quu4i18HTFCtfC8o82mt2nAu+ZNEuU+SJzK4mKUwdSwt/kDMMxdHZ5ss7aoTlreHGDehts12OGBMsp7w/cYqKnnaLf8uHFfcasOD+51SDGyo5jzA5QDM6lrt28Cptb/3NwH+xmFTY85YxE9tnTAKkBd/NRPlB8Q1HNzLWu4QGC4u0wnWeM0IvWhtEFguEb8E9MtcvKHHC5iVyyxJUavJ9s+41Xg4x0KF2Z0fmmsZTu1WYrcFLhWtBnkUGeS70NfQpGZ5UkuL9yJN3SvVApdku9QMbw6Bn/ep05V5JnFSOGlHx5HztyMpkq/CJRcuzq1lxnoUWhXVulhwBrDelvsgO8pBVALJw=

checkout:
post:
Expand All @@ -38,7 +35,7 @@ jobs:
include:
- stage: test
script:
- make proto-lint proto-all gen-swagger generate format-go
- make lint-check proto-lint proto-all gen-swagger generate format-go
- echo "Checking that prototool and format-go don't result in a modified git tree" && git diff --exit-code protobufs/gen
- ./build/scripts/test_wrapper.sh
after_success:
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
FROM golang:1.10-alpine as builder
FROM golang:1.11-alpine as builder

RUN apk update && apk add --no-cache openssh git jq curl gcc libc-dev build-base

ADD . /go/src/github.com/centrifuge/go-centrifuge
WORKDIR /go/src/github.com/centrifuge/go-centrifuge

RUN go install -ldflags "-X github.com/centrifuge/go-centrifuge/version.gitCommit=`git rev-parse HEAD`" ./...
RUN go install -ldflags "-X github.com/centrifuge/go-centrifuge/version.gitCommit=`git rev-parse HEAD`" ./cmd/centrifuge/...

FROM alpine:latest

RUN apk update && apk add --no-cache jq curl

WORKDIR /root/
COPY --from=builder /go/bin/go-centrifuge .
COPY --from=builder /go/bin/centrifuge .
COPY build/scripts/docker/entrypoint.sh /root

VOLUME ["/root/config"]
Expand Down
Loading

0 comments on commit f5c58aa

Please sign in to comment.