GithubHelp home page GithubHelp logo

stellar / stellar-docs Goto Github PK

View Code? Open in Web Editor NEW
35.0 24.0 84.0 47.31 MB

Documentation for Stellar

Home Page: https://developers.stellar.org

License: Apache License 2.0

JavaScript 1.62% SCSS 0.23% Dockerfile 0.04% Makefile 0.02% Shell 0.01% TypeScript 2.32% Mustache 0.03% MDX 95.14% CSS 0.59%

stellar-docs's Introduction

Stellar Documentation and API Reference

Welcome to the official home repository for Documentation for the Stellar network.

Table of Contents

Contributing

Contributions are more than welcome! Thank you! 🎉

Before diving in, please read our Stellar Contribution Guide for details on contributing to Stellar's various repositories. Please take special note of the code of conduct.

Our documentation site is built using Docusaurus. The content is written in MDX, which adds a lot of cool possibilities. Even if you're unfamiliar with plain markdown, do not fear! You can still contribute in a helpful and meaningful way. Markdown is super easy to learn, and will come quite naturally after only a bit of practice. You can always help fix typos, spelling, and broken links, too.

You can contribute to the docs in several ways:

  • See something that needs to be fixed in the docs, like an error in the code or a typo? File a pull request (PR) proposing to correct the error;
  • Think there is helpful content missing from the docs, like a specific how-to guide or piece of explanatory content? File an issue explaining what you’d like to see (be sure to search existing issues to avoid duplication);
  • Have an idea that could make the docs better, like a structural change or a new section idea? File an issue explaining what you’d like to see (these will be added to the Ideas section on the Dev Docs board for discussion);
  • Want to complete an existing issue? Search through the issues to find something to work on! Issues without an assignee and labeled as a “Good First Issue” or with “Help Wanted” are great places to start! Once you’ve selected an issue to work on, file a PR with your proposed fix.

No matter what you contribute, whether a PR or an issue, you can expect to receive a response from docs maintainers within one week.

  • PRs need to be reviewed and approved before merging. Look for either an approval or a follow-up question.
  • Issues will be prioritized, labeled, and assigned (if possible). You can check the status of your issue on the Dev Docs board. The status of issues according to the column is:
    • Ideas: these issues are being actively discussed. Ideas will either be discarded or repurposed into an actionable issue and added to the queue within three weeks.
    • Backlog: these issues are not prioritized or actively being worked on.
    • To Do: these issues are prioritized and will be worked on soon.
    • In Progress: these issues are currently being worked on.
    • Blocked: these issues are being worked on but are blocked for some reason and need attention.
    • Done: these issues have been completed and can be closed.

If you have questions, feel free to ask in the Stellar Developer Discord.

Quick Start

Open in GitHub Codespaces Open in Gitpod

To begin development on the documentation, you will first need yarn installed on your system. Once it is, you can run the following commands:

git clone https://github.com/stellar/stellar-docs
cd stellar-docs
yarn install
npx docusaurus start

This will begin the development server, and open a browser window/tab pointing to http://localhost:3000/docs/. This development server will auto-reload when it detects changes to the repository.

After you've made your changes, please use prettier to ensure consistent formatting throughout the repository:

npm run check:mdx # this will search for problems in the MDX files
npm run format:mdx # this will fix any problems that were found

Repository Structure

  • /docs/ Contains all the documentation content. If you're contributing to the actual documentation, rather than site functionality, this is likely where you will want to be.
    • /docs/<subdirectory>/ Each subdirectory inside the docs directory contains content documents relating to a common idea (asset issuance, or running a validator node, for example). There can also be subdirectories nested even further, which will follow the same rules. The location of a document within this directory structure will have a direct impact on the URL given to the document on the site (unless there is metadata or front matter that overrides these defaults.)
    • /docs/<subdirectory>/_category_.json This file contains information that determines the directory's location and position within the site's sidebar.
    • /docs/<subdirectory>/<filename>.mdx The actual documents live in these files (written in Markdown), and also contains "front matter" which can specify configuration parameter for the document's display, URL, etc. All filenames must use dashes for spaces instead of spaces or underscores
  • /src/ Contains non-documentation files like custom React components and styling.
  • /static/ Contains static assets. Anything in this directory will be copied to the root of the final build directory.
  • /nginx/ Contains configuration used to deploy and host the docs site. Unless you're part of Stellar's IT Ops team, you probably don't need to do anything with this. Exception:
    • /nginx/includes/redirects.conf Contains redirect rules to avoid broken links. If you find a broken link somewhere out in the wilds of the internet, and there's no way for it to be changed, a redirect could be a useful tool. (Note our aim isn't to completely avoid 404 pages for a user. That would be impossible and impractical. These redirects are evaluated on a case-by-case basis, and it may be determined that a redirect isn't the right approach in some instances.)

Using Markdown

Markdown Basics

If you're unfamiliar with Markdown, there are loads of good tutorials and cheat sheets out there. Check out some of these resources to get a handle on the basics:

Custom Markdown

Our repository uses some custom React components that can be used inside the MDX documents. Use them as follows:

Make sure that there is an empty line within the wrapper. For example,

<Alert>
<!-- EMPTY LINE AFTER THE COMPONENT'S OPENING TAG IS REQUIRED -->

Note: the testnet is reset every three months, so when building on it, make sure you have a plan to recreate necessary accounts and other data. For more info, check out the [best practices for using the testnet](../../learn/fundamentals/networks.mdx).

<!-- EMPTY LINE BEFORE THE COMPONENT'S CLOSING TAG IS REQUIRED -->
</Alert>

Alert

Testnet reset alert

<Alert /> is used to convey hints, warnings, etc. For example, Build a SEP-31 Anchor on Testnet

import { Alert } from "@site/src/components/Alert";

<Alert>

Note: the testnet is reset every three months, so when building on it, make sure you have a plan to recreate necessary accounts and other data. For more info, check out the [best practices for using the testnet](../../fundamentals-and-concepts/testnet-and-pubnet).

</Alert>

Code Example

Create account code example

<CodeExample /> is a code snippet component. You can include snippets for more than one language. See an example including a snippet for JavaScript and Python below. It is using Prism React Renderer for syntax highlighting.

import { CodeExample } from "@site/src/components/CodeExample";

<CodeExample>

```js
// create a completely new and unique pair of keys
// see more about KeyPair objects: https://stellar.github.io/js-stellar-sdk/Keypair.html
const pair = StellarSdk.Keypair.random();

pair.secret();
// SAV76USXIJOBMEQXPANUOQM6F5LIOTLPDIDVRJBFFE2MDJXG24TAPUU7
pair.publicKey();
// GCFXHS4GXL6BVUCXBWXGTITROWLVYXQKQLF4YH5O5JT3YZXCYPAFBJZB
```

```python
# stellar-sdk >= 2.0.0 required
# create a completely new and unique pair of keys
# see more about KeyPair objects: https://stellar-sdk.readthedocs.io/en/latest/api.html#keypair
from stellar_sdk import Keypair

pair = Keypair.random()
print(f"Secret: {pair.secret}")
# Secret: SCMDRX7A7OVRPAGXLUVRNIYTWBLCS54OV7UH2TF5URSG4B4JQMUADCYU
print(f"Public Key: {pair.public_key}")
# Public Key: GAG7SXULMNWCW6LX42JKZOZRA2JJXQT23LYY32OXA6XECUQG7RZTQJHO
```

</CodeExample>

Languages that are currently being used in Documentation and API Reference are below:

// https://github.com/stellar/stellar-docs/blob/main/src/components/CodeExample.js

const CODE_LANGS = {
  bash: 'bash',
  cpp: 'C++',
  curl: 'cURL',
  go: 'Go',
  html: 'html',
  java: 'Java',
  javascript: 'JavaScript',
  js: 'JavaScript',
  json: 'JSON',
  json5: 'JSON5',
  python: 'Python',
  scss: 'SCSS',
  toml: 'TOML',
  ts: 'TypeScript',
  tsx: 'TSX',
  typescript: 'TypeScript',
  yaml: 'YAML',
};

stellar-docs's People

Contributors

acharb avatar alejomendoza avatar briwylde08 avatar christian-rogobete avatar danasacco avatar dmkozh avatar elliotfriend avatar fnando avatar ifropc avatar jakeurban avatar janewang avatar jesmarsc avatar jiahuiwho avatar kalepail avatar leighmcculloch avatar marcelosalloum avatar marwen-abid avatar mazurakihor avatar miguelnietoa avatar mollykarcher avatar namankumar avatar philipliu avatar piyalbasu avatar rice2000 avatar rydurham avatar saugaatallabadi avatar shaptic avatar sisuresh avatar tamirms avatar torisamples avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stellar-docs's Issues

Add guidelines on data storage model

(as per discussion with @tomerweller) It would be nice to have some guidelines on storing large sets of data on chain. For example, when storing a list of accounts, it's not immediately obvious that a scalable approach is to have each individual account as a separate key (instead of having one key "accounts" and a list as a value). An explanation that each key-val pair creates a ledger entry in core that is strictly limited in size would also be helpful.

Create a tutorial for `integration testing` multiple contracts

What

Create a tutorial dedicated to the topic of integration testing multiple contracts together in a test.

Why

We demonstrate testing of contracts in most examples. A couple examples involve multiple contracts and also happen to demonstrate how to run integration tests where multiple contracts are in use during the test.

However, if a developer was wanting to learn how to specifically do integration testing, gazing at our docs they would probably come to the conclusion it isn't supported as there is no tutorial focused on that topic alone.

Given it is an important topic, and a topic we have good support for, we would benefit from a tutorial that focuses solely on that.

Scope

There are two ways to run integration tests, and both should be demonstrated in a tutorial:

  • The "wasm" way

    The primary contract being tested is loaded natively with dependencies loaded as .wasm. The primary could also be loaded as wasm.

    Good for:

    • dependencies that are not tightly coupled to the primary
    • dependencies not developed in close proximity to the primary
    • when the source of the dependency is unavailable
    • when the source of the dependency is not trusted
    • when the test is testing an old version, or variety of versions, of a dependency

    Benefits:

    • verifies exact on chain behavior of any contract loaded as wasm
    • avoid complexity that arises from importing contracts into rust/cargo projects
  • The "native" way

    The primary contract and dependencies are compiled natively as part of building the test. This requires having the source, and importing the dependency into the primary's Rust project.

    Good for:

    • dependencies that are tightly coupled to the primary and developed in close proximity
    • when the source is available and trusted
    • when testing against only a single version of a dependency

    Benefits:

    • step through debugging possible through dependencies
    • smooth development of tightly coupled multi-contract products

Both ways can be used together where tests have some dependencies as wasm and some native.

Related docs

We have a fuzz testing tutorial that was added in stellar/soroban-docs#486 (thanks @brson). Fuzz testing situations that require multiple contracts to be loaded into the VM benefit from the native testing approach, as it allows the fuzzer to identify inputs that cause branches in logic of dependencies which will help the fuzzer get increased code coverage. When we add the integration test page, we should link to the section on native testing from the fuzz testing docs.

Create a `cost analysis` tutorial / resource

We don't currently have a page that talks concretely and practically with examples for how to evaluate the cost of a contract, and how to improve the efficiency of contract functions.

This page should probably be in the form of a tutorial with a concrete example of how to view the cost of executing a contract function, then making a change to improve the efficiency of the contract, then re-running the contract and viewing the improved cost.

The tutorial should ideally touch on the derived cpu/mem costs as well as the individual costs that lead to the derived values, so that folks know how to identify where their costs are coming from.

Horizon containerization best practices

What problem does your feature solve?

Partner Experience initiative - Not much direction is provided in Running docs for how best to configure horizon and it's supporting infrastructure as containers, rather settings are documented individually and left to user to figure out best combinations.

What would you like to see?

Provide updated copy under the Running section, it should provide opinionated directions(and brief reason why) to informs reader on how they can deploy horizon in containers:

What should the containerization boundaries look like, should postgresql be internal to the same container as horizon?
Should a watcher core node be in same container as horizon?
How should command line parameters be passed to the horizon container, as environment variables?
When, where and how should shared external volumes be defined on any containers to enable larger storage requirements(most containers only get like 32G or less for default ephemeral storage).

Update the dockerfiles at https://github.com/stellar/go/blob/master/services/horizon/docker, consider adding a new examples directory with new Dockerfile(s) that codify the recommendations here in docs.

What alternatives are there?

Add example usage for various common JavaScript utilities

What problem does your feature solve?

There is a lack of "discoverability" for certain helpers and features in the JavaScript SDK.

People ask questions on Discord frequently about things that are very easy to do if you know about them, but knowing about them requires unnecessarily intimate knowledge about the SDK. Now that it has stabilized, we should take the time to raise the visibility of these helpful devX features.

What would you like to see?

Like with State Expiration, there should be brief demonstrations of how things are done via the JS SDK. Here's a non-exhaustive list:

What alternatives are there?

A lot of this already exists in example dapps and other "fully featured" demos, but this hurts discoverability and ramping up for new users.

Merge horizon partner_experience branch back into main

We're nearing the end of all the content that we want to produce in the partner_experience branch. We should:

  • PR the merge back to main
  • Get internal team review + suss out any additional things we want to add
  • Engage docs/tech writing for a final copy/formatting/etc pass

Horizon Ingestion docs consolidation

What problem does your feature solve?

Horizon ingestion docs refer to many aspects of ingestion with variations of configuration, approach, and references to command line flag, environment variables some of which have become obsolete or not relevant. It may lead to confusion or un-necessary steps for readers.

What would you like to see?

Horizon ingestion docs are updated to present smaller copy, with direct, opinionated writeup on what/why ingestion is needed, the best strategy to follow for desired outcome, and concise updated examples of using the latest(and least number of) command line flags and config variables.

Review state verification and history retention(reaper) aspects and concise configuration examples to achieve.

Mention how to use ingestion filtering. Include concise configuration examples of Asset and Account filter rules and how there outcomes affect data stored in history.

Discuss the need to use captive core mode of ingestion only, and the config settings for ensuring on-disk usage.

Should we mention trying to do full history or discourage that in docs with explanation and recommend using DataWarehouse/Hubble for those concerns?

What alternatives are there?

Horizon upgrade best practices

What problem does your feature solve?

No copy present in current docs https://developers.stellar.org/docs/run-api-server/ for how to upgrade a recent installed horizon to newer version. There is copy on migrating from 1.x which is obsolete now?

What would you like to see?

  • Rename Migrating from 1.x menu to be 'Upgrade', and repurpose the right hand side page content:
    • How does user verify if state rebuilds will be triggered?
    • How does user know if database schema upgrades will be triggered and for how long?
      • Changelog usually mentions if db schema changed and expected duration of the new migrations step added ...
      • What mechanisms or cli tricks are available to check if a schema migration will be triggered from current to new?
        • install new horizon on a machine that has access to db, don't start it, just run horizon db migrate status ... what else is better to do here?
    • Describe how db schema migration is invoked automatically by horizon at start up, are there any command line flags that affect or related to this upgrade behavior? I.e. if ingest=false, it skips attempting schema upgrades and just starts web server.
    • What are recommended pre-upgrade steps:
      • determine if a new version of horizon will trigger a schema update
      • back up db
      • multi-instance deployment considerations, rolling upgrades, if helm this is managed.

What alternatives are there?

Horizon config section for more opinionated best practices

What problem does your feature solve?

Partner Experience initiative - consolidate horizon config docs section, review and update/refactor the copy to be lighter footprint but with more opinionated direction towards a single group of settings to enable user's to quickly get through it and have a decent running system afterwards, rather than documenting all settings individually and letting the user figure out how to group/associate them:

How much history should they retain?
Should they use in-memory or on-disk mode?
How often should they run state verification? Use the new config params …
What version of postgresql should they run?
How often (hopefully, never) do they need to manually vacuum their db?

What would you like to see?

Updated copy on horizon config in https://developers.stellar.org/docs/run-api-server/configuring

What alternatives are there?

Bigger callout to Dev Discord and Stack Exchange in footer of docs

What problem does your feature solve?

Helps docs users get help faster when navigating through the docs.

What would you like to see?

A footer at the bottom of the page that says something like: "Questions? Ask in the Stellar Developer Discord or Stellar Stack Exchange"

What alternatives are there?

Add back tutorials using stellar/quickstart

It looks like at some point we've lost tutorials and instructions for how to use quickstart in the main soroban docs. We used to at an early point in the getting started guide help folks run their contracts on their own private network using the stellar/quickstart image.

What I see today is no mention of it, instead only using testnet:

Screenshot 2023-11-01 at 4 37 13 PM

Ref: https://soroban.stellar.org/docs/getting-started/deploy-to-testnet

I think really early on in the developer journey we need to expose them to quickstart. It ideally should be step 3 in this flow. Quickstart is faster to develop against, albeit with some additional setup cost.

We should definitely promote testnet at the same points to and let folks hitup testnet directly. But still include quickstart as the recommended place to test and run contracts.

Create a `Transaction Lifecycle` resource

We're getting a lot of questions that relate to the transaction lifecycle and don't have a great resource to send people to.

The regular Stellar resources are confusing because (a) they don't have any information on preflight and (b) soroban-rpc's tx submission is async

Horizon metrics usage

What problem does your feature solve?

Not much insight is given on metrics published by horizon in docs. https://developers.stellar.org/docs/run-api-server/monitoring

What would you like to see?

Update https://developers.stellar.org/docs/run-api-server/monitoring.
Add More details on the metrics that are published, do they follow a standard such as OpenMetrics or just Prometheus?
Provide details on main family/grouping of metrics keys available.
What are the prometheus server settings to scrape metrics from horizon?
What config settings to horizon if any for metrics? best practices here.
Reference to some links of sample Grafana dashboards that have queries against the horizon metrics keys to demonstrate what's possible.

What alternatives are there?

Stellar-core install instructions: add package instructions

The docs state that stellar-core can be installed from Ubuntu packages, but don't provide any instruction on how to do that, or what the custom apt repo is.

I think we should tell people what they need to do to configure the Stellar apt repo, as well as how to install the packages if we're discussing the package installation method here.

## Package-based Installation
If you are using Ubuntu 18.04 LTS or later, we provide the latest stable releases of [stellar-core](https://github.com/stellar/stellar-core) and [stellar-horizon](https://github.com/stellar/go/tree/master/services/horizon) in Debian binary package format.
You may choose to install these packages individually, which offers the greatest flexibility but requires **manual** creation of the relevant configuration files and configuration of a **PostgreSQL** database.

Deprecated method 'Network.useTestNetwork()` in documentation

What version are you using?

Latest docs online (main-branch).

What did you do?

The JS example for the channel-accounts documentation uses an outdated method Network.useTestNetwork().

What did you expect to see?

Usage of up-to-date code in example-snippet (as suggested in #34).

What did you see instead?

Usage of outdated code in example snippet:
grafik

Update Java SDK snippet for Transaction building to use latest sdk release

What version are you using?

latest docs

What did you do?

the docs use java sdk snippets that are pre-protocol 19 changes, after that the Transction build and submit class interfaces have changed a bit with preconditions, etc. community members are getting a bit confused to still see the old examples in these docs.
https://discord.com/channels/897514728459468821/921506043966656552/1009105031724802069

What did you expect to see?

latest java.sdk, 0.37 class interfaces used for Transaction building/submit example code snippet.

What did you see instead?

older java.sdk, 0.31 and earlier class interfaces used for Transaction building/submit example code snippets in docs.

First Bug

What version are you using?

What did you do?

What did you expect to see?

What did you see instead?

Tasks

No tasks being tracked yet.

Tasks

No tasks being tracked yet.

Add guides

I think need to add a "Guides" section that provide education about how to do certain things at a higher level, and across a broader set of tools including wallets.

Right now the docs are really narrowly focused on specific areas. At the moment only one area: building the contracts themselves. Soon another narrow area: building dapps.

We don't have any documentation that tackle the bigger topics that @tyvdh has been highlighting need addressing:

  • Asset issuance and management
  • Using assets across Stellar and Soroban

The idea with the Guides is that they form higher level education, but are still focused on step-by-step instruction.

These guides ideally need to cover some categories, and within those categories there are specific more narrow tasks we need to be teaching:

  • Category: Asset Issuance
    • How to issue an asset on Stellar
    • How to create a token on Soroban for that asset
    • How to mint
    • How to burn / clawback
  • Category: Asset Use
    • How to import / export
    • How to make payments
    • ?

I imagine there are many more topics than this, so anyone is welcome to please update this list.

cc @tomerweller @tyvdh

Option type missing from docs

It is not clear how to represent a Rust Option type in XDR. The custom-types documentation does not include any information about Option types.

Also, it would be helpful to have more tooling or at least a link to a reference implementation which converts Soroban types into their corresponding XDR structures. Otherwise, you are left guessing at how values should be encoded as SCVals.

Change address

What version are you using?

What did you do?

What did you expect to see?

What did you see instead?

soroban-by-example.org

Placeholder issue for building ???-by-example.com website to teach new devs how to write stellar contracts.
Inspired by: https://solidity-by-example.org, and https://gobyexample.com. Largely, this depends on a lot of example contracts, building up from hello world, to complex defi examples.

TODO

  • Figure out a name/domain
  • Create a repo for that and convert these to issues there.
  • Plan the different examples and how they fit together
  • Start writing example contracts
    • Paul: IMO, it would be nice to follow a "jupyter-notebook" or "literate code" style here where we have snippets of code, with lots of explainer text and examples mixed in.
  • Make the code runnable "live" in-line in the browser 🤯

Revisit a way to automate and/or verify the rpc docs

What problem does your feature solve?

We might forget to update the docs to match as we change soroban-rpc.

What would you like to see?

Automatic generation or at least verification that the docs match the API as expected. This is an "eventually" wishlist item following on from stellar/soroban-docs#247, where there is some previous work linked.

What alternatives are there?

Do it manually

Add docs for how to test contract consistency and sdk/env/protocol upgrades

As identified in stellar/rs-soroban-sdk#1095 and further discussed in stellar/rs-soroban-sdk#1082 we need docs, and maybe a tutorial, for how to test contract consistency overtime. We need docs that discuss the concepts and importance of this as much as we need tutorials.

The docs need to emphasize the importance of this.

If we add a tutorial, or multiple tutorials, some options would be:

  • A tutorial that shows how to write integration tests that test a contract with multiple versions of an sdk, env, or protocol.
  • A tutorial that shows how to use test snapshots to verify that contract behavior is not changing.

Calling contract with arguments documentation

The docs does not shows how to pass arguements to contracts method via the soroban js client.

It has only one scenario of a contract method call without arguments.

Could anyone assist me with how to pass arguements to a contract method via the soroban js client.

getLedgerEntries: add meaningful coding examples

The getLedgerEntries method is pretty powerful, you can retrieve any piece of state from the ledger: accounts, trustlines, offers, data, liquidity pools, contract wasms, contract instances, contract storage, yada yada.

However, there are two challenges associated with that:

  1. building the relevant xdr key for the type of ledger entry you're looking for
  2. parsing the xdr result

However, our coding examples use pre-built keys and don't parse the results. I think that modifying our JS and Python examples in this page to include these can help unlock human potential

Tasks

Update `create-an-app` article with new CLI version

The "Create An App" article has some instructions regarding the soroban contract bindings command in v0.9.4.

Assuming those caveats and workarounds are no longer needed, we should update/modify/remove language here as necessary to reflect the new release.

@chadoh Can you update this page as needed? If you don't have time with Meridian coming up, I can get a PR started for you to review?

Streamline events related content

These are the following resources about events

  1. Events (Basic Tutorials): a guide on publishing events targeting contract developers
  2. Events (Fundamentals and Concepts): contains two parts. The first describes events under the txmeta hood, targeting a fairly advanced audience. The second is an explanation on diagnostic events without going to specifics.
  3. getEvents json-rpc reference

I suggest the following changes:

  1. Add a Consuming Events section at the end of the Events basic tutorial that demonstrated querying the RPC service for the events emitted in the tutorial.
  2. Kill the Events fundamentals and concepts section. Digging into the txmeta is not something that we do elsewhere in the docs and seems a bit more confusing than beneficial, especially since we expect people to consume events through the rpc's getEvents method
  3. Add a Diagnostic Events reference section that outlines all known diagnostic events
  4. Add a reference in the Debugging section on using diagnostic events and link to the reference from it

Horizon compute pre-requirements

What problem does your feature solve?

The https://developers.stellar.org/docs/run-api-server/prerequisites has a lot of information, some duplication and obsolete facets may be present and may be difficult for readers to make correct conclusions for current day horizon capabilities.

What would you like to see?

Simplify/condense compute requirements tables stated for catch-up and real-time ingestion down to single section for horizon and db. Follow a more opinionated stance to reduce the amount of overall content, try to avoid explaining all settings individually, instead just state the combination that is recommended and why.

Focus recommendation towards `on-disk mode of captive core and don't mention in-memory settings. Describe why IOPSon the volume used to host captive core db needs to be fast SSD, and highest IOPS can afford, bare min of at least 3k r/w a second.

Mention ballpark estimates on how much it will be expected to cost in terms of compute, for those considering a cloud deployment.

What alternatives are there?

TeX doesn't render

On pages like this one, there is use of LaTeX syntax for math, but it does not render correctly. It's probably missing a MathJax script?

cross contract calls: document the non panicking version

Our current cross contract call example panics when the called contract panics.

However, often times the calling contract would be interested in handling the error, rather than panicing. It would be beneficial to either add this to our existing cross contract how-to or potentially somewhere else.

For example, instead of this call, which will panic when add() panics:

let client = contract_a::ContractClient::new(&env, contract_id);
client.add(&x, &y)

We can introduce something like this call, which will return 0 when add() panics:

let client = contract_a::ContractClient::new(&env, contract_id);
client.try_add(&x, &y).unwrap_or(Ok(0)).unwrap()

Docs: comparison with other systems

I was chatting with a friend today and I showed them the soroban docs and they said they wanted to know how it compared to other smart contract platforms, especially wasm-based ones (cosmwasm, solana, elrond, etc.)

I think this would be a useful thing to add to the learn section, for people who want a quick summary and don't want to have to build a mental model of all the systems from the bottom up.

Docs: Claim Claimable Balance page not clear about required trustline (for non-native assets)

What version are you using?

Latest public docs site:
https://developers.stellar.org/docs/encyclopedia/claimable-balances#claim-claimable-balance

What did you do?

We were running into "op_no_trust" issues when attempting to claim an asset that destination account did not trust. We incorrectly assumed that claiming a claimable balance would also establish a trustline, but were incorrect. Clearer messaging about this in the docs would have saved us some time and trial/error.

The above linked page implies this, but it could be more explicit:

The balance on the entry will be moved to the source account if there are no limit or trustline issues (for non-native assets).

What did you expect to see?

A note underneath that line that says something to the effect of:

For non-native assets, claimant account must have a trustline to the asset or claim will result in op_no_trust error.

What did you see instead?

No mention in the docs (that I could find) where it says a trustline must first be established before a balance can be claimed (for non-native assets).

Integrate Stellar CLI docs into Consolidated Developer Docs

Integrate CLI docs into Consolidated Developer Docs, making them searchable and easily accessible

Tasks

Documentation for including failed data references the wrong key

What did you do?

The include_failed parameter on various endpoints, such as transactions and operations, is documented as includefailed.

Example: https://developers.stellar.org/api/resources/get-operations-by-account-id

What did you expect to see?

The parameter key should be include_failed.

What did you see instead?

The documentation reflects it as includefailed.

Using the parameter as documented doesn't work

With include_failed: https://horizon.stellar.org/accounts/GBFVU7QY6EMTYSF3WKH54CO5CE46BC72HOKZBBXH5YBJBLDVT3RNSNM2/operations?cursor=122568453843611647&limit=2&include_failed=true

With includefailed: https://horizon.stellar.org/accounts/GBFVU7QY6EMTYSF3WKH54CO5CE46BC72HOKZBBXH5YBJBLDVT3RNSNM2/operations?cursor=122568453843611647&limit=2&includefailed=true

The transaction 3cdbcbef533c834095cee2719b812d51394f95043e17e0f92a5251faf5b318f5 is only reflected when the correct parameter name is used, as expected

Add an explainer for how to load up the env in a test with a ledger snapshot

What problem does your feature solve?

There are a number of instances where knowing how to initialize the environment with a ledger snapshot would prove useful.
e.g. https://discord.com/channels/897514728459468821/1063544780170219601

What would you like to see?

A new, likely section of or additional page to, the testing section detailing how to load up the env with a ledger snapshot.

  • Especially how to load in accounts with trustlines in various states
  • Loading up an account with an XLM balance

What alternatives are there?

For the asset related issues you can use the example token contract vs the token spec.
e.g. https://github.com/stellar/soroban-examples/blob/main/single_offer/src/test.rs#L8

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.