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

[WIP] ACN registration start up extension #689

Merged
merged 4 commits into from
Apr 20, 2022

Conversation

Karrenbelt
Copy link
Contributor

Proposed changes

First draft on extending the registration skill with the request for Tendermint configuration sharing via the ACN.

Questions:

  1. where does the agent get the service id from to make the service registry contract call?
  2. ACN connection not at all used yet, not sure where this should come in

Also I realize refactoring and putting things in other places might be a good idea. I will not do that until it is fully functional, implementing it all in one place is easier. Primarily looking for feedback on the message flow at this stage.

Fixes

If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

What types of changes does your code introduce? (A breaking change is a fix or feature that would cause existing functionality and APIs to not work as expected.)
Put an x in the box that applies

  • Non-breaking fix (non-breaking change which fixes an issue)
  • Breaking fix (breaking change which fixes an issue)
  • Non-breaking feature (non-breaking change which adds functionality)
  • Breaking feature (breaking change which adds functionality)
  • Refactor (non-breaking change which changes implementation)
  • Messy (mixture of the above - requires explanation!)

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING doc
  • I am making a pull request against the main branch (left side). Also you should start your branch off our main.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@DavidMinarsch
Copy link
Contributor

DavidMinarsch commented Apr 15, 2022

ACN connection not at all used yet, not sure where this should come in

When you send a message into the outbox, it will be automatically routed to the connection if you set default_routing correctly in aea-config.yaml: https://valory-xyz.github.io/open-aea/config/

@DavidMinarsch DavidMinarsch changed the base branch from ACN-message-handler to ACN-service-registry-address April 15, 2022 18:35
Comment on lines +198 to +200
# TODO: update tendermint config here
# use ABCI connection to send info to tendermint server
# - implement `update_validators` endpoint on server
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to implement handling of messages the agent receives, not sure where yet as I have not looked into it.

Copy link
Contributor

@DavidMinarsch DavidMinarsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good progress!

self.context.logger.error(f"Failed processing tendermint response from {address}")

# when all information is collected, update and restart tendermint
if not self.registered_addresses.difference(self.collected):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do guard clause instead, so return if condition not met to avoid nesting

@DavidMinarsch DavidMinarsch merged commit 14b18eb into ACN-service-registry-address Apr 20, 2022
@DavidMinarsch DavidMinarsch deleted the ACN-registration-start-up branch April 20, 2022 17:17
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.

2 participants