Skip to content

Commit

Permalink
Merge master (#1416)
Browse files Browse the repository at this point in the history
* 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 7f4d726.

* Bts/new (#953)

* ethereum key from env

* New bootstrap peers

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

This reverts commit 7eca861.

* 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 8d85b3d.

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

* Feat/signed attr api (#1264)

* add signed attr to pending service

* add signed attr api

* add testworl test for signed attribute

* review changes

* change version

* fix bug in rendering attributes (#1267)

* Remove Collaborator API (#1266)

* add model function

* pending service

* add api

* update swagger json

* add testworld cases

* make remove collaborators no-op

* Adding badges

* add version check to make file (#1270)

* fix rest tls (#1278)

* Added funding status (#1313)

* Fix eth tx retrial message + gocelery max retrial (#1314)

* Fix eth tx retrial message

* lint

* Add high bound task retrial

* keep track of nonce in memory (#1315)

* keep track of nonce in memory

* keep track of nonce in memory

* remove static geth var + fix tw tests

* comment back testutil

* fix tw setup

* retrial

* inc cov

* rm global geth

* cleanup

* use acc from config

* Edge (#1327)

* Add Document Transition Validation Flag to signature (#1287)

* transition flag

* fix tests

* spacing

* tests

* tests

* tests

* travis edge branch build

* fix tw

* update proto

* Tree hashing changes (#1289)

* wip change hashing functions

* spacing

* disable testworld

* use blake2b

* comments

* add simple nft (#1290)

* add simple nft

* extract mint abi

* Tree Split (#1293)

* wip change hashing functions

* spacing

* disable testworld

* use blake2b

* wip default tree

* wip proofs work

* wip adapt docs + tests

* remove unused struct

* ordered tree + tests

* ordered tree + tests

* revert submodule

* fmt

* add unit test

* review

* breaking version (#1298)

* breaking version

* fix unit test

* update create config (#1300)

* update create config

* fix testworld

* Update/apis (#1301)

* update create config

* fix testworld

* update apis

* move account details to next level

* register the model before db operations (#1304)

* Extrinsic added to block listener (#1305)

* Extrinsic added to block listener

* Lock versions

* submit extrisic (#1306)

* submit extrisic

* add andhor repo tests

* add tests for submit extrinsics

* fix linting

* add subkey installation

* update make file

* eexport to path

* centchain extrinsic status check (#1310)

* Add status check on extrinsic

* check error str

* Added centrifuge chain at startup for tests (#1316)

* Added centrifuge chain at startup for tests

* try pull subkey

* Integrate centchain for anchoring (#1317)

* WIP centchain integration

* wip: fix unit tests

* wip: fix unit tests

* wip: fix unit tests

* wip: fix unit tests

* wip fix task + various

* Adding nonce in memory

* Fix commit

* anchor lifespan + use gsrpc fix for moment

* fix int

* unit tests

* test fixes

* fixes 2

* use seth

* use seth

* try 1

* Debug decoding

* include new GSRPC version + comments

* Feat/deploy asset contract (#1323)

* deploy asset manager

* push address in single echo

* correct deployments

* fix incorrect nft abi

* skip test

* Validate proofs against centchain (#1324)

* add unit tests

* validate tests

* enable generic NFT test with only validation

* add error logs

* make nft validate call to cent chain

* fix unit tests

* review changes

* rename trees

* more renaming

* fix unit tests

* Feat/nft mint (#1325)

* working mint

* update swagger

* reviewed changes

* enable nft tests (#1326)

* enable nft tests

* upgrade packages

* fix missing args

* fix testworld

* fix testworld

* fix transfer nft

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

* add subkey to docker (#1328)

* add subkey to docker

* move subkey download to builder

* Remove invoice (#1336)

* remove direct imports of invoice

* fix unit tests

* remove binary

* use nix seperate account

* removee auth token

* update testworld tests

* update tests

* more fixes

* remove invoice

* update swagger version

* update deps

* update deps

* Add bridge as test dep (#1337)

* wip add bridge as test dep

* wip add bridge scripts

* wip add bridge image

* wip add bridge image

* fix path

* fix script

* tw add balance

* debug logs

* remove interactiveness

* Bridge integration (#1338)

* add event listeneing

* run dapp migrations as partof the migration scrpt

* context switch

* remove self bridge

* does this work

* minor changes

* update docker images

* remove stale bridges

* review changes

* refactor

* fix unit tests

* add ca certs

* New envs + cleanup NFT (#1339)

* cleanup

* fix test lint

* push fix

* Cleanup Anchor and NFTS (#1341)

* cleanup 1

* more cleanup of NFT

* fix tests

* Run test world against any network (#1342)

* cleanup 1

* more cleanup of NFT

* fix tests

* refactor testworld

* minor corrections

* not to strict

* fix integrartion tests

* update travis

* review changes

* fix base64 decode

* skip migratrions

* parallel run

* Roles: Get, Update, Create (#1350)

* add model functions

* add pending doc service functions

* add get role

* add role api

* add update role api

* add testworld tests for get roles

* add testworld tests for add and update

* update cc docker image

* remove trailing /

* fix tests

* fix unit tests

* typo

* 1 - Transition Rules: Create API (#1352)

* update model to add rule for attributes

* add create rule api

* add testworld tests

* update config

* minor review changes

* add missing comments

* readable prefixes

* update commeent

* 2- Transition rules: Get API (#1353)

* update model to add rule for attributes

* add create rule api

* add testworld tests

* update config

* minor review changes

* add missing comments

* add get endpoint

* Add testworld tests

* readable prefixes

* update commeent

* 3 - Transition Rules: Delete API (#1354)

* update model to add rule for attributes

* add create rule api

* add testworld tests

* update config

* minor review changes

* add missing comments

* add get endpoint

* Add testworld tests

* readable prefixes

* update commeent

* add delete transition rule

* add http api for delete

* add delete tests for test world

* review changes

* update to latest GSRPC (#1356)

* update gsrpc module (#1357)

* update gsrpc module

* fix unit test

* update deps

* update nonce fetch

* Update bridge

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

* constraint (#1363)

* Add fulvous config (#1365)

* Delete ISSUE_TEMPLATE.md

* Delete PULL_REQUEST_TEMPLATE.md

* Feat/asset nft (#1367)

* update migrate script

* adapt integration tests

* adapt testworld

* Update Fulvous NFT (#1369)

* Add nft ownerof retrial (#1370)

* deploy asset handler (#1371)

* deploy asset handler

* update repo url

* add missing events (#1373)

* update modules (#1374)

* Added doc signature convenience test (#1375)

* Changes for NFT Minter script (#1376)

* update swagger components (#1380)

* Use temp fix for indices (#1382)

* Use temp fix for indices

* fix gopck

* use released cent image

* update gocelery (#1381)

* add signed attribute response (#1386)

* Bridge migration (#1377)

* phase 1

* working version of bridge v2

* remove fmt

* lint

* GSRPC dep

* testing

* testing

* testing

* testing

* comment test

* re-enable parallel tw test

* new chain

* Go 14 and Modules (#1387)

* Add dev dependencies (#1391)

* Bridge relayer pre release (#1390)

* Use temp fix for indices

* Adding latest bridge pre-release

* remove echo

* Fix nix pull

* fixes

* latest bridge + contracts

* Latest Chain version

* Fix xgo (#1392)

* Use temp fix for indices

* Use 1.13 for xgo

* Fix gov (#1393)

* Use temp fix for indices

* Fix Dockerfile to use Go 1.14

* fix int256 (#1404)

* add signed subtype (#1405)

* Bridge/v1.0.0 (#1408)

* Use temp fix for indices

* Updated to latest v1 bridge components

* update protobufs with compute fields (#1409)

* remove files

* merge conflict + travis

* merge conflict + travis

* merge conflict + travis

* merge conflict + travis

* Fix fulvous deployed NFT/Asset + make url more stable

* stable att 1

Co-authored-by: Charly <fei.charleen@gmail.com>
Co-authored-by: Vedhavyas Singareddi <vedhavyas.singareddi@gmail.com>
Co-authored-by: Vimukthi <vbwickramasinghe@gmail.com>
Co-authored-by: Manuel Polzhofer <manuel.polzhofer@gmail.com>
Co-authored-by: Vimukthi <vimukthi@centrifuge.io>
Co-authored-by: Tharsanan1 <tharsanan.15@cse.mrt.ac.lk>
Co-authored-by: Haritha Jayasinghe <haritha.16@cse.mrt.ac.lk>
Co-authored-by: Charly <charly@centrifuge.io>
Co-authored-by: zyfrank <zy_frank@hotmail.com>
Co-authored-by: Lucas Vogelsang <l@lucasvo.com>
  • Loading branch information
11 people committed Jul 24, 2020
1 parent 5633745 commit 982af16
Show file tree
Hide file tree
Showing 293 changed files with 11,145 additions and 12,799 deletions.
22 changes: 0 additions & 22 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

2 changes: 0 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ coverage.txt
*.swo
testworld/hostconfigs/*
.DS_Store
localAddresses
localAddresses
/build/scripts/test-dependencies/bridge/config/config.toml
/centrifuge
/profile.out
10 changes: 10 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,13 @@
path = build/privacy-enabled-erc721
url = https://github.com/centrifuge/privacy-enabled-erc721.git
branch = develop
[submodule "build/ethereum-bridge-contracts"]
path = build/ethereum-bridge-contracts
url = https://github.com/centrifuge/ethereum-bridge-contracts.git
branch = master
[submodule "build/centrifuge-ethereum-contracts"]
path = build/centrifuge-ethereum-contracts
url = https://github.com/centrifuge/centrifuge-ethereum-contracts
[submodule "build/chainbridge-deploy"]
path = build/chainbridge-deploy
url = https://github.com/ChainSafe/chainbridge-deploy.git
22 changes: 15 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: go
go:
- 1.11.4
- 1.14.3

# Maybe this helps with building branches in a fork
go_import_path: github.com/centrifuge/go-centrifuge
Expand All @@ -10,7 +10,7 @@ services:

env:
matrix:
- DEPCACHEDIR=/tmp/depcache IMAGE_NAME=centrifugeio/go-centrifuge
- IMAGE_NAME=centrifugeio/go-centrifuge PATH="$HOME/.cargo/bin:$PATH"

checkout:
post:
Expand All @@ -19,21 +19,25 @@ checkout:
cache:
directories:
- ~/bin/
- /tmp/depcache
- $GOPATH/pkg/mod

before_install:
- nvm install 10.15.1
- npm install -g truffle@4.1.13
- travis_retry bash <(curl https://nixos.org/nix/install)
- npm install -g truffle@5.1.29
- wget https://nixos.org/nix/install
- chmod +x install
- travis_retry ./install
- . $HOME/.nix-profile/etc/profile.d/nix.sh
- nix-env -if https://github.com/cachix/cachix/tarball/master --substituters https://cachix.cachix.org --trusted-public-keys cachix.cachix.org-1:eWNHQldwUO7G2VkjpnjDbWwy4KQ/HNxht7H4SSoMckM=
- nix-env -iA cachix -f https://cachix.org/api/v1/install
- cachix use dapp
- git clone --recursive https://github.com/dapphub/dapptools $HOME/.dapp/dapptools
- nix-env -f $HOME/.dapp/dapptools -iA dapp solc
- bash -c "cd $HOME/.dapp/dapptools && git checkout b76035185e67be430d851af81ad62c5f42c3e965"
- nix-env -f $HOME/.dapp/dapptools -iA dapp seth solc

install:
- mkdir -p ~/bin
- make install
- wget -P $HOME/.cargo/bin/ https://storage.googleapis.com/centrifuge-dev-public/subkey && chmod +x $HOME/.cargo/bin/subkey

jobs:
include:
Expand All @@ -57,6 +61,10 @@ jobs:
- stage: "Tests"
name: "Test world tests"
script:
- |
if [ "${TESTWORLD_NETWORK}" != "" ]; then
export SKIP_MIGRATION=true
fi
- ./build/scripts/test_wrapper.sh testworld
after_success:
- bash <(curl -s https://codecov.io/bash)
Expand Down
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
FROM golang:1.11-alpine as builder
FROM golang:1.14-stretch as builder

RUN apk update && apk add --no-cache openssh git jq curl gcc libc-dev build-base
RUN apt-get -y update && apt-get -y upgrade && apt-get -y install wget && apt-get install ca-certificates -y

ADD . /go/src/github.com/centrifuge/go-centrifuge
WORKDIR /go/src/github.com/centrifuge/go-centrifuge
RUN wget -P /go/bin/ https://storage.googleapis.com/centrifuge-dev-public/subkey && chmod +x /go/bin/subkey

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

FROM alpine:latest

RUN apk update && apk add --no-cache jq curl
FROM debian:stretch-slim
RUN apt-get -y update && apt-get -y upgrade && apt-get install ca-certificates -y

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

COPY --from=builder /go/bin/subkey /usr/local/bin/
RUN subkey --version

VOLUME ["/root/config"]

ENTRYPOINT ["/root/entrypoint.sh"]
Expand Down

0 comments on commit 982af16

Please sign in to comment.