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

GRPC and NotifierConfig update #6744

Open
wants to merge 4 commits into
base: MX-16271-indexing-incoming-tokens
Choose a base branch
from

Conversation

axenteoctavian
Copy link
Contributor

@axenteoctavian axenteoctavian commented Jan 28, 2025

Reasoning behind the pull request

  • GRPC server disabled by default
  • NotifierConfig disabled by default

Proposed changes

  • make GRPC server disabled by default
  • make NotifierConfig disabled by default
  • Enable both services with sovereign deploy scripts

Testing procedure

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@axenteoctavian axenteoctavian self-assigned this Jan 28, 2025
@axenteoctavian axenteoctavian marked this pull request as ready for review January 28, 2025 14:50
@axenteoctavian axenteoctavian changed the title start with disabled grpc server, enable with sovereign deploy scripts GRPC server and NotifierConfig update Jan 28, 2025
@axenteoctavian axenteoctavian changed the title GRPC server and NotifierConfig update GRPC and NotifierConfig update Jan 28, 2025
@mariusmihaic mariusmihaic self-requested a review February 6, 2025 09:05
@@ -39,6 +39,7 @@
]

[OutGoingBridge]
Enabled = false
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also add a comment explaining this, similar to the one from [NotifierConfig] ?

section_found = True
if section_found and "Enabled" in line:
line = re.sub(r'(Enabled\s*=\s*)\w+', r'\1true', line)
section_found = False
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you set this to false since you don't use it afterwards?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will skip the second if and will not check "Enabled" in line every time.

def update_sovereign_config(file_path, main_chain_address, sovereign_chain_address):
with open(file_path, 'r') as file:
lines = file.readlines()

updated_lines = update_subscribed_addresses(lines, "OutgoingSubscribedEvents", "deposit", sovereign_chain_address)
updated_lines = update_subscribed_addresses(updated_lines, "NotifierConfig", "deposit", main_chain_address)
updated_lines = update_subscribed_addresses(updated_lines, "NotifierConfig", "execute", main_chain_address)
updated_lines = enable_key(updated_lines, "OutGoingBridge")
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this do exactly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will set Enabled = true in [OutGoingBridge] section

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