Skip to content

Get faucet url from envvar or resolve srv record #1000

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

Merged
merged 4 commits into from
Feb 3, 2021

Conversation

pnowosie
Copy link
Contributor

@pnowosie pnowosie commented Feb 2, 2021

SRV record is set (thanks to @Wiezzel who figured it out).

 nslookup -type=SRV _zk-faucet._tcp.dev.golem.network
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
_zk-faucet._tcp.dev.golem.network	service = 10 10 5778 yacn.dev.golem.network.

Authoritative answers can be found from:

Testing shows that SRV record is resolved only to hostname & port
2021-02-03T07:29:38Z INFO faucet_srv] Resolved faucet host: "yacn.dev.golem.network:5778"

Assumptions

For now I'm taking the following assumptions (tech debt)

  • all other zk-sync faucets we provide via SRV would end with zk/donatex
  • environment variable ZKSYNC_FAUCET_ADDR value is taken as is without any changes

Tests

Run withdrawal example with log level debug. Example of [successful withdrawal].

[2021-02-03T08:11:17Z DEBUG ya_utils_networking::srv_resolver] Resolved address: yacn.dev.golem.network:5778
[2021-02-03T08:11:17Z DEBUG ya_zksync_driver::zksync::faucet] Faucet url: http://yacn.dev.golem.network:5778/zk/donatex/0x19a2...6df3

@pnowosie pnowosie marked this pull request as ready for review February 2, 2021 13:24
@pnowosie pnowosie requested review from a team February 2, 2021 13:24
Copy link

@Wiezzel Wiezzel left a comment

Choose a reason for hiding this comment

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

Reviewed & tested. OK ☑️
Please change PR base to payments/beta-1

@pnowosie pnowosie changed the base branch from release/v0.6 to payments/beta-1 February 3, 2021 10:32
@pnowosie pnowosie merged commit 5954334 into payments/beta-1 Feb 3, 2021
@pnowosie pnowosie deleted the pnowosie/pay-132-faucet-domain-name branch February 9, 2021 17:35
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.

3 participants