Link Search Menu Expand Document

perun-node GitHub

PR #207 Move contract validation from node to session init
#### Description - Contracts are validated during node initialization using a read-only blockchain backend. Validated addresses are then stored in a registry and passed on to the session. - Since valid contract addresses are provided by the node, use the addresses without validation in session init. Also, remove the tests related to invalid contracts for OpenSession and updates its doc comments to remove InvalidContracts Error. - Remove the option for user to provide the addresses in session config. Also, remove the contract addresses from session config template in testdata. ##### Category Implementation Task ##### Relevant issue Resolves #106. #### Testing Added tests for contract validation in node init. Tested `perunnodetui` and perunnodecli`. ##### Steps to run the tests 1. 2. 3. #### Checklist - [x] Name is added to the NOTICE file, if it is not present already. - [x] Changes are rebased onto the target branch.
Created At 2021-06-16 11:46:00 +0000 UTC
PR #206 Add read-only chain backend to validate contracts
#### Description - For validating contracts during node initialization, a read-only chain backend is needed, because node does not have credentials to initialize a full chain backend. - Add a ROChainBackend interface that specifies only methods for validating the contracts. - Implement a constructor for ROChainBackend, where the transactor is set to nil. This is safe to use because only validation methods are exposed via this interface and those methods do not use the transactor. ##### Category Implementation Task ##### Relevant issue Relates to #106. #### Testing Tests are added for validating contracts using read-only backend. ##### Steps to run the tests 1. 2. 3. #### Checklist - [x] Name is added to the NOTICE file, if it is not present already. - [x] Changes are rebased onto the target branch.
Created At 2021-06-16 11:41:07 +0000 UTC
PR #205 Remove hard-coded secondary settle, register
#### Description - Hard coded secondary logic for settle and register transactions were implemented in go-perun, since they were not working as expected. - But in go-perun/issues/8, it was concluded to add this feature later, when there is a concrete use case. - Now, it is removed, because the hard-coded sleep: - Does not save any cost, as we work on testnet. - Doubles the test execution time for session package. ##### Category Implementation Task ##### Relevant issue Closes #204. #### Testing Test execution time for session package becomes half compared to previous test run. ##### Steps to run the tests #### Checklist - [x] Name is added to the NOTICE file, if it is not present already. - [x] Changes are rebased onto the target branch.
Created At 2021-06-16 07:00:15 +0000 UTC
PR #203 Improve API Error impl & document errors in API
#### Description - The implementation is improved to - Store the underlying error, so that error stack can be retreived. - Implement formatter interface, so that error stack is retreived from the underlying error and printed when using the "%+v" verb in printf style funcs. - For most errors (except for failed pre-condition), generate error messages within the error constructors. So that redundant definition of error messags is removed. - Add tests for all error constructors, perun pkg has 100% coverage now. - Move error assertions functions to perun-node/peruntest, as most of them are used in perun_test both session_test packages. - Document the named errors returned by each of the API. - Also, use upper case 'O' in timedOut in all the places. ##### Category Implementation Task ##### Relevant issue Resolves #132. #### Testing Tests have been added in perun package for error constructors. This package now has 100% coverage. ##### Steps to run the tests 1. 2. 3. #### Checklist - [x] Name is added to the NOTICE file, if it is not present already. - [x] Changes are rebased onto the target branch.
Created At 2021-06-15 20:34:07 +0000 UTC
PR #202 Add missing named errors in OpenSession
#### Description - Add invalid contracts error in blockchain package to detect type of contract. For OpenSession API: - Used InvalidConfig error (for each parameter), InvalidContractsError. - Updated the proto buff definitions and grpc bindings to handle the newly added errors. - Removed the parsing of PartAddrs from config and the tests related to it as partsAddrs are not used now. ##### Category Implementation Task ##### Relevant issue Relates to #132. #### Testing Tests for newly added named errors have been added. ##### Steps to run the tests 1. 2. 3. #### Checklist - [x] Name is added to the NOTICE file, if it is not present already. - [x] Changes are rebased onto the target branch.
Created At 2021-06-15 11:08:30 +0000 UTC