Walrus Relay
Walrus Relay
Walrus Relay delegates high-bandwidth operations to a backend server, enabling mobile and web apps to store data on Walrus without the burden of uploading to multiple storage nodes directly.
Suibase provides a local relay process for testing your applications before using production services. The binary used are downloaded from Mysten Lab, and are therefore compatible with the official networks.
Resources:
Examples:
Enabling / Starting
Enable Walrus Relay for the network you intend to use. Only testnet and mainnet are supported:
testnet wal-relay enable
mainnet wal-relay enable
The relay starts/stops automatically alongside the workdir services:
testnet start
testnet stop
You can monitor the relay status:
testnet wal-relay status
mainnet wal-relay status
How to connect?
Connect your applications to these local ports:
Testnet: http://localhost:45852
Mainnet: http://localhost:45853
Specify these in the host field of the Mysten SDK:
Example:
const client = new SuiClient({
url: getFullnodeUrl('testnet'),
network: 'testnet',
}).$extend(
WalrusClient.experimental_asClientExtension({
uploadRelay: {
host: 'http://localhost:45852',
},
}),
);
Statistics
View request statistics for a given workdir with:
testnet wal-relay stats
You can clear all stats with:
testnet wal-relay clear
Disabling
Disable Walrus Relay for a specific network:
testnet wal-relay disable
mainnet wal-relay disable
Upgrading
It is recommended to regularly upgrade the binaries to match the latest networks:
testnet update
mainnet update
You might want to regularly update suibase itself with ~/suibase/update