Skip to content

Commit

Permalink
On... Off... On...
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-Electron authored Feb 27, 2024
1 parent 77d8576 commit f492b01
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### On-Ledger Requests

An on-ledger request is a Layer 1 transaction that validator nodes retrieve from the Tangle. The Tangle acts as an
arbiter between users and chains and guarantees that the transaction is valid, making it the only way to transfer assets
to a chain or between chains. However, it is the slowest way to invoke a smart contract.

### Off-Ledger Requests

If all necessary assets are in the chain already, it is possible to send a request directly to that chain's validator
nodes.
This way, you don’t have to wait for the Tangle to process the message, significantly reducing the overall confirmation
time.
Due to the shorter delay, off-ledger requests are preferred over on-ledger requests unless you need to move assets
between chains or Layer 1 accounts.
17 changes: 3 additions & 14 deletions docs/build/isc/v1.0.0-rc.6/docs/explanations/invocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ tags:

---

import OnOffLedgerRequest from '../_partials/_on_off_ledger_request.md';

# Calling a Smart Contract

## Entry Points
Expand Down Expand Up @@ -63,20 +65,7 @@ exchange which would will the user's funds from one currency to another and send

This is called _asynchronous composability_.

### On-Ledger Requests

An on-ledger request is a Layer 1 transaction that validator nodes retrieve from the Tangle. The Tangle acts as an
arbiter between users and chains and guarantees that the transaction is valid, making it the only way to transfer assets
to a chain or between chains. However, it is the slowest way to invoke a smart contract.

### Off-Ledger Requests

If all necessary assets are in the chain already, it is possible to send a request directly to that chain's validator
nodes.
This way, you don’t have to wait for the Tangle to process the message, significantly reducing the overall confirmation
time.
Due to the shorter delay, off-ledger requests are preferred over on-ledger requests unless you need to move assets
between chains or Layer 1 accounts.
<OnOffLedgerRequest/>

---

Expand Down
7 changes: 2 additions & 5 deletions docs/build/isc/v1.0.0-rc.6/docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ tags:

---
import NetworkWarning from './_admonitions/_network_warning.md'
import OnOffLedgerRequest from './_partials/_on_off_ledger_request.md';

# Introduction

Expand Down Expand Up @@ -72,8 +73,4 @@ may involve delays.
Running a request consumes 'gas', that is the cost of executing an on-chain request. You can specify a `GasBudget`
for each request, with costs charged to your on-chain account.

## On-Ledger vs Off-Ledger Requests

Requests can be [on-ledger](explanations/invocation.md#on-ledger-requests), that is, processed through
the Tangle, or [off-ledger](explanations/invocation.md#off-ledger-requests), directly sent to validators for faster
processing.
<OnOffLedgerRequest/>

0 comments on commit f492b01

Please sign in to comment.