Skip to content

Conversation

@rydurham
Copy link
Contributor

@rydurham rydurham commented Dec 8, 2022

Here are some proposed spelling adjustments. In some cases I might be changing appropriate colloquial usage; let me know if you would like anything reverted.

@rydurham
Copy link
Contributor Author

rydurham commented Dec 8, 2022

The automated check is failing due to MDX linting errors in areas not touched by this PR. I can add the fixes generated by npm run format:mdx to this PR if you would like.

@silence48
Copy link
Contributor

silence48 commented Dec 9, 2022

The automated check is failing due to MDX linting errors in areas not touched by this PR. I can add the fixes generated by npm run format:mdx to this PR if you would like.

I fixed these in 65 already
5c98ded is the commit.

edit: I would not add the npm run format:mdx to the actions as that would make tests always pass since it would format the code in the test... you should run npm run format:mdx prior to doing your pr generally, but i was commenting I had already fixed the code example errors that was causing prettier to fail in [65]

Copy link
Contributor

@silence48 silence48 left a comment

Choose a reason for hiding this comment

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

the only thing i see that gave me pause was the change of 'homedomain' to 'home domain' because in the linked code example homeDomain is a variable name and the name used in the xdr on to submit it to the ledger.

All the other changes look needed.

- Add `NODE_IS_VALIDATOR=true` to your configuration file

If you want other validators to add your node to their quorum sets, you should also share your public key (GDMTUTQ... ) by publishing a stellar.toml file on your homedomain following specs laid out in [SEP-20](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0020.md).
If you want other validators to add your node to their quorum sets, you should also share your public key (GDMTUTQ... ) by publishing a stellar.toml file on your home domain following specs laid out in [SEP-20](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0020.md).
Copy link
Contributor

Choose a reason for hiding this comment

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

homedomain is the name of the option in the sdk and the name of the data entry.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would remove this suggestion then

Copy link
Contributor Author

@rydurham rydurham Dec 10, 2022

Choose a reason for hiding this comment

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

That same sections refers to an environment variable NODE_HOME_DOMAIN which does separate those two words. To my ear "home domain" make more sense in this context.

However it is mentioned as "homedomain" in SEP-20 so I have now reverted it here.

---

