Skip to content

Commit

Permalink
Toliman updates (#129)
Browse files Browse the repository at this point in the history
* Toliman updates

* cleanup dev account fluff

* up-to-date with latest

* fix build

* cleans up index page
  • Loading branch information
andytudhope authored Jul 6, 2024
1 parent 1f1c7ad commit 9715a83
Show file tree
Hide file tree
Showing 22 changed files with 173 additions and 120 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).
20 changes: 6 additions & 14 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,7 @@ 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="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 All @@ -48,8 +47,6 @@ SUAVE is currently in early alpha. The first testnet is called Rigil. Please be
</a>
</div>

<br/>

## Build

<div className="intro-grid">
Expand Down Expand Up @@ -90,7 +87,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 +122,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 +135,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 All @@ -155,9 +152,6 @@ SUAVE is currently in early alpha. The first testnet is called Rigil. Please be
</div>
</a>
</div>
-->

<br/>

## Connect

Expand Down Expand Up @@ -195,8 +189,6 @@ SUAVE is currently in early alpha. The first testnet is called Rigil. Please be
</div>

<br/>
<br/>
<br/>


![logo](/img/social-preview-3.jpg)
16 changes: 8 additions & 8 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
items: [
'what-is-suave',
'what-to-build',
'rigil',
'toliman',
{
type: 'link',
label: 'Forum',
Expand Down Expand Up @@ -38,10 +38,10 @@ module.exports = {
collapsed: false,
link: { type: 'doc', id: 'concepts/index' },
items: [
'technical/specs/rigil/mevm',
'technical/specs/rigil/precompiles',
'technical/specs/toliman/mevm',
'technical/specs/toliman/precompiles',
'concepts/confidential-computation',
'technical/specs/rigil/confidential-data-store',
'technical/specs/toliman/confidential-data-store',
'concepts/block-building',
'concepts/offchain-http',
'concepts/mev-supplychain-interface',
Expand Down 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
60 changes: 60 additions & 0 deletions docs/toliman.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: Toliman Testnet
description: How to use the Toliman testnet
keywords:
- test
- build
- suave
- create
- deploy
- transact
---

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

# 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 Toliman in [**our community directory**](/tools/community-directory).

:::

## Chain info

- [Block Explorer](https://explorer.toliman.suave.flashbots.net)
- [Faucet](https://faucet.toliman.suave.flashbots.net/)
- [EthStats](https://ethstats.toliman.suave.flashbots.net/)
- [Technical Specs](/technical/specs/toliman/)
- `chainId: 33626250`
- Toliman Kettle Address: `0xf579de142d98f8379c54105ac944fe133b7a17fe`

We have RPC nodes you can connect to:

<RPCButton />

## Dev info

The local devnet setup funds a dev account for you by default, as well as setting up a Kettle for you to submit Confidential Compute Requests to when interacting with your contracts. Your local address and the Kettle created for your local devnet are listed below:

### Local dev account

The address is:

`0xBE69d72ca5f88aCba033a063dF5DBe43a4148De0`

The private key is:

`0x91ab9a7e53c220e6210460b65a7a3bb2ca181412a8a7b43ff336b3df1737ce12`

### Local Kettle

The address is:

`0xB5fEAfbDD752ad52Afb7e1bD2E40432A485bBB7F`

The private key is:

`0x6c45335a22461ccdb978b78ab61b238bad2fae4544fb55c14eb096c875ccfc52`
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.
17 changes: 11 additions & 6 deletions docs/tools/typescript-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ description: An overview of the TypeScript SDK (suave-viem)

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import DevInfo from '@site/src/components/DevInfo';

:::info

Expand Down Expand Up @@ -60,9 +59,13 @@ const suaveProvider = getSuaveProvider(http(SUAVE_RPC_URL));

## Wallet Creation

To interact with the SUAVE network, we'll need a wallet. When running a local SUAVE devnet, there is an account which is set up with funds for you by default.
To interact with the SUAVE network, we'll need a wallet.

<DevInfo />
:::info

When running a local SUAVE devnet, [**there is an account which is set up with funds for you by default**](/toliman#dev-info).

:::

To make a wallet, we'll import the `getSuaveWallet` function. We'll also need to import the `Hex` type to make sure our hex strings are properly formatted.

Expand Down Expand Up @@ -190,6 +193,7 @@ async function main() {
abi: Contract.abi,
functionName: exampleWithNumberInput,
}),
isEIP712,
confidentialInputs: encodeAbiParameters([
{type: 'uint256'}
], [
Expand All @@ -207,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
8 changes: 5 additions & 3 deletions docs/tutorials/deploy-contracts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ keywords:
- solidity
---

import DevInfo from '@site/src/components/DevInfo';

# Deploy A Contract

Now that you have `suave-geth` running locally, let's deploy a new contract and begin looking at the programming model on SUAVE. Remember, SUAVE enables you to:
Expand Down Expand Up @@ -117,4 +115,8 @@ Congratulations! You just deployed your first contract to a local SUAVE network!

Take note of the address to which it has been deployed: you'll need it in the next tutorial, where we'll send confidential compute requests to your contracts, and extend the functions to emit information about offchain computations onchain.

<DevInfo />
:::info

You can find your [**pre-funded dev account and local kettle address here**](/toliman#dev-info).

:::
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/toliman/#architecture).
Loading

0 comments on commit 9715a83

Please sign in to comment.