Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFT: usage of depositAddress parameter #456

Merged
merged 10 commits into from Nov 16, 2018

Conversation

xmxanuel
Copy link
Member

removed usage of identity contract address for mint method

@codecov
Copy link

codecov bot commented Nov 16, 2018

Codecov Report

Merging #456 into develop will decrease coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #456      +/-   ##
===========================================
- Coverage    53.65%   53.58%   -0.08%     
===========================================
  Files           91       91              
  Lines         5556     5554       -2     
===========================================
- Hits          2981     2976       -5     
- Misses        2295     2302       +7     
+ Partials       280      276       -4
Impacted Files Coverage Δ
nft/ethereum_payment_obligation.go 68.66% <100%> (-2.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d57f3d6...bf65a07. Read the comment docs.

@xmxanuel xmxanuel merged commit 55dea3c into centrifuge:develop Nov 16, 2018
mikiquantum added a commit that referenced this pull request Dec 17, 2018
* 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 centrifuge/roadmap#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)
mikiquantum added a commit that referenced this pull request Jan 20, 2019
* 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 centrifuge/roadmap#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)

* Consolidate DB Repository (#574)

* encapsulated DB interface

* lint

* added typed errors

* fix integration test

* fix integration test

* remove ID from storage.Repository

* ISSUE and PR templates proposal (#551)

* ISSUE and PR templates proposal

* Updates

* Update ISSUE_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

* Update ISSUE_TEMPLATE.md

* Cleanup testworld generated files (#578)

* Cleanup testworld generated files

* Force delete

* HTTP header for tenantID (#575)

Fixes #488 

1. Add interceptor that require header 'authorization' which holds tenantID
2. Add basic version if HTTPError and http Error response interceptor since we ned it for point 1

* added a generic document service (#579)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* document service: added CreateProof to model (#581)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* moved service_test.go

* document service: createProof and CreateProofForVersion (#584)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* added proof methods

* moved service_test.go

* added tests for createProof in service

* fixed broken createProofVersion test case

* formatting

* Transactions (#582)

* initial tx repo

* lint fixes

* document service: added RequestDocumentSignature and ReceiveAnchoredDocument (#586)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* added proof methods

* moved service_test.go

* added tests for createProof in service

* implemented remaining methods for document service

* fixed broken createProofVersion test case

* formatting

* added tests for requestSignature

* formatting

* [Config DB] API Admin Endpoints (#583)

* Added proto models + service

* handler + service

* model tests

* add tests

* delete return

* missing tag

* proto

* [MultiTenancy] P2P refactorings No. 1 (#594)

* [MultiTenancy] P2P refactorings No. 1

* Fix problems

* Minor cleanups

* Debugged integration test

* Fix bug

* Fully debuggable integration tests (#595)

* [MultiTenancy] P2P refactorings No. 1

* Fix problems

* Minor cleanups

* Debugged integration test

* Fully debuggable integration tests

* Fix bug

* Minor

* Transaction Status Check API (#596)

Fixes #496 

- Add Transaction Status check endpoint

* Minor refactors (#600)

* remove signature package

* keytools => crypto

* remove signature package

* refactor bootstrappers

* rename contextheader

*  Convert ContextHeader to Context and make a util (#601)

* Fix error

* Convert ContextHeader to Context and make a util

* fix problem

* Fix lint issue

* Remove P2P GRPC (#597)

* Buggy iteration

* Remove GRPC POC

* Remove GRPC POC

* Fix lint

* Fix protobuf generated code

* Fixed client test

* Messenger tests

* Messenger tests

* correct testworld

* remove useless code

* Rename

* [MultiTenancy] Enable config database and api (#602)

* Enable config database and api

* Enable config database and api

* Minor

* Fix createConfig issue

* Add Testworld test for config API

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Lint fix

* Generate swagger

* Remove race detection from TestWorld to improve perf

* Fix unit tests

* REST fix /config/tenant => /config/tenants (#605)

* REST fix /config/tenant => /config/tenants

* REST fix /config/tenant => /config/tenants

* Async APIs (#598)

Fixes #497 #498 #499 

I started using commom.Address for tenant id since that is a requirement for transactions.
Note: This will break the functional tests.

* increment sleep to 1 sec

* [MultiTenancy] Use db stored config at runtime (#603)

* Enable config database and api

* Enable config database and api

* Minor

* Fix createConfig issue

* Add Testworld test for config API

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Lint fix

* Generate swagger

* Remove race detection from TestWorld to improve perf

* Use db stored config at runtime

* Lint and swagger

* Fix unit tests

* Fix tests

* Fix unit tests

* Remove -race from testworld

* Fix conflicts

* Try testworld without -race

* merging

* Merging still

* Fix confgi

* Fix test

* use json marshaller (#608)

* [MultiTenancy] Refactor identity package to remove cycles when using data structures from the interface (#606)

* Enable config database and api

* Enable config database and api

* Minor

* Fix createConfig issue

* Add Testworld test for config API

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Lint fix

* Generate swagger

* Remove race detection from TestWorld to improve perf

* Use db stored config at runtime

* Lint and swagger

* Fix unit tests

* Fix tests

* Fix unit tests

* Remove -race from testworld

* Refactor identity and context

* Make identity work with db stored config

* Fix conflicts

* Fix test and lint

* Try testworld without -race

* merging

* Merging still

* Fix confgi

* Fix test

* Fix tests

* Multi tenancy service parts complete without api handlers and p2p handlers (#609)

* Multi tenancy complete without api handlers and p2p handlers

* Fixed unit tests

* Fix unit tests

* Fix unit tests

* Anchor uses tenant config (#618)

* Anchor uses tenant config

* Fix unit test

* genericDocumentService: added interface and bootstrappers (#610)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* added proof methods

* moved service_test.go

* added tests for createProof in service

* implemented remaining methods for document service

* fixed broken createProofVersion test case

* formatting

* added tests for requestSignature

* formatting

* implemented own interface for generic document

* added bootstrapper to generic document service

* added bootstrapper for generic service

* fixed linting

* added bootstrapper for tests

* removed derive from cd

* removed cyclic dep

* formatting

* fixed api/server

* formatting

* formatting

* fixed api server

* correct testworld flags

* formatting

* Removing no longer used scripts (#621)

* using generic document service inside invoice service (#620)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* added proof methods

* moved service_test.go

* added tests for createProof in service

* implemented remaining methods for document service

* fixed broken createProofVersion test case

* formatting

* added tests for requestSignature

* formatting

* implemented own interface for generic document

* added bootstrapper to generic document service

* added bootstrapper for generic service

* fixed linting

* added bootstrapper for tests

* removed derive from cd

* replaced getVersion for invoice with generic one

* removed cyclic dep

* formatting

* fixed api/server

* formatting

* fixed GetLatestVersion invoice

* formatting

* fixed api server

* correct testworld flags

* added generic exists to invoice

* added generic proof generation to invoice

* added generic requestDocumentSignature to invoice

* formatting

* formatting

* removed old tests

* using a embedded interface

* Identity package uses tenantConfig (#619)

* Identity package uses tenantConfig

* Fix testworld issue

* Fix problem

* NFT: using generic document service (#622)

* added testworld tests for proofs

* implemented NFT with generic service

* correct flags for testworld

* fixed nft error tests

* po service using generic service (#623)

* added testworld tests for proofs

* po service uses generic service

* removed old po tests

* P2P review updates (#624)

* P2P review updates

* review comments

* review comments

* Final rename

* P2P - tenant <--> protocol mapping (#626)

* NFT: fix async testcase  (#628)

* added testworld tests for proofs

* async nft testcase

*  Support local tenant loops (#627)

* P2P - tenant <--> protocol mapping

* Support local tenant loops

* Add tests

* Fix test

* Fix test

* Review comments

* Add basic Read rules to CoreDocument (#611)

This PR will add basic read rules derived from the collaborators passed.

Fixes #587

* identity: gocelery task for successful transaction (#632)

* added testworld tests for proofs

* added transaction status task

* added protobuf header transaction.

* removed nft confirm task

* implemented getTransactionStatus

* formatting

* formatting

* removed testoutput

* formatting

* added swagger

* Fix p2p validation check for local (#634)

* Fix p2p validation check for local

* Fix p2p validation check for local

* Added Generic handler + new p2p envelope (#629)

* envelope + handler

* rename proto

* format + tests

* timeout

* fix

* address comments

* Fix storage <--> config cycles (#633)

* Fix storage <--> config cycles

* Fix test

* Fix lint

* merge issues

* merge issues

* add peer validator for Read ACL (#639)

* add peer validator

* refactor to bool

* API /config/tenants/generate endpoint (#637)

* API /config/tenants/generate endpoint

* Fix problems

* Fix test issues

* Fix test issues

* Success message added (#641)

* Success message added

* further user instructions for success message

* Added signature to header + handshake validation (#640)

* Added signature to header + handshake validation

* fix tests

* address comments

* added eth key check

* fix integration test

* Multitenant(Account) api (#642)

* Enable auth header for API

* Minor

* Minor

* Minor

* More tests and fixes

* non exisiting document check

* Fix tests

* lint

* fix

* remove comment

* P2P Key check (#648)

* Added signature to header + handshake validation

* fix tests

* address comments

* added eth key check

* fix integration test

* Remove signature

* Remove signature

* typo

* fix pk

* Import main node config file everytime node starts(simpler than removing config service usage) (#649)

* Import main node config file everytime node starts(simpler than removing config service usage)

* Remove dead code

* Fix tests

* Fix test

* Fix problem with creat

* review comments

* add account fields to notification (#653)

* add account fields to notification

* comments + proto-gen

* Account rename 1: move API /config/tenants => /accounts (#654)

* move API /config/tenants => /accounts

* move API /config/tenants => /accounts

* Review comments

* added tests for transactionStatusTask (#645)

* added testworld tests for proofs

* added transaction status task

* added protobuf header transaction.

* removed nft confirm task

* implemented getTransactionStatus

* formatting

* formatting

* removed testoutput

* formatting

* added swagger

* added integration tests for transaction task

* formatting

* formatting

* removed mock eth client from identity package

* simplified integration tests

* changed nft register transactionTask

* fixed broken unit test in api package

* Add Auth Header to Swagger UI (#655)

* add account fields to notification

* comments + proto-gen

* Add custom swagger auth header

* comments

* use latest gocelery for retry and delay (#643)

Remove the for loop with retryable tasks

* Add nil safe config (#636)

* add nil safe config

* add error checks account config

* error type

* error type

*  Account rename 2: refs in config and configstore packages (#659)

* move API /config/tenants => /accounts

* move API /config/tenants => /accounts

* Review comments

* Account rename 2: refs in config and configstore packages

* merge

* Review comments

* More refs

* pump metis version (#657)

* removing confirmation transaction task (#658)

* added testworld tests for proofs

* added transaction status task

* added protobuf header transaction.

* removed nft confirm task

* implemented getTransactionStatus

* formatting

* formatting

* removed testoutput

* formatting

* added swagger

* added integration tests for transaction task

* formatting

* formatting

* removed mock eth client from identity package

* simplified integration tests

* changed nft register transactionTask

* fixed broken unit test in api package

* removing confirmation task

* transactionStatusTask: added submitTransaction to ethereum package (#661)

* created submitTransaction method

* create transactionTask queuing in ethereum package

* modified mock clients

* moved register transaction task  into ethereum package

* support getting core documents (#652)

* update MessageTypes to include GetAnchoredDocument type

* added generic service to Handler struct

* changed naming on messagetypes

* updated centrifuge-protobuf package to latest version

* implementation for GetDocument method

* resolve MessageType for GetDocument methods from string

* removed irrelevant senderID

* added genericService to p2p bootstrapper

* Feat/read acl nfts (#650)

Fixes #590 

This would add the NFT validator.

* remove the signature from NFT read acls (#664)

As per our discussion yesterday

* Refactor/message types to map (#662)

* if else block to map

* Account rename 3: use of tenant in variable names (#665)

* Account rename 3: use of tenant in variable names

* fix compile

* Document service refactor (#666)

* break the coredocument package

* fix anchors

* fix unit tests

* fix unit tests

* fix tests

* break the coredocument package

* fix anchors

* fix unit tests

* fix unit tests

* fix tests

* Client has access to idService (#667)

* Added CMD tests (#668)

* Added CMD tests

* wrap in go file
mikiquantum added a commit that referenced this pull request Jun 25, 2019
* fix builds (#381)

* Merge develop into master (#390)

* 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

* Merge Develop (#576)

* 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 1a5dbf7ab78c919c1a3a7a50f46c2bc27369980d.

* 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)

* Merging Develop -> Master (#669)

* 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 1a5dbf7ab78c919c1a3a7a50f46c2bc27369980d.

* 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)

* Consolidate DB Repository (#574)

* encapsulated DB interface

* lint

* added typed errors

* fix integration test

* fix integration test

* remove ID from storage.Repository

* ISSUE and PR templates proposal (#551)

* ISSUE and PR templates proposal

* Updates

* Update ISSUE_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

* Update ISSUE_TEMPLATE.md

* Cleanup testworld generated files (#578)

* Cleanup testworld generated files

* Force delete

* HTTP header for tenantID (#575)

Fixes #488 

1. Add interceptor that require header 'authorization' which holds tenantID
2. Add basic version if HTTPError and http Error response interceptor since we ned it for point 1

* added a generic document service (#579)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* document service: added CreateProof to model (#581)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* moved service_test.go

* document service: createProof and CreateProofForVersion (#584)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* added proof methods

* moved service_test.go

* added tests for createProof in service

* fixed broken createProofVersion test case

* formatting

* Transactions (#582)

* initial tx repo

* lint fixes

* document service: added RequestDocumentSignature and ReceiveAnchoredDocument (#586)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* added proof methods

* moved service_test.go

* added tests for createProof in service

* implemented remaining methods for document service

* fixed broken createProofVersion test case

* formatting

* added tests for requestSignature

* formatting

* [Config DB] API Admin Endpoints (#583)

* Added proto models + service

* handler + service

* model tests

* add tests

* delete return

* missing tag

* proto

* [MultiTenancy] P2P refactorings No. 1 (#594)

* [MultiTenancy] P2P refactorings No. 1

* Fix problems

* Minor cleanups

* Debugged integration test

* Fix bug

* Fully debuggable integration tests (#595)

* [MultiTenancy] P2P refactorings No. 1

* Fix problems

* Minor cleanups

* Debugged integration test

* Fully debuggable integration tests

* Fix bug

* Minor

* Transaction Status Check API (#596)

Fixes #496 

- Add Transaction Status check endpoint

* Minor refactors (#600)

* remove signature package

* keytools => crypto

* remove signature package

* refactor bootstrappers

* rename contextheader

*  Convert ContextHeader to Context and make a util (#601)

* Fix error

* Convert ContextHeader to Context and make a util

* fix problem

* Fix lint issue

* Remove P2P GRPC (#597)

* Buggy iteration

* Remove GRPC POC

* Remove GRPC POC

* Fix lint

* Fix protobuf generated code

* Fixed client test

* Messenger tests

* Messenger tests

* correct testworld

* remove useless code

* Rename

* [MultiTenancy] Enable config database and api (#602)

* Enable config database and api

* Enable config database and api

* Minor

* Fix createConfig issue

* Add Testworld test for config API

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Lint fix

* Generate swagger

* Remove race detection from TestWorld to improve perf

* Fix unit tests

* REST fix /config/tenant => /config/tenants (#605)

* REST fix /config/tenant => /config/tenants

* REST fix /config/tenant => /config/tenants

* Async APIs (#598)

Fixes #497 #498 #499 

I started using commom.Address for tenant id since that is a requirement for transactions.
Note: This will break the functional tests.

* increment sleep to 1 sec

* [MultiTenancy] Use db stored config at runtime (#603)

* Enable config database and api

* Enable config database and api

* Minor

* Fix createConfig issue

* Add Testworld test for config API

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Lint fix

* Generate swagger

* Remove race detection from TestWorld to improve perf

* Use db stored config at runtime

* Lint and swagger

* Fix unit tests

* Fix tests

* Fix unit tests

* Remove -race from testworld

* Fix conflicts

* Try testworld without -race

* merging

* Merging still

* Fix confgi

* Fix test

* use json marshaller (#608)

* [MultiTenancy] Refactor identity package to remove cycles when using data structures from the interface (#606)

* Enable config database and api

* Enable config database and api

* Minor

* Fix createConfig issue

* Add Testworld test for config API

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Lint fix

* Generate swagger

* Remove race detection from TestWorld to improve perf

* Use db stored config at runtime

* Lint and swagger

* Fix unit tests

* Fix tests

* Fix unit tests

* Remove -race from testworld

* Refactor identity and context

* Make identity work with db stored config

* Fix conflicts

* Fix test and lint

* Try testworld without -race

* merging

* Merging still

* Fix confgi

* Fix test

* Fix tests

* Multi tenancy service parts complete without api handlers and p2p handlers (#609)

* Multi tenancy complete without api handlers and p2p handlers

* Fixed unit tests

* Fix unit tests

* Fix unit tests

* Anchor uses tenant config (#618)

* Anchor uses tenant config

* Fix unit test

* genericDocumentService: added interface and bootstrappers (#610)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* added proof methods

* moved service_test.go

* added tests for createProof in service

* implemented remaining methods for document service

* fixed broken createProofVersion test case

* formatting

* added tests for requestSignature

* formatting

* implemented own interface for generic document

* added bootstrapper to generic document service

* added bootstrapper for generic service

* fixed linting

* added bootstrapper for tests

* removed derive from cd

* removed cyclic dep

* formatting

* fixed api/server

* formatting

* formatting

* fixed api server

* correct testworld flags

* formatting

* Removing no longer used scripts (#621)

* using generic document service inside invoice service (#620)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* added proof methods

* moved service_test.go

* added tests for createProof in service

* implemented remaining methods for document service

* fixed broken createProofVersion test case

* formatting

* added tests for requestSignature

* formatting

* implemented own interface for generic document

* added bootstrapper to generic document service

* added bootstrapper for generic service

* fixed linting

* added bootstrapper for tests

* removed derive from cd

* replaced getVersion for invoice with generic one

* removed cyclic dep

* formatting

* fixed api/server

* formatting

* fixed GetLatestVersion invoice

* formatting

* fixed api server

* correct testworld flags

* added generic exists to invoice

* added generic proof generation to invoice

* added generic requestDocumentSignature to invoice

* formatting

* formatting

* removed old tests

* using a embedded interface

* Identity package uses tenantConfig (#619)

* Identity package uses tenantConfig

* Fix testworld issue

* Fix problem

* NFT: using generic document service (#622)

* added testworld tests for proofs

* implemented NFT with generic service

* correct flags for testworld

* fixed nft error tests

* po service using generic service (#623)

* added testworld tests for proofs

* po service uses generic service

* removed old po tests

* P2P review updates (#624)

* P2P review updates

* review comments

* review comments

* Final rename

* P2P - tenant <--> protocol mapping (#626)

* NFT: fix async testcase  (#628)

* added testworld tests for proofs

* async nft testcase

*  Support local tenant loops (#627)

* P2P - tenant <--> protocol mapping

* Support local tenant loops

* Add tests

* Fix test

* Fix test

* Review comments

* Add basic Read rules to CoreDocument (#611)

This PR will add basic read rules derived from the collaborators passed.

Fixes #587

* identity: gocelery task for successful transaction (#632)

* added testworld tests for proofs

* added transaction status task

* added protobuf header transaction.

* removed nft confirm task

* implemented getTransactionStatus

* formatting

* formatting

* removed testoutput

* formatting

* added swagger

* Fix p2p validation check for local (#634)

* Fix p2p validation check for local

* Fix p2p validation check for local

* Added Generic handler + new p2p envelope (#629)

* envelope + handler

* rename proto

* format + tests

* timeout

* fix

* address comments

* Fix storage <--> config cycles (#633)

* Fix storage <--> config cycles

* Fix test

* Fix lint

* merge issues

* merge issues

* add peer validator for Read ACL (#639)

* add peer validator

* refactor to bool

* API /config/tenants/generate endpoint (#637)

* API /config/tenants/generate endpoint

* Fix problems

* Fix test issues

* Fix test issues

* Success message added (#641)

* Success message added

* further user instructions for success message

* Added signature to header + handshake validation (#640)

* Added signature to header + handshake validation

* fix tests

* address comments

* added eth key check

* fix integration test

* Multitenant(Account) api (#642)

* Enable auth header for API

* Minor

* Minor

* Minor

* More tests and fixes

* non exisiting document check

* Fix tests

* lint

* fix

* remove comment

* P2P Key check (#648)

* Added signature to header + handshake validation

* fix tests

* address comments

* added eth key check

* fix integration test

* Remove signature

* Remove signature

* typo

* fix pk

* Import main node config file everytime node starts(simpler than removing config service usage) (#649)

* Import main node config file everytime node starts(simpler than removing config service usage)

* Remove dead code

* Fix tests

* Fix test

* Fix problem with creat

* review comments

* add account fields to notification (#653)

* add account fields to notification

* comments + proto-gen

* Account rename 1: move API /config/tenants => /accounts (#654)

* move API /config/tenants => /accounts

* move API /config/tenants => /accounts

* Review comments

* added tests for transactionStatusTask (#645)

* added testworld tests for proofs

* added transaction status task

* added protobuf header transaction.

* removed nft confirm task

* implemented getTransactionStatus

* formatting

* formatting

* removed testoutput

* formatting

* added swagger

* added integration tests for transaction task

* formatting

* formatting

* removed mock eth client from identity package

* simplified integration tests

* changed nft register transactionTask

* fixed broken unit test in api package

* Add Auth Header to Swagger UI (#655)

* add account fields to notification

* comments + proto-gen

* Add custom swagger auth header

* comments

* use latest gocelery for retry and delay (#643)

Remove the for loop with retryable tasks

* Add nil safe config (#636)

* add nil safe config

* add error checks account config

* error type

* error type

*  Account rename 2: refs in config and configstore packages (#659)

* move API /config/tenants => /accounts

* move API /config/tenants => /accounts

* Review comments

* Account rename 2: refs in config and configstore packages

* merge

* Review comments

* More refs

* pump metis version (#657)

* removing confirmation transaction task (#658)

* added testworld tests for proofs

* added transaction status task

* added protobuf header transaction.

* removed nft confirm task

* implemented getTransactionStatus

* formatting

* formatting

* removed testoutput

* formatting

* added swagger

* added integration tests for transaction task

* formatting

* formatting

* removed mock eth client from identity package

* simplified integration tests

* changed nft register transactionTask

* fixed broken unit test in api package

* removing confirmation task

* transactionStatusTask: added submitTransaction to ethereum package (#661)

* created submitTransaction method

* create transactionTask queuing in ethereum package

* modified mock clients

* moved register transaction task  into ethereum package

* support getting core documents (#652)

* update MessageTypes to include GetAnchoredDocument type

* added generic service to Handler struct

* changed naming on messagetypes

* updated centrifuge-protobuf package to latest version

* implementation for GetDocument method

* resolve MessageType for GetDocument methods from string

* removed irrelevant senderID

* added genericService to p2p bootstrapper

* Feat/read acl nfts (#650)

Fixes #590 

This would add the NFT validator.

* remove the signature from NFT read acls (#664)

As per our discussion yesterday

* Refactor/message types to map (#662)

* if else block to map

* Account rename 3: use of tenant in variable names (#665)

* Account rename 3: use of tenant in variable names

* fix compile

* Document service refactor (#666)

* break the coredocument package

* fix anchors

* fix unit tests

* fix unit tests

* fix tests

* break the coredocument package

* fix anchors

* fix unit tests

* fix unit tests

* fix tests

* Client has access to idService (#667)

* Added CMD tests (#668)

* Added CMD tests

* wrap in go file

* Merge Develop (#855)

* run tests in parallel (#824)

* Key revoked validation (#820)

* Revocation validation

* Revocation validation

* Review comments

* add rules (#821)

<This is intended as a guide when describing-reviewing pull requests for go-centrifuge>
Fixs #800.

* Feat(documents): validate transitions (#819)

Closes #802 and Closes #803

* Implement CollaboratorCanUpdate on Invoice and PO (#830)

Closes #805 and Closes #806

* Feat/integrate collab can update (#834)

* added method to Model

* validator

* test


* lint

* New Signature structure (#791)

* signature check

* tmp

* fix test

* signature

* fmt

* fix tests

* use repo

* fixes

* updating proto

* added setup back

* Feat/write acls receive doc (#840)

Fixes #838 

Also, removed creating identities in every test. this should improve our integration tests run time

Note: testworld tests that check for transition failures are disabled until #807 is done

* Update log for coredoc (#842)

* Update log for coredoc

* Update log for coredoc

* Review comments

* Merge

* Update deps

* Update deps

* minor

* Added Invalid Signature Tests (#784)

* Initial commit for invalid signature test cases

* Added invalid signature in the utility method

* Added test case for revoked key signature

* Fixed test case to use Alice key for signing document

* Refactored prepareCoreDocument helper method

* Refactored invalid signature test

* Added valid signature success test case

* Rebased with develop and fixed failing tests

* Fixed issue with converting time to protobuf Timestamp

* Fixed failing unit test for timestamp

* Adding signing purpose key back once revoked

* Refactored Add and Revoke signing key

* Added method to get signing key pair

* Fixed spacing issues with imports

* Added test case to send document with revoked signing key

* Resolved review comments

* Refactored waitTillStatus to getTransactionStatusAndMessage

* Added nil check for message in transaction

* Document consensus validations (#846)

* Document consensus validations

* timestamp validations done

* More validations

* fix test

* Fix tests

* Review comments

* transitionValidator integration: requestDocumentSignature (#841)

<This is intended as a guide when describing-reviewing pull requests for go-centrifuge>
Issue Link: closes #807.


Co-authored-by: Vedhavyas Singareddi <vedhavyas.singareddi@gmail.com>

* Nft sign + execute (#845)

* signature check

* tmp

* fix test

* signature

* fmt

* fix tests

* use repo

* fixes

* adding signature proof

* updating proto

* added setup back

* execute integration

* add setup

* new contract

* comments

* fix tw

* fix id test

* fix p2p test

*  Fix timestamp conversions (#850)

* Document consensus validations

* timestamp validations done

* More validations

* fix test

* Fix tests

* Fix timestamp conversions

* Review comments

* Gocelery update

* Fix logs

* Fix logging

* Secret as env (#852)

* move secret (#853)

* Adding cent prefix (#854)

* Fix identity concurrent creation (#848)

* WIP fix identity concurrent creation

* tests

* add factory check

* Candidate v0.0.4 to master (#986)

* fix (#906)

return correct error on GetDocument

* fix vet and lint issues (#880)

Fixes the issue from GoreportCard

* take password interactively (#916)

* create new document with embedded Access Token, add test coverage for CoreDocument (#915)

* method

* added some tests

* Adding attributes to models (#901)

* Adding attributes to models

* Partially test

* LGTM

* Review comments

* Upgrade libp2p (#922)

* WIP: Upgrade libp2p

* WIP: Upgrade libp2p

* dep

* protobuf for entity relationship (#919)

* protobuf for entity relations

* better comments

* better naming

* fmt

* new entity handler response

* fmt

* fmt

* fixed entityrelationship model

* formatting

* swagger update

* Remove certs (#928)

Closes #909 

Changes:
- Removed the certificates
- GRPC server will be run on a different port and `127.0.0.1`
- API host is `127.0.0.1` by default but can be changed through `createconfig`

* removing manage ids (#930)

* create file with 600 permission (#931)

Closes #908

* Allow setting Ethereum max gas price (#932)

* Allow setting Ethereum max gas price

* Fix lint

* Review comment and minor

* Entity Relationship Create (Share) service (#905)

* new files

* wip

* added protos

* model

* spacing

* tests

* fix

* fix

* fix

* initial commit

* rm label

* initial

* fix

* wip

* fix

* wip

* wip

* wip

* wip

* fix

* swagger

* test

* spacing

* entity: GET method (#934)

* entity GET method

* moved isCollaborator to coredocument

* Add multiple gas limits (#937)

* dont return error for gas price breach

* Different gas limits for different ops

* Different gas limits for different ops

* Fix tests

* test fix

* cache the keys instead of the opts

* use context.backGround for now

* Revert txopts cache and review comments

* ignore .DS_Store

* Remove config endpoint (#939)

* dont return error for gas price breach

* Different gas limits for different ops

* Different gas limits for different ops

* Fix tests

* test fix

* cache the keys instead of the opts

* use context.backGround for now

* Revert txopts cache and review comments

* ignore .DS_Store

* Remove the unuseful config api

* stuff

* Delete Access Token (#942)

* initial

* entity-relationship: repo + bootstrapper (#938)

* new files

* wip

* added protos

* model

* spacing

* tests

* fix

* fix

* fix

* initial commit

* rm label

* initial

* fix

* wip

* fix

* wip

* wip

* wip

* wip

* fix

* swagger

* test

* spacing

* initial

* added ER repository and bootstrapper

* fmt

* wrapped document.repository

* fix

* spacing

* rm Gopkg.lock

* added request method for document

* fmt

* worker limit + swagger + macos build (#945)

* Fix block not ready in node (#946)

* Fix block no ready in light node

* Fix block no ready in light node

* test

* P2P error masking (#944)

* P2P error masking

* Adjustments

* Adjustments

* Adjustments

* Review comments

* Review comments

* merge

* ethereum key from env (#950)

* updated entity relationship protobuf (#952)

* updated protos

* revert previous commit for bootstrap nodes (#954)

This reverts commit 7f4d7269ab67989569daaa0266903b5dd0123eae.

* Bts/new (#953)

* ethereum key from env

* New bootstrap peers

* Revert "revert previous commit for bootstrap nodes (#954)" (#955)

This reverts commit 7eca86136032d7517d8d24175e8696ccb2201d0e.

*  Add nft index to api response (#949)

* bindings

* Add nft index to api response

* data

* Latest smart contracts and fixes

* Latest smart contracts and fixes

* Fix tests 1

* Fix testworld

* Review comments

* contracts

* merge

* version change

* Start message for node (#957)

* Remove pb errors

* Add ascii art and messafge

* Fix build

* Disclaimer

* More build fixes

* p2p: getDocumentRequest for entity (#948)

* initial implementation getDocumentRequest

* fixed unit tests

* added todo comments

* added test for p2p

* added granter to entityrelationship

* fixed p2p testworld test

* fixed p2p testworld test with er send/receive

* fmt

* processor bootstrapper no nil check

* fixed p2p testworld test

* fmt

* fmt and selfDID from ctx

* fixed self.DID parameter

* fmt

* fmt

* fmt

* Entity handler: Share and Revoke (#940)

* hex string DB index (#956)

* ethereum key from env

* hex string index

* string trim

* Fix/prefix and develop (#964)

* ethereum key from env

* hex string index

* string trim

* Fix prefix

* Fix prefix

* Fix prefix

* 56bit token ID option (#965)

* Remove unnecessary documentation

* 56bit token ID option

* 56bit token ID option

* 56bit token ID option

* Fix

* Fix

* comment

* add stack traces to error (#963)

Closes #883 

Changes:
- `errors.New` will attach stack trace by default
- Call `errors.StackTrace(err)` to get the stack trace

Note: this will not change the current `error.Error` log behavior. Stack traces should be retrieved and printed explicitly

Example stack trace:
```
github.com/centrifuge/go-centrifuge/errors.TestWithStackTrace
	/Users/vedhavyas/Projects/Go/src/github.com/centrifuge/go-centrifuge/errors/errors_test.go:169
testing.tRunner
	/usr/local/Cellar/go@1.11/1.11.6/libexec/src/testing/testing.go:827
runtime.goexit
	/usr/local/Cellar/go@1.11/1.11.6/libexec/src/runtime/asm_amd64.s:1333
```

* entity: GET EntityWithRelationship  (#961)

* initial implementation getDocumentRequest

* fixed unit tests

* added todo comments

* added test for p2p

* added granter to entityrelationship

* fixed p2p testworld test

* fixed p2p testworld test with er send/receive

* fmt

* processor bootstrapper no nil check

* fixed p2p testworld test

* fmt

* fmt and selfDID from ctx

* fixed self.DID parameter

* fmt

* fmt

* fmt

* added Get Relationship entpoint

* implemented RequestEntityWithRelationship method in service

* validator for received doc

* added testworld test for get entpoint

* added validator after recieving doc from p2p

* fmt

* fmt

* fmt

* fixed lock file

* fixed cmd package

* added swagger

* fixed linting"
"

* return entity from database if it is the latest

* better variable naming

* fmt

* protobuf documentService renamed to entityService

* fixed new protobuf handler name

* fixed entityService naming

* swagger API service naming update (#966)

* Added embarcadero boot nodes (#968)

* Added embarcadero boot nodes

* add embarcadero mainnet

* GET relationship: correct endpoint + db store (#973)

* updated entity service for new get endpoint

* adopted testworld test

* added store to db after received on p2p

* removed boostrapper closure for processor

* fmt

* fmt

* better err handling

* refactor to jobs (#974)

closes #926

* added latestDocumentValidator to PostAnchoredValidator (#967)

* added valdiator

* fmt

* improved latestDocumentValidator with additional error checks

* revert processor test

* fixed processor unit tests

* fixed unit tests

* GetEntityByRelationship uses only latestDocumentValidator

* update swagger (#976)

* Minor things (#977)

* fix p2p return errors (#981)

* fix p2p return errors

* fix p2p return errors

* fix p2p return errors

* entity service unit test for relationship requests (#982)

* added unit test draft

* added setup method for unit tests

* added unit test for entity p2p request

* add mock processor

* added an additional unit test

* Ropsten address (#985)

* Ropsten address

* format

* Testworld coverage for Entity/EntityRelationship (#962)

* Low entropy token ID with 999999999999999 max (#987) (#990)

* Master merge (#991)

* fix (#906)

return correct error on GetDocument

* fix vet and lint issues (#880)

Fixes the issue from GoreportCard

* take password interactively (#916)

* create new document with embedded Access Token, add test coverage for CoreDocument (#915)

* method

* added some tests

* Adding attributes to models (#901)

* Adding attributes to models

* Partially test

* LGTM

* Review comments

* Upgrade libp2p (#922)

* WIP: Upgrade libp2p

* WIP: Upgrade libp2p

* dep

* protobuf for entity relationship (#919)

* protobuf for entity relations

* better comments

* better naming

* fmt

* new entity handler response

* fmt

* fmt

* fixed entityrelationship model

* formatting

* swagger update

* Remove certs (#928)

Closes #909 

Changes:
- Removed the certificates
- GRPC server will be run on a different port and `127.0.0.1`
- API host is `127.0.0.1` by default but can be changed through `createconfig`

* removing manage ids (#930)

* create file with 600 permission (#931)

Closes #908

* Allow setting Ethereum max gas price (#932)

* Allow setting Ethereum max gas price

* Fix lint

* Review comment and minor

* Entity Relationship Create (Share) service (#905)

* new files

* wip

* added protos

* model

* spacing

* tests

* fix

* fix

* fix

* initial commit

* rm label

* initial

* fix

* wip

* fix

* wip

* wip

* wip

* wip

* fix

* swagger

* test

* spacing

* entity: GET method (#934)

* entity GET method

* moved isCollaborator to coredocument

* Add multiple gas limits (#937)

* dont return error for gas price breach

* Different gas limits for different ops

* Different gas limits for different ops

* Fix tests

* test fix

* cache the keys instead of the opts

* use context.backGround for now

* Revert txopts cache and review comments

* ignore .DS_Store

* Remove config endpoint (#939)

* dont return error for gas price breach

* Different gas limits for different ops

* Different gas limits for different ops

* Fix tests

* test fix

* cache the keys instead of the opts

* use context.backGround for now

* Revert txopts cache and review comments

* ignore .DS_Store

* Remove the unuseful config api

* stuff

* Delete Access Token (#942)

* initial

* entity-relationship: repo + bootstrapper (#938)

* new files

* wip

* added protos

* model

* spacing

* tests

* fix

* fix

* fix

* initial commit

* rm label

* initial

* fix

* wip

* fix

* wip

* wip

* wip

* wip

* fix

* swagger

* test

* spacing

* initial

* added ER repository and bootstrapper

* fmt

* wrapped document.repository

* fix

* spacing

* rm Gopkg.lock

* added request method for document

* fmt

* worker limit + swagger + macos build (#945)

* Fix block not ready in node (#946)

* Fix block no ready in light node

* Fix block no ready in light node

* test

* P2P error masking (#944)

* P2P error masking

* Adjustments

* Adjustments

* Adjustments

* Review comments

* Review comments

* merge

* ethereum key from env (#950)

* updated entity relationship protobuf (#952)

* updated protos

* revert previous commit for bootstrap nodes (#954)

This reverts commit 7f4d7269ab67989569daaa0266903b5dd0123eae.

* Bts/new (#953)

* ethereum key from env

* New bootstrap peers

* Revert "revert previous commit for bootstrap nodes (#954)" (#955)

This reverts commit 7eca86136032d7517d8d24175e8696ccb2201d0e.

*  Add nft index to api response (#949)

* bindings

* Add nft index to api response

* data

* Latest smart contracts and fixes

* Latest smart contracts and fixes

* Fix tests 1

* Fix testworld

* Review comments

* contracts

* merge

* version change

* Start message for node (#957)

* Remove pb errors

* Add ascii art and messafge

* Fix build

* Disclaimer

* More build fixes

* p2p: getDocumentRequest for entity (#948)

* initial implementation getDocumentRequest

* fixed unit tests

* added todo comments

* added test for p2p

* added granter to entityrelationship

* fixed p2p testworld test

* fixed p2p testworld test with er send/receive

* fmt

* processor bootstrapper no nil check

* fixed p2p testworld test

* fmt

* fmt and selfDID from ctx

* fixed self.DID parameter

* fmt

* fmt

* fmt

* Entity handler: Share and Revoke (#940)

* hex string DB index (#956)

* ethereum key from env

* hex string index

* string trim

* Fix/prefix and develop (#964)

* ethereum key from env

* hex string index

* string trim

* Fix prefix

* Fix prefix

* Fix prefix

* 56bit token ID option (#965)

* Remove unnecessary documentation

* 56bit token ID option

* 56bit token ID option

* 56bit token ID option

* Fix

* Fix

* comment

* add stack traces to error (#963)

Closes #883 

Changes:
- `errors.New` will attach stack trace by default
- Call `errors.StackTrace(err)` to get the stack trace

Note: this will not change the current `error.Error` log behavior. Stack traces should be retrieved and printed explicitly

Example stack trace:
```
github.com/centrifuge/go-centrifuge/errors.TestWithStackTrace
	/Users/vedhavyas/Projects/Go/src/github.com/centrifuge/go-centrifuge/errors/errors_test.go:169
testing.tRunner
	/usr/local/Cellar/go@1.11/1.11.6/libexec/src/testing/testing.go:827
runtime.goexit
	/usr/local/Cellar/go@1.11/1.11.6/libexec/src/runtime/asm_amd64.s:1333
```

* entity: GET EntityWithRelationship  (#961)

* initial implementation getDocumentRequest

* fixed unit tests

* added todo comments

* added test for p2p

* added granter to entityrelationship

* fixed p2p testworld test

* fixed p2p testworld test with er send/receive

* fmt

* processor bootstrapper no nil check

* fixed p2p testworld test

* fmt

* fmt and selfDID from ctx

* fixed self.DID parameter

* fmt

* fmt

* fmt

* added Get Relationship entpoint

* implemented RequestEntityWithRelationship method in service

* validator for received doc

* added testworld test for get entpoint

* added validator after recieving doc from p2p

* fmt

* fmt

* fmt

* fixed lock file

* fixed cmd package

* added swagger

* fixed linting"
"

* return entity from database if it is the latest

* better variable naming

* fmt

* protobuf documentService renamed to entityService

* fixed new protobuf handler name

* fixed entityService naming

* swagger API service naming update (#966)

* Added embarcadero boot nodes (#968)

* Added embarcadero boot nodes

* add embarcadero mainnet

* GET relationship: correct endpoint + db store (#973)

* updated entity service for new get endpoint

* adopted testworld test

* added store to db after received on p2p

* removed boostrapper closure for processor

* fmt

* fmt

* better err handling

* refactor to jobs (#974)

closes #926

* added latestDocumentValidator to PostAnchoredValidator (#967)

* added valdiator

* fmt

* improved latestDocumentValidator with additional error checks

* revert processor test

* fixed processor unit tests

* fixed unit tests

* GetEntityByRelationship uses only latestDocumentValidator

* update swagger (#976)

* Minor things (#977)

* fix p2p return errors (#981)

* fix p2p return errors

* fix p2p return errors

* fix p2p return errors

* entity service unit test for relationship requests (#982)

* added unit test draft

* added setup method for unit tests

* added unit test for entity p2p request

* add mock processor

* added an additional unit test

* Ropsten address (#985)

* Ropsten address

* format

* Testworld coverage for Entity/EntityRelationship (#962)

* Low entropy token ID with 999999999999999 max (#987) (#990)
mikiquantum added a commit that referenced this pull request Sep 3, 2019
* fix builds (#381)

* Merge develop into master (#390)

* 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

* Merge Develop (#576)

* 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 1a5dbf7ab78c919c1a3a7a50f46c2bc27369980d.

* 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)

* Merging Develop -> Master (#669)

* 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 1a5dbf7ab78c919c1a3a7a50f46c2bc27369980d.

* 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)

* Consolidate DB Repository (#574)

* encapsulated DB interface

* lint

* added typed errors

* fix integration test

* fix integration test

* remove ID from storage.Repository

* ISSUE and PR templates proposal (#551)

* ISSUE and PR templates proposal

* Updates

* Update ISSUE_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

* Update ISSUE_TEMPLATE.md

* Cleanup testworld generated files (#578)

* Cleanup testworld generated files

* Force delete

* HTTP header for tenantID (#575)

Fixes #488 

1. Add interceptor that require header 'authorization' which holds tenantID
2. Add basic version if HTTPError and http Error response interceptor since we ned it for point 1

* added a generic document service (#579)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* document service: added CreateProof to model (#581)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* moved service_test.go

* document service: createProof and CreateProofForVersion (#584)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* added proof methods

* moved service_test.go

* added tests for createProof in service

* fixed broken createProofVersion test case

* formatting

* Transactions (#582)

* initial tx repo

* lint fixes

* document service: added RequestDocumentSignature and ReceiveAnchoredDocument (#586)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* added proof methods

* moved service_test.go

* added tests for createProof in service

* implemented remaining methods for document service

* fixed broken createProofVersion test case

* formatting

* added tests for requestSignature

* formatting

* [Config DB] API Admin Endpoints (#583)

* Added proto models + service

* handler + service

* model tests

* add tests

* delete return

* missing tag

* proto

* [MultiTenancy] P2P refactorings No. 1 (#594)

* [MultiTenancy] P2P refactorings No. 1

* Fix problems

* Minor cleanups

* Debugged integration test

* Fix bug

* Fully debuggable integration tests (#595)

* [MultiTenancy] P2P refactorings No. 1

* Fix problems

* Minor cleanups

* Debugged integration test

* Fully debuggable integration tests

* Fix bug

* Minor

* Transaction Status Check API (#596)

Fixes #496 

- Add Transaction Status check endpoint

* Minor refactors (#600)

* remove signature package

* keytools => crypto

* remove signature package

* refactor bootstrappers

* rename contextheader

*  Convert ContextHeader to Context and make a util (#601)

* Fix error

* Convert ContextHeader to Context and make a util

* fix problem

* Fix lint issue

* Remove P2P GRPC (#597)

* Buggy iteration

* Remove GRPC POC

* Remove GRPC POC

* Fix lint

* Fix protobuf generated code

* Fixed client test

* Messenger tests

* Messenger tests

* correct testworld

* remove useless code

* Rename

* [MultiTenancy] Enable config database and api (#602)

* Enable config database and api

* Enable config database and api

* Minor

* Fix createConfig issue

* Add Testworld test for config API

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Lint fix

* Generate swagger

* Remove race detection from TestWorld to improve perf

* Fix unit tests

* REST fix /config/tenant => /config/tenants (#605)

* REST fix /config/tenant => /config/tenants

* REST fix /config/tenant => /config/tenants

* Async APIs (#598)

Fixes #497 #498 #499 

I started using commom.Address for tenant id since that is a requirement for transactions.
Note: This will break the functional tests.

* increment sleep to 1 sec

* [MultiTenancy] Use db stored config at runtime (#603)

* Enable config database and api

* Enable config database and api

* Minor

* Fix createConfig issue

* Add Testworld test for config API

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Lint fix

* Generate swagger

* Remove race detection from TestWorld to improve perf

* Use db stored config at runtime

* Lint and swagger

* Fix unit tests

* Fix tests

* Fix unit tests

* Remove -race from testworld

* Fix conflicts

* Try testworld without -race

* merging

* Merging still

* Fix confgi

* Fix test

* use json marshaller (#608)

* [MultiTenancy] Refactor identity package to remove cycles when using data structures from the interface (#606)

* Enable config database and api

* Enable config database and api

* Minor

* Fix createConfig issue

* Add Testworld test for config API

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Fix bug with GET /config/tenant/list (end point url ambigous)

* Lint fix

* Generate swagger

* Remove race detection from TestWorld to improve perf

* Use db stored config at runtime

* Lint and swagger

* Fix unit tests

* Fix tests

* Fix unit tests

* Remove -race from testworld

* Refactor identity and context

* Make identity work with db stored config

* Fix conflicts

* Fix test and lint

* Try testworld without -race

* merging

* Merging still

* Fix confgi

* Fix test

* Fix tests

* Multi tenancy service parts complete without api handlers and p2p handlers (#609)

* Multi tenancy complete without api handlers and p2p handlers

* Fixed unit tests

* Fix unit tests

* Fix unit tests

* Anchor uses tenant config (#618)

* Anchor uses tenant config

* Fix unit test

* genericDocumentService: added interface and bootstrappers (#610)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* added proof methods

* moved service_test.go

* added tests for createProof in service

* implemented remaining methods for document service

* fixed broken createProofVersion test case

* formatting

* added tests for requestSignature

* formatting

* implemented own interface for generic document

* added bootstrapper to generic document service

* added bootstrapper for generic service

* fixed linting

* added bootstrapper for tests

* removed derive from cd

* removed cyclic dep

* formatting

* fixed api/server

* formatting

* formatting

* fixed api server

* correct testworld flags

* formatting

* Removing no longer used scripts (#621)

* using generic document service inside invoice service (#620)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* added proof methods

* moved service_test.go

* added tests for createProof in service

* implemented remaining methods for document service

* fixed broken createProofVersion test case

* formatting

* added tests for requestSignature

* formatting

* implemented own interface for generic document

* added bootstrapper to generic document service

* added bootstrapper for generic service

* fixed linting

* added bootstrapper for tests

* removed derive from cd

* replaced getVersion for invoice with generic one

* removed cyclic dep

* formatting

* fixed api/server

* formatting

* fixed GetLatestVersion invoice

* formatting

* fixed api server

* correct testworld flags

* added generic exists to invoice

* added generic proof generation to invoice

* added generic requestDocumentSignature to invoice

* formatting

* formatting

* removed old tests

* using a embedded interface

* Identity package uses tenantConfig (#619)

* Identity package uses tenantConfig

* Fix testworld issue

* Fix problem

* NFT: using generic document service (#622)

* added testworld tests for proofs

* implemented NFT with generic service

* correct flags for testworld

* fixed nft error tests

* po service using generic service (#623)

* added testworld tests for proofs

* po service uses generic service

* removed old po tests

* P2P review updates (#624)

* P2P review updates

* review comments

* review comments

* Final rename

* P2P - tenant <--> protocol mapping (#626)

* NFT: fix async testcase  (#628)

* added testworld tests for proofs

* async nft testcase

*  Support local tenant loops (#627)

* P2P - tenant <--> protocol mapping

* Support local tenant loops

* Add tests

* Fix test

* Fix test

* Review comments

* Add basic Read rules to CoreDocument (#611)

This PR will add basic read rules derived from the collaborators passed.

Fixes #587

* identity: gocelery task for successful transaction (#632)

* added testworld tests for proofs

* added transaction status task

* added protobuf header transaction.

* removed nft confirm task

* implemented getTransactionStatus

* formatting

* formatting

* removed testoutput

* formatting

* added swagger

* Fix p2p validation check for local (#634)

* Fix p2p validation check for local

* Fix p2p validation check for local

* Added Generic handler + new p2p envelope (#629)

* envelope + handler

* rename proto

* format + tests

* timeout

* fix

* address comments

* Fix storage <--> config cycles (#633)

* Fix storage <--> config cycles

* Fix test

* Fix lint

* merge issues

* merge issues

* add peer validator for Read ACL (#639)

* add peer validator

* refactor to bool

* API /config/tenants/generate endpoint (#637)

* API /config/tenants/generate endpoint

* Fix problems

* Fix test issues

* Fix test issues

* Success message added (#641)

* Success message added

* further user instructions for success message

* Added signature to header + handshake validation (#640)

* Added signature to header + handshake validation

* fix tests

* address comments

* added eth key check

* fix integration test

* Multitenant(Account) api (#642)

* Enable auth header for API

* Minor

* Minor

* Minor

* More tests and fixes

* non exisiting document check

* Fix tests

* lint

* fix

* remove comment

* P2P Key check (#648)

* Added signature to header + handshake validation

* fix tests

* address comments

* added eth key check

* fix integration test

* Remove signature

* Remove signature

* typo

* fix pk

* Import main node config file everytime node starts(simpler than removing config service usage) (#649)

* Import main node config file everytime node starts(simpler than removing config service usage)

* Remove dead code

* Fix tests

* Fix test

* Fix problem with creat

* review comments

* add account fields to notification (#653)

* add account fields to notification

* comments + proto-gen

* Account rename 1: move API /config/tenants => /accounts (#654)

* move API /config/tenants => /accounts

* move API /config/tenants => /accounts

* Review comments

* added tests for transactionStatusTask (#645)

* added testworld tests for proofs

* added transaction status task

* added protobuf header transaction.

* removed nft confirm task

* implemented getTransactionStatus

* formatting

* formatting

* removed testoutput

* formatting

* added swagger

* added integration tests for transaction task

* formatting

* formatting

* removed mock eth client from identity package

* simplified integration tests

* changed nft register transactionTask

* fixed broken unit test in api package

* Add Auth Header to Swagger UI (#655)

* add account fields to notification

* comments + proto-gen

* Add custom swagger auth header

* comments

* use latest gocelery for retry and delay (#643)

Remove the for loop with retryable tasks

* Add nil safe config (#636)

* add nil safe config

* add error checks account config

* error type

* error type

*  Account rename 2: refs in config and configstore packages (#659)

* move API /config/tenants => /accounts

* move API /config/tenants => /accounts

* Review comments

* Account rename 2: refs in config and configstore packages

* merge

* Review comments

* More refs

* pump metis version (#657)

* removing confirmation transaction task (#658)

* added testworld tests for proofs

* added transaction status task

* added protobuf header transaction.

* removed nft confirm task

* implemented getTransactionStatus

* formatting

* formatting

* removed testoutput

* formatting

* added swagger

* added integration tests for transaction task

* formatting

* formatting

* removed mock eth client from identity package

* simplified integration tests

* changed nft register transactionTask

* fixed broken unit test in api package

* removing confirmation task

* transactionStatusTask: added submitTransaction to ethereum package (#661)

* created submitTransaction method

* create transactionTask queuing in ethereum package

* modified mock clients

* moved register transaction task  into ethereum package

* support getting core documents (#652)

* update MessageTypes to include GetAnchoredDocument type

* added generic service to Handler struct

* changed naming on messagetypes

* updated centrifuge-protobuf package to latest version

* implementation for GetDocument method

* resolve MessageType for GetDocument methods from string

* removed irrelevant senderID

* added genericService to p2p bootstrapper

* Feat/read acl nfts (#650)

Fixes #590 

This would add the NFT validator.

* remove the signature from NFT read acls (#664)

As per our discussion yesterday

* Refactor/message types to map (#662)

* if else block to map

* Account rename 3: use of tenant in variable names (#665)

* Account rename 3: use of tenant in variable names

* fix compile

* Document service refactor (#666)

* break the coredocument package

* fix anchors

* fix unit tests

* fix unit tests

* fix tests

* break the coredocument package

* fix anchors

* fix unit tests

* fix unit tests

* fix tests

* Client has access to idService (#667)

* Added CMD tests (#668)

* Added CMD tests

* wrap in go file

* Merge Develop (#855)

* run tests in parallel (#824)

* Key revoked validation (#820)

* Revocation validation

* Revocation validation

* Review comments

* add rules (#821)

<This is intended as a guide when describing-reviewing pull requests for go-centrifuge>
Fixs #800.

* Feat(documents): validate transitions (#819)

Closes #802 and Closes #803

* Implement CollaboratorCanUpdate on Invoice and PO (#830)

Closes #805 and Closes #806

* Feat/integrate collab can update (#834)

* added method to Model

* validator

* test


* lint

* New Signature structure (#791)

* signature check

* tmp

* fix test

* signature

* fmt

* fix tests

* use repo

* fixes

* updating proto

* added setup back

* Feat/write acls receive doc (#840)

Fixes #838 

Also, removed creating identities in every test. this should improve our integration tests run time

Note: testworld tests that check for transition failures are disabled until #807 is done

* Update log for coredoc (#842)

* Update log for coredoc

* Update log for coredoc

* Review comments

* Merge

* Update deps

* Update deps

* minor

* Added Invalid Signature Tests (#784)

* Initial commit for invalid signature test cases

* Added invalid signature in the utility method

* Added test case for revoked key signature

* Fixed test case to use Alice key for signing document

* Refactored prepareCoreDocument helper method

* Refactored invalid signature test

* Added valid signature success test case

* Rebased with develop and fixed failing tests

* Fixed issue with converting time to protobuf Timestamp

* Fixed failing unit test for timestamp

* Adding signing purpose key back once revoked

* Refactored Add and Revoke signing key

* Added method to get signing key pair

* Fixed spacing issues with imports

* Added test case to send document with revoked signing key

* Resolved review comments

* Refactored waitTillStatus to getTransactionStatusAndMessage

* Added nil check for message in transaction

* Document consensus validations (#846)

* Document consensus validations

* timestamp validations done

* More validations

* fix test

* Fix tests

* Review comments

* transitionValidator integration: requestDocumentSignature (#841)

<This is intended as a guide when describing-reviewing pull requests for go-centrifuge>
Issue Link: closes #807.


Co-authored-by: Vedhavyas Singareddi <vedhavyas.singareddi@gmail.com>

* Nft sign + execute (#845)

* signature check

* tmp

* fix test

* signature

* fmt

* fix tests

* use repo

* fixes

* adding signature proof

* updating proto

* added setup back

* execute integration

* add setup

* new contract

* comments

* fix tw

* fix id test

* fix p2p test

*  Fix timestamp conversions (#850)

* Document consensus validations

* timestamp validations done

* More validations

* fix test

* Fix tests

* Fix timestamp conversions

* Review comments

* Gocelery update

* Fix logs

* Fix logging

* Secret as env (#852)

* move secret (#853)

* Adding cent prefix (#854)

* Fix identity concurrent creation (#848)

* WIP fix identity concurrent creation

* tests

* add factory check

* Candidate v0.0.4 to master (#986)

* fix (#906)

return correct error on GetDocument

* fix vet and lint issues (#880)

Fixes the issue from GoreportCard

* take password interactively (#916)

* create new document with embedded Access Token, add test coverage for CoreDocument (#915)

* method

* added some tests

* Adding attributes to models (#901)

* Adding attributes to models

* Partially test

* LGTM

* Review comments

* Upgrade libp2p (#922)

* WIP: Upgrade libp2p

* WIP: Upgrade libp2p

* dep

* protobuf for entity relationship (#919)

* protobuf for entity relations

* better comments

* better naming

* fmt

* new entity handler response

* fmt

* fmt

* fixed entityrelationship model

* formatting

* swagger update

* Remove certs (#928)

Closes #909 

Changes:
- Removed the certificates
- GRPC server will be run on a different port and `127.0.0.1`
- API host is `127.0.0.1` by default but can be changed through `createconfig`

* removing manage ids (#930)

* create file with 600 permission (#931)

Closes #908

* Allow setting Ethereum max gas price (#932)

* Allow setting Ethereum max gas price

* Fix lint

* Review comment and minor

* Entity Relationship Create (Share) service (#905)

* new files

* wip

* added protos

* model

* spacing

* tests

* fix

* fix

* fix

* initial commit

* rm label

* initial

* fix

* wip

* fix

* wip

* wip

* wip

* wip

* fix

* swagger

* test

* spacing

* entity: GET method (#934)

* entity GET method

* moved isCollaborator to coredocument

* Add multiple gas limits (#937)

* dont return error for gas price breach

* Different gas limits for different ops

* Different gas limits for different ops

* Fix tests

* test fix

* cache the keys instead of the opts

* use context.backGround for now

* Revert txopts cache and review comments

* ignore .DS_Store

* Remove config endpoint (#939)

* dont return error for gas price breach

* Different gas limits for different ops

* Different gas limits for different ops

* Fix tests

* test fix

* cache the keys instead of the opts

* use context.backGround for now

* Revert txopts cache and review comments

* ignore .DS_Store

* Remove the unuseful config api

* stuff

* Delete Access Token (#942)

* initial

* entity-relationship: repo + bootstrapper (#938)

* new files

* wip

* added protos

* model

* spacing

* tests

* fix

* fix

* fix

* initial commit

* rm label

* initial

* fix

* wip

* fix

* wip

* wip

* wip

* wip

* fix

* swagger

* test

* spacing

* initial

* added ER repository and bootstrapper

* fmt

* wrapped document.repository

* fix

* spacing

* rm Gopkg.lock

* added request method for document

* fmt

* worker limit + swagger + macos build (#945)

* Fix block not ready in node (#946)

* Fix block no ready in light node

* Fix block no ready in light node

* test

* P2P error masking (#944)

* P2P error masking

* Adjustments

* Adjustments

* Adjustments

* Review comments

* Review comments

* merge

* ethereum key from env (#950)

* updated entity relationship protobuf (#952)

* updated protos

* revert previous commit for bootstrap nodes (#954)

This reverts commit 7f4d7269ab67989569daaa0266903b5dd0123eae.

* Bts/new (#953)

* ethereum key from env

* New bootstrap peers

* Revert "revert previous commit for bootstrap nodes (#954)" (#955)

This reverts commit 7eca86136032d7517d8d24175e8696ccb2201d0e.

*  Add nft index to api response (#949)

* bindings

* Add nft index to api response

* data

* Latest smart contracts and fixes

* Latest smart contracts and fixes

* Fix tests 1

* Fix testworld

* Review comments

* contracts

* merge

* version change

* Start message for node (#957)

* Remove pb errors

* Add ascii art and messafge

* Fix build

* Disclaimer

* More build fixes

* p2p: getDocumentRequest for entity (#948)

* initial implementation getDocumentRequest

* fixed unit tests

* added todo comments

* added test for p2p

* added granter to entityrelationship

* fixed p2p testworld test

* fixed p2p testworld test with er send/receive

* fmt

* processor bootstrapper no nil check

* fixed p2p testworld test

* fmt

* fmt and selfDID from ctx

* fixed self.DID parameter

* fmt

* fmt

* fmt

* Entity handler: Share and Revoke (#940)

* hex string DB index (#956)

* ethereum key from env

* hex string index

* string trim

* Fix/prefix and develop (#964)

* ethereum key from env

* hex string index

* string trim

* Fix prefix

* Fix prefix

* Fix prefix

* 56bit token ID option (#965)

* Remove unnecessary documentation

* 56bit token ID option

* 56bit token ID option

* 56bit token ID option

* Fix

* Fix

* comment

* add stack traces to error (#963)

Closes #883 

Changes:
- `errors.New` will attach stack trace by default
- Call `errors.StackTrace(err)` to get the stack trace

Note: this will not change the current `error.Error` log behavior. Stack traces should be retrieved and printed explicitly

Example stack trace:
```
github.com/centrifuge/go-centrifuge/errors.TestWithStackTrace
	/Users/vedhavyas/Projects/Go/src/github.com/centrifuge/go-centrifuge/errors/errors_test.go:169
testing.tRunner
	/usr/local/Cellar/go@1.11/1.11.6/libexec/src/testing/testing.go:827
runtime.goexit
	/usr/local/Cellar/go@1.11/1.11.6/libexec/src/runtime/asm_amd64.s:1333
```

* entity: GET EntityWithRelationship  (#961)

* initial implementation getDocumentRequest

* fixed unit tests

* added todo comments

* added test for p2p

* added granter to entityrelationship

* fixed p2p testworld test

* fixed p2p testworld test with er send/receive

* fmt

* processor bootstrapper no nil check

* fixed p2p testworld test

* fmt

* fmt and selfDID from ctx

* fixed self.DID parameter

* fmt

* fmt

* fmt

* added Get Relationship entpoint

* implemented RequestEntityWithRelationship method in service

* validator for received doc

* added testworld test for get entpoint

* added validator after recieving doc from p2p

* fmt

* fmt

* fmt

* fixed lock file

* fixed cmd package

* added swagger

* fixed linting"
"

* return entity from database if it is the latest

* better variable naming

* fmt

* protobuf documentService renamed to entityService

* fixed new protobuf handler name

* fixed entityService naming

* swagger API service naming update (#966)

* Added embarcadero boot nodes (#968)

* Added embarcadero boot nodes

* add embarcadero mainnet

* GET relationship: correct endpoint + db store (#973)

* updated entity service for new get endpoint

* adopted testworld test

* added store to db after received on p2p

* removed boostrapper closure for processor

* fmt

* fmt

* better err handling

* refactor to jobs (#974)

closes #926

* added latestDocumentValidator to PostAnchoredValidator (#967)

* added valdiator

* fmt

* improved latestDocumentValidator with additional error checks

* revert processor test

* fixed processor unit tests

* fixed unit tests

* GetEntityByRelationship uses only latestDocumentValidator

* update swagger (#976)

* Minor things (#977)

* fix p2p return errors (#981)

* fix p2p return errors

* fix p2p return errors

* fix p2p return errors

* entity service unit test for relationship requests (#982)

* added unit test draft

* added setup method for unit tests

* added unit test for entity p2p request

* add mock processor

* added an additional unit test

* Ropsten address (#985)

* Ropsten address

* format

* Testworld coverage for Entity/EntityRelationship (#962)

* Master merge (#991)

* fix (#906)

return correct error on GetDocument

* fix vet and lint issues (#880)

Fixes the issue from GoreportCard

* take password interactively (#916)

* create new document with embedded Access Token, add test coverage for CoreDocument (#915)

* method

* added some tests

* Adding attributes to models (#901)

* Adding attributes to models

* Partially test

* LGTM

* Review comments

* Upgrade libp2p (#922)

* WIP: Upgrade libp2p

* WIP: Upgrade libp2p

* dep

* protobuf for entity relationship (#919)

* protobuf for entity relations

* better comments

* better naming

* fmt

* new entity handler response

* fmt

* fmt

* fixed entityrelationship model

* formatting

* swagger update

* Remove certs (#928)

Closes #909 

Changes:
- Removed the certificates
- GRPC server will be run on a different port and `127.0.0.1`
- API host is `127.0.0.1` by default but can be changed through `createconfig`

* removing manage ids (#930)

* create file with 600 permission (#931)

Closes #908

* Allow setting Ethereum max gas price (#932)

* Allow setting Ethereum max gas price

* Fix lint

* Review comment and minor

* Entity Relationship Create (Share) service (#905)

* new files

* wip

* added protos

* model

* spacing

* tests

* fix

* fix

* fix

* initial commit

* rm label

* initial

* fix

* wip

* fix

* wip

* wip

* wip

* wip

* fix

* swagger

* test

* spacing

* entity: GET method (#934)

* entity GET method

* moved isCollaborator to coredocument

* Add multiple gas limits (#937)

* dont return error for gas price breach

* Different gas limits for different ops

* Different gas limits for different ops

* Fix tests

* test fix

* cache the keys instead of the opts

* use context.backGround for now

* Revert txopts cache and review comments

* ignore .DS_Store

* Remove config endpoint (#939)

* dont return error for gas price breach

* Different gas limits for different ops

* Different gas limits for different ops

* Fix tests

* test fix

* cache the keys instead of the opts

* use context.backGround for now

* Revert txopts cache and review comments

* ignore .DS_Store

* Remove the unuseful config api

* stuff

* Delete Access Token (#942)

* initial

* entity-relationship: repo + bootstrapper (#938)

* new files

* wip

* added protos

* model

* spacing

* tests

* fix

* fix

* fix

* initial commit

* rm label

* initial

* fix

* wip

* fix

* wip

* wip

* wip

* wip

* fix

* swagger

* test

* spacing

* initial

* added ER repository and bootstrapper

* fmt

* wrapped document.repository

* fix

* spacing

* rm Gopkg.lock

* added request method for document

* fmt

* worker limit + swagger + macos build (#945)

* Fix block not ready in node (#946)

* Fix block no ready in light node

* Fix block no ready in light node

* test

* P2P error masking (#944)

* P2P error masking

* Adjustments

* Adjustments

* Adjustments

* Review comments

* Review comments

* merge

* ethereum key from env (#950)

* updated entity relationship protobuf (#952)

* updated protos

* revert previous commit for bootstrap nodes (#954)

This reverts commit 7f4d7269ab67989569daaa0266903b5dd0123eae.

* Bts/new (#953)

* ethereum key from env

* New bootstrap peers

* Revert "revert previous commit for bootstrap nodes (#954)" (#955)

This reverts commit 7eca86136032d7517d8d24175e8696ccb2201d0e.

*  Add nft index to api response (#949)

* bindings

* Add nft index to api response

* data

* Latest smart contracts and fixes

* Latest smart contracts and fixes

* Fix tests 1

* Fix testworld

* Review comments

* contracts

* merge

* version change

* Start message for node (#957)

* Remove pb errors

* Add ascii art and messafge

* Fix build

* Disclaimer

* More build fixes

* p2p: getDocumentRequest for entity (#948)

* initial implementation getDocumentRequest

* fixed unit tests

* added todo comments

* added test for p2p

* added granter to entityrelationship

* fixed p2p testworld test

* fixed p2p testworld test with er send/receive

* fmt

* processor bootstrapper no nil check

* fixed p2p testworld test

* fmt

* fmt and selfDID from ctx

* fixed self.DID parameter

* fmt

* fmt

* fmt

* Entity handler: Share and Revoke (#940)

* hex string DB index (#956)

* ethereum key from env

* hex string index

* string trim

* Fix/prefix and develop (#964)

* ethereum key from env

* hex string index

* string trim

* Fix prefix

* Fix prefix

* Fix prefix

* 56bit token ID option (#965)

* Remove unnecessary documentation

* 56bit token ID option

* 56bit token ID option

* 56bit token ID option

* Fix

* Fix

* comment

* add stack traces to error (#963)

Closes #883 

Changes:
- `errors.New` will attach stack trace by default
- Call `errors.StackTrace(err)` to get the stack trace

Note: this will not change the current `error.Error` log behavior. Stack traces should be retrieved and printed explicitly

Example stack trace:
```
github.com/centrifuge/go-centrifuge/errors.TestWithStackTrace
	/Users/vedhavyas/Projects/Go/src/github.com/centrifuge/go-centrifuge/errors/errors_test.go:169
testing.tRunner
	/usr/local/Cellar/go@1.11/1.11.6/libexec/src/testing/testing.go:827
runtime.goexit
	/usr/local/Cellar/go@1.11/1.11.6/libexec/src/runtime/asm_amd64.s:1333
```

* entity: GET EntityWithRelationship  (#961)

* initial implementation getDocumentRequest

* fixed unit tests

* added todo comments

* added test for p2p

* added granter to entityrelationship

* fixed p2p testworld test

* fixed p2p testworld test with er send/receive

* fmt

* processor bootstrapper no nil check

* fixed p2p testworld test

* fmt

* fmt and selfDID from ctx

* fixed self.DID parameter

* fmt

* fmt

* fmt

* added Get Relationship entpoint

* implemented RequestEntityWithRelationship method in service

* validator for received doc

* added testworld test for get entpoint

* added validator after recieving doc from p2p

* fmt

* fmt

* fmt

* fixed lock file

* fixed cmd package

* added swagger

* fixed linting"
"

* return entity from database if it is the latest

* better variable naming

* fmt

* protobuf documentService renamed to entityService

* fixed new protobuf handler name

* fixed entityService naming

* swagger API service naming update (#966)

* Added embarcadero boot nodes (#968)

* Added embarcadero boot nodes

* add embarcadero mainnet

* GET relationship: correct endpoint + db store (#973)

* updated entity service for new get endpoint

* adopted testworld test

* added store to db after received on p2p

* removed boostrapper closure for processor

* fmt

* fmt

* better err handling

* refactor to jobs (#974)

closes #926

* added latestDocumentValidator to PostAnchoredValidator (#967)

* added valdiator

* fmt

* improved latestDocumentValidator with additional error checks

* revert processor test

* fixed processor unit tests

* fixed unit tests

* GetEntityByRelationship uses only latestDocumentValidator

* update swagger (#976)

* Minor things (#977)

* fix p2p return errors (#981)

* fix p2p return errors

* fix p2p return errors

* fix p2p return errors

* entity service unit test for relationship requests (#982)

* added unit test draft

* added setup method for unit tests

* added unit test for entity p2p request

* add mock processor

* added an additional unit test

* Ropsten address (#985)

* Ropsten address

* format

* Testworld coverage for Entity/EntityRelationship (#962)

* Low entropy token ID with 999999999999999 max (#987) (#990)

* Merge Candidate v0.0.5 (#1146)

* fix (#906)

return correct error on GetDocument

* fix vet and lint issues (#880)

Fixes the issue from GoreportCard

* take password interactively (#916)

* create new document with embedded Access Token, add test coverage for CoreDocument (#915)

* method

* added some tests

* Adding attributes to models (#901)

* Adding attributes to models

* Partially test

* LGTM

* Review comments

* Upgrade libp2p (#922)

* WIP: Upgrade libp2p

* WIP: Upgrade libp2p

* dep

* protobuf for entity relationship (#919)

* protobuf for entity relations

* better comments

* better naming

* fmt

* new entity handler response

* fmt

* fmt

* fixed entityrelationship model

* formatting

* swagger update

* Remove certs (#928)

Closes #909 

Changes:
- Removed the certificates
- GRPC server will be run on a different port and `127.0.0.1`
- API host is `127.0.0.1` by default but can be changed through `createconfig`

* removing manage ids (#930)

* create file with 600 permission (#931)

Closes #908

* Allow setting Ethereum max gas price (#932)

* Allow setting Ethereum max gas price

* Fix lint

* Review comment and minor

* Entity Relationship Create (Share) service (#905)

* new files

* wip

* added protos

* model

* spacing

* tests

* fix

* fix

* fix

* initial commit

* rm label

* initial

* fix

* wip

* fix

* wip

* wip

* wip

* wip

* fix

* swagger

* test

* spacing

* entity: GET method (#934)

* entity GET method

* moved isCollaborator to coredocument

* Add multiple gas limits (#937)

* dont return error for gas price breach

* Different gas limits for different ops

* Different gas limits for different ops

* Fix tests

* test fix

* cache the keys instead of the opts…
mikiquantum added a commit that referenced this pull request Sep 3, 2019
* fix (#906)

return correct error on GetDocument

* fix vet and lint issues (#880)

Fixes the issue from GoreportCard

* take password interactively (#916)

* create new document with embedded Access Token, add test coverage for CoreDocument (#915)

* method

* added some tests

* Adding attributes to models (#901)

* Adding attributes to models

* Partially test

* LGTM

* Review comments

* Upgrade libp2p (#922)

* WIP: Upgrade libp2p

* WIP: Upgrade libp2p

* dep

* protobuf for entity relationship (#919)

* protobuf for entity relations

* better comments

* better naming

* fmt

* new entity handler response

* fmt

* fmt

* fixed entityrelationship model

* formatting

* swagger update

* Remove certs (#928)

Closes #909 

Changes:
- Removed the certificates
- GRPC server will be run on a different port and `127.0.0.1`
- API host is `127.0.0.1` by default but can be changed through `createconfig`

* removing manage ids (#930)

* create file with 600 permission (#931)

Closes #908

* Allow setting Ethereum max gas price (#932)

* Allow setting Ethereum max gas price

* Fix lint

* Review comment and minor

* Entity Relationship Create (Share) service (#905)

* new files

* wip

* added protos

* model

* spacing

* tests

* fix

* fix

* fix

* initial commit

* rm label

* initial

* fix

* wip

* fix

* wip

* wip

* wip

* wip

* fix

* swagger

* test

* spacing

* entity: GET method (#934)

* entity GET method

* moved isCollaborator to coredocument

* Add multiple gas limits (#937)

* dont return error for gas price breach

* Different gas limits for different ops

* Different gas limits for different ops

* Fix tests

* test fix

* cache the keys instead of the opts

* use context.backGround for now

* Revert txopts cache and review comments

* ignore .DS_Store

* Remove config endpoint (#939)

* dont return error for gas price breach

* Different gas limits for different ops

* Different gas limits for different ops

* Fix tests

* test fix

* cache the keys instead of the opts

* use context.backGround for now

* Revert txopts cache and review comments

* ignore .DS_Store

* Remove the unuseful config api

* stuff

* Delete Access Token (#942)

* initial

* entity-relationship: repo + bootstrapper (#938)

* new files

* wip

* added protos

* model

* spacing

* tests

* fix

* fix

* fix

* initial commit

* rm label

* initial

* fix

* wip

* fix

* wip

* wip

* wip

* wip

* fix

* swagger

* test

* spacing

* initial

* added ER repository and bootstrapper

* fmt

* wrapped document.repository

* fix

* spacing

* rm Gopkg.lock

* added request method for document

* fmt

* worker limit + swagger + macos build (#945)

* Fix block not ready in node (#946)

* Fix block no ready in light node

* Fix block no ready in light node

* test

* P2P error masking (#944)

* P2P error masking

* Adjustments

* Adjustments

* Adjustments

* Review comments

* Review comments

* merge

* ethereum key from env (#950)

* updated entity relationship protobuf (#952)

* updated protos

* revert previous commit for bootstrap nodes (#954)

This reverts commit 7f4d7269ab67989569daaa0266903b5dd0123eae.

* Bts/new (#953)

* ethereum key from env

* New bootstrap peers

* Revert "revert previous commit for bootstrap nodes (#954)" (#955)

This reverts commit 7eca86136032d7517d8d24175e8696ccb2201d0e.

*  Add nft index to api response (#949)

* bindings

* Add nft index to api response

* data

* Latest smart contracts and fixes

* Latest smart contracts and fixes

* Fix tests 1

* Fix testworld

* Review comments

* contracts

* merge

* version change

* Start message for node (#957)

* Remove pb errors

* Add ascii art and messafge

* Fix build

* Disclaimer

* More build fixes

* p2p: getDocumentRequest for entity (#948)

* initial implementation getDocumentRequest

* fixed unit tests

* added todo comments

* added test for p2p

* added granter to entityrelationship

* fixed p2p testworld test

* fixed p2p testworld test with er send/receive

* fmt

* processor bootstrapper no nil check

* fixed p2p testworld test

* fmt

* fmt and selfDID from ctx

* fixed self.DID parameter

* fmt

* fmt

* fmt

* Entity handler: Share and Revoke (#940)

* hex string DB index (#956)

* ethereum key from env

* hex string index

* string trim

* Fix/prefix and develop (#964)

* ethereum key from env

* hex string index

* string trim

* Fix prefix

* Fix prefix

* Fix prefix

* 56bit token ID option (#965)

* Remove unnecessary documentation

* 56bit token ID option

* 56bit token ID option

* 56bit token ID option

* Fix

* Fix

* comment

* add stack traces to error (#963)

Closes #883 

Changes:
- `errors.New` will attach stack trace by default
- Call `errors.StackTrace(err)` to get the stack trace

Note: this will not change the current `error.Error` log behavior. Stack traces should be retrieved and printed explicitly

Example stack trace:
```
github.com/centrifuge/go-centrifuge/errors.TestWithStackTrace
	/Users/vedhavyas/Projects/Go/src/github.com/centrifuge/go-centrifuge/errors/errors_test.go:169
testing.tRunner
	/usr/local/Cellar/go@1.11/1.11.6/libexec/src/testing/testing.go:827
runtime.goexit
	/usr/local/Cellar/go@1.11/1.11.6/libexec/src/runtime/asm_amd64.s:1333
```

* entity: GET EntityWithRelationship  (#961)

* initial implementation getDocumentRequest

* fixed unit tests

* added todo comments

* added test for p2p

* added granter to entityrelationship

* fixed p2p testworld test

* fixed p2p testworld test with er send/receive

* fmt

* processor bootstrapper no nil check

* fixed p2p testworld test

* fmt

* fmt and selfDID from ctx

* fixed self.DID parameter

* fmt

* fmt

* fmt

* added Get Relationship entpoint

* implemented RequestEntityWithRelationship method in service

* validator for received doc

* added testworld test for get entpoint

* added validator after recieving doc from p2p

* fmt

* fmt

* fmt

* fixed lock file

* fixed cmd package

* added swagger

* fixed linting"
"

* return entity from database if it is the latest

* better variable naming

* fmt

* protobuf documentService renamed to entityService

* fixed new protobuf handler name

* fixed entityService naming

* swagger API service naming update (#966)

* Added embarcadero boot nodes (#968)

* Added embarcadero boot nodes

* add embarcadero mainnet

* GET relationship: correct endpoint + db store (#973)

* updated entity service for new get endpoint

* adopted testworld test

* added store to db after received on p2p

* removed boostrapper closure for processor

* fmt

* fmt

* better err handling

* refactor to jobs (#974)

closes #926

* added latestDocumentValidator to PostAnchoredValidator (#967)

* added valdiator

* fmt

* improved latestDocumentValidator with additional error checks

* revert processor test

* fixed processor unit tests

* fixed unit tests

* GetEntityByRelationship uses only latestDocumentValidator

* update swagger (#976)

* Minor things (#977)

* fix p2p return errors (#981)

* fix p2p return errors

* fix p2p return errors

* fix p2p return errors

* entity service unit test for relationship requests (#982)

* added unit test draft

* added setup method for unit tests

* added unit test for entity p2p request

* add mock processor

* added an additional unit test

* Ropsten address (#985)

* Ropsten address

* format

* Testworld coverage for Entity/EntityRelationship (#962)

* Low entropy token ID with 999999999999999 max (#987)

* Cleanup jobs refactor (#994)

Closes #983

* Add a config to enable debug logging (#996)

* Add a config to enable debug logging

* fix test

* set used anchor repo (#998)

* set used anchor repo

* omprove test coverage

* update lock

* New big int type (#999)

* previous review comments

* Added new int256 type

* Review comments and more tests

* more testst

* Validators (#1000)

* update GetAnchorData

* add current version validator

* add version check for signature validator group

* fix tests

* add anchor repo address validator

* fix integration tests

* fix unit tests

* missing test

* review changes

* minor changes

* Custom Attr - Client protobufs (#1010)

* Custom Attr - Client protobufs

* Implement text marshalling/unmarshalling for AttrKey

* Fix conversions

* :|

* Add minimum response time to p2p calls (#1013)

* Add p2p delay

* Add p2p delay

* Add p2p delay

* Attributes: Client API to Model conversion (#1011)

* Custom Attr - Client protobufs

* Implement text marshalling/unmarshalling for AttrKey

* Fix conversions

* :|

* Attributes: Client API to Model conversion (without tests)

* More tests

* add tests


Co-authored-by: Vedhavyas Singareddi <vedhavyas.singareddi@gmail.com>

* Feat/coredo model attrs (#1016)

* Custom Attr - Client protobufs

* Implement text marshalling/unmarshalling for AttrKey

* Fix conversions

* :|

* Attributes: Client API to Model conversion (without tests)

* More tests

* add tests

* add converters

* conversion from coredoc to p2p

* add model functions

* fix tests

* update dep


Co-authored-by: Vimukthi <vimukthi@centrifuge.io>

*  Adjustable p2p delay (#1017)

* Adjustable p2p delay

* remove darwin

* add check

* add test

* Fix init value (#1019)

* fix init value

* fix test

* Enable notification on Job completion (#1020)

* wip

* wip

* job notification

* fix

* gen

* tests

* tests

* tests

* update proto

* add attribute testworld tests cases (#1021)

* add tests cases

* add test case for int256

* move the marshall logic to core doc

* revert to previous marshall

* move both marshal and unmarshal to coredoc

* fix linting

* funding: create + get (#1015)

* create funding protobuf

* created protobuf

* added PrepareNewVersionWithExistingData to model

* fmt

* fmt

* added new prepareVersion method to other model implementations

* added support for creating attribute keys

* added get values from struct

* fmt

* err handlingi

* added attribute idx

* fmt

* fmt

* fmt

* fmt

* fmt

* swagger

* added GET protobuf definition

* added fundingData struct

* added index as int256

* create response from model

* added get method in handler

* added type from tag

* fmt

* better iteration in finding

* fmt

* refactored: labelToJSON

* added days as integer

* fmt

* fmt

* better method names

* lint exclude uppercase

* only add attributes if not empty

* fixed protobuf

* protobuf created and fmt

* fmt

* whitespaces

* added int256 checks

* feat: funding GET list (#1024)

* create funding protobuf

* created protobuf

* added PrepareNewVersionWithExistingData to model

* fmt

* fmt

* added new prepareVersion method to other model implementations

* added support for creating attribute keys

* added get values from struct

* fmt

* err handlingi

* added attribute idx

* fmt

* fmt

* fmt

* fmt

* fmt

* swagger

* added GET protobuf definition

* added fundingData struct

* added index as int256

* create response from model

* added get method in handler

* added type from tag

* fmt

* better iteration in finding

* fmt

* refactored: labelToJSON

* added days as integer

* fmt

* fmt

* better method names

* lint exclude uppercase

* only add attributes if not empty

* fixed protobuf

* created protobuf for list

* added serive method for GET list

* fmt

* fmt

* better errors

* improved code readablity

* fmt

* added swagger

* changed funding urls

* swagger

* Feat/signed attrs (#1023)

* add signed attr

* add convertor

* refactor service name and add validator

* add signature validation

* add to validator group

* update dep to origin

* Feat/funding aggrement handler (#1029)

* register handler

* return signer identity for signed type

* feat: funding getVersion and getListVersion (#1026)

* create funding protobuf

* created protobuf

* added PrepareNewVersionWithExistingData to model

* fmt

* fmt

* added new prepareVersion method to other model implementations

* added support for creating attribute keys

* added get values from struct

* fmt

* err handlingi

* added attribute idx

* fmt

* fmt

* fmt

* fmt

* fmt

* swagger

* added GET protobuf definition

* added fundingData struct

* added index as int256

* create response from model

* added get method in handler

* added type from tag

* fmt

* better iteration in finding

* fmt

* refactored: labelToJSON

* added days as integer

* fmt

* fmt

* better method names

* lint exclude uppercase

* only add attributes if not empty

* fixed protobuf

* created protobuf for list

* added serive method for GET list

* fmt

* fmt

* better errors

* protobuf get version

* improved code readablity

* fmt

* added get version

* fmt

* added swagger

* swagger

* fmt

* changed funding urls

* swagger

* fmt

* better errors

* fmt

* feat: funding update (#1027)

* create funding protobuf

* created protobuf

* added PrepareNewVersionWithExistingData to model

* fmt

* fmt

* added new prepareVersion method to other model implementations

* added support for creating attribute keys

* added get values from struct

* fmt

* err handlingi

* added attribute idx

* fmt

* fmt

* fmt

* fmt

* fmt

* swagger

* added GET protobuf definition

* added fundingData struct

* added index as int256

* create response from model

* added get method in handler

* added type from tag

* fmt

* better iteration in finding

* fmt

* refactored: labelToJSON

* added days as integer

* fmt

* fmt

* better method names

* lint exclude uppercase

* only add attributes if not empty

* fixed protobuf

* created protobuf for list

* added serive method for GET list

* fmt

* fmt

* better errors

* protobuf get version

* improved code readablity

* fmt

* added get version

* fmt

* added swagger

* swagger

* fmt

* protobuf added for update

* changed funding urls

* swagger

* fmt

* better errors

* added update funcs to service

* added update tests

* fmt

* handler unit test

* fmt

* fmt

* refactoring fill attributes

* better comments

* protobufs update

* use next_version (#1033)

* Fix/enable fields (#1034)

* use next+_version

* enable disabled fields

* Remove txpool access (#1036)

* Remove txpool access

* review comments

* feat: funding sign service + handler (#1032)

* create funding protobuf

* created protobuf

* added PrepareNewVersionWithExistingData to model

* fmt

* fmt

* added new prepareVersion method to other model implementations

* added support for creating attribute keys

* added get values from struct

* fmt

* err handlingi

* added attribute idx

* fmt

* fmt

* fmt

* fmt

* fmt

* swagger

* added GET protobuf definition

* added fundingData struct

* added index as int256

* create response from model

* added get method in handler

* added type from tag

* fmt

* better iteration in finding

* fmt

* refactored: labelToJSON

* added days as integer

* fmt

* fmt

* better method names

* lint exclude uppercase

* only add attributes if not empty

* fixed protobuf

* created protobuf for list

* added serive method for GET list

* fmt

* fmt

* better errors

* protobuf get version

* improved code readablity

* fmt

* added get version

* fmt

* added swagger

* swagger

* fmt

* protobuf added for update

* changed funding urls

* swagger

* fmt

* better errors

* added update funcs to service

* added update tests

* fmt

* handler unit test

* fmt

* fmt

* refactoring fill attributes

* better comments

* create sign endpoint

* refactored getLatestIndex

* protobufs update

* added Sign method to Service

* added createSignAttrs method

* unit tests for sign

* improved tests

* unit tests for sign handler method

* fmt

* fmt

* swagger

* fmt

* fmt

* fmt

* Readme file updated with go installation prerequisites.  (#1045)

* Readme file added with go prerequisite

* updated readme file with go installation commands

* feat: GET Signatures + testworld tests (#1041)

* create funding protobuf

* created protobuf

* added PrepareNewVersionWithExistingData to model

* fmt

* fmt

* added new prepareVersion method to other model implementations

* added support for creating attribute keys

* added get values from struct

* fmt

* err handlingi

* added attribute idx

* fmt

* fmt

* fmt

* fmt

* fmt

* swagger

* added GET protobuf definition

* added fundingData struct

* added index as int256

* create response from model

* added get method in handler

* added type from tag

* fmt

* better iteration in finding

* fmt

* refactored: labelToJSON

* added days as integer

* fmt

* fmt

* better method names

* lint exclude uppercase

* only add attributes if not empty

* fixed protobuf

* created protobuf for list

* added serive method for GET list

* fmt

* fmt

* better errors

* protobuf get version

* improved code readablity

* fmt

* added get version

* fmt

* added swagger

* swagger

* fmt

* protobuf added for update

* changed funding urls

* swagger

* fmt

* better errors

* added update funcs to service

* added update tests

* fmt

* handler unit test

* fmt

* fmt

* refactoring fill attributes

* better comments

* create sign endpoint

* refactored getLatestIndex

* protobufs update

* added Sign method to Service

* added createSignAttrs method

* unit tests for sign

* improved tests

* unit tests for sign handler method

* fmt

* added derive signatures

* split signature service methods

* fmt

* swagger

* added unit test

* added signatures to list return

* fixed tests for signature list

* fixed tests for signature list

* added verify method to account

* added signature verify

* added unit test for sign verify

* fmt

* better error handling

* fmt

* fmt

* removed account method

* swagger

* fmt

* fmt

* validate only value

* fmt

* fmt

* fmt

* fmt

* private attr payload msg

* fmt

* fmt

* added collaborators to addAttributes

* better protobuf list naming

* resolved merge conflict

* added basic funding testworld test

* fixed context in handler

* added sign testworld test

* added list testworld test

* fixed update testworld test

* added prepareNewVersion flag to deleteAttribute

* fmt

* fixed add new collaborator

* swagger

* changed funding package to fun

* fixed attribute collaborator pointer

* better error handling

* comments

* fmt

* swagger new version

* changed rest endpoints to documents and fundings

* AddAttributes with document prefix

* added documentPrefix to deleteAttributes

* Webhook bugfix and testworld webhook tests (#1056)

* Webhook bugfix and integration tests

* readem

* Fix test

* Review comments and integration test fix

* Ping API (#1037)

* initial setup

* add tests

* fix testworld

* review comments

* Fix multi account wrong local collaborator bug (#1060)

* Fix multi account wrong local collaborator bug

* fix test

* fix typo (#1063)

* fix typo

* add period

* Feat/inv data (#1059)

* add hex bytes

* add inv data and coversions

* add invoice data type

* add tests

* add data retriever

* fix empty collabs (#1064)

* Fix/swagger tags (#1065)

* add tags

* bump version

* Feat/migration (#1061)

* wip

* Cleanup

* Add tests

* lint + test

* lint + test

* migrate at startup

* gen

* add asset check as test

* comments

* comments

* removed data

* removed jobs

* removed comment

* fix test

* Migrate/keys (#1067)

* wip

* Cleanup

* Add tests

* lint + test

* lint + test

* migrate at startup

* gen

* add asset check as test

* comments

* comments

* removed data

* removed jobs

* removed comment

* fix test

* Add key migration

* comments

* add service functions for Invoice (#1068)

* add service functions

* load json tests

* tests for model functions

* add service tests

* Fix for DHT KValue=20 issue (#1066)

* remove dht dead code and minor fix

* test

* test

* test

* test

* remove FindProvider

* Review comments

* add service methods (#1075)

* add service methods

* add service tests

* add core api service

* typo

* Feat/coreapi handler (#1080)

* add core api handler

* add types test

* review changes

* add middleware tests

* working api

* add test world test

* update tests

* fix testworld

* remove middleware

* add accounts to header rule

* added funder and borrower id (#1084)

* Feat/coreapi update (#1087)

* add update endpoint

* add testworld case

* fix testworld

* feat: nft tokenTransfer and ownerOf support (#1085)

* added protobuf for transfer from

* renamed unpaidInvoice to service in nft package

* added transferFromJob

* added transferFrom service method

* added TokenTransfer handler method

* added mock for transferFrom

* added integration test for nftTransfer

* added fail transactionFrom integration test

* added handler unit tests

* handler unit test

* fmt

* fmt

* clean up

* increased gas for transferFrom

* swagger

* better gaslimit for transferFrom

* added protobuf for ownerOf

* added handler for ownerOf

* fixed handler ownerOf

* added handler test for owner of

* better ownerOf response

* added testworld test for nftTransfer

* added testworld test owner of

* fmt

* change to new nft rest api paths

* fixed spacing

* fmt

*  Incorrect Protocol Messages Testcases #837 (#1083)

* add incorrect node version, incorrect body tests

* remove unnecessary test function in incorrect_proto_test

* use updated peer interface to getPeerID

* removed oskar

* renamed messenger_testworld file

* add linting

* Revert "add linting"
fix linting issue
This reverts commit 8d85b3dd7fdb2224eb1a336d35bd94a76c6f97b9.

* linting fix

* remove local account check

* lint fix

* lint fix

* add message over max size test

* lint fix

* add specific assertions

* new mint url (#1090)

* Jobs and Get Document API (#1089)

* add update endpoint

* add testworld case

* fix testworld

* migrate jobs to rest

* migrate jobs to rest

* fix unit tests

* add get and get version

* update swagger

* update testworld tests

* Feat/proofs api (#1095)

* add update endpoint

* add testworld case

* fix testworld

* migrate jobs to rest

* migrate jobs to rest

* fix unit tests

* add get and get version

* update swagger

* update testworld tests

* add proofs endpoints

* add proofs endpoints

* update testworld tests

* better test coverage

* Add PO to generic documents API (#1102)

* add data object

* add required model methods

* enable po for generic apis

* add test world test case

* lint check

* update swagger

* replace url path params with constants

* nft_logs (#1103)

* set range for webhook http status code job log (#1104)

* range for webhook http status code job log
* added test

* Add Entity to CoreAPIs (#1105)

* entity data

* add model methods

* add entity to the core apis

* add converters tests

* add test world cases

* fix testworld

* Feat/nfts api (#1108)

* entity data

* add model methods

* add entity to the core apis

* add converters tests

* add test world cases

* fix testworld

* migrate min nft

* migrate transfer nft

* migrate owner nft

* fix unit tests

* fix test world

* fix nft tests

* fix unit and tes world tests

* add accounts sign api (#1114)

* Byzantine fault behaviour tests 1 #876 (#1077)

* add Byzantine test

* add client signature verification

* adjust unit test according changed function signature

* adjust unit test

* adjust unit test

* goimports

* fix signing root calculating

* adjust server_testworld test

* Adjust TestHost_RevokedSigningKey

* add another two signature test

* adjust TestHost_RevokedSigningKey

* no content, force a CI build, it is ok on my site

* add print information for debugging

* change according to comments

* adjust format

* increase timeout limit to 30 min

* Feat/api versionning (#1117)

* version accounts

* funding service apis

* invoices and nft

* pos

* Byzantine fault behaviour tests 1 #876 (#1077)

* add Byzantine test

* add client signature verification

* adjust unit test according changed function signature

* adjust unit test

* adjust unit test

* goimports

* fix signing root calculating

* adjust server_testworld test

* Adjust TestHost_RevokedSigningKey

* add another two signature test

* adjust TestHost_RevokedSigningKey

* no content, force a CI build, it is ok on my site

* add print information for debugging

* change according to comments

* adjust format

* increase timeout limit to 30 min

* fix testworlds

* move collaborators up

* migrate attributes

* fix tests

* api todos

* rename nfts

* fix tests

* update swagger routes

* add debug

* fix tests


Co-authored-by: null <zy_frank@hotmail.com>

* change file permissions (#1123)

* Feat/generic (#1122)

* add generic doc service

* add testworkd tests

* add update to service

* update deps

* change deps

* remove duplicate auth (#1133)

* Fix repo panic (#1139)

* TransferDetails Pt1: Generic attribute util functions, funding related changes (#1135)

* TransferDetails Pt2: TD service, Bootstrapper (#1136)

* TransferDetails Pt3: userAPI/handler (#1140)

* add doc/job prefix (#1141)

* add doc/job prefix

* add doc/job prefix

* Naming mistakes for api endpoints and generation (#1149)

* naming mistakes for api endpoints and generation

* fix (#1150)

* details and migration bug (#1151)

* details and migration bug

* spacing

* Don't ignore notification error (#1154)

* use core api service (#1153)

* use core api service

* remove interface

* fix tests

* better tests

* review changes

* Migrate/get account (#1155)

* add api to router

* remove protobuf service endpoint

* fix test world

* migrate generate

* migrate get accounts (#1156)

* migrate get accounts

* remove response protobuf

* remove unused code

* revert comment change

* fix test world

* fix the swaggeer (#1159)

* Migrate/create acc (#1160)

* migrate get accounts

* remove response protobuf

* remove unused code

* revert comment change

* fix test world

* migrate create

* better decsription

* migrate account update (#1161)

* migrate update

* update swagger

* Migrate/po create (#1163)

* migrate update

* update swagger

* add po create api

* remove po create protobuf

* fix testworld tests

* restore json key (#1166)

* add key to attr response (#1168)

* Migrate/po get (#1169)

* add key to attr response

* add po get api

* remove get protobuf service

* migrate update

* fix testworld

* update testworld

* Migrate/po get version (#1171)

* add key to attr response

* add po get api

* remove get protobuf service

* add get version api

* remove protobuf get version service

* minor swagger changes

* lint check fix

* cleanup PO (#1173)

* cleanup PO

* fix testworld

* fix integration tests

* add endpoint to rest (#1175)

* add endpoint to rest

* remote create protobuf service

* Invoice create API migration (#1157)

* Invoice create API migration

* Invoice create API migration

* review

* fix tests

* Fix tests

* invoice updates after merge

* invoice updates after merge

* swagger

* review and tests

* review and tests

* comments

* tests

* fix po bug

* fix po bug

* fix unit

* fix swagger

* Invoice update get (#1180)

* Status code 202 accepted

* Status code 202 accepted

* Invoice update and get migration

* fix tests

* review

* migrate Entity Get and Update endpoint (#1178)

* migrate update endpoint

* migrate get

* minor chnages to tests

* add the relationship data

* regenerate swagger

* add more tests

* ignore paths

* Migrate share entity (#1185)

* add base functions to entity relationships

* build fixes

* add shre endpoint

* fix lint and tests

* fix testworld tests

* review comments

* migrate entity revoke (#1187)

* Invoice getversion + remove inv protobufs (#1183)

* Invoice getversion

* Fix tests and remove protobuf stuff

* review

* review

* Fix tests

* Fix tests

* fix tests again :/

* migrate get (#1188)

* migrate get

* add to router

* fix tests

* New env new ips (#1191)

* Cleanuup/entity (#1190)

* migrate get

* add to router

* fix unit tests

* fix testworld

* uncomment test

* Invoice unpaid NFT migration (#1189)

* Invoice unpaid NFT migration

* mv

* fix tests

* test

* review comments

* review comments

* rename

* Migrate/funding get post (#1193)

* add funding service to userapi

* migrate create funding agreement

* migrate get list

* fix unit tests

* fix testworld

* fix testworld

* fix unit tests

* migrate get and Put funding agreements (#1196)

* migrate get

* migrate put

* migrate sign (#1198)

* migrate get version (#1199)

* migrate get version

* migrate get version all

* clean up funding agreement

* Remove all protobufs (#1202)

* remove protocol.proto

* remove documentpb

* fix tests

* remove unneeded scripts

* fix make install

* fix travis

* fix diff check

* comment fix and dep update

* remove grpc (#1205)

* remove grpc

* fix make issues

* send 404 instead of 200 (#1206)

* Remove code :D (#1208)

* Remove code :D

* fix test

* Generic NFT (#1207)

* wip generic nft

* gen swagger

* fix mint

* generic nft + swagger

* generic nft + swagger

* tests

* fmt

* use http submodule

* travis

* travis

* swagger changes

* fixes

* fixes

* travis nixos cache

* travis nixos cache

* nixos no cache

* add log error on server side (#1210)

* remove redundant doc ID (#1213)

* use error chan (#1216)

* use error chan

* fix tests

* fix tests

* Fix/efficient fetching (#1215)

* add index type

* update tests

* fix tests

* minor test fixes

* better test

* add index migration

* add testworld tests

* fix testworld

* ignore migration files and testworld

* maybe this will work

* remove po (#1219)

* add status to the document (#1232)

* add status to the document

* add committeed once anchored

* add tests for migration

* fix tests

* add invoice derive (#1233)

* add invoice derive

* lock version

* Add commit to pending service (#1234)

* wip

* wip

* wip

* add tests

* fmt

* Feat/pending repo (#1236)

* wip

* wip

* wip

* add tests

* fmt

* add peding repo

* commit tests


Co-authored-by: Miguel Hervas <miguel.hervas.lazaro@gmail.com>

* add create (#1238)

* NFT logging (#1237)

* NFT logging

* NFT logging

* add convert test

* add nixos travis retry

* add nixos travis retry

* Pending service update (#1242)

* wip pending update

* comments

* tests

* prepare data

* rename cd patch

* not status check

* PendingService - Get and GetVersion (#1243)

* add get

* add get version

* update service difintion

* add create api (#1244)

* add create api

* add testworld tests

* fix testworld

* add update v2 API (#1245)

* add update

* add test world tests

* fix testworld test

* commit api (#1246)

* commit api

* v0.0.6 api

* add tests

* add tests

* remove richgo

* remove richgo

* comments

* comments + merge develop

* Get and Get version API (#1247)

* add get api

* add get api tests for testworld

* fix testworld

* add get version

* fix tests

* optimize proofs for generic nft (#1249)

* optimize proofs

* improve logging

* fixed length timestamp and decimal (#1248)

* fixed length timestamp and decimal

* comments

* comment

* comment

* Feat/derive generic (#1256)

* generic derive

* add generic doc v2 testworld tests

* fix tests

* update codecove ignore

* fix unit tests

* add entity derive (#1257)

* add entity derive

* add entoty tests

* Feat/derive er (#1258)

* add entity derive

* add entoty tests

* modify deriver

* add derive for er

* remove args

* gen swagger

* Monetary Attribute (#1259)

* Monetary Attribute

* fix testworld test

* fix testworld test

* fix testworld test

* address comments

* adding type

* adding type

* node version 0.0.6 (#1261)

* Merge 0.0.6-rc1 develop (#1262)

* fix builds (#381)

* Merge develop into master (#390)

* 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

* Merge Develop (#576)

* 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 1a5dbf7ab78c919c1a3a7a50f46c2bc27369980d.

* 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)

* Merging Develop -> Master (#669)

* 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 1a5dbf7ab78c919c1a3a7a50f46c2bc27369980d.

* 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)

* Consolidate DB Repository (#574)

* encapsulated DB interface

* lint

* added typed errors

* fix integration test

* fix integration test

* remove ID from storage.Repository

* ISSUE and PR templates proposal (#551)

* ISSUE and PR templates proposal

* Updates

* Update ISSUE_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

* Update ISSUE_TEMPLATE.md

* Cleanup testworld generated files (#578)

* Cleanup testworld generated files

* Force delete

* HTTP header for tenantID (#575)

Fixes #488 

1. Add interceptor that require header 'authorization' which holds tenantID
2. Add basic version if HTTPError and http Error response interceptor since we ned it for point 1

* added a generic document service (#579)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* document service: added CreateProof to model (#581)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* moved service_test.go

* document service: createProof and CreateProofForVersion (#584)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* added proof methods

* moved service_test.go

* added tests for createProof in service

* fixed broken createProofVersion test case

* formatting

* Transactions (#582)

* initial tx repo

* lint fixes

* document service: added RequestDocumentSignature and ReceiveAnchoredDocument (#586)

* added testworld tests for proofs

* doc service with get and get version

* added test for getVersion

* added more tests for service get methods

* improved search and tests

* improved tests

* generated genericdoc package

* moved service_test

* added CreateProof to model

* changed to correct create proofs

* formatting

* correct flags

* added proof methods

* moved service_test.go

* added tests for createProof in service

* implemented remaining methods for document service

* fixed broken createProofVersion test case

* formatting

* added tests for requestSignature

* formatting

* [Config DB] API Admin Endpoints (#583)

* Added proto models + service

* handler + service

* model tests

* add tests

* delete return

* missing tag

* proto

* [MultiTenancy] P2P refactorings No. 1 (#594)

* [MultiTenancy] P2P refactorings No…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants