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

Determine configuration needs for Stacks Foundation instance #43

Closed
4 of 5 tasks
markmhendrickson opened this issue Feb 12, 2021 · 13 comments
Closed
4 of 5 tasks
Assignees
Labels

Comments

@markmhendrickson
Copy link

markmhendrickson commented Feb 12, 2021

This issue is intended to track configuration details for the Stacks Foundation, which will be hosting an instance of the registrar for the community.

  • Estimate STX budget needed for allocation to registrar wallet for at least 1 year of operation
  • Determine whether Hiro PBC needs to transfer ownership of .id.stx address to Foundation
  • Determine what anti-spam measures are available out of the box (or if others are necessary)
  • Determine if we can set up alerts for abnormal runtime behavior (e.g. increased registration rates indicating spam, percentage of % budget spent) to help Foundation monitor maintenance needs
  • Determine if there are any other runtime parameters to configure

In support of leather-io/extension#946

@markmhendrickson
Copy link
Author

@lgalabru Do you have a sense of how much each username should cost for BNS on Stacks 2.0 given your work on it? Per the first task item above and estimating a budget for a year of spend per registration.

@fjl4 @jessesoslow Is it important that we legally transfer ownership of the .id.stx subdomain to the Foundation somehow if they're going to run their registrar with it?

@kantai Does the registrar here come with any anti-spam measures out of the box aside from nameMinLength? I remember we had this in place for Stacks 1.0, but I'm not sure if we laid other measures on top of it as well.

@CharlieC3 @wileyj Will it be possible to set up any standard alerts (e.g. downtime, abnormal traffic) for the Foundation to receive from the mainnet instance?

@CharlieC3
Copy link
Member

Will it be possible to set up any standard alerts (e.g. downtime, abnormal traffic) for the Foundation to receive from the mainnet instance?

@markmhx
For crashes or other non-successful terminations it's relatively easy to trigger an automated email to be sent out. Also if there's an endpoint we can GET or POST to determine general availability, that would be easy to implement as well. But anything more advanced would require more time for us to set up proper log and metric collection on the Foundation's side. It's definitely possible, but it's not like things on Hiro's end where we already have the supporting tools needed for advanced monitoring available.

@lgalabru
Copy link
Member

lgalabru commented Mar 5, 2021

@markmhx It's a per-namespace thing, defining name's prices is up to the owner of the namespace, via a price function (different params: length of the name, precence of vowels, etc). .btc and .id have very different settings.
The BNS contract have a read-only endpoint, that given a namespace and a name, tells you what the cost would be:

(define-read-only (get-name-price (namespace (buff 20)) (name (buff 48)))

I think we have a BNS HTTP endpoint wrapping that function.

@kantai
Copy link
Member

kantai commented Mar 5, 2021

@kantai Does the registrar here come with any anti-spam measures out of the box aside from nameMinLength? I remember we had this in place for Stacks 1.0, but I'm not sure if we laid other measures on top of it as well.

Sort of-- the registrar can be configured with IP rate limiting. It may also be configured to require an API key to validate incoming requests. The API key could be used to place a proxy in front of the registrar to perform more rigorous anti-spam protection (the proxy could require CAPTCHAs, phone verification, whatever).

@markmhendrickson
Copy link
Author

I think we have a BNS HTTP endpoint wrapping that function.

@lgalabru Mind providing a link to the endpoint? We're hoping to use .id.stx here.

@markmhendrickson
Copy link
Author

@aulneau @diwakergupta and @lgalabru helped point me towards this URL for price checking a name:

https://stacks-node-api.testnet.stacks.co/v2/prices/names/bimba.id

This URL loads for me and provides an amount for bimba.id on testnet. However, if I try to get a value for the intended .id.stx namespace, it returns Invalid name:

https://stacks-node-api.testnet.stacks.co/v2/prices/names/bimba.id.stx

Likewise, when I try to query such pricing against mainnet, the path 404s in general:

https://stacks-node-api.mainnet.stacks.co/v2/prices/names/bimba.id
https://stacks-node-api.mainnet.stacks.co/v2/prices/names/bimba.id.stx

Presumably I need to query the last URL listed here for both mainnet and the intended namespace to get an accurate estimate of how much a given username will cost on mainnet for this namespace as registered by the subdomain registrar.

Do we need to simply deploy support for this /v2/prices/names resource to the mainnet instance, and should the .id.stx namespace be queryable there since it's already registered on mainnet?

@Filmaluco
Copy link

Filmaluco commented Jun 9, 2021

@markmhx is there any updates?
Is the .id.stx going to be like the old id.blockstack were we can register with no cost...?
I attempted to register an username with .id.stx on https://registrar.stacks.co/register and got:

{"status":false,"message":"Failed to validate your registration request. Requested subdomain operation is invalid."}

Is the only way to register a username now to to register our subdomain? and handle the costs/maintenance?
or
buy the .id with stacks?

@markmhendrickson
Copy link
Author

This issue is actually stale since we did indeed end up hosting the registrar here at https://registrar.stacks.co/ (and I'll close this issue accordingly, though we can keep chatting about your needs in the comments).

I'm not sure why you'd be seeing that error if you're attempting to register with .id.stx. @hstove do you have any quick take on how could be going wrong here given your previous work on integrating the updated registrar?

@markmhendrickson
Copy link
Author

@asimm241 Might you have any insight into the above error message?

@asimm241
Copy link
Contributor

@markmhx
I'm not so sure. What I can speculate from the code is that
It could be because you are passing an invalid address.
A more plausible explanation is that the name that you're trying to register already exists.
You can check your name here
https://stacks-node-api.stacks.co/v1/names/{subdomain_name}
OR
https://registrar.stacks.co/v1/names/{subdomain_name}
examples:
https://registrar.stacks.co/v1/names/test123456.id.stx
https://registrar.stacks.co/v1/names/test1234.id.stx

@Filmaluco
Copy link

Filmaluco commented Jun 23, 2021

Example that fails @asimm241

--> GET https://stacks-node-api.mainnet.stacks.co/v1/names/blocoiotest1234.id.stx
<-- 404 https://registrar.stacks.co/v1/names/blocoiotest1234.id.stx (1616ms)

{"status":"available"}


Am I missing something here in the POST request? Did the format changed from "legacy"?
The owner address is BTC, should it be STX? but even if that is the case why is the error related with subdomain....

--> POST https://registrar.stacks.co/register
{"name":"blocoiotest1234","owner_address":"1D9hVpGCFRkAi6qmetE386NBy9Uj7tzeVS","zonefile":"$ORIGIN blocoiotest1234.id.stx\n$TTL 3600\n_http._tcp\tIN\tURI\t10\t1\t\"https://gaia.blockstack.org/hub/1D9hVpGCFRkAi6qmetE386NBy9Uj7tzeVS/profile.json\"\n\n"}
<-- 409 https://registrar.stacks.co/register (340ms)

{"status":false,"message":"Failed to validate your registration request. Requested subdomain operation is invalid."}

@asimm241
Copy link
Contributor

Yes, It the

Example that fails @asimm241

--> GET https://stacks-node-api.mainnet.stacks.co/v1/names/blocoiotest1234.id.stx
<-- 404 https://registrar.stacks.co/v1/names/blocoiotest1234.id.stx (1616ms)

{"status":"available"}

Am I missing something here in the POST request? Did the format changed from "legacy"?
The owner address is BTC, should it be STX? but even if that is the case why is the error related with subdomain....

--> POST https://registrar.stacks.co/register
{"name":"blocoiotest1234","owner_address":"1D9hVpGCFRkAi6qmetE386NBy9Uj7tzeVS","zonefile":"$ORIGIN blocoiotest1234.id.stx\n$TTL 3600\n_http._tcp\tIN\tURI\t10\t1\t\"https://gaia.blockstack.org/hub/1D9hVpGCFRkAi6qmetE386NBy9Uj7tzeVS/profile.json\"\n\n"}
<-- 409 https://registrar.stacks.co/register (340ms)

{"status":false,"message":"Failed to validate your registration request. Requested subdomain operation is invalid."}

@Filmaluco Yes it is the problem with BTC address, It should be STX!.
The error says the request is invalid (You provided an invalid address).

@Filmaluco
Copy link

@asimm241 thank you, now I have to implement the STX address, since android does not have it yet .... let's hope its just that so I won't need to bother you anymore :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants