Upgrade sui packages and compiler to 1.19.1-mainnet (#3803)

* sui: upgrade to mainnet-1.19.1

* sui: update Dockerfile.base

* sui: update tilt deployment to support new sui binary

* sui: remove faucet and simplify tilt deploy script

* sui: add script for switching Move.toml files between networks

* devnet: update sui addresses, regen config

---------

Co-authored-by: Evan Gray <battledingo@gmail.com>
This commit is contained in:
Csongor Kiss 2024-04-15 17:16:07 +01:00 committed by GitHub
parent b18a7e61eb
commit a46bccaa9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
56 changed files with 1112 additions and 546 deletions

View File

@ -188,7 +188,7 @@ def build_node_yaml():
"--suiRPC",
"http://sui:9000",
"--suiMoveEventType",
"0x7f6cebb8a489654d7a759483bd653c4be3e5ccfef17a8b5fd3ba98bd072fabc3::publish_message::WormholeMessage",
"0x320a40bff834b5ffa12d7f5cc2220dd733dd9e8e91c425800203d06fb2b1fee8::publish_message::WormholeMessage",
"--suiWS",
"ws://sui:9000",
]
@ -732,7 +732,6 @@ if sui:
"sui",
port_forwards = [
port_forward(9000, 9000, name = "RPC [:9000]", host = webHost),
port_forward(5003, name = "Faucet [:5003]", host = webHost),
port_forward(9184, name = "Prometheus [:9184]", host = webHost),
],
labels = ["sui"],

View File

@ -33,9 +33,9 @@ const OVERRIDES = {
},
DEVNET: {
sui: {
core: "0x5a5160ca3c2037f4b4051344096ef7a48ebf4400b3f385e57ea90e1628a8bde0", // wormhole module State object ID
core: "0x12253210c90f89e7a8525e6c52d41309ff5bfb31f43f561b5fe6f50cd72f9668", // wormhole module State object ID
token_bridge:
"0xa6a3da85bbe05da5bfd953708d56f1a3a023e7fb58e5a824a3d4de3791e8f690", // token_bridge module State object ID
"0x830ed228c6f1bcb40003bb49af3277df2cbf933d63a6bcdcb0ba4580a1a7654e", // token_bridge module State object ID
},
aptos: {
token_bridge:

View File

@ -12,9 +12,6 @@ spec:
- name: prometheus
port: 9184
targetPort: prometheus
- name: faucet
port: 5003
targetPort: faucet
selector:
app: sui
---
@ -52,9 +49,6 @@ spec:
- containerPort: 9184
name: prometheus
protocol: TCP
- containerPort: 5003
name: faucet
protocol: TCP
readinessProbe:
tcpSocket:
port: 9000
@ -66,6 +60,7 @@ spec:
"cd /tmp && ./scripts/wait_for_devnet.sh && worm sui setup-devnet && touch success && sleep infinity",
]
readinessProbe:
initialDelaySeconds: 30
periodSeconds: 5
failureThreshold: 300
exec:

View File

@ -176,7 +176,7 @@
},
"21": {
"contracts": {
"tokenBridgeEmitterAddress": "be8d2e6809d4873bcf1d8be6af2b92500091ad6aa5dc76bc717af86a58d300ca"
"tokenBridgeEmitterAddress": "8c6ba6a65f1b9c7fba4c5ad710086ace208e9ac21786a923425efc8167a419f0"
}
},
"22": {

View File

@ -16,7 +16,7 @@ var knownDevnetTokenbridgeEmitters = map[vaa.ChainID]string{
vaa.ChainIDBSC: "0000000000000000000000000290fb167208af455bb137780163b7b7a9a10c16",
vaa.ChainIDAlgorand: "8ec299cb7f3efec28f542397e07f07118d74c875f85409ed8e6b93c17b60e992",
vaa.ChainIDWormchain: "c9138c6e5bd7a2ab79c1a87486c9d7349d064b35ac9f7498f3b207b3a61e6013",
vaa.ChainIDSui: "be8d2e6809d4873bcf1d8be6af2b92500091ad6aa5dc76bc717af86a58d300ca",
vaa.ChainIDSui: "8c6ba6a65f1b9c7fba4c5ad710086ace208e9ac21786a923425efc8167a419f0",
}
// KnownDevnetNFTBridgeEmitters is a map of known NFT emitters used during development.

View File

@ -56,7 +56,6 @@ import { Payload, VAA, parse, serialiseVAA } from "../../vaa/generic";
import {
ETH_NODE_URL,
ETH_PRIVATE_KEY10,
SUI_FAUCET_URL,
SUI_NODE_URL,
TEST_ERC20,
WORMHOLE_RPC_HOSTS,
@ -79,7 +78,6 @@ const suiAddress: string = suiKeypair.getPublicKey().toSuiAddress();
const suiProvider: JsonRpcProvider = new JsonRpcProvider(
new Connection({
fullnode: SUI_NODE_URL,
faucet: SUI_FAUCET_URL,
})
);
const suiSigner: RawSigner = new RawSigner(suiKeypair, suiProvider);

View File

@ -95,6 +95,3 @@ export const APTOS_PRIVATE_KEY =
"537c1f91e56891445b491068f519b705f8c0f1a1e66111816dd5d4aa85b8113d";
export const SUI_NODE_URL = ci ? "http://sui:9000" : "http://localhost:9000";
export const SUI_FAUCET_URL = ci
? "http://sui:5003/gas"
: "http://localhost:5003/gas";

View File

@ -757,9 +757,9 @@ const DEVNET = {
"0x46da3d4c569388af61f951bdd1153f4c875f90c2991f6b2d0a38e2161a40852c",
},
sui: {
core: "0x5a5160ca3c2037f4b4051344096ef7a48ebf4400b3f385e57ea90e1628a8bde0", // wormhole module State object ID
core: "0x12253210c90f89e7a8525e6c52d41309ff5bfb31f43f561b5fe6f50cd72f9668", // wormhole module State object ID
token_bridge:
"0xa6a3da85bbe05da5bfd953708d56f1a3a023e7fb58e5a824a3d4de3791e8f690", // token_bridge module State object ID
"0x830ed228c6f1bcb40003bb49af3277df2cbf933d63a6bcdcb0ba4580a1a7654e", // token_bridge module State object ID
nft_bridge: undefined,
},
moonbeam: {

View File

@ -4,10 +4,10 @@ cd ..; DOCKER_BUILDKIT=1 docker build --no-cache --progress plain -f sui/Dockerf
# tag the image with the appropriate version
docker tag sui:latest ghcr.io/wormhole-foundation/sui:1.0.0-testnet_1
docker tag sui:latest ghcr.io/wormhole-foundation/sui:1.19.1-mainnet
# push to ghcr
docker push ghcr.io/wormhole-foundation/sui:1.0.0-testnet_1
docker push ghcr.io/wormhole-foundation/sui:1.19.1-mainnet
echo remember to update both Dockerfile and Dockerfile.export

View File

@ -1,9 +1,12 @@
FROM cli-gen AS cli-export
FROM const-gen AS const-export
FROM ghcr.io/wormhole-foundation/sui:1.0.0-testnet_1@sha256:806fc83e7bbd59bca0a1960870d27b041d0b99a286d7eccfcec25beb74c2346c as sui
FROM ghcr.io/wormhole-foundation/sui:1.19.1-mainnet@sha256:544a1b2aa5701fae25a19aed3c5e8c24e0caf7d1c9f511b6844d339a8f0b2a00 as sui
RUN sui genesis -f
# initial run
# COPY sui/devnet/genesis_config genesis_config
# RUN sui genesis -f --from-config genesis_config
# subsequent runs after committing files from /root/.sui/sui_config/
COPY sui/devnet/ /root/.sui/sui_config/
WORKDIR /tmp

View File

@ -1,27 +1,24 @@
FROM docker.io/redhat/ubi8@sha256:56c374376a42da40f3aec753c4eab029b5ea162d70cb5f0cda24758780c31d81 as sui-node
# RUN apt-get update && apt-get -y install libclang-dev jq cmake curl npm --no-install-recommends
RUN dnf -y update
RUN dnf -y install jq cmake curl npm git gcc openssl-devel gcc-c++ clang make git
COPY sui/scripts/setup_rust.sh /tmp
RUN /tmp/setup_rust.sh
FROM rust:1.62@sha256:5777f201f507075309c4d2d1c1e8d8219e654ae1de154c844341050016a64a0c as sui-node
WORKDIR /tmp
COPY sui/scripts/node_builder.sh /tmp
RUN curl -L https://github.com/MystenLabs/sui/releases/download/mainnet-v1.19.1/sui-mainnet-v1.19.1-ubuntu-x86_64.tgz > sui-mainnet-v1.19.1-ubuntu-x86_64.tgz
RUN echo "6a8cc96759760293143a00fe7031a5fea70d2dff5b98d18c0470c09555da63e0 sui-mainnet-v1.19.1-ubuntu-x86_64.tgz" | sha256sum -c --status
RUN /tmp/node_builder.sh
RUN tar -xvf sui-mainnet-v1.19.1-ubuntu-x86_64.tgz
RUN mv target/release/sui-ubuntu-x86_64 /bin/sui
RUN mv target/release/sui-faucet-ubuntu-x86_64 /bin/sui-faucet
RUN mv target/release/sui-node-ubuntu-x86_64 /bin/sui-node
FROM docker.io/redhat/ubi8@sha256:56c374376a42da40f3aec753c4eab029b5ea162d70cb5f0cda24758780c31d81 as export-stage
RUN rm sui-mainnet-v1.19.1-ubuntu-x86_64.tgz
RUN dnf -y update
RUN dnf -y install jq curl git make
RUN apt-get update
RUN apt-get install -y ca-certificates curl gnupg
RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
# Update nodejs version from 10.24.0 to 18.x
RUN yum install https://rpm.nodesource.com/pub_18.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y
RUN yum install nodejs -y --setopt=nodesource-nodejs.module_hotfixes=1
ARG NODE_MAJOR=18
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
COPY --from=sui-node /root/.cargo/bin/sui /bin/sui
COPY --from=sui-node /root/.cargo/bin/sui-faucet /bin/sui-faucet
COPY --from=sui-node /root/.cargo/bin/sui-node /bin/sui-node
RUN apt-get update
RUN apt-get install nodejs -y

View File

@ -19,19 +19,18 @@ Make sure your Cargo version is at least 1.65.0 and then follow the steps below:
- https://docs.sui.io/build/install
## Prerequisites
#https://docs.sui.io/guides/developer/getting-started/sui-install# Prerequisites
Install the `Sui` CLI. This tool is used to compile the contracts and run the tests.
```sh
cargo install --locked --git https://github.com/MystenLabs/sui.git --rev 09b2081498366df936abae26eea4b2d5cafb2788 sui sui-faucet
cargo install --locked --git https://github.com/MystenLabs/sui.git --rev 041c5f2bae2fe52079e44b70514333532d69f4e6 sui
```
Some useful Sui CLI commands are
- `sui start` to spin up a local network
- `rpc-server` to start a server for handling rpc calls
- `sui-faucet` to start a faucet for requesting funds from active-address
Next, install the [worm](../clients/js/README.md) CLI tool by running
@ -93,13 +92,7 @@ Simply run
worm start-validator sui
```
which will start a local sui validator with an RPC endpoint at `0.0.0.0:9000`
and the faucet endpoint at `0.0.0.0:5003/gas`. Note that the faucet takes a few
(~10) seconds to come up, so only proceed when you see the following:
```text
Faucet is running. Faucet endpoint: 0.0.0.0:5003/gas
```
which will start a local sui validator with an RPC endpoint at `0.0.0.0:9000`.
Once the validator is running, the contracts are ready to deploy. In the
[scripts](./scripts) directory, run

View File

@ -0,0 +1,125 @@
---
protocol-key-pair:
value: avYcyVgYMXTyaUYh9IRwLK0gSzl7YF6ZQDAbrS1Bhvo=
worker-key-pair:
value: AAvfYqj1HPsXmthZ1t2Uw19vU6tdhK48YAFgkhJ7P/sV
account-key-pair:
value: ABmHnCaxw0GWzW+1MZYfTDonS1wZsO8KO37SXgm6pqc6
network-key-pair:
value: AEpJ6PVCvnrtaxREy8UNSiDwLPPrZMh12TbgELadmAHB
db-path: /root/.sui/sui_config/authorities_db/8dcff6d15504
network-address: /ip4/127.0.0.1/tcp/36219/http
json-rpc-address: "127.0.0.1:37179"
enable-experimental-rest-api: true
metrics-address: "127.0.0.1:44423"
admin-interface-port: 35585
consensus-config:
address: /ip4/127.0.0.1/tcp/35107/http
db-path: /root/.sui/sui_config/consensus_db/8dcff6d15504
internal-worker-address: ~
max-pending-transactions: ~
max-submit-position: ~
submit-delay-step-override-millis: ~
narwhal-config:
header_num_of_batches_threshold: 32
max_header_num_of_batches: 1000
max_header_delay: 1000ms
min_header_delay: 500ms
gc_depth: 50
sync_retry_delay: 5000ms
sync_retry_nodes: 3
batch_size: 5000000
max_batch_delay: 100ms
max_concurrent_requests: 500000
prometheus_metrics:
socket_addr: /ip4/127.0.0.1/tcp/42177/http
network_admin_server:
primary_network_admin_server_port: 34745
worker_network_admin_server_base_port: 43111
anemo:
send_certificate_rate_limit: ~
report_batch_rate_limit: ~
request_batches_rate_limit: ~
enable-event-processing: false
enable-index-processing: true
grpc-load-shed: ~
grpc-concurrency-limit: 20000000000
p2p-config:
listen-address: "127.0.0.1:41551"
external-address: /ip4/127.0.0.1/udp/41551
state-sync:
checkpoint-content-timeout-ms: 10000
genesis:
genesis-file-location: /root/.sui/sui_config/genesis.blob
authority-store-pruning-config:
num-latest-epoch-dbs-to-retain: 3
epoch-db-pruning-period-secs: 3600
num-epochs-to-retain: 0
max-checkpoints-in-batch: 10
max-transactions-in-batch: 1000
end-of-epoch-broadcast-channel-capacity: 128
checkpoint-executor-config:
checkpoint-execution-max-concurrency: 200
local-execution-timeout-sec: 30
db-checkpoint-config:
perform-db-checkpoints-at-epoch-end: false
indirect-objects-threshold: 18446744073709551615
expensive-safety-check-config:
enable-epoch-sui-conservation-check: false
enable-deep-per-tx-sui-conservation-check: false
force-disable-epoch-sui-conservation-check: false
enable-state-consistency-check: false
force-disable-state-consistency-check: false
enable-secondary-index-checks: false
transaction-deny-config:
package-publish-disabled: false
package-upgrade-disabled: false
shared-object-disabled: false
user-transaction-disabled: false
receiving-objects-disabled: false
zklogin-sig-disabled: false
zklogin-disabled-providers: []
certificate-deny-config: {}
state-debug-dump-config: {}
state-archive-write-config:
concurrency: 0
use-for-pruning-watermark: false
state-archive-read-config: []
state-snapshot-write-config:
concurrency: 0
indexer-max-subscriptions: ~
transaction-kv-store-read-config:
base-url: ""
jwk-fetch-interval-seconds: 3600
zklogin-oauth-providers:
Mainnet:
- Facebook
- Google
- Twitch
Testnet:
- Facebook
- Google
- Twitch
Unknown:
- Apple
- Facebook
- Google
- Kakao
- Slack
- Twitch
authority-overload-config:
max-txn-age-in-queue:
secs: 1
nanos: 0
overload-monitor-interval:
secs: 10
nanos: 0
execution-queue-latency-soft-limit:
secs: 1
nanos: 0
execution-queue-latency-hard-limit:
secs: 10
nanos: 0
max-load-shedding-percentage: 95
min-load-shedding-percentage-above-hard-limit: 50
safe-transaction-ready-rate: 100

View File

@ -0,0 +1,125 @@
---
protocol-key-pair:
value: OXnx3yM1C/ppgnDMx/o1d49fJs7E05kq11mXNae/O+I=
worker-key-pair:
value: AE4ZKvLhbIyoYlv0y7q7aPHyU/Jty/D1AzILgYUs4VqC
account-key-pair:
value: AEAh/lnBSwKKrazfLNz3J7DBu7W2EMuhcShk6MHJhxpT
network-key-pair:
value: AHdOWNkwAgBFMTlwVSGkhI4COGDX40frs5xOz72DHvNm
db-path: /root/.sui/sui_config/authorities_db/addeef94d898
network-address: /ip4/127.0.0.1/tcp/36853/http
json-rpc-address: "127.0.0.1:34043"
enable-experimental-rest-api: true
metrics-address: "127.0.0.1:45007"
admin-interface-port: 36657
consensus-config:
address: /ip4/127.0.0.1/tcp/45105/http
db-path: /root/.sui/sui_config/consensus_db/addeef94d898
internal-worker-address: ~
max-pending-transactions: ~
max-submit-position: ~
submit-delay-step-override-millis: ~
narwhal-config:
header_num_of_batches_threshold: 32
max_header_num_of_batches: 1000
max_header_delay: 1000ms
min_header_delay: 500ms
gc_depth: 50
sync_retry_delay: 5000ms
sync_retry_nodes: 3
batch_size: 5000000
max_batch_delay: 100ms
max_concurrent_requests: 500000
prometheus_metrics:
socket_addr: /ip4/127.0.0.1/tcp/44505/http
network_admin_server:
primary_network_admin_server_port: 45567
worker_network_admin_server_base_port: 43075
anemo:
send_certificate_rate_limit: ~
report_batch_rate_limit: ~
request_batches_rate_limit: ~
enable-event-processing: false
enable-index-processing: true
grpc-load-shed: ~
grpc-concurrency-limit: 20000000000
p2p-config:
listen-address: "127.0.0.1:37183"
external-address: /ip4/127.0.0.1/udp/37183
state-sync:
checkpoint-content-timeout-ms: 10000
genesis:
genesis-file-location: /root/.sui/sui_config/genesis.blob
authority-store-pruning-config:
num-latest-epoch-dbs-to-retain: 3
epoch-db-pruning-period-secs: 3600
num-epochs-to-retain: 0
max-checkpoints-in-batch: 10
max-transactions-in-batch: 1000
end-of-epoch-broadcast-channel-capacity: 128
checkpoint-executor-config:
checkpoint-execution-max-concurrency: 200
local-execution-timeout-sec: 30
db-checkpoint-config:
perform-db-checkpoints-at-epoch-end: false
indirect-objects-threshold: 18446744073709551615
expensive-safety-check-config:
enable-epoch-sui-conservation-check: false
enable-deep-per-tx-sui-conservation-check: false
force-disable-epoch-sui-conservation-check: false
enable-state-consistency-check: false
force-disable-state-consistency-check: false
enable-secondary-index-checks: false
transaction-deny-config:
package-publish-disabled: false
package-upgrade-disabled: false
shared-object-disabled: false
user-transaction-disabled: false
receiving-objects-disabled: false
zklogin-sig-disabled: false
zklogin-disabled-providers: []
certificate-deny-config: {}
state-debug-dump-config: {}
state-archive-write-config:
concurrency: 0
use-for-pruning-watermark: false
state-archive-read-config: []
state-snapshot-write-config:
concurrency: 0
indexer-max-subscriptions: ~
transaction-kv-store-read-config:
base-url: ""
jwk-fetch-interval-seconds: 3600
zklogin-oauth-providers:
Mainnet:
- Facebook
- Google
- Twitch
Testnet:
- Facebook
- Google
- Twitch
Unknown:
- Apple
- Facebook
- Google
- Kakao
- Slack
- Twitch
authority-overload-config:
max-txn-age-in-queue:
secs: 1
nanos: 0
overload-monitor-interval:
secs: 10
nanos: 0
execution-queue-latency-soft-limit:
secs: 1
nanos: 0
execution-queue-latency-hard-limit:
secs: 10
nanos: 0
max-load-shedding-percentage: 95
min-load-shedding-percentage-above-hard-limit: 50
safe-transaction-ready-rate: 100

View File

@ -0,0 +1,125 @@
---
protocol-key-pair:
value: CyNkjqNVr3HrHTH7f/NLs7u5lUHJzuPAw0PqMTD2y2s=
worker-key-pair:
value: AOuUqLZBJxwz++dkJA9sY0wvTykcCC6jSS3Jqz77IlRI
account-key-pair:
value: AEUws4dzsXHsai5hVbK1O8jWOpPAJjtzdJl32Vxvoj83
network-key-pair:
value: ADGySwzr54kpKui4vTatL4CtV4/1ffyyHuZ6CMyzZPGI
db-path: /root/.sui/sui_config/authorities_db/b3fd5efb5c87
network-address: /ip4/127.0.0.1/tcp/39101/http
json-rpc-address: "127.0.0.1:38815"
enable-experimental-rest-api: true
metrics-address: "127.0.0.1:32833"
admin-interface-port: 39835
consensus-config:
address: /ip4/127.0.0.1/tcp/43831/http
db-path: /root/.sui/sui_config/consensus_db/b3fd5efb5c87
internal-worker-address: ~
max-pending-transactions: ~
max-submit-position: ~
submit-delay-step-override-millis: ~
narwhal-config:
header_num_of_batches_threshold: 32
max_header_num_of_batches: 1000
max_header_delay: 1000ms
min_header_delay: 500ms
gc_depth: 50
sync_retry_delay: 5000ms
sync_retry_nodes: 3
batch_size: 5000000
max_batch_delay: 100ms
max_concurrent_requests: 500000
prometheus_metrics:
socket_addr: /ip4/127.0.0.1/tcp/40195/http
network_admin_server:
primary_network_admin_server_port: 45269
worker_network_admin_server_base_port: 39967
anemo:
send_certificate_rate_limit: ~
report_batch_rate_limit: ~
request_batches_rate_limit: ~
enable-event-processing: false
enable-index-processing: true
grpc-load-shed: ~
grpc-concurrency-limit: 20000000000
p2p-config:
listen-address: "127.0.0.1:36503"
external-address: /ip4/127.0.0.1/udp/36503
state-sync:
checkpoint-content-timeout-ms: 10000
genesis:
genesis-file-location: /root/.sui/sui_config/genesis.blob
authority-store-pruning-config:
num-latest-epoch-dbs-to-retain: 3
epoch-db-pruning-period-secs: 3600
num-epochs-to-retain: 0
max-checkpoints-in-batch: 10
max-transactions-in-batch: 1000
end-of-epoch-broadcast-channel-capacity: 128
checkpoint-executor-config:
checkpoint-execution-max-concurrency: 200
local-execution-timeout-sec: 30
db-checkpoint-config:
perform-db-checkpoints-at-epoch-end: false
indirect-objects-threshold: 18446744073709551615
expensive-safety-check-config:
enable-epoch-sui-conservation-check: false
enable-deep-per-tx-sui-conservation-check: false
force-disable-epoch-sui-conservation-check: false
enable-state-consistency-check: false
force-disable-state-consistency-check: false
enable-secondary-index-checks: false
transaction-deny-config:
package-publish-disabled: false
package-upgrade-disabled: false
shared-object-disabled: false
user-transaction-disabled: false
receiving-objects-disabled: false
zklogin-sig-disabled: false
zklogin-disabled-providers: []
certificate-deny-config: {}
state-debug-dump-config: {}
state-archive-write-config:
concurrency: 0
use-for-pruning-watermark: false
state-archive-read-config: []
state-snapshot-write-config:
concurrency: 0
indexer-max-subscriptions: ~
transaction-kv-store-read-config:
base-url: ""
jwk-fetch-interval-seconds: 3600
zklogin-oauth-providers:
Mainnet:
- Facebook
- Google
- Twitch
Testnet:
- Facebook
- Google
- Twitch
Unknown:
- Apple
- Facebook
- Google
- Kakao
- Slack
- Twitch
authority-overload-config:
max-txn-age-in-queue:
secs: 1
nanos: 0
overload-monitor-interval:
secs: 10
nanos: 0
execution-queue-latency-soft-limit:
secs: 1
nanos: 0
execution-queue-latency-hard-limit:
secs: 10
nanos: 0
max-load-shedding-percentage: 95
min-load-shedding-percentage-above-hard-limit: 50
safe-transaction-ready-rate: 100

View File

@ -0,0 +1,125 @@
---
protocol-key-pair:
value: VTDx4HjVmRBqdqBWg2zN+zcFE20io3CrBchGy/iV1lo=
worker-key-pair:
value: ACsedxHqp9Son+iep5m4+eKM+yMc8hYyqhrDJLUucJ+G
account-key-pair:
value: AAAujq3QBAO4JNOYeKBW5dMn+8N4zE4bEHx+Bv9Y5tKr
network-key-pair:
value: AOFPA8/e6v4OpU5U0308llf51JfsxVla/pclVq9Ztajb
db-path: /root/.sui/sui_config/authorities_db/99f25ef61f80
network-address: /ip4/127.0.0.1/tcp/39187/http
json-rpc-address: "127.0.0.1:33519"
enable-experimental-rest-api: true
metrics-address: "127.0.0.1:33765"
admin-interface-port: 33957
consensus-config:
address: /ip4/127.0.0.1/tcp/41413/http
db-path: /root/.sui/sui_config/consensus_db/99f25ef61f80
internal-worker-address: ~
max-pending-transactions: ~
max-submit-position: ~
submit-delay-step-override-millis: ~
narwhal-config:
header_num_of_batches_threshold: 32
max_header_num_of_batches: 1000
max_header_delay: 1000ms
min_header_delay: 500ms
gc_depth: 50
sync_retry_delay: 5000ms
sync_retry_nodes: 3
batch_size: 5000000
max_batch_delay: 100ms
max_concurrent_requests: 500000
prometheus_metrics:
socket_addr: /ip4/127.0.0.1/tcp/35645/http
network_admin_server:
primary_network_admin_server_port: 44333
worker_network_admin_server_base_port: 43351
anemo:
send_certificate_rate_limit: ~
report_batch_rate_limit: ~
request_batches_rate_limit: ~
enable-event-processing: false
enable-index-processing: true
grpc-load-shed: ~
grpc-concurrency-limit: 20000000000
p2p-config:
listen-address: "127.0.0.1:40869"
external-address: /ip4/127.0.0.1/udp/40869
state-sync:
checkpoint-content-timeout-ms: 10000
genesis:
genesis-file-location: /root/.sui/sui_config/genesis.blob
authority-store-pruning-config:
num-latest-epoch-dbs-to-retain: 3
epoch-db-pruning-period-secs: 3600
num-epochs-to-retain: 0
max-checkpoints-in-batch: 10
max-transactions-in-batch: 1000
end-of-epoch-broadcast-channel-capacity: 128
checkpoint-executor-config:
checkpoint-execution-max-concurrency: 200
local-execution-timeout-sec: 30
db-checkpoint-config:
perform-db-checkpoints-at-epoch-end: false
indirect-objects-threshold: 18446744073709551615
expensive-safety-check-config:
enable-epoch-sui-conservation-check: false
enable-deep-per-tx-sui-conservation-check: false
force-disable-epoch-sui-conservation-check: false
enable-state-consistency-check: false
force-disable-state-consistency-check: false
enable-secondary-index-checks: false
transaction-deny-config:
package-publish-disabled: false
package-upgrade-disabled: false
shared-object-disabled: false
user-transaction-disabled: false
receiving-objects-disabled: false
zklogin-sig-disabled: false
zklogin-disabled-providers: []
certificate-deny-config: {}
state-debug-dump-config: {}
state-archive-write-config:
concurrency: 0
use-for-pruning-watermark: false
state-archive-read-config: []
state-snapshot-write-config:
concurrency: 0
indexer-max-subscriptions: ~
transaction-kv-store-read-config:
base-url: ""
jwk-fetch-interval-seconds: 3600
zklogin-oauth-providers:
Mainnet:
- Facebook
- Google
- Twitch
Testnet:
- Facebook
- Google
- Twitch
Unknown:
- Apple
- Facebook
- Google
- Kakao
- Slack
- Twitch
authority-overload-config:
max-txn-age-in-queue:
secs: 1
nanos: 0
overload-monitor-interval:
secs: 10
nanos: 0
execution-queue-latency-soft-limit:
secs: 1
nanos: 0
execution-queue-latency-hard-limit:
secs: 10
nanos: 0
max-load-shedding-percentage: 95
min-load-shedding-percentage-above-hard-limit: 50
safe-transaction-ready-rate: 100

View File

@ -9,4 +9,4 @@ envs:
rpc: "https://fullnode.devnet.sui.io:443"
ws: ~
active_env: localnet
active_address: "0xed867315e3f7c83ae82e6d5858b6a6cc57c291fd84f7509646ebc8162169cf96"
active_address: ~

File diff suppressed because one or more lines are too long

Binary file not shown.

55
sui/devnet/genesis_config Normal file
View File

@ -0,0 +1,55 @@
---
ssfn_config_info: ~
validator_config_info: ~
parameters:
chain_start_timestamp_ms: 1709486339140
protocol_version: 36
allow_insertion_of_extra_objects: true
epoch_duration_ms: 86400000
stake_subsidy_start_epoch: 0
stake_subsidy_initial_distribution_amount: 1000000000000000
stake_subsidy_period_length: 10
stake_subsidy_decrease_rate: 1000
accounts:
- address: "0x2e425dd30f43ff1d59547322839cfc4b8fbaae54d72075181ebd7388b644fdbe"
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: "0x8a8bb058d6c86aa175566c9e2d19278dd22ed9fecdda8fb486018f93a0629bb5"
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: "0xa0f33ce147ecae789f535c64634851724284dd618a529672702b991a5f7bf816"
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: "0xbd00a48078c0513a5f9a0d1c9352cd5c23a0e0cf3e6a82673cdae857cd00021e"
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: "0xfd5f84cf9285f2b206e03727224b9daffa6092661b840d92434751792010b7de"
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: "0xed867315e3f7c83ae82e6d5858b6a6cc57c291fd84f7509646ebc8162169cf96"
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
[
"AB522qKKEsXMTFRD2SG3Het/02S/ZBOugmcH3R1CDG6l",
"AOmPq9B16F3W3ijO/4s9hI6v8LdiYCawKAW31PKpg4Qp",
"AOLhc0ryVWnD5LmqH3kCHruBpVV+68EWjEGu2eC9gndK",
"AKCo1FyhQ0zUpnoZLmGJJ+8LttTrt56W87Ho4vBF+R+8",
"AGA20wtGcwbcNAG4nwapbQ5wIuXwkYQEWFUoSVAxctHb"
]

View File

@ -1,73 +0,0 @@
---
protocol-key-pair:
value: VTDx4HjVmRBqdqBWg2zN+zcFE20io3CrBchGy/iV1lo=
worker-key-pair:
value: AOALyRbJi6ld82KFPzzSTqFcvnEJe7cxFmE4UmgTMkt1
account-key-pair:
value: AFO6/i9VpgpR9Tb5fA7PBh2bM8HMbsxjPC/twrRFXZoh
network-key-pair:
value: ACTXLjvKVNOmez4eB/undu829MFIpNqRactays+pGNnf
db-path: /root/.sui/sui_config/authorities_db/99f25ef61f80
network-address: /ip4/127.0.0.1/tcp/37395/http
json-rpc-address: "127.0.0.1:34677"
metrics-address: "127.0.0.1:34733"
admin-interface-port: 33561
consensus-config:
address: /ip4/127.0.0.1/tcp/36643/http
db-path: /root/.sui/sui_config/consensus_db/99f25ef61f80
internal-worker-address: ~
max-pending-transactions: ~
narwhal-config:
header_num_of_batches_threshold: 32
max_header_num_of_batches: 1000
max_header_delay: 2000ms
min_header_delay: 500ms
gc_depth: 50
sync_retry_delay: 5000ms
sync_retry_nodes: 3
batch_size: 500000
max_batch_delay: 100ms
block_synchronizer:
range_synchronize_timeout: 30000ms
certificates_synchronize_timeout: 30000ms
payload_synchronize_timeout: 30000ms
payload_availability_timeout: 30000ms
handler_certificate_deliver_timeout: 30000ms
consensus_api_grpc:
socket_addr: /ip4/127.0.0.1/tcp/32825/http
get_collections_timeout: 5000ms
remove_collections_timeout: 5000ms
max_concurrent_requests: 500000
prometheus_metrics:
socket_addr: /ip4/127.0.0.1/tcp/43711/http
network_admin_server:
primary_network_admin_server_port: 34257
worker_network_admin_server_base_port: 45379
anemo:
send_certificate_rate_limit: ~
get_payload_availability_rate_limit: ~
get_certificates_rate_limit: ~
report_batch_rate_limit: ~
request_batch_rate_limit: ~
enable-event-processing: false
grpc-load-shed: ~
grpc-concurrency-limit: 20000000000
p2p-config:
listen-address: "127.0.0.1:33745"
external-address: /ip4/127.0.0.1/udp/33745
genesis:
genesis-file-location: /root/.sui/sui_config/genesis.blob
authority-store-pruning-config:
num-latest-epoch-dbs-to-retain: 3
epoch-db-pruning-period-secs: 3600
num-epochs-to-retain: 1
max-checkpoints-in-batch: 200
max-transactions-in-batch: 1000
use-range-deletion: true
end-of-epoch-broadcast-channel-capacity: 128
checkpoint-executor-config:
checkpoint-execution-max-concurrency: 200
local-execution-timeout-sec: 10
db-checkpoint-config:
perform-db-checkpoints-at-epoch-end: false
indirect-objects-threshold: 18446744073709551615

View File

@ -1,73 +0,0 @@
---
protocol-key-pair:
value: avYcyVgYMXTyaUYh9IRwLK0gSzl7YF6ZQDAbrS1Bhvo=
worker-key-pair:
value: ALcYC9nZa2UFKkxycem4wHZUW6nPTmAPWIC0Me/X8/OQ
account-key-pair:
value: AFQ60/bLdbiryFJsWRrXW29RvC56WN2CAyS75jTRtQWj
network-key-pair:
value: AKgyYvFpPmPmmEPNdltJ4cfcb9D0t0bigFz3cak+iblf
db-path: /root/.sui/sui_config/authorities_db/8dcff6d15504
network-address: /ip4/127.0.0.1/tcp/45631/http
json-rpc-address: "127.0.0.1:39065"
metrics-address: "127.0.0.1:36781"
admin-interface-port: 41085
consensus-config:
address: /ip4/127.0.0.1/tcp/46119/http
db-path: /root/.sui/sui_config/consensus_db/8dcff6d15504
internal-worker-address: ~
max-pending-transactions: ~
narwhal-config:
header_num_of_batches_threshold: 32
max_header_num_of_batches: 1000
max_header_delay: 2000ms
min_header_delay: 500ms
gc_depth: 50
sync_retry_delay: 5000ms
sync_retry_nodes: 3
batch_size: 500000
max_batch_delay: 100ms
block_synchronizer:
range_synchronize_timeout: 30000ms
certificates_synchronize_timeout: 30000ms
payload_synchronize_timeout: 30000ms
payload_availability_timeout: 30000ms
handler_certificate_deliver_timeout: 30000ms
consensus_api_grpc:
socket_addr: /ip4/127.0.0.1/tcp/36797/http
get_collections_timeout: 5000ms
remove_collections_timeout: 5000ms
max_concurrent_requests: 500000
prometheus_metrics:
socket_addr: /ip4/127.0.0.1/tcp/40191/http
network_admin_server:
primary_network_admin_server_port: 34921
worker_network_admin_server_base_port: 43785
anemo:
send_certificate_rate_limit: ~
get_payload_availability_rate_limit: ~
get_certificates_rate_limit: ~
report_batch_rate_limit: ~
request_batch_rate_limit: ~
enable-event-processing: false
grpc-load-shed: ~
grpc-concurrency-limit: 20000000000
p2p-config:
listen-address: "127.0.0.1:40075"
external-address: /ip4/127.0.0.1/udp/40075
genesis:
genesis-file-location: /root/.sui/sui_config/genesis.blob
authority-store-pruning-config:
num-latest-epoch-dbs-to-retain: 3
epoch-db-pruning-period-secs: 3600
num-epochs-to-retain: 1
max-checkpoints-in-batch: 200
max-transactions-in-batch: 1000
use-range-deletion: true
end-of-epoch-broadcast-channel-capacity: 128
checkpoint-executor-config:
checkpoint-execution-max-concurrency: 200
local-execution-timeout-sec: 10
db-checkpoint-config:
perform-db-checkpoints-at-epoch-end: false
indirect-objects-threshold: 18446744073709551615

View File

@ -1,73 +0,0 @@
---
protocol-key-pair:
value: OXnx3yM1C/ppgnDMx/o1d49fJs7E05kq11mXNae/O+I=
worker-key-pair:
value: AFNNzJwFj3Xdc6SoCzXZ+8otMB5HXVBX/57G9JRkOJcJ
account-key-pair:
value: AIRtltXdA0Y0eLXY9eLpXFpZOcvP3HW9bzBnpVQMZs6Q
network-key-pair:
value: AOSqdS3WsvNdxqIZtKCK31wTPM5AqSkpDLkd56ZL/u+G
db-path: /root/.sui/sui_config/authorities_db/addeef94d898
network-address: /ip4/127.0.0.1/tcp/34255/http
json-rpc-address: "127.0.0.1:40709"
metrics-address: "127.0.0.1:43007"
admin-interface-port: 45245
consensus-config:
address: /ip4/127.0.0.1/tcp/41199/http
db-path: /root/.sui/sui_config/consensus_db/addeef94d898
internal-worker-address: ~
max-pending-transactions: ~
narwhal-config:
header_num_of_batches_threshold: 32
max_header_num_of_batches: 1000
max_header_delay: 2000ms
min_header_delay: 500ms
gc_depth: 50
sync_retry_delay: 5000ms
sync_retry_nodes: 3
batch_size: 500000
max_batch_delay: 100ms
block_synchronizer:
range_synchronize_timeout: 30000ms
certificates_synchronize_timeout: 30000ms
payload_synchronize_timeout: 30000ms
payload_availability_timeout: 30000ms
handler_certificate_deliver_timeout: 30000ms
consensus_api_grpc:
socket_addr: /ip4/127.0.0.1/tcp/36241/http
get_collections_timeout: 5000ms
remove_collections_timeout: 5000ms
max_concurrent_requests: 500000
prometheus_metrics:
socket_addr: /ip4/127.0.0.1/tcp/36547/http
network_admin_server:
primary_network_admin_server_port: 38113
worker_network_admin_server_base_port: 45711
anemo:
send_certificate_rate_limit: ~
get_payload_availability_rate_limit: ~
get_certificates_rate_limit: ~
report_batch_rate_limit: ~
request_batch_rate_limit: ~
enable-event-processing: false
grpc-load-shed: ~
grpc-concurrency-limit: 20000000000
p2p-config:
listen-address: "127.0.0.1:39953"
external-address: /ip4/127.0.0.1/udp/39953
genesis:
genesis-file-location: /root/.sui/sui_config/genesis.blob
authority-store-pruning-config:
num-latest-epoch-dbs-to-retain: 3
epoch-db-pruning-period-secs: 3600
num-epochs-to-retain: 1
max-checkpoints-in-batch: 200
max-transactions-in-batch: 1000
use-range-deletion: true
end-of-epoch-broadcast-channel-capacity: 128
checkpoint-executor-config:
checkpoint-execution-max-concurrency: 200
local-execution-timeout-sec: 10
db-checkpoint-config:
perform-db-checkpoints-at-epoch-end: false
indirect-objects-threshold: 18446744073709551615

View File

@ -1,73 +0,0 @@
---
protocol-key-pair:
value: CyNkjqNVr3HrHTH7f/NLs7u5lUHJzuPAw0PqMTD2y2s=
worker-key-pair:
value: ACKCL1GI/NLZHFVW1cUR6gu9fdh5ll/XpJWCRirrVDgj
account-key-pair:
value: AI5hzubOtOnMiBuXhZ2Cvnop5AQOxMHxhUdyPiy7/C37
network-key-pair:
value: AG5LdZdKNOxwTtshbJjyRcq3dJIHu9NQnBz4WwbQPl3K
db-path: /root/.sui/sui_config/authorities_db/b3fd5efb5c87
network-address: /ip4/127.0.0.1/tcp/43597/http
json-rpc-address: "127.0.0.1:40123"
metrics-address: "127.0.0.1:40221"
admin-interface-port: 44653
consensus-config:
address: /ip4/127.0.0.1/tcp/39661/http
db-path: /root/.sui/sui_config/consensus_db/b3fd5efb5c87
internal-worker-address: ~
max-pending-transactions: ~
narwhal-config:
header_num_of_batches_threshold: 32
max_header_num_of_batches: 1000
max_header_delay: 2000ms
min_header_delay: 500ms
gc_depth: 50
sync_retry_delay: 5000ms
sync_retry_nodes: 3
batch_size: 500000
max_batch_delay: 100ms
block_synchronizer:
range_synchronize_timeout: 30000ms
certificates_synchronize_timeout: 30000ms
payload_synchronize_timeout: 30000ms
payload_availability_timeout: 30000ms
handler_certificate_deliver_timeout: 30000ms
consensus_api_grpc:
socket_addr: /ip4/127.0.0.1/tcp/39889/http
get_collections_timeout: 5000ms
remove_collections_timeout: 5000ms
max_concurrent_requests: 500000
prometheus_metrics:
socket_addr: /ip4/127.0.0.1/tcp/40255/http
network_admin_server:
primary_network_admin_server_port: 38277
worker_network_admin_server_base_port: 41135
anemo:
send_certificate_rate_limit: ~
get_payload_availability_rate_limit: ~
get_certificates_rate_limit: ~
report_batch_rate_limit: ~
request_batch_rate_limit: ~
enable-event-processing: false
grpc-load-shed: ~
grpc-concurrency-limit: 20000000000
p2p-config:
listen-address: "127.0.0.1:35253"
external-address: /ip4/127.0.0.1/udp/35253
genesis:
genesis-file-location: /root/.sui/sui_config/genesis.blob
authority-store-pruning-config:
num-latest-epoch-dbs-to-retain: 3
epoch-db-pruning-period-secs: 3600
num-epochs-to-retain: 1
max-checkpoints-in-batch: 200
max-transactions-in-batch: 1000
use-range-deletion: true
end-of-epoch-broadcast-channel-capacity: 128
checkpoint-executor-config:
checkpoint-execution-max-concurrency: 200
local-execution-timeout-sec: 10
db-checkpoint-config:
perform-db-checkpoints-at-epoch-end: false
indirect-objects-threshold: 18446744073709551615

View File

@ -5,7 +5,7 @@ version = "0.1.0"
[dependencies.Sui]
git = "https://github.com/MystenLabs/sui.git"
subdir = "crates/sui-framework/packages/sui-framework"
rev = "09b2081498366df936abae26eea4b2d5cafb2788"
rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"
[dependencies.Wormhole]
local = "../../wormhole"

View File

@ -2,6 +2,8 @@
[move]
version = 0
manifest_digest = "F1027436A2346E82F07F1149F91C26F61778F611858CEA83F9D22BDEF50A7FD8"
deps_digest = "397E6A9F7A624706DBDFEE056CE88391A15876868FD18A88504DA74EB458D697"
dependencies = [
{ name = "Sui" },
@ -14,11 +16,11 @@ dev-dependencies = [
[[move.package]]
name = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "09b2081498366df936abae26eea4b2d5cafb2788", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "041c5f2bae2fe52079e44b70514333532d69f4e6", subdir = "crates/sui-framework/packages/move-stdlib" }
[[move.package]]
name = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "09b2081498366df936abae26eea4b2d5cafb2788", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "041c5f2bae2fe52079e44b70514333532d69f4e6", subdir = "crates/sui-framework/packages/sui-framework" }
dependencies = [
{ name = "MoveStdlib" },
@ -43,3 +45,8 @@ source = { local = "../../wormhole" }
dependencies = [
{ name = "Sui" },
]
[move.toolchain-version]
compiler-version = "1.19.0"
edition = "legacy"
flavor = "sui"

View File

@ -5,7 +5,7 @@ version = "0.1.0"
[dependencies.Sui]
git = "https://github.com/MystenLabs/sui.git"
subdir = "crates/sui-framework/packages/sui-framework"
rev = "09b2081498366df936abae26eea4b2d5cafb2788"
rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"
[dependencies.Wormhole]
local = "../../wormhole"

View File

@ -5,7 +5,7 @@ version = "1.0.0"
[dependencies.Sui]
git = "https://github.com/MystenLabs/sui.git"
subdir = "crates/sui-framework/packages/sui-framework"
rev = "09b2081498366df936abae26eea4b2d5cafb2788"
rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"
[dependencies.Wormhole]
local = "../../wormhole"

View File

@ -2,6 +2,8 @@
[move]
version = 0
manifest_digest = "E0D2B32F0A5B6F9A76311FD7A68260A698BD9ECCEAF95A779183CB374EC933FB"
deps_digest = "060AD7E57DFB13104F21BE5F5C3759D03F0553FC3229247D9A7A6B45F50D03A3"
dependencies = [
{ name = "Sui" },
@ -13,11 +15,11 @@ dev-dependencies = [
[[move.package]]
name = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "09b2081498366df936abae26eea4b2d5cafb2788", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "041c5f2bae2fe52079e44b70514333532d69f4e6", subdir = "crates/sui-framework/packages/move-stdlib" }
[[move.package]]
name = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "09b2081498366df936abae26eea4b2d5cafb2788", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "041c5f2bae2fe52079e44b70514333532d69f4e6", subdir = "crates/sui-framework/packages/sui-framework" }
dependencies = [
{ name = "MoveStdlib" },
@ -30,3 +32,8 @@ source = { local = "../../wormhole" }
dependencies = [
{ name = "Sui" },
]
[move.toolchain-version]
compiler-version = "1.19.0"
edition = "legacy"
flavor = "sui"

View File

@ -5,7 +5,7 @@ version = "1.0.0"
[dependencies.Sui]
git = "https://github.com/MystenLabs/sui.git"
subdir = "crates/sui-framework/packages/sui-framework"
rev = "09b2081498366df936abae26eea4b2d5cafb2788"
rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"
[dependencies.Wormhole]
local = "../../wormhole"

View File

@ -104,7 +104,7 @@ module core_messages::sender_test {
test_scenario::next_tx(scenario, admin);
{
let wormhole_state = take_state(scenario);
init_with_params(&mut wormhole_state, test_scenario::ctx(scenario));
init_with_params(&wormhole_state, test_scenario::ctx(scenario));
return_state(wormhole_state);
};

View File

@ -5,7 +5,7 @@ version = "0.0.1"
[dependencies.Sui]
git = "https://github.com/MystenLabs/sui.git"
subdir = "crates/sui-framework/packages/sui-framework"
rev = "09b2081498366df936abae26eea4b2d5cafb2788"
rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"
[dependencies.Wormhole]
local = "../../wormhole"

View File

@ -1,11 +1,9 @@
#!/bin/bash
source $HOME/.cargo/env
git clone https://github.com/MystenLabs/sui.git --branch devnet
cd sui
# Corresponds to https://github.com/MystenLabs/sui/releases/tag/testnet-1.0.0
git reset --hard 09b2081498366df936abae26eea4b2d5cafb2788
# Corresponds to https://github.com/MystenLabs/sui/releases/tag/mainnet-v1.19.1
git reset --hard 041c5f2bae2fe52079e44b70514333532d69f4e6
cargo --locked install --path crates/sui
cargo --locked install --path crates/sui-faucet

View File

@ -2,6 +2,4 @@
set -x
sui start >/dev/null 2>&1 &
sleep 5
sui-faucet --write-ahead-log faucet.log
sui start 2>&1

31
sui/scripts/switch.sh Executable file
View File

@ -0,0 +1,31 @@
#!/bin/bash
network="$1"
valid_networks=("devnet" "testnet" "mainnet" "reset")
usage() {
echo "Usage: $0 {devnet|testnet|mainnet|reset}" >&2
exit 1
}
if [[ ! " ${valid_networks[@]} " =~ " ${network} " ]]; then
echo "Error: Unrecognized network '${network}'."
usage
fi
git ls-files | grep 'Move.toml' | while read -r file; do
if [[ "$network" == "reset" ]]; then
echo "Resetting $file"
git checkout "$file" --quiet
else
dir=$(dirname "$file")
base=$(basename "$file")
new_file="${dir}/Move.$network.toml"
if [ -f "$new_file" ]; then
echo "Switching $file to $new_file"
rm "$file"
# Create a relative symlink
(cd "$dir" && ln -s "$(basename "$new_file")" "$base")
fi
fi
done

View File

@ -4,6 +4,3 @@ set -e
# Wait for sui to start
while [[ "$(curl -X POST -H "Content-Type: application/json" -d '{ "jsonrpc":"2.0", "method":"rpc.discover","id":1 }' -s -o /dev/null -w '%{http_code}' 0.0.0.0:9000/)" != "200" ]]; do sleep 1; done
# Wait for sui-faucet to start
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 0.0.0.0:5003/)" != "200" ]]; do sleep 1; done

View File

@ -5,7 +5,7 @@ version = "0.2.0"
[dependencies.Sui]
git = "https://github.com/MystenLabs/sui.git"
subdir = "crates/sui-framework/packages/sui-framework"
rev = "09b2081498366df936abae26eea4b2d5cafb2788"
rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"
[dependencies.Wormhole]
local = "../wormhole"

View File

@ -2,19 +2,24 @@
[move]
version = 0
manifest_digest = "868DAEC26B76907DDD55CB64F8F3373546E028B90763B6BD8D1544F7EB721AAD"
deps_digest = "060AD7E57DFB13104F21BE5F5C3759D03F0553FC3229247D9A7A6B45F50D03A3"
dependencies = [
{ name = "Sui" },
]
dev-dependencies = [
{ name = "Wormhole" },
]
[[move.package]]
name = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "09b2081498366df936abae26eea4b2d5cafb2788", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "041c5f2bae2fe52079e44b70514333532d69f4e6", subdir = "crates/sui-framework/packages/move-stdlib" }
[[move.package]]
name = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "09b2081498366df936abae26eea4b2d5cafb2788", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "041c5f2bae2fe52079e44b70514333532d69f4e6", subdir = "crates/sui-framework/packages/sui-framework" }
dependencies = [
{ name = "MoveStdlib" },
@ -27,3 +32,8 @@ source = { local = "../wormhole" }
dependencies = [
{ name = "Sui" },
]
[move.toolchain-version]
compiler-version = "1.19.0"
edition = "legacy"
flavor = "sui"

View File

@ -6,7 +6,7 @@ published-at = "0x26efee2b51c911237888e5dc6702868abca3c7ac12c53f76ef8eba0697695e
[dependencies.Sui]
git = "https://github.com/MystenLabs/sui.git"
subdir = "crates/sui-framework/packages/sui-framework"
rev = "09b2081498366df936abae26eea4b2d5cafb2788"
rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"
[dependencies.Wormhole]
local = "../wormhole"

View File

@ -6,7 +6,7 @@ published-at = "0x562760fc51d90d4ae1835bac3e91e0e6987d3497b06f066941d3e51f6e8d76
[dependencies.Sui]
git = "https://github.com/MystenLabs/sui.git"
subdir = "crates/sui-framework/packages/sui-framework"
rev = "09b2081498366df936abae26eea4b2d5cafb2788"
rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"
[dependencies.Wormhole]
local = "../wormhole"

View File

@ -5,7 +5,7 @@ version = "0.2.0"
[dependencies.Sui]
git = "https://github.com/MystenLabs/sui.git"
subdir = "crates/sui-framework/packages/sui-framework"
rev = "09b2081498366df936abae26eea4b2d5cafb2788"
rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"
[dependencies.Wormhole]
local = "../wormhole"

View File

@ -57,6 +57,7 @@ module token_bridge::complete_transfer {
sequence: u64
}
#[allow(lint(coin_field))]
/// This type is only generated from `authorize_transfer` and can only be
/// redeemed using `redeem_relayer_payout`. Integrators running relayer
/// contracts are expected to implement `redeem_relayer_payout` within their

View File

@ -45,6 +45,7 @@ module token_bridge::complete_transfer_with_payload {
/// `EmitterCap` address does not agree with encoded redeemer.
const E_INVALID_REDEEMER: u64 = 0;
#[allow(lint(coin_field))]
/// This type is only generated from `authorize_transfer` and can only be
/// redeemed using `redeem_coin`. Integrators are expected to implement
/// `redeem_coin` within their contracts and call `authorize_transfer` in a

View File

@ -90,6 +90,7 @@ module token_bridge::create_wrapped {
setup
}
#[allow(lint(share_owned))]
/// This function performs the bulk of `prepare_registration`, except
/// checking the module name. This separation is useful for testing.
fun prepare_registration_internal<CoinType: drop, Version>(

View File

@ -77,8 +77,8 @@ module token_bridge::wrapped_asset {
assert!(token_chain != chain_id(), E_SUI_CHAIN);
// Set metadata.
coin::update_name(&mut treasury_cap, coin_meta, name);
coin::update_symbol(&mut treasury_cap, coin_meta, string_utils::to_ascii(&symbol));
coin::update_name(&treasury_cap, coin_meta, name);
coin::update_symbol(&treasury_cap, coin_meta, string_utils::to_ascii(&symbol));
let decimals = cap_decimals(native_decimals);
@ -149,8 +149,8 @@ module token_bridge::wrapped_asset {
// Finally only update the name and symbol.
self.info.symbol = symbol;
coin::update_name(&mut self.treasury_cap, coin_meta, name);
coin::update_symbol(&mut self.treasury_cap, coin_meta, string_utils::to_ascii(&symbol));
coin::update_name(&self.treasury_cap, coin_meta, name);
coin::update_symbol(&self.treasury_cap, coin_meta, string_utils::to_ascii(&symbol));
}
#[test_only]

View File

@ -42,6 +42,7 @@ module token_bridge::setup {
);
}
#[allow(lint(share_owned))]
/// Only the owner of the `DeployerCap` can call this method. This
/// method destroys the capability and shares the `State` object.
public fun complete(

View File

@ -53,12 +53,14 @@ module token_bridge::coin_wrapped_12 {
UPDATED_VAA
}
#[allow(implicit_const_copy)]
public fun token_meta(): AssetMeta {
asset_meta::deserialize_test_only(
wormhole::vaa::peel_payload_from_vaa(&VAA)
)
}
#[allow(implicit_const_copy)]
public fun updated_token_meta(): AssetMeta {
asset_meta::deserialize_test_only(
wormhole::vaa::peel_payload_from_vaa(&UPDATED_VAA)

View File

@ -61,6 +61,7 @@ module token_bridge::coin_wrapped_7 {
VAA
}
#[allow(implicit_const_copy)]
public fun token_meta(): AssetMeta {
asset_meta::deserialize_test_only(
wormhole::vaa::peel_payload_from_vaa(&VAA)

View File

@ -5,7 +5,7 @@ version = "0.2.0"
[dependencies.Sui]
git = "https://github.com/MystenLabs/sui.git"
subdir = "crates/sui-framework/packages/sui-framework"
rev = "09b2081498366df936abae26eea4b2d5cafb2788"
rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"
[addresses]
wormhole = "_"

View File

@ -2,6 +2,8 @@
[move]
version = 0
manifest_digest = "E8C411A83F4F7EF268B73C732B9B6F49F7B204F0C9C2530765365C38B76EF646"
deps_digest = "F8BBB0CCB2491CA29A3DF03D6F92277A4F3574266507ACD77214D37ECA3F3082"
dependencies = [
{ name = "Sui" },
@ -9,12 +11,17 @@ dependencies = [
[[move.package]]
name = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "09b2081498366df936abae26eea4b2d5cafb2788", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "041c5f2bae2fe52079e44b70514333532d69f4e6", subdir = "crates/sui-framework/packages/move-stdlib" }
[[move.package]]
name = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "09b2081498366df936abae26eea4b2d5cafb2788", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "041c5f2bae2fe52079e44b70514333532d69f4e6", subdir = "crates/sui-framework/packages/sui-framework" }
dependencies = [
{ name = "MoveStdlib" },
]
[move.toolchain-version]
compiler-version = "1.19.0"
edition = "legacy"
flavor = "sui"

View File

@ -6,7 +6,7 @@ published-at = "0x5306f64e312b581766351c07af79c72fcb1cd25147157fdc2f8ad76de9a3fb
[dependencies.Sui]
git = "https://github.com/MystenLabs/sui.git"
subdir = "crates/sui-framework/packages/sui-framework"
rev = "09b2081498366df936abae26eea4b2d5cafb2788"
rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"
[addresses]
wormhole = "0x5306f64e312b581766351c07af79c72fcb1cd25147157fdc2f8ad76de9a3fb6a"

View File

@ -6,7 +6,7 @@ published-at = "0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a
[dependencies.Sui]
git = "https://github.com/MystenLabs/sui.git"
subdir = "crates/sui-framework/packages/sui-framework"
rev = "09b2081498366df936abae26eea4b2d5cafb2788"
rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"
[addresses]
wormhole = "0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94"

View File

@ -5,7 +5,7 @@ version = "0.2.0"
[dependencies.Sui]
git = "https://github.com/MystenLabs/sui.git"
subdir = "crates/sui-framework/packages/sui-framework"
rev = "09b2081498366df936abae26eea4b2d5cafb2788"
rev = "041c5f2bae2fe52079e44b70514333532d69f4e6"
[addresses]
wormhole = "_"

View File

@ -40,6 +40,7 @@ module wormhole::setup {
);
}
#[allow(lint(share_owned))]
/// Only the owner of the `DeployerCap` can call this method. This
/// method destroys the capability and shares the `State` object.
public fun complete(