forked from hyperledger-labs/perun-node
-
Notifications
You must be signed in to change notification settings - Fork 1
Perunio api #1
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
Open
manoranjith
wants to merge
58
commits into
develop
Choose a base branch
from
perunio-api
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Perunio api #1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- fix links to Hyperledger chat - remove duplicate "Emeritus Maintainers"-section introduced in 8526c80. Signed-off-by: Chris Hoeppler <christian.hoeppler@de.bosch.com>
Signed-off-by: Jason Stallings <142006+octalmage@users.noreply.github.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Also update the path for perun generic library packages to from "perun.network/go-perun/pkg/sync" to "polycry.pt/poly-go/sync" as this library was moved in the newer version of go-perun. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Use LatestSignerForChainID instead of NewEIP155Signer. - Use channel.Asset type instead of wallet.Address in relevant places. - Use Update instead of UpdateBy with new signature for updater func. - Rename wallet.Address.(Equals -> Equal) - Update all mocks with latest version of mockery (separate this change). - Use updated signature for NewBus and pass the serializer explicitly. - Use updated signature for listner.Accept and pass the serializer explicitly. - Replace usage of Bytes method on Address with MarshalBinary. - Adapt to rename of some of the data types. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Also, update the syntax for protoc command, as the compiler for grpc bindings has now been separated from the one for protobuf bindings. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Because, the older version is not compatible with go version 1.19. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Because the syntax for configuring this linter has changed. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Because the rules for newer version of gofumpt has been updated. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Run goimports with "-local github.com/hyperledger-labs/perun-node" option. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Because the updated version of linter requires doc comments for main packages as well. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Because package has been depricated since go 1.17. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- These errors were not detected by older version of revive. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- go1.19 introduced new formatting directives have been for comments. - The new syntax is "//toolname:directive". - For more details, see the syntax section in this page - "https://go.dev/doc/comment". Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- For tests using ganache-cli, parallelism should be set to 1 to ensure the correct incrementation of nonce used in creating transactions. Signed-off-by: manoranjith <ponraj.manoranjitha@in.bosch.com>
- In preparation for adding new apis - funding and watching. - Split "api.proto" file into three smaller parts, so that they can be extended later and move them to a separate directory. - Also, split the related files in api/grpc accordingly. - Move the file with "go generate" directory to project root. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Use the following syntax consistently: 1. From<type> for funcs that convert from perun to protobuf types. 2. To<type> for funcs that convert from protobuf types to perun. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- As these functions are closely coupled to protobuf bindings and do not implement any application logic, they fit better in "pb" package. - Also, move the tests on types in generated go bindings to "pb" package. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Include all methods defined by the Funder interface. - Also, update the command for generating protobufs. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Because the client initialization itself is not specific to ethereum blockchain or payments application. - Instead, the funder, adjudicator and wallet instances are passed as abstract interfaces and it is in the higher layer APIs, the functionality is limited to payments. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- However, only local is supported now. - Also, add a nolint:funlen directive for session.New function. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Common types used across the perun-node project (including errors) are
defined in perun-node package.
- Hence, these definitions fit better in the perun package.
- Trigger for this change:
- to implement client side logic for grpc funder (in session package),
the grpc/pb package is needed, which creates an import cycle.
- because grpc/pb package imports payments package, which inturn
imports sessions package.
- and payment package is importing session package only for using the
error constants.
- hence moving these error constants breaks the import cycle by
removing the need for payments package to import sessions package.
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Also, move the grpcFunder to a separate file. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- The filesToMove array was not populated. Hence, the directories were empty. To fix, populate this array properly. - The idProvider.yml include only the own alias. To fix, modify the logic to include everything except own alias. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Change build command to install. This installs the binaries in $GOBIN directory. - Add generate command that generates the artefacts for demo. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Previously, the nested map was not initialized. This caused a panic when Register was invoked. - Initializing the map fixes this it. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- ETH asset is registered by default already during the initialization fo the funder. Signed-off-by: manoranjith <ponraj.manoranjitha@in.bosch.com>
- The key can be used for initializing pre-funded accounts in ganache-cli or for initializing the same keys for tests in alternate clients (like rust implementation). Signed-off-by: manoranjith <ponraj.manoranjitha@in.bosch.com>
- Add a flag to run command to specify the service to run. - Split the serve function in gprc package. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- This is a temporary workaround to enable the existing version of perunnode-cli to connect with the API in fundwatch only mode to generate a session-id by opening a session. - Once, the perunnode-cli is updated, this can be undone. Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- The extracted handlers use in golang standard context, protobuf request/response messages. - Hence, these can be shared between grpc and other upcoming implementations (like peruniotcp server). Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
d802cd5 to
461cb54
Compare
- The extracted handlers use in golang standard context, protobuf request/response messages. - Hence, these can be shared between grpc and other upcoming implementations (like peruniotcp server). Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
6899640 to
4946237
Compare
- Define a api_messages.proto as a enum of all the funding and watching services. - This is needed, for parsing of the request, because unlike grpc, tcp adapter using perunio's custom messaging scheme does not have an in-built routing mechanism. Signed-off-by: manoranjith <ponraj.manoranjitha@in.bosch.com>
- Also combine the commands for watching and funding service, because the api_messages.proto depends on both of these definitions. Signed-off-by: manoranjith <ponraj.manoranjitha@in.bosch.com>
4946237 to
2083387
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Category
Relevant issue
Testing
Steps to run the tests
Needs to be tested along with an embedded implementation, which will use this API.
This will be documented separately.
Checklist