_Stellar Anchors_ are the on/off ramps of the Stellar network: they accept deposits of fiat currencies (such as USD, CNY, and BRL) via existing rails (such as bank deposits or cash-in points), and send a user the equivalent digital tokens representing those deposits on the Stellar network. On the flipside, they allow holders to redeem those tokens for the real-world assets they represent. To read more about the kinds of things you can do with digital fiat currency, check out [this explainer](https://www.stellar.org/learn/the-power-of-stellar).
_Stellar Anchors_ are the on/off ramps of the Stellar network: they accept deposits of fiat currencies (such as USD, CNY, and BRL) via existing rails (such as bank deposits or cash-in points), and send a user the equivalent digital tokens representing those deposits on the Stellar network. On the flip-side, they allow holders to redeem those tokens for the real-world assets they represent. To read more about the kinds of things you can do with digital fiat currency, check out [this explainer](https://www.stellar.org/learn/the-power-of-stellar).
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove hyphen and make it "flip side"

This call is actually a part of [SEP-0010](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md), which allows us to verify ownership of a user's public key so the Anchor knows the deposit request is coming from a valid entity. You don’t want someone else issuing deposit requests on your account, so to prove you control the Stellar account request the deposit, you sign a dummy authentication transaction and send it to the Anchor's web auth server. The server responds with a JWT token, which will be used to verify all further API calls to the anchor. For more info on how this works, check out the user authentication from an [Anchor's point of view](../../anchoring-assets/enabling-deposit-and-withdrawal/setting-up-test-server.mdx#authentication).
The endpoint for creating an authenticated user session is specified the `WEB_AUTH_ENDPOINT` on an Anchor's stellar.toml file. The first thing our wallet does is make a GET request with a public `account` param which will send back an unsigned Stellar transaction for that account that has in invalide sequence number, so it doesn't actually _do_ anything when submitted to the network. In response you’ll sign that transaction on behalf of the user and POST it back. If the signature checks out, the success response will contain an Authorization Bearer header JWT which you’ll want to store and use for all future interactions with the Anchor.
The endpoint for creating an authenticated user session is specified the `WEB_AUTH_ENDPOINT` on an Anchor's stellar.toml file. The first thing our wallet does is make a GET request with a public `account` param which will send back an unsigned Stellar transaction for that account that has in invalid sequence number, so it doesn't actually _do_ anything when submitted to the network. In response you’ll sign that transaction on behalf of the user and POST it back. If the signature checks out, the success response will contain an Authorization Bearer header JWT which you’ll want to store and use for all future interactions with the Anchor.
Copy link
Contributor

Choose a reason for hiding this comment

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

While we're at it, let's change to "an invalid" instead of "in invalid"

Stellar is a self-serve distributed ledger that you can use as a backend to power all kinds of apps and services. It has built-in logic for creating accounts, signing transactions, and tracking balances, and anyone can use it to issue, store, transfer, and trade assets. Since many of those assets connect to real-world currencies, and since there are open protocols for integrating deposit and withdrawal of those assets, a Stellar-based app can take advantage of real banking rails and connect to real money.

Currently, developers use Stellar to power cross-border payment apps, currency exchanges, micropayment services, and platforms for in-game purchases, but what you build — and how you build it — is up to you. At its core, though, any app built on Stellar relies on the same basic functions: key storage, account creation, transaction signing, and queries to the Stellar database. To make things easy, and to stick with common parlance, we’ll call the part of an app that implements those core functions a _wallet_. This section of the docs will walk you through the process of building one.
Currently, developers use Stellar to power cross-border payment apps, currency exchanges, micro-payment services, and platforms for in-game purchases, but what you build — and how you build it — is up to you. At its core, though, any app built on Stellar relies on the same basic functions: key storage, account creation, transaction signing, and queries to the Stellar database. To make things easy, and to stick with common parlance, we’ll call the part of an app that implements those core functions a _wallet_. This section of the docs will walk you through the process of building one.
Copy link
Contributor

Choose a reason for hiding this comment

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

We typically don't hyphenate micropayment, we can remove this suggestion

## Notable SEPs

There are many SEPs, and they cover a wide variety of standards for interoperation. Whatever you're building, you may want to take a look at the complete list to see if there's a standard for your use case.
There are many SEPs, and they cover a wide variety of standards for inter-operation. Whatever you're building, you may want to take a look at the complete list to see if there's a standard for your use case.
Copy link
Contributor

Choose a reason for hiding this comment

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

We typically don't hyphenate interoperation or any of its forms, we can remove this suggestion

</CodeExample>

We assume the existence of a sleep implementation similar to the one [here](https://stackoverflow.com/a/39914235) Be sure to integrate backoff into your retry mechanism. In our example error-handling code above, we implement a simple linear backoff, but there are [plenty of recommendations](https://backoff-utils.readthedocs.io/en/latest/strategies.html#why-are-backoff-strategies-useful) for various other strategies. Backoff is important both for maintaining performance and avoiding rate-limiting issues.
We assume the existence of a sleep implementation similar to the one [here](https://stackoverflow.com/a/39914235) Be sure to integrate back-off into your retry mechanism. In our example error-handling code above, we implement a simple linear back-off, but there are [plenty of recommendations](https://backoff-utils.readthedocs.io/en/latest/strategies.html#why-are-backoff-strategies-useful) for various other strategies. Back-off is important both for maintaining performance and avoiding rate-limiting issues.
Copy link
Contributor

Choose a reason for hiding this comment

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

@ElliotFriend what do you think of this one?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like backoff is the more common usage across various projects/products. I think we can remove this suggestion.

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 has now been reverted. Thanks!

@briwylde08
Copy link
Contributor

Thanks for these. Commented on a couple to be removed and want some other eyes on a couple of others.

@briwylde08
Copy link
Contributor

@tyvdh can you see why this is failing the MDX linting check aka the bane of my existence?

@silence48
Copy link
Contributor

silence48 commented Dec 9, 2022

@tyvdh can you see why this is failing the MDX linting check aka the bane of my existence?

i fixed that linting check failure in [65] it was just some small things in code examples.

In the future if you start getting failing checks run npm run format:mdx and it should pretty print. (you still have to commit the changes after that)

The other warning about the deprecated command shouldn't cause failures.

Copy link
Contributor

@silence48 silence48 left a comment

Choose a reason for hiding this comment

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

the new changes make sense to me!

@briwylde08 briwylde08 merged commit a1b47de into stellar:main Dec 13, 2022
@rydurham rydurham deleted the small_spelling_adjustments branch December 13, 2022 21:04
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.

4 participants