Skip to content

Commit

Permalink
up-to-date with latest
Browse files Browse the repository at this point in the history
  • Loading branch information
andytudhope committed Jul 6, 2024
1 parent 4970793 commit 9f9a617
Show file tree
Hide file tree
Showing 15 changed files with 47 additions and 43 deletions.
2 changes: 1 addition & 1 deletion docs/concepts/block-building.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function buildEthBlock(BuildBlockArgs memory blockArgs, DataId dataId, string me

As the name suggests, we only support building blocks on Ethereum L1 for now. This will change as SUAVE matures.

All of these functions utilize the SUAVE Execution Namespace. To understand more about this, please consult the [Execution Namespace specification](/technical/specs/rigil/mevm.md#suavex-namespace).
All of these functions utilize the SUAVE Execution Namespace. To understand more about this, please consult the [Execution Namespace specification](/technical/specs/toliman/mevm.md#suavex-namespace).

## Bundles

Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/confidential-computation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: How to understand confidential computation on SUAVE and use it to y

Confidential computation enables you to handle orderflow privately and securely.

In SUAVE, we achieve this with [Kettles](/technical/specs/rigil/kettle#confidential-computation) performing compute offchain, but according to smart contracts written onchain. In this way, offchain compute is not constrained by chain consensus. The Kettles will eventually run in [TEEs](https://www.youtube.com/watch?v=ek-bu4aoh0A), which provide both **enhanced privacy** (no-one, not even the host OS, can see unencrypted data) and **integrity** (you can be sure the correct code, and only that code, is running at all times).
In SUAVE, we achieve this with [Kettles](/technical/specs/toliman/kettle#confidential-computation) performing compute offchain, but according to smart contracts written onchain. In this way, offchain compute is not constrained by chain consensus. The Kettles will eventually run in [TEEs](https://www.youtube.com/watch?v=ek-bu4aoh0A), which provide both **enhanced privacy** (no-one, not even the host OS, can see unencrypted data) and **integrity** (you can be sure the correct code, and only that code, is running at all times).

## Interface

Expand All @@ -27,7 +27,7 @@ Once the MEVM has the confidential inputs, there is any number of things you cou
function extractHint(bytes memory bundleData) internal view returns (bytes memory)
```

You can also consult [our technical specs](/technical/specs/rigil/kettle#confidential-computation) for further information about confidential computation if required.
You can also consult [our technical specs](/technical/specs/toliman/kettle#confidential-computation) for further information about confidential computation if required.

### Computing over Confidential Data

Expand Down
10 changes: 5 additions & 5 deletions docs/concepts/rpc-differences.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Creates a new message call transaction or a contract creation for any signed `Co

Executes a new message call immediately without creating a transaction on the block chain. It follows the same format as the default `eth_call` with two extra parameters:

- `IsConfidential`: Set to true to execute as a confidential request and access the [`MEVM`](/technical/specs/rigil/precompiles) methods.
- `IsConfidential`: Set to true to execute as a confidential request and access the [`MEVM`](/technical/specs/toliman/precompiles) methods.
- `ExecutionAddress`: `address` - (optional) The execution address that performs the execution.

3. **eth_kettleAddress**
Expand All @@ -32,7 +32,7 @@ The easiest way to test your connection to an RPC endpoint is via a simple curl
curl -X POST \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_kettleAddress","params":[],"id":1}' \
https://rpc.rigil.suave.flashbots.net
https://rpc.toliman.suave.flashbots.net
```

#### Local curl request
Expand All @@ -57,7 +57,7 @@ Note that the only difference between these two is the URL at the end of the cur

### SUAVE Transactions

The example above follows the [exact same API interface](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-eth) as the original go-ethereum client. However, if we grab a random transaction hash from the [Rigil Explorer](https://explorer.rigil.suave.flashbots.net/), we can see the core difference with the SUAVE Rigil RPC: a new SUAVE transaction type.
The example above follows the [exact same API interface](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-eth) as the original go-ethereum client. However, if we grab a random transaction hash from the [Rigil Explorer](https://explorer.toliman.suave.flashbots.net/), we can see the core difference with the SUAVE Rigil RPC: a new SUAVE transaction type.

#### Remote curl request

Expand All @@ -72,7 +72,7 @@ curl -X POST \
],
"id": 1
}' \
https://rpc.rigil.suave.flashbots.net
https://rpc.toliman.suave.flashbots.net
```

#### Response
Expand Down Expand Up @@ -112,4 +112,4 @@ This response has a couple fields that aren't in your traditional Ethereum trans
- `executionNode`
- `requestRecord`

To dive deeper into these differences checkout the [SUAVE chain specs](../technical/specs/rigil/suave-chain.md).
To dive deeper into these differences checkout the [SUAVE chain specs](../technical/specs/toliman/suave-chain.md).
14 changes: 7 additions & 7 deletions docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ keywords:

:::info

SUAVE is currently in early alpha. The first testnet is called Rigil. Please be aware that your data will likely not persist, and that Rigil is not yet fully confidential or secure. Happy hacking!
SUAVE is currently in early alpha. The second testnet is called Toliman. Please be aware that your data will likely not persist, and that Toliman is not yet fully confidential or secure. Happy hacking!

:::

Expand All @@ -25,8 +25,8 @@ SUAVE is currently in early alpha. The first testnet is called Rigil. Please be
<a href="/what-is-suave/" className="intro-link">
<div className="intro-block">
<div className="intro-image">
<!-- <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24"><path d="M6.993 12c0 2.761 2.246 5.007 5.007 5.007s5.007-2.246 5.007-5.007S14.761 6.993 12 6.993 6.993 9.239 6.993 12zM12 8.993c1.658 0 3.007 1.349 3.007 3.007S13.658 15.007 12 15.007 8.993 13.658 8.993 12 10.342 8.993 12 8.993zM10.998 19h2v3h-2zm0-17h2v3h-2zm-9 9h3v2h-3zm17 0h3v2h-3zM4.219 18.363l2.12-2.122 1.415 1.414-2.12 2.122zM16.24 6.344l2.122-2.122 1.414 1.414-2.122 2.122zM6.342 7.759 4.22 5.637l1.415-1.414 2.12 2.122zm13.434 10.605-1.414 1.414-2.122-2.122 1.414-1.414z"></path></svg> -->
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path d="M6.993 12c0 2.761 2.246 5.007 5.007 5.007s5.007-2.246 5.007-5.007S14.761 6.993 12 6.993 6.993 9.239 6.993 12zM12 8.993c1.658 0 3.007 1.349 3.007 3.007S13.658 15.007 12 15.007 8.993 13.658 8.993 12 10.342 8.993 12 8.993zM10.998 19h2v3h-2zm0-17h2v3h-2zm-9 9h3v2h-3zm17 0h3v2h-3zM4.219 18.363l2.12-2.122 1.415 1.414-2.12 2.122zM16.24 6.344l2.122-2.122 1.414 1.414-2.122 2.122zM6.342 7.759 4.22 5.637l1.415-1.414 2.12 2.122zm13.434 10.605-1.414 1.414-2.122-2.122 1.414-1.414z"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24"><path d="M6.993 12c0 2.761 2.246 5.007 5.007 5.007s5.007-2.246 5.007-5.007S14.761 6.993 12 6.993 6.993 9.239 6.993 12zM12 8.993c1.658 0 3.007 1.349 3.007 3.007S13.658 15.007 12 15.007 8.993 13.658 8.993 12 10.342 8.993 12 8.993zM10.998 19h2v3h-2zm0-17h2v3h-2zm-9 9h3v2h-3zm17 0h3v2h-3zM4.219 18.363l2.12-2.122 1.415 1.414-2.12 2.122zM16.24 6.344l2.122-2.122 1.414 1.414-2.122 2.122zM6.342 7.759 4.22 5.637l1.415-1.414 2.12 2.122zm13.434 10.605-1.414 1.414-2.122-2.122 1.414-1.414z"></path></svg> -->
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path d="M6.993 12c0 2.761 2.246 5.007 5.007 5.007s5.007-2.246 5.007-5.007S14.761 6.993 12 6.993 6.993 9.239 6.993 12zM12 8.993c1.658 0 3.007 1.349 3.007 3.007S13.658 15.007 12 15.007 8.993 13.658 8.993 12 10.342 8.993 12 8.993zM10.998 19h2v3h-2zm0-17h2v3h-2zm-9 9h3v2h-3zm17 0h3v2h-3zM4.219 18.363l2.12-2.122 1.415 1.414-2.12 2.122zM16.24 6.344l2.122-2.122 1.414 1.414-2.122 2.122zM6.342 7.759 4.22 5.637l1.415-1.414 2.12 2.122zm13.434 10.605-1.414 1.414-2.122-2.122 1.414-1.414z"></path></svg>
</div>
<div className="intro-text">
<div className="intro-heading">What is SUAVE?</div>
Expand Down Expand Up @@ -90,7 +90,7 @@ SUAVE is currently in early alpha. The first testnet is called Rigil. Please be
</div>
</div>
</a>
<!--

<a href="/tutorials/create-precompiles" className="intro-link">
<div className="intro-block">
<div className="intro-image">
Expand Down Expand Up @@ -125,10 +125,10 @@ SUAVE is currently in early alpha. The first testnet is called Rigil. Please be
<div className="intro-desc">Example code to get you started</div>
</div>
</div>
</a> -->
</a>
</div>

<!-- Use our references:
## Use our references

<div className="intro-grid">
<a href="/technical/" className="intro-link">
Expand All @@ -138,7 +138,7 @@ SUAVE is currently in early alpha. The first testnet is called Rigil. Please be
</div>
<div className="intro-text">
<div className="intro-heading">Technical Specs</div>
<div className="intro-desc">Details about the Suave Rigil architecture</div>
<div className="intro-desc">Details about the Suave Toliman architecture</div>
</div>
</div>
</a>
Expand Down
8 changes: 4 additions & 4 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ module.exports = {
collapsed: true,
link: { type: 'doc', id: 'technical/README' },
items: [
'technical/specs/rigil/README',
'technical/specs/rigil/kettle',
'technical/specs/rigil/suave-chain',
'technical/specs/rigil/glossary',
'technical/specs/toliman/README',
'technical/specs/toliman/kettle',
'technical/specs/toliman/suave-chain',
'technical/specs/toliman/glossary',
],
},

Expand Down
8 changes: 4 additions & 4 deletions docs/toliman.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ keywords:

import RPCButton from '@site/src/components/RPCButton/index';

# Rigil
# Toliman

:::info

We encourage you to read our [tutorials first](/tutorials) to understand how to work with SUAVE locally.

If you've already done that, you can also look through all the tools and examples already in use on Rigil in [**our community directory**](/tools/community-directory).
If you've already done that, you can also look through all the tools and examples already in use on Toliman in [**our community directory**](/tools/community-directory).

:::

Expand All @@ -28,8 +28,8 @@ If you've already done that, you can also look through all the tools and example
- [Faucet](https://faucet.toliman.suave.flashbots.net/)
- [EthStats](https://ethstats.toliman.suave.flashbots.net/)
- [Technical Specs](/technical/specs/toliman/)
- `chainId: 16813125`
- Toliman Kettle Address: `0x03493869959c866713c33669ca118e774a30a0e5`
- `chainId: 33626250`
- Toliman Kettle Address: `0xf579de142d98f8379c54105ac944fe133b7a17fe`

We have RPC nodes you can connect to:

Expand Down
2 changes: 1 addition & 1 deletion docs/tools/golang-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ client := sdk.NewClient(rpcClient, privateKey, executionNodeAddress)

- `rpcClient`: Your Ethereum RPC client.
- `privateKey`: An ECDSA private key for signing transactions.
- `executionNodeAddress`: The address of a SUAVE Kettle. Use `0x03493869959c866713c33669ca118e774a30a0e5` if working on Rigil.
- `executionNodeAddress`: The address of a SUAVE Kettle. Use `0xf579de142d98f8379c54105ac944fe133b7a17fe` if working on Toliman.

One way to instantiate a golang RPC client using the go-ethereum rpc module "github.com/ethereum/go-ethereum/rpc" is:

Expand Down
Empty file removed docs/tools/tools-resources.mdx
Empty file.
8 changes: 5 additions & 3 deletions docs/tools/typescript-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ async function main() {
abi: Contract.abi,
functionName: exampleWithNumberInput,
}),
isEIP712,
confidentialInputs: encodeAbiParameters([
{type: 'uint256'}
], [
Expand All @@ -210,9 +211,10 @@ main();

1. We specify transaction type `0x43` to indicate that this is a Confidential Compute Request.
2. We call functions by ABI-encoding the function call in the `data` field, the same as you would for an Ethereum transaction.
2. We set a new field called **with confidential inputs**.
4. We provide our confidential data (also ABI-encoded) in the `confidentialInputs` field; this data is not revealed publicly, and is only known to the kettle.
5. The `kettleAddress` we use is specific to the local devnet. On a public testnet, this value is different. If you're looking for that address you can find it [here](/rigil).
3. We specify `isEIP712` (a boolean which defaults to `true` above), to signify that the request should be signed as EIP712 signed typed data. This is particularly useful as it allows users to interact with Suave without ever changing their RPC endpoint. We recommend you always set it to `true`.
4. We set a new field called **with confidential inputs**.
5. We provide our confidential data (also ABI-encoded) in the `confidentialInputs` field; this data is not revealed publicly, and is only known to the kettle.
6. The `kettleAddress` we use is specific to the local devnet. On a public testnet, this value is different. If you're looking for that address you can find it [here](/toliman).

## Watching Pending Transactions

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/create-precompiles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Creating precompiles requires writing lower level code than the contracts and tr

:::

SUAVE uses [custom precompiles](/technical/specs/rigil/precompiles) to extend the EVM with specific MEV functions. Unless you have a very specific use case, building a SUAPP should not require writing precompiles.
SUAVE uses [custom precompiles](/technical/specs/toliman/precompiles) to extend the EVM with specific MEV functions. Unless you have a very specific use case, building a SUAPP should not require writing precompiles.

In this tutorial, we will add a new precompile to the [suave-geth client](https://github.com/flashbots/suave-geth) that will be accessible in any builder solidity contract on SUAVE.

> If you do want to create your own precompile, please [consult our governance process](/technical/specs/rigil/precompiles#precompiles-governance) along with this tutorial.
> If you do want to create your own precompile, please [consult our governance process](/technical/specs/toliman/precompiles#precompiles-governance) along with this tutorial.
## Understand the structure

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/cross-chain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ It is often the case that Suapps need to connect to two (or more!) different blo

The other option is to spoof Ethereum L1 (or chains like it) using Anvil, a tool which is also well suited to making your cross-chain life easier.

For this reason, we maintain a [fork of foundry](https://github.com/flashbots/suavex-foundry) which specifically implements [`suavex_call`](/technical/specs/rigil/mevm#suavex-namepspace). The historical context for this tool can be found in [this forum post](https://collective.flashbots.net/t/anvil-for-mevm-external-provider/3114).
For this reason, we maintain a [fork of foundry](https://github.com/flashbots/suavex-foundry) which specifically implements [`suavex_call`](/technical/specs/toliman/mevm#suavex-namepspace). The historical context for this tool can be found in [this forum post](https://collective.flashbots.net/t/anvil-for-mevm-external-provider/3114).

The idea is that, instead of running your own L1 node, you simply run Anvil via an RPC provider, and use that to test any croos chain interactions:

Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/run-suave.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ It should tell you the block height of your local network.

The main actor in the SUAVE protocol is called a "Kettle". Kettles house all components necessary to perform confidential compute.

Here is the architecture of a Kettle on the Rigil Testnet. When you start a local SUAVE devnet, you're running all the stuff in the purple square (but not the domain specific services, i.e. nodes connected to other chains from/to which you wish to receive or send bundles).
Here is the architecture of a Kettle on the Toliman Testnet. When you start a local SUAVE devnet, you're running all the stuff in the purple square (but not the domain specific services, i.e. nodes connected to other chains from/to which you wish to receive or send bundles).

![Rigil architecture](/assets/rigil-architecture.svg)
![Architecture](/assets/architecture.svg)

You can read more about exactly what a Kettle contains in [architecture section of the Technical Specs](/technical/specs/rigil/#architecture).
You can read more about exactly what a Kettle contains in [architecture section of the Technical Specs](/technical/specs/tliman/#architecture).
6 changes: 4 additions & 2 deletions docs/tutorials/suappify-counter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ async function main() {
abi: Counter.abi,
functionName: "setNumber",
}),
isEIP712,
confidentialInputs: encodeAbiParameters([
{type: 'uint256'}
], [
Expand All @@ -191,8 +192,9 @@ The most critical part to understand is crafting and sending Confidential Comput
1. We specify transaction type `0x43` to indicate that this is a Confidential Compute Request.
2. We send the request to our smart contract (`counterAddress`) to call `setNumber` with confidential inputs.
3. We call the `setNumber` function by ABI-encoding the function call in the `data` field, the same as you would for an ethereum transaction.
4. We provide our confidential data (also ABI-encoded) in the `confidentialInputs` field; this data is not revealed publicly, and is only known to the kettle.
5. The `kettleAddress` we use is specific to the local devnet. On a public testnet, this value is different. If you're looking for that address you can find it [here](/rigil).
4. We specify `isEIP712` (a boolean which defaults to `true` above), to signify that the request should be signed as EIP712 signed typed data. This is particularly useful as it allows users to interact with Suave without ever changing their RPC endpoint. We recommend you always set it to `true`.
5. We provide our confidential data (also ABI-encoded) in the `confidentialInputs` field; this data is not revealed publicly, and is only known to the kettle.
6. The `kettleAddress` we use is specific to the local devnet. On a public testnet, this value is different. If you're looking for that address you can find it [here](/toliman).

:::info

Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/using-testnet.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Using SUAVE Testnets
description: How to deploy contracts and transact on the Rigil testnet
description: How to deploy contracts and transact on the Toliman testnet
keywords:
- test
- build
Expand All @@ -14,11 +14,11 @@ keywords:

The `spell` tool we've been using in all our previous tutorials is only intended for local use. Therefore, we'll need to adapt our approach slightly in order to get our contract working on the testnet, and start transacting there.

1. Get rETH from the [faucet](https://faucet.rigil.suave.flashbots.net/).
1. Get rETH from the [faucet](https://faucet.toliman.suave.flashbots.net/).
2. Use Forge. From the root of your contracts directory, you can run:

```bash
forge create --rpc-url https://rpc.rigil.suave.flashbots.net --legacy \
forge create --rpc-url https://rpc.toliman.suave.flashbots.net --legacy \
--private-key <your_funded_priv_key> <your_contract_name>.sol:<your_contract_name>
```

Expand Down
10 changes: 5 additions & 5 deletions src/components/RPCButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import {useSDK} from '@metamask/sdk-react';
*/
function RPCButton() {
const {sdk} = useSDK();
const rpcUrl = 'https://rpc.rigil.suave.flashbots.net';
const blockExplorerUrl = 'https://explorer.rigil.suave.flashbots.net';
const rpcUrl = 'https://rpc.toliman.suave.flashbots.net';
const blockExplorerUrl = 'https://explorer.toliman.suave.flashbots.net';

const connectToRPC = async () => {
if (sdk) {
const addChainParams = {
chainId: '0x1008C45',
chainName: `Rigil Testnet`,
chainId: '0x201188A',
chainName: `Toliman Testnet`,
iconUrls: ['https://docs.flashbots.net/img/logo.png'],
nativeCurrency: {
name: 'Ethereum',
Expand Down Expand Up @@ -78,7 +78,7 @@ function RPCButton() {
type="button"
className="ring-offset-background focus-visible:ring-ring inline-flex h-10 min-w-full cursor-pointer items-center justify-center whitespace-nowrap rounded-md border-none bg-gray-950 px-4 py-2 text-base font-bold text-white transition-colors hover:bg-gray-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"
onClick={() => connectToRPC()}>
Connect to Rigil
Connect to Toliman
</button>
</div>
);
Expand Down

0 comments on commit 9f9a617

Please sign in to comment.