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

anchor platform: add documentation for events #232

Merged
merged 9 commits into from
Sep 13, 2023
Merged

anchor platform: add documentation for events #232

merged 9 commits into from
Sep 13, 2023

Conversation

JakeUrban
Copy link
Contributor

@JakeUrban JakeUrban commented Sep 12, 2023

Adds the POST /event callback to the Callback API documentation. Includes a brief description of how to use event callbacks and the importance of recovering from missed events.

I think it makes sense to update the docs section once we merge SoftServe's work, since their PR (#215) changes the structure so much.

@stellar-jenkins
Copy link

@stellar-jenkins
Copy link

@JakeUrban JakeUrban marked this pull request as ready for review September 12, 2023 23:20
openapi/anchor-platform/bundled_callback.yml Outdated Show resolved Hide resolved
The transaction event type. Can be one of the following:
- `transaction_created` - a transaction was created through the SEP endpoints. The payload is in the `transaction` field.
- `transaction_status_changed` - the status of a transaction has changed. The payload is in the `transaction` field.
- `transaction_error` - error processing the transaction. The payload is in the `transaction` field.
Copy link
Contributor

Choose a reason for hiding this comment

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

If it's an error, how do we retrieve an error itself?

Copy link
Contributor Author

@JakeUrban JakeUrban Sep 12, 2023

Choose a reason for hiding this comment

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

transaction_error means one of two things

  1. the anchor platform experienced an unexpected error and put the transaction in the error status as result. If this happens, the business has to triage the issue and if possible, move it back out of the error status and potentially update other fields so that it can continue processing. At best, the platform will have put an informative message in the message field as a starting point.
  2. the business put the transaction into the error status itself via PATCH /transactions or the associated RPC method. In this case, the business knows what the error was.

I have a 3.0 jira issue for merging transaction_error event types into the transaction_status_changed type.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's a good idea to put this message in the OpenAPI file spec

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it is, I see the message field on in the docs.

timestamp:
type: string
format: date-time
payload:
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally payload should be

oneOf
   - PayloadTransaction
   - PayloadQuote
 
PayloadTransaction:
oneOf
   - PayloadTransactionSep24 ( object is transaction: TransactionSEP24 )
   - PayloadTransactionSep31 (object is transaction: TransactionSEP31 )

But types in openapi is very tedious so idk if it's worth to even bother

Copy link
Contributor Author

@JakeUrban JakeUrban Sep 12, 2023

Choose a reason for hiding this comment

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

We don't have to decide on this now but I actually don't know if creating different permutations of the platform transaction schema is the right approach, as opposed to having a unified platform transaction schema documented.

I think this makes a bit more sense, even if we have to explain that the value of transaction.sep has an impact on the expected values for transaction.status and transaction.kind.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think having separate types between SEPs make sense to indicate mandatory/optional/not used fields. Everything else is too much work to clearly separate types.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think the fields differ between SEPs though, other than the values of status and kind right?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, there are quite a few differences in platform transaction between sep-24 and sep-31

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lets merge this as-is but we can continue to discuss this. The intention behind the platform API was to unify the schema across SEPs so if there are schema differences we should resolve them.

Copy link
Contributor

Choose a reason for hiding this comment

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

image
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like the diff is:

  • kind has different values depending on the value of sep
  • status has different values depending on the value of sep
  • quote_id is present for SEP-31 transactions but not for SEP-24.
    • this should be present on SEP-24 though, since its supported in the protocol, no?
  • source_account and destination_account is present on SEP-24, but not SEP-31
    • I don't see a reason why they shouldn't be on SEP-31
  • memo and memo_type is on SEP-24 but not SEP-31
    • same here, not sure why we don't have this on SEP-31
  • customers is on SEP-31, not SEP-24
    • we've discussed this before, I think the outcome was to add customers to SEP-24 but sender and receiver will be the same
  • creator is on SEP-31, not SEP-24
    • this actually seems like a bug, how do businesses know which wallet created the transaction without this?

In every case above, there doesn't seem to be a problem making the schema's match.

@stellar-jenkins
Copy link

1 similar comment
@stellar-jenkins
Copy link

@Ifropc
Copy link
Contributor

Ifropc commented Sep 13, 2023

Can you re-run codegen task? Backtick is fixed in yaml file, but rendered version is still incorrect

@stellar-jenkins
Copy link

@stellar-jenkins
Copy link

@JakeUrban JakeUrban merged commit d55e2b4 into main Sep 13, 2023
2 checks passed
@JakeUrban JakeUrban deleted the ap-events branch September 13, 2023 19:31
ElliotFriend pushed a commit that referenced this pull request Mar 12, 2024
* Update Examples, SDK and CLI v0.2.1

* Pin docker image

* Add release notes

* preview 3 start

* fix

* fix nums

* link

* FutureNet => Futurenet

* add core and horizon versions
ElliotFriend pushed a commit that referenced this pull request Mar 12, 2024
ElliotFriend added a commit that referenced this pull request Mar 15, 2024
* Add release notes (#232)

* Update Examples, SDK and CLI v0.2.1

* Pin docker image

* Add release notes

* preview 3 start

* fix

* fix nums

* link

* FutureNet => Futurenet

* add core and horizon versions

* Revert "Add release notes (#232)" (#233)

This reverts commit 1823544.

* Add release notes (#234)

* Update version of SDK (#236)

* Update versions of software (#240)

* Remove "Preview" from releases page title

* Update chanelogs

* Update soroban-rpc version

* Update Friendbot version

* updated quickstart image sha (#241)

* Add changelog notes about XDR

* Add changelog notes about env

* Add other changelogs

* Add contributors

* Next Release Dev Branch (#231)

* Fix links to contributors

* Add js-stellar-base and js-soroban-client versions to release notes (#242)

* Reorder the nav bar (#244)

* Update Examples, SDK and CLI v0.2.1

* Pin docker image

* Add release notes (#234)

* Rename and move releases page

* reorder EVERYTHING

* reorder Learn between Examples and SDKs

* update wallet position

Co-authored-by: Leigh McCulloch <[email protected]>

* Update the release notes (#246)

* Update the release notes

* Update docs/releases.mdx

Co-authored-by: Leigh McCulloch <[email protected]>

* Update release versions for upcoming release (#259)

* initial ver

* update

* update

* update

* Update release page

* Support arm64 images in docs for quickstart (#274)

* update all admonitions such that prettier doesn't yell

* Lots of formatting

* Reorg (#290)

* Change SDK section to Reference section

* Adding JS SDK to list of SDKs

* Adding Overcat's Python SDK to list of SDKs

* Moving Networks -> Futurenet to Reference section

* Moving Releases to Reference section

* Delete Networks from main nav

Networks now lives under Reference section

* Deleting as Releases now live in Reference section

* Changing sidebar position

Temporary, this will eventually move to How-To Guides

* Update byo.mdx

* Edited Quick Start to 1. Hello World

Includes Tutorials -> Create a Project / Write a Contract / Test / Build / Run on Sandbox / Optimizing Builds

* Move Storing Data from Examples to Getting Started

* Move Deploy to Local Network to Getting Started

Moved this section from Tutorials to Getting Started

* Move Freighter wallet tutorial to Getting Started

* Update and rename 6.-connect-Freighter-wallet.mdx to 4. Connect Freighter Wallet

* Move Deploy to Futurenet to Getting Started

* Rename 4. Connect Freighter Wallet to 4. Connect Freighter Wallet.mdx

* Moved to Getting Started

* Moved to Getting Started

Removing this section

* Moved to Getting Started

Removing this as it has been moved to Getting Started

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* Moved to Getting Started

Removing due to this section being moved

* Update Examples to How-To Guides

* Move BYO SDK to How-To Guides

* Moved to How-To Guides

* Moved invoking contracts with transactions to How-To Guides

* Removing because it's moved to How-To Guides

* Moved Token Interface to Token How-To Guide

* Remove Token Interface

Token Interface has been moved to How-To Guides -> Token

* Move Stellar Asset Contract to How-To Guides

* Delete docs/built-in-contracts directory

Moved to How-To Guides

* Move Stellar FAQs to Learn

* Delete faq.mdx

Moved to Learn

* Update authorization.mdx

Alphabetize sidebar

* Update contract-lifecycle.mdx

Alphabetizing sidebar

* Update custom-types.mdx

Alphabetizing sidebar

* Update rust-dialect.mdx

Alphabetizing sidebar

* Update debugging.mdx

Alphabetizing sidebar

* Update environment-concepts.mdx

Alphabetizing sidebar

* Update errors.mdx

Alphabetizing sidebar

* Update events.mdx

Alphabetizing sidebar

* Update gas-and-metering.mdx

Alphabetizing sidebar

* Update interacting-with-contracts.mdx

Alphabetizing sidebar

* Update persisting-data.mdx

Alphabetizing sidebar

* Update high-level-overview.mdx

Update spelling

* formatting

* formatting

* formatting

* formatting

* Update faq.mdx

* fixed broken links

* fix broken links

* fix broken links

* moar link fixes

* fixed some broken links

* added sorobanathon homepage

* add google tag manager

* Content edits made

* back to original

* Content Edit

* button location

* Content & Eligibility guidelines added

* Update sorobanathon.js

* update all admonitions such that prettier doesn't yell

* Lots of formatting

* --prose-wrap preserve

* Update releases.mdx

* update prettier

* fixed the callouts

* formatting

* fix module import

* Update sorobanathon.js

* Fixed Reorg PR

Fixed links, moved sections, deleted double sections

* Update index.js

* Updating Sorobanathon Info

* Fixed links

Many links.

* Formatting

* Change SDK section to Reference section

* Adding JS SDK to list of SDKs

* Adding Overcat's Python SDK to list of SDKs

* Moving Networks -> Futurenet to Reference section

* Moving Releases to Reference section

* Delete Networks from main nav

Networks now lives under Reference section

* Deleting as Releases now live in Reference section

* Changing sidebar position

Temporary, this will eventually move to How-To Guides

* Update byo.mdx

* formatting

* fix broken links

* Edited Quick Start to 1. Hello World

Includes Tutorials -> Create a Project / Write a Contract / Test / Build / Run on Sandbox / Optimizing Builds

* Move Storing Data from Examples to Getting Started

* Move Deploy to Local Network to Getting Started

Moved this section from Tutorials to Getting Started

* Move Freighter wallet tutorial to Getting Started

* Update and rename 6.-connect-Freighter-wallet.mdx to 4. Connect Freighter Wallet

* Move Deploy to Futurenet to Getting Started

* Rename 4. Connect Freighter Wallet to 4. Connect Freighter Wallet.mdx

* Moved to Getting Started

Removing this as it has been moved to Getting Started

* Moved to Getting Started -> Hello World

* Moved to Getting Started -> Hello World

* formatting

* fix broken links

* moar link fixes

* Update Examples to How-To Guides

* Move BYO SDK to How-To Guides

* Moved invoking contracts with transactions to How-To Guides

* Moved Token Interface to Token How-To Guide

* Remove Token Interface

Token Interface has been moved to How-To Guides -> Token

* Move Stellar Asset Contract to How-To Guides

* Delete docs/built-in-contracts directory

Moved to How-To Guides

* formatting

* fixed broken links

* Move Stellar FAQs to Learn

* Update authorization.mdx

Alphabetize sidebar

* Update contract-lifecycle.mdx

Alphabetizing sidebar

* Update custom-types.mdx

Alphabetizing sidebar

* Update rust-dialect.mdx

Alphabetizing sidebar

* Update debugging.mdx

Alphabetizing sidebar

* Update environment-concepts.mdx

Alphabetizing sidebar

* Update errors.mdx

Alphabetizing sidebar

* Update events.mdx

Alphabetizing sidebar

* Update gas-and-metering.mdx

Alphabetizing sidebar

* Update interacting-with-contracts.mdx

Alphabetizing sidebar

* Update persisting-data.mdx

Alphabetizing sidebar

* Update high-level-overview.mdx

Update spelling

* formatting

* Update faq.mdx

* fixed some broken links

* Update releases.mdx

* update prettier

* fixed the callouts

* formatting

* fix module import

* Fixed Reorg PR

Fixed links, moved sections, deleted double sections

* Fixed links

Many links.

* Formatting

* Merge cleanup

* More cleanup

* Formatting

* some small design tweaks

* copy tweaks

---------

Co-authored-by: Bri <[email protected]>
Co-authored-by: Anuxhya <[email protected]>

* Pre mainnet restructure (#644)

* docs: rename "fundamentals and concepts" to "soroban internals"

* docs: remove old "under the hood" section

* docs: add tags to the various tutorials

* docs: move tutorials into one main directory

* fix broken links to old pages

* docs: renaming soroban internals in category file

* docs: remove old "command line reference" category

* docs: add tokens directory, rearrange sidebars

* docs: rearrange migration from evm guide

* docs: remove unused reference/interfaces category

* docs: move "reference" section to "resources"

* docs: move "releases" page up a level

* docs: move FAQ page up one level

* docs: move dev tools into resources directory

* docs: move testnet.mdx to networks.mdx

* docs: rearrange items in resources directory

* docs: collapse various SDK pages into two pages

* docs: move data-providers up one level

* docs: remove some empty categories, move the tutorial template

* docs: add a new getting-started page, reorganize that section

* docs: change sidebar position integers in soroban-internals

* docs: shuffling contract interaction around in soroban-internals

* style: fixing a couple small markdown nits in dapps directory

* docs: fix a broken link

* feat: start to the "guides" page(s)

* style(lint): fixing a small linting error

* remove guides placeholder

* fixing broken links

* work on guides listing. might revert this

* formatting mdx

* docs: fixing a broken link to tutorials

* style: crack at making the tutorials filterable and hidden in the sidebar

* customizing some components for the `/guides` pages and layouts

* rename index page for guides to README

* remove commented configuration option

* remove some console logging in components

* change name of index page in guides sidebar

* remove commented sidebar generation code

* remove comments and add description to sidebar generator

* rename sidebar generator file

* more work on how the 'guides' pages might look.

* docs: adjusting sidebar positions of new getting started pages

* fix some broken links in the getting-started section

* prefer "README.mdx" files where possible

* some more guides placeholder stubs

* docs(guides): More placeholder stubs for guides and categories

* feat: don't display "guides in category" page on `/guides`

* build: check/fix MDX formatting in more directories than just docs

* style: add a larger margin before more category guides

* style: more selectively increase that top margin

* docs(guides): a quick stab at a "publishing" events guide

* docs(guides): first stab at the "publish events" guide

* docs: updating tutorial descriptions

* fix a few broken links

* docs: add note about a tuple with one element

* style: couple link changes and reformats

* move fuzzing tutorial back

* change to README file in contract interactions category

* docs(guides): give a better title for the wasm metadata guide

* fixing some broken markdown links

* fix (another!) broken link

* move the guides back into the main layout of the docs directory

* add placeholder for testnet reset automation stuff

* some initial content for some guides

* markdown formatting and fixing broken links

* moving "resources" back to "reference" to fit the definition better

More like "technical reference" rather than a "reference encyclopedia"

* change some styles of the tutorial list

* removing most category pages

* some more first-drafts of guides

* fixing some category links

* include a period at the end of each tutorial description

* simplify tutorial search box placeholder text

* better description for the tutorials page

* making the pre-commit script executable

* flesh out some of the state archival guides

* first effort for some rpc ledger key guides

* fix some broken links

* add a guide on ingesting events into a db

* first effort at storage type guides

* Some more stubs, marking drafts, and a couple additions

* make not a draft to fix a broken link

* guides category descriptions in README.mdx files

* marking incomplete chain migration docs as drafts

* change some tutorial difficulty levels

* fine-tune the tutorials component styling a bit

* improving some guides organization

* fix linting errors and broken links

* include wrap instructions for native lumens

* fix broken link in contract metadata guide

* final changes to existing guides

* moving developer tools into the main sidebar

* create real redirects instead of just notes

* fix broken links in a dapps challenge page

* fix a redirect syntax error

* fix a tutorials redirect

* Add 20.1.0 section (#704)

* Add 20.1.0 section

* format

* Update docs/releases.mdx

Co-authored-by: George <[email protected]>

* Update docs/releases.mdx

---------

Co-authored-by: George <[email protected]>

* use the docusaurus blog feature for meeting notes (#719)

* use the docusaurus blog feature for meeting notes

* tweak the meeting notes a bit

---------

Co-authored-by: Tyler van der Hoeven <[email protected]>

* [Do Not Merge] Updates pending vote (#729)

* update to the welcome page to reflect the live on Mainnet status

* remove note about non-production software on networks page

* add the link definition for the phased rollout

* Add v20.2.0 release to `releases.mdx`  (#737)

* Update releases.mdx

* use latest versions

* add changelog

* update title

* Update resource limits and make a new reference page for them (#736)

* add a reference page on resource limits and fees

* remove resource fee/limit tables from "explainer" page

* removing some unnecessary comments and entries

Some of the comments are more applicable in the discussion doc,
than they are for developer documentation. So, let's get rid of
those.

* remove unnecessary "current is..." language from resource fees

* Update resource-limits-fees.mdx (#746)

* Update resource-limits-fees.mdx

Add context around the phased approach

* formatting and linting

---------

Co-authored-by: Elliot Voris <[email protected]>

* Create 2024-02-22.mdx (#748)

* Create 2024-02-22.mdx

* Update 2024-02-22.mdx

* Create 2024-02-15.mdx (#750)

* Create 2024-02-15.mdx

* proper indents

---------

Co-authored-by: Tyler van der Hoeven <[email protected]>

* Phase 1 updates to Soroban docs (#747)

* Adding Mainnet to Networks section

-Need help with Mainnet information for Horizon API, Validator, and History Archive
-Also getting errors when clicking on Testnet and Futurenet History Archive links

* Add Mainnet information to Block Explorers

* Add Releases section for Phase 1

* put in version numbers for (most) software

* add changelong for soroban rpc

* add changelog for soroban cli

* add mainnet passphrase to protocol 20 release notes

* try another title for this version

* remove unnecessary headings

* update Horizon link for Mainnet

* add resource limits and fees to releases page

* shifting some things around in resource limits for phase 1

* use `TBD` for soroban react version placeholders

* networks placeholders

* add validator and history urls for Mainnet

---------

Co-authored-by: Elliot Voris <[email protected]>

* replace a link for indexing services in a meeting notes post (#753)

* rename "releases" page to "software versions"

* format mdx in newly added pages

* create a reference sidebar and add the navbar item

* add navbar and sidebar links to meeting notes blog

* fix some broken links

* add fees disclaimer to resource page

* updates to SDP Introduction

* add phase 2 references

* rollback commit that updated software version for phase 2

* correctly spell "position" so the meetings are actually on the right

* Revert "add phase 2 references"

This reverts commit b3e553f.

* remove the extra "meeting notes" entry from reference sidebar

* fix some broken links (just a couple this time!)

* remove some old, commented-out entries from the `docs` sidebar

* add some links

* fix some soroban links to point to this site's pages

---------

Co-authored-by: Leigh McCulloch <[email protected]>
Co-authored-by: shawn <[email protected]>
Co-authored-by: Tyler van der Hoeven <[email protected]>
Co-authored-by: Jay Geng <[email protected]>
Co-authored-by: Siddharth Suresh <[email protected]>
Co-authored-by: Tsachi Herman <[email protected]>
Co-authored-by: Bri <[email protected]>
Co-authored-by: Anuxhya <[email protected]>
Co-authored-by: George <[email protected]>
Co-authored-by: Julian Martinez <[email protected]>
Co-authored-by: Naman Kumar <[email protected]>
Co-authored-by: Julian Martinez <[email protected]>
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