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

feat: node api proxy #92

Merged
merged 6 commits into from
Nov 24, 2021
Merged

feat: node api proxy #92

merged 6 commits into from
Nov 24, 2021

Conversation

r4mmer
Copy link
Member

@r4mmer r4mmer commented Oct 11, 2021

Acceptance criteria

  • Implements the api described on the design [Design] Proxy full-node api #83
  • Does not alter parameters passed to the full-node and returns the exact response from the full-node

@r4mmer r4mmer added the enhancement New feature or request label Oct 11, 2021
@r4mmer r4mmer self-assigned this Oct 11, 2021
@r4mmer r4mmer marked this pull request as ready for review October 13, 2021 16:47
Base automatically changed from dev to main October 14, 2021 22:26
@r4mmer r4mmer changed the base branch from main to dev October 29, 2021 15:08
@r4mmer r4mmer force-pushed the feat/node-proxy-api branch from 5abd5b4 to 2f00813 Compare October 29, 2021 15:13
@@ -41,3 +41,39 @@ def get_address_search(
except HathorCoreTimeout:
self.node_api_gateway.blacklist_address(address)
return ADDRESS_BLACKLIST_RESPONSE
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like we are using this same response for a lot of cases, even the ones that are not timeout.

And the variable name does not represent its content Timeout due to too many transaction

Is that right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, the previous response was "This address is blacklisted" but the reason of the blacklist is a timeout due to too many transactions. This message was changed because it is showed to the user on the frontend so it should reflect the actual reason.

Copy link
Contributor

Choose a reason for hiding this comment

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

but the reason of the blacklist is a timeout due to too many transactions

I'm not sure I understand this sentence.

I brought an example from line 18 in this file to make my point clearer:

        if self.node_api_gateway.is_blacklisted_address(address):
            return ADDRESS_BLACKLIST_RESPONSE

I don't understand why in this case we return Timeout due to too many transaction to the user.

Copy link
Contributor

@andreabadesso andreabadesso left a comment

Choose a reason for hiding this comment

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

Other than @luislhl comments, this looks good to me

@r4mmer r4mmer requested a review from luislhl November 23, 2021 17:10
@r4mmer r4mmer merged commit 42dbb74 into dev Nov 24, 2021
@r4mmer r4mmer deleted the feat/node-proxy-api branch November 24, 2021 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants