Skip to content

Commit

Permalink
Merge branch 'testnet-update' into gg/sites-testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
mlegner committed Oct 17, 2024
2 parents f5cf9e7 + 70b2a12 commit dfe9e69
Show file tree
Hide file tree
Showing 23 changed files with 1,041 additions and 936 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
name: Check editorconfig
steps:
- uses: actions/checkout@v4
- run: pip install editorconfig-checker=="2.7.3" --break-system-packages
- run: pip install editorconfig-checker=="3.0.3"
- run: ec

markdownlint:
Expand Down
7 changes: 2 additions & 5 deletions contracts/walrus/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Walrus Testnet Move contracts

<!-- TODO: Update to latest contracts and update object ID. -->

This is the Move source code for the Walrus Testnet instance. We provide this so developers can
experiment with building Walrus apps that require Move extensions. A slightly different version of
these contracts is deployed on Sui Testnet as package
`0x668fb342c7ea45a3a8d645efefbb41d6b732a5fd4ead552f58df7fabe443c12e`.
experiment with building Walrus apps that require Move extensions. These contracts are deployed on
Sui Testnet as package `0x9f992cc2430a1f442ca7a5ca7638169f5d5c00e0ebc3977a65e9ac6e497fe5ef`.

**A word of caution:** Walrus Mainnet will use new Move packages with struct layouts and function
signatures that may not be compatible with this package. Move code that builds against this package
Expand Down
2 changes: 0 additions & 2 deletions contracts/walrus/sources/staking/staked_wal.move
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module walrus::staked_wal;
use sui::balance::Balance;
use wal::wal::WAL;

// Keep errors in `walrus-sui/types/move_errors.rs` up to date with changes here.
const ENotWithdrawing: u64 = 0;
const EMetadataMismatch: u64 = 1;
const EInvalidAmount: u64 = 2;
Expand All @@ -22,7 +21,6 @@ const ECantSplitWithdrawing: u64 = 5;

/// The state of the staked WAL. It can be either `Staked` or `Withdrawing`.
/// The `Withdrawing` state contains the epoch when the staked WAL can be
///
public enum StakedWalState has store, copy, drop {
// Default state of the staked WAL - it is staked in the staking pool.
Staked,
Expand Down
1 change: 0 additions & 1 deletion contracts/walrus/sources/staking/staking_inner.move
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const MIN_STAKE: u64 = 0;
/// Temporary upper limit for the number of storage nodes.
const TEMP_ACTIVE_SET_SIZE_LIMIT: u16 = 100;

// Keep errors in `walrus-sui/types/move_errors.rs` up to date with changes here.
const EWrongEpochState: u64 = 0;
const EInvalidSyncEpoch: u64 = 1;
const EDuplicateSyncDone: u64 = 2;
Expand Down
1 change: 0 additions & 1 deletion contracts/walrus/sources/staking/staking_pool.move
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use walrus::{
walrus_context::WalrusContext
};

// Keep errors in `walrus-sui/types/move_errors.rs` up to date with changes here.
const EPoolAlreadyUpdated: u64 = 0;
const ECalculationError: u64 = 1;
const EIncorrectEpochAdvance: u64 = 2;
Expand Down
1 change: 0 additions & 1 deletion contracts/walrus/sources/staking/storage_node.move
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use sui::{bls12381::{G1, g1_from_bytes}, group_ops::Element};
use walrus::event_blob::EventBlobAttestation;

// Error codes
// Keep errors in `walrus-sui/types/move_errors.rs` up to date with changes here.
const EInvalidNetworkPublicKey: u64 = 0;

/// Represents a storage node in the system.
Expand Down
1 change: 0 additions & 1 deletion contracts/walrus/sources/system/blob.move
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use walrus::{
};

// Error codes
// Keep errors in `walrus-sui/types/move_errors.rs` up to date with changes here.
const ENotCertified: u64 = 0;
const EBlobNotDeletable: u64 = 1;
const EResourceBounds: u64 = 2;
Expand Down
1 change: 0 additions & 1 deletion contracts/walrus/sources/system/storage_accounting.move
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use sui::balance::{Self, Balance};
use wal::wal::WAL;

// Errors
// Keep errors in `walrus-sui/types/move_errors.rs` up to date with changes here.
const ETooFarInFuture: u64 = 0;

/// Holds information about a future epoch, namely how much
Expand Down
1 change: 0 additions & 1 deletion contracts/walrus/sources/system/system_state_inner.move
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const MAX_MAX_EPOCHS_AHEAD: u32 = 1000;
const BYTES_PER_UNIT_SIZE: u64 = 1_024 * 1_024; // 1 MiB

// Errors
// Keep errors in `walrus-sui/types/move_errors.rs` up to date with changes here.
const EInvalidMaxEpochsAhead: u64 = 0;
const EStorageExceeded: u64 = 1;
const EInvalidEpochsAhead: u64 = 2;
Expand Down
9 changes: 4 additions & 5 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@
- [The Walrus Sites Portal](./walrus-sites/portal.md)
- [Site data authentication](./walrus-sites/authentication.md)
- [Known restrictions](./walrus-sites/restrictions.md)
- [Legal terms](./walrus-sites/legal.md)
- [Privacy policy](./walrus-sites/privacy.md)
- [Terms of service](./walrus-sites/tos.md)
- [Terms of service](./walrus-sites/tos.md)

---

[Glossary](./glossary.md)
[Devnet terms of service](./devnet_tos.md)
[Testnet terms of service](./testnet_tos.md)
[Devnet terms of service](./legal/devnet_tos.md)
[Testnet terms of service](./legal/testnet_tos.md)
[Privacy policy](./legal/privacy.md)
1 change: 0 additions & 1 deletion docs/dev-guide/sui-struct.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ querying or executing transactions on Sui directly. However, Walrus uses Sui to
and smart contract developers can read information about the Walrus system, as well as stored blobs,
on Sui.

<!-- TODO Update URLs -->
The Move code of the Walrus Testnet contracts is available at
<https://github.com/MystenLabs/walrus-docs/blob/main/contracts>. An example package using
the Walrus contracts is available at
Expand Down
50 changes: 1 addition & 49 deletions docs/devnet_tos.md
Original file line number Diff line number Diff line change
@@ -1,49 +1 @@
<!-- markdownlint-disable proper-names -->
# DEVNET TERMS OF SERVICE - WALRUS

Last updated: June 13, 2024

By using Mysten Labs Devnet software, technologies, tools, and other services (collectively
“Devnet”), you agree to the general Terms of Service and these additional Devnet Terms of Service
(together, the “Terms”). If you do not agree, do not participate in Devnet. If you are using Devnet
on behalf of an organization, you represent and warrant that you are an authorized representative of
that organization and have the authority to bind that business or entity to the Terms.

## Eligibility Criteria

You may use Devnet only if you:

- Are 18 years or older and capable of forming a binding contract with us.
- Are not otherwise barred from participating in Devnet under applicable law.

We may, at our discretion, introduce new or change existing eligibility criteria or conditions we
deem appropriate. Devnet may operate in certain phases, and your participation in any one phase of
Devnet does not guarantee that you will be selected for any other phases of Devnet.

## Duration

Devnet will commence on the date we prescribe and continue until terminated at our discretion. We
may change, discontinue, or wipe, temporarily or permanently, all or any part of Devnet, at any
time and without notice at our discretion, including, without limitation, the modification of the
presence, amounts, or any other conditions applicable to data you have stored within Devnet, without
any liability to you or other Devnet users.

## No Warranty

Mysten Labs provides the Devnet platform solely as a developer preview. Devnet is provided "as is"
and "with all faults." We make no warranties, express or implied, regarding the reliability,
accuracy, performance, or fitness for a particular purpose of the service provided. You accept all
risks associated with the use of Devnet and agree that Mysten Labs, its affiliates, and its
employees shall not be liable for any damages, whether direct, indirect, incidental, special,
consequential, or punitive, arising out of the use or inability to use the service, including but
not limited to lost profits, loss of business, or data loss.

No employee or representative of Mysten Labs is authorized to make any warranties or representations
beyond those stated in this agreement. Any statements made by employees or representatives of Mysten
Labs regarding the service shall not be construed as warranties or representations, and customers
agree to indemnify and hold harmless Mysten Labs from any such statements.

Any deficiencies or errors in the Devnet platform shall not constitute a breach of this agreement,
and customers agree to waive any right to seek a refund or compensation based on such deficiencies
or errors. This "as is, no warranty" provision shall survive the termination or expiration of any
other agreements between you and Mysten Labs.
# Devnet terms of service
49 changes: 49 additions & 0 deletions docs/legal/devnet_tos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!-- markdownlint-disable proper-names -->
# DEVNET TERMS OF SERVICE - WALRUS

Last updated: June 13, 2024

By using Mysten Labs Devnet software, technologies, tools, and other services (collectively
“Devnet”), you agree to the general Terms of Service and these additional Devnet Terms of Service
(together, the “Terms”). If you do not agree, do not participate in Devnet. If you are using Devnet
on behalf of an organization, you represent and warrant that you are an authorized representative of
that organization and have the authority to bind that business or entity to the Terms.

## Eligibility Criteria

You may use Devnet only if you:

- Are 18 years or older and capable of forming a binding contract with us.
- Are not otherwise barred from participating in Devnet under applicable law.

We may, at our discretion, introduce new or change existing eligibility criteria or conditions we
deem appropriate. Devnet may operate in certain phases, and your participation in any one phase of
Devnet does not guarantee that you will be selected for any other phases of Devnet.

## Duration

Devnet will commence on the date we prescribe and continue until terminated at our discretion. We
may change, discontinue, or wipe, temporarily or permanently, all or any part of Devnet, at any
time and without notice at our discretion, including, without limitation, the modification of the
presence, amounts, or any other conditions applicable to data you have stored within Devnet, without
any liability to you or other Devnet users.

## No Warranty

Mysten Labs provides the Devnet platform solely as a developer preview. Devnet is provided "as is"
and "with all faults." We make no warranties, express or implied, regarding the reliability,
accuracy, performance, or fitness for a particular purpose of the service provided. You accept all
risks associated with the use of Devnet and agree that Mysten Labs, its affiliates, and its
employees shall not be liable for any damages, whether direct, indirect, incidental, special,
consequential, or punitive, arising out of the use or inability to use the service, including but
not limited to lost profits, loss of business, or data loss.

No employee or representative of Mysten Labs is authorized to make any warranties or representations
beyond those stated in this agreement. Any statements made by employees or representatives of Mysten
Labs regarding the service shall not be construed as warranties or representations, and customers
agree to indemnify and hold harmless Mysten Labs from any such statements.

Any deficiencies or errors in the Devnet platform shall not constitute a breach of this agreement,
and customers agree to waive any right to seek a refund or compensation based on such deficiencies
or errors. This "as is, no warranty" provision shall survive the termination or expiration of any
other agreements between you and Mysten Labs.
Loading

0 comments on commit dfe9e69

Please sign in to comment.