├── .cargo └── config.toml ├── .dockerignore ├── .envrc ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── actions │ └── gali │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── action.yml │ │ └── entrypoint.sh ├── pull_request_template.md └── workflows │ ├── build-push-container.yml │ ├── build-push-containers-all.yml │ ├── build-push-manifest.yml │ ├── build-tag.yml │ ├── checks-all.yml │ ├── checks-conventional-commits.yml │ ├── handle-target-comment.yml │ ├── tag-semantic-version.yml │ └── target-comment.yml ├── .gitignore ├── .gitmodules ├── CHANGELOG.md ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── benches └── howzit │ ├── Cargo.toml │ ├── howzit │ ├── .gitignore │ ├── Move.toml │ └── sources │ │ └── howzit.move │ └── src │ ├── bin │ └── howzit-bench.rs │ ├── howzit.rs │ └── lib.rs ├── cache └── solidity-files-cache.json ├── cog.toml ├── config.json ├── demo └── hsm │ ├── Cargo.toml │ └── src │ ├── action_stream │ ├── join.rs │ ├── mod.rs │ ├── notify_verify.rs │ └── random.rs │ ├── cli │ ├── mod.rs │ └── server │ │ ├── ed25519 │ │ ├── hashi_corp_vault.rs │ │ └── mod.rs │ │ ├── mod.rs │ │ └── secp256k1 │ │ ├── aws_kms.rs │ │ └── mod.rs │ ├── cryptography │ ├── aws_kms.rs │ ├── google_kms.rs │ ├── hashicorp_vault.rs │ ├── mod.rs │ └── verifier.rs │ ├── lib.rs │ ├── main.rs │ └── server.rs ├── docker ├── README.md ├── build │ ├── bridge-service │ │ └── Dockerfile │ ├── bridge-setup │ │ └── Dockerfile │ ├── helios │ │ └── Dockerfile │ ├── hsm-demo │ │ └── Dockerfile │ ├── movement-celestia-appd │ │ └── Dockerfile │ ├── movement-celestia-bridge │ │ └── Dockerfile │ ├── movement-celestia-da-light-node │ │ └── Dockerfile │ ├── movement-config │ │ └── Dockerfile │ ├── movement-faucet-service │ │ └── Dockerfile │ ├── movement-full-node-setup │ │ └── Dockerfile │ ├── movement-full-node │ │ └── Dockerfile │ ├── movement-indexer │ │ └── Dockerfile │ ├── movement-tests-e2e-followers-consistent │ │ └── Dockerfile │ ├── movement-tests-e2e-simple-interaction │ │ └── Dockerfile │ ├── movement-util │ │ └── Dockerfile │ └── wait-for-celestia-light-node │ │ └── Dockerfile └── compose │ ├── grafana-alloy │ ├── README.md │ ├── config.alloy │ ├── docker-compose.yml │ └── img │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ └── 4.png │ ├── movement-full-node │ ├── docker-compose.bardock-follower.yml │ ├── docker-compose.celestia-mainnet.yml │ ├── docker-compose.da-sequencer.yml │ ├── docker-compose.faucet-replicas.yml │ ├── docker-compose.faucet.yml │ ├── docker-compose.follower.backup.yml │ ├── docker-compose.follower.yml │ ├── docker-compose.fullnode.yml │ ├── docker-compose.fullnode_setup.yml │ ├── docker-compose.leader.yml │ ├── docker-compose.ledger-should-progress.yml │ ├── docker-compose.local.yml │ ├── docker-compose.mainnet-follower.yml │ ├── docker-compose.mainnet-leader.yml │ ├── docker-compose.telemetry.yml │ ├── docker-compose.test-followers.yml │ ├── docker-compose.test.yml │ ├── docker-compose.yml │ ├── ledger-should-progress.sh │ ├── otel-collector-config.yaml │ ├── prometheus.yml │ └── snapshot │ │ ├── docker-compose.backup.yml │ │ ├── docker-compose.restore.yml │ │ └── docker-compose.save_db.yml │ └── movement-indexer │ ├── README.md │ ├── docker-compose.hasura.yml │ ├── docker-compose.indexer.yml │ ├── docker-compose.local-development.indexer.yml │ └── indexer-config.json ├── docs ├── explorer │ └── README.md ├── indexer │ └── README.md ├── movement-node-experimental │ ├── README.md │ ├── l-monninger │ │ └── open-network │ │ │ ├── README.md │ │ │ ├── movement-full-follower.service.j2 │ │ │ └── movement-full-follower.yml │ └── open-network.md ├── movement-node │ ├── indexer-explorer │ │ └── README.md │ ├── run-fullnode │ │ ├── README.md │ │ ├── ansible │ │ │ ├── devnet │ │ │ │ ├── README.md │ │ │ │ ├── movement-fullnode.service.j2 │ │ │ │ └── movement-fullnode.yml │ │ │ ├── mainnet │ │ │ │ ├── README.md │ │ │ │ ├── movement-fullnode.service.j2 │ │ │ │ └── movement-fullnode.yml │ │ │ └── testnet │ │ │ │ ├── README.md │ │ │ │ ├── movement-fullnode.service.j2 │ │ │ │ └── movement-fullnode.yml │ │ ├── manual │ │ │ ├── README.md │ │ │ ├── follower-node │ │ │ │ └── README.md │ │ │ └── movement-full-node.service.template │ │ └── scripts │ │ │ ├── devnet │ │ │ ├── backup.sh │ │ │ └── restore.sh │ │ │ ├── mainnet │ │ │ ├── backup.sh │ │ │ └── restore.sh │ │ │ ├── setup_migrate.sh │ │ │ └── testnet │ │ │ ├── backup.sh │ │ │ └── restore.sh │ └── run │ │ ├── ansible │ │ ├── README.md │ │ └── follower-node │ │ │ ├── README.md │ │ │ ├── mainnet │ │ │ ├── README.md │ │ │ ├── movement-full-follower.service.j2 │ │ │ └── movement-full-follower.yml │ │ │ └── testnet │ │ │ ├── movement-full-follower.service.j2 │ │ │ └── movement-full-follower.yml │ │ └── manual │ │ ├── README.md │ │ ├── follower-node │ │ └── README.md │ │ └── movement-full-node.service.template └── testing │ ├── README.md │ └── pipeline │ └── README.md ├── flake.lock ├── flake.nix ├── img ├── movement-labs-logo-yellow.png └── movement-logo.png ├── justfile ├── networks ├── README.md └── movement │ ├── faucet │ ├── Cargo.toml │ └── src │ │ └── main.rs │ ├── indexer │ ├── Cargo.toml │ ├── bin │ │ └── load_metadata.rs │ ├── hasura_metadata.json │ └── src │ │ ├── main.rs │ │ └── service.rs │ ├── movement-client │ ├── Cargo.toml │ └── src │ │ ├── bin │ │ └── e2e │ │ │ ├── bardock_alice_bob.rs │ │ │ ├── demo_scenario.rs │ │ │ ├── followers_consistent.rs │ │ │ ├── gas_dos.rs │ │ │ ├── ggp_gas_fee.rs │ │ │ ├── key_rotation.rs │ │ │ ├── load_alice_bob.rs │ │ │ ├── sequence_number_ooo.rs │ │ │ ├── simple_interaction.rs │ │ │ ├── soak_alice_bob.rs │ │ │ ├── transfer.rs │ │ │ └── whitelist.rs │ │ ├── lib.rs │ │ ├── load_soak_testing │ │ ├── mod.rs │ │ ├── scenario.rs │ │ └── util.rs │ │ ├── move-modules │ │ ├── Move.toml │ │ ├── scripts │ │ │ └── rotate.move │ │ └── sources │ │ │ └── placeholder.move │ │ └── tests │ │ ├── complex-alice │ │ ├── .gitignore │ │ ├── Move.toml │ │ ├── deploy.sh │ │ └── sources │ │ │ └── resource_roulette.move │ │ ├── hey-partners │ │ ├── .gitignore │ │ ├── Faucet │ │ │ ├── Move.toml │ │ │ └── sources │ │ │ │ └── faucet.move │ │ ├── LICENSE │ │ ├── LPCoin │ │ │ ├── Move.toml │ │ │ └── sources │ │ │ │ └── LPCoin.move │ │ ├── LPResourceAccount │ │ │ ├── Move.toml │ │ │ └── sources │ │ │ │ └── resourceAccount.move │ │ ├── README.md │ │ ├── Swap │ │ │ ├── Move.toml │ │ │ └── sources │ │ │ │ ├── swap.move │ │ │ │ └── swap_library.move │ │ ├── TestCoin │ │ │ ├── Move.toml │ │ │ └── sources │ │ │ │ └── testCoins.move │ │ ├── test.sh │ │ ├── tests │ │ │ ├── rust-sdk │ │ │ │ ├── .cargo │ │ │ │ │ └── config.toml │ │ │ │ ├── Cargo.toml │ │ │ │ └── main.rs │ │ │ └── typescript-sdk │ │ │ │ ├── .gitignore │ │ │ │ ├── main.test.ts │ │ │ │ ├── package-lock.json │ │ │ │ ├── package.json │ │ │ │ ├── pnpm-lock.yaml │ │ │ │ └── tsconfig.spec.json │ │ ├── u256 │ │ │ ├── Move.toml │ │ │ └── sources │ │ │ │ └── u256.move │ │ └── uq64x64 │ │ │ ├── Move.toml │ │ │ └── sources │ │ │ └── uq64x64.move │ │ ├── indexer_stream.rs │ │ └── mod.rs │ ├── movement-config │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ ├── migrations │ │ ├── elsa_to_biarritz_rc1 │ │ │ ├── dot_movement.rs │ │ │ └── mod.rs │ │ └── mod.rs │ │ ├── ops │ │ ├── aptos │ │ │ ├── framework │ │ │ │ ├── mod.rs │ │ │ │ └── releases │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── release_signer.rs │ │ │ ├── mod.rs │ │ │ ├── rest_client.rs │ │ │ ├── rotate_key │ │ │ │ ├── core_resource_account │ │ │ │ │ ├── dot_movement.rs │ │ │ │ │ ├── load_key_rotation_signer.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── signer.rs │ │ │ │ └── mod.rs │ │ │ └── signer.rs │ │ └── mod.rs │ │ └── releases │ │ ├── biarritz_rc1 │ │ ├── da_db.rs │ │ ├── execution_extension.rs │ │ ├── mod.rs │ │ └── syncing.rs │ │ └── mod.rs │ ├── movement-full-node │ ├── Cargo.toml │ └── src │ │ ├── admin │ │ ├── bring_up │ │ │ ├── biarritz_rc1_to_pre_l1_merge │ │ │ │ ├── downgrade.rs │ │ │ │ ├── mod.rs │ │ │ │ └── upgrade.rs │ │ │ ├── elsa_to_biarritz_rc1 │ │ │ │ ├── downgrade.rs │ │ │ │ ├── mod.rs │ │ │ │ └── upgrade.rs │ │ │ └── mod.rs │ │ ├── config │ │ │ ├── migrate │ │ │ │ ├── elsa_to_biarritz_rc1 │ │ │ │ │ └── mod.rs │ │ │ │ └── mod.rs │ │ │ └── mod.rs │ │ ├── framework │ │ │ ├── mod.rs │ │ │ └── upgrade │ │ │ │ ├── biarritz_rc1 │ │ │ │ └── mod.rs │ │ │ │ ├── commit_hash │ │ │ │ └── mod.rs │ │ │ │ ├── elsa │ │ │ │ └── mod.rs │ │ │ │ └── mod.rs │ │ ├── governed_gas_pool │ │ │ ├── fund │ │ │ │ └── mod.rs │ │ │ └── mod.rs │ │ ├── mcr │ │ │ ├── force_commitment.rs │ │ │ └── mod.rs │ │ ├── mod.rs │ │ ├── ops │ │ │ ├── mint_lock.rs │ │ │ └── mod.rs │ │ ├── rotate_key │ │ │ ├── core_resource_account │ │ │ │ └── mod.rs │ │ │ ├── known_signer │ │ │ │ └── mod.rs │ │ │ ├── mcr_validator │ │ │ │ └── mod.rs │ │ │ └── mod.rs │ │ └── testkey │ │ │ └── mod.rs │ │ ├── backup │ │ └── mod.rs │ │ ├── common_args.rs │ │ ├── da │ │ ├── mod.rs │ │ ├── read_block.rs │ │ ├── run.rs │ │ └── stream_blocks │ │ │ └── mod.rs │ │ ├── lib.rs │ │ ├── main.rs │ │ ├── node │ │ ├── da_db.rs │ │ ├── manager.rs │ │ ├── mod.rs │ │ ├── partial.rs │ │ └── tasks │ │ │ ├── execute_settle.rs │ │ │ ├── mod.rs │ │ │ └── state_verifier.rs │ │ ├── run │ │ └── mod.rs │ │ ├── state │ │ ├── mod.rs │ │ ├── node │ │ │ ├── commitment.rs │ │ │ └── mod.rs │ │ └── settlement │ │ │ ├── accepted_commitment.rs │ │ │ ├── commitment.rs │ │ │ └── mod.rs │ │ └── tests │ │ ├── e2e │ │ ├── mod.rs │ │ └── remote_da.rs │ │ └── mod.rs │ ├── movement-util │ ├── Cargo.toml │ └── src │ │ ├── common_args.rs │ │ ├── lib.rs │ │ ├── main.rs │ │ └── syncing │ │ ├── delete_resource.rs │ │ ├── downsync.rs │ │ ├── mod.rs │ │ └── upsync.rs │ └── setup │ ├── Cargo.toml │ └── src │ ├── lib.rs │ ├── local.rs │ ├── main.rs │ └── migrate.rs ├── out └── WETH9.sol │ └── WETH9.json ├── package-lock.json ├── package.json ├── payload.json ├── pnpm-lock.yaml ├── process-compose ├── m1-da-light-node │ ├── process-compose.arabica.yml │ ├── process-compose.build.yml │ ├── process-compose.local.yml │ ├── process-compose.setup.yml │ ├── process-compose.test.yml │ └── process-compose.yml ├── mcr-client │ ├── process-compose.build.yml │ ├── process-compose.local.yml │ ├── process-compose.test.yml │ └── process-compose.yml └── movement-full-node │ ├── README.md │ ├── process-compose.bardock-follower.yml │ ├── process-compose.build.yml │ ├── process-compose.celestia-arabica.yml │ ├── process-compose.celestia-local.yml │ ├── process-compose.celestia-mainnet.yml │ ├── process-compose.celestia-mocha.yml │ ├── process-compose.complex-alice-load.yml │ ├── process-compose.complex-alice-soak.yml │ ├── process-compose.complex-alice.yml │ ├── process-compose.deploy.yml │ ├── process-compose.eth-holesky.yml │ ├── process-compose.eth-local.yml │ ├── process-compose.feed.yml │ ├── process-compose.flamegraph.yml │ ├── process-compose.fullnode.yml │ ├── process-compose.gas-dos.yml │ ├── process-compose.genesis-elsa.yml │ ├── process-compose.genesis-head.yml │ ├── process-compose.hasura.yml │ ├── process-compose.hey-partners-load.yml │ ├── process-compose.hey-partners-soak.yml │ ├── process-compose.howzit.yml │ ├── process-compose.hsm.yml │ ├── process-compose.indexer-test.yml │ ├── process-compose.indexer.yml │ ├── process-compose.load.yml │ ├── process-compose.setup.yml │ ├── process-compose.soak.yml │ ├── process-compose.telemetry.yml │ ├── process-compose.test-bring-up-biarritz-rc1-to-pre-l1-merge.yml │ ├── process-compose.test-bring-up-elsa-to-biarritz-rc1.yml │ ├── process-compose.test-followers.yml │ ├── process-compose.test-force-commitment.yml │ ├── process-compose.test-ggp-gas-fee.yml │ ├── process-compose.test-key-rotation.yml │ ├── process-compose.test-migrate-biarritz-rc1-to-pre-l1-merge.yml │ ├── process-compose.test-migrate-elsa-to-biarritz-rc1.yml │ ├── process-compose.test-mock-da.yml │ ├── process-compose.test-sequence-number-ooo.yml │ ├── process-compose.test-upgrade-biarritz-rc1.yml │ ├── process-compose.test-upgrade-elsa.yml │ ├── process-compose.test-upgrade-pre-l1-merge.yml │ ├── process-compose.test-whitelist.yml │ ├── process-compose.test.yml │ ├── process-compose.with-snapshot-node.yml │ ├── process-compose.yml │ └── process-composer.open-network-leader.yml ├── proposal.move ├── proto └── movementlabs │ └── protocol_units │ ├── bridge │ └── v1beta1.proto │ └── da │ ├── light_node │ ├── v1beta1.proto │ └── v1beta2.proto │ └── sequencer │ └── v1.proto ├── protocol-units ├── README.md ├── access-control │ └── aptos │ │ └── account-whitelist │ │ ├── Cargo.toml │ │ └── src │ │ ├── config │ │ └── mod.rs │ │ ├── file │ │ └── mod.rs │ │ └── lib.rs ├── bridge │ └── contracts │ │ └── minter │ │ ├── .gitignore │ │ └── Move.toml ├── cryptography │ └── tentacles │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── proptest-regressions │ │ ├── tests │ │ │ ├── jellyfish_merkle.txt │ │ │ ├── node_type.txt │ │ │ ├── restore.txt │ │ │ └── update_proof.txt │ │ └── tree │ │ │ └── ics23_impl.txt │ │ └── src │ │ ├── bytes32ext.rs │ │ ├── iterator.rs │ │ ├── lib.rs │ │ ├── mock.rs │ │ ├── node_type.rs │ │ ├── reader.rs │ │ ├── restore.rs │ │ ├── tests.rs │ │ ├── tests │ │ ├── compute_vectors.rs │ │ ├── helper.rs │ │ ├── iterator.rs │ │ ├── jellyfish_merkle.rs │ │ ├── nibble_path.rs │ │ ├── node_type.rs │ │ ├── restore.rs │ │ ├── sha2_256_vectors.json │ │ ├── tree_cache.rs │ │ ├── update_proof.rs │ │ └── vectors.rs │ │ ├── tree.rs │ │ ├── tree │ │ └── ics23_impl.rs │ │ ├── tree_cache.rs │ │ ├── types.rs │ │ ├── types │ │ ├── access_path.rs │ │ ├── block_info.rs │ │ ├── nibble.rs │ │ ├── nibble │ │ │ └── nibble_path.rs │ │ ├── proof.rs │ │ ├── proof │ │ │ ├── definition.rs │ │ │ └── proptest_proof.rs │ │ └── transaction │ │ │ └── change_set.rs │ │ └── writer.rs ├── da-sequencer │ ├── client │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── config │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── node │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── batch.rs │ │ │ ├── block.rs │ │ │ ├── celestia │ │ │ ├── blob.rs │ │ │ ├── client.rs │ │ │ ├── height.rs │ │ │ ├── mock.rs │ │ │ ├── mod.rs │ │ │ └── submit.rs │ │ │ ├── error.rs │ │ │ ├── healthcheck.rs │ │ │ ├── lib.rs │ │ │ ├── main.rs │ │ │ ├── server.rs │ │ │ ├── storage │ │ │ └── mod.rs │ │ │ ├── tests │ │ │ ├── client.rs │ │ │ ├── mock.rs │ │ │ ├── mod.rs │ │ │ └── whitelist.rs │ │ │ └── whitelist.rs │ ├── proto │ │ ├── Cargo.toml │ │ ├── build.rs │ │ └── src │ │ │ └── lib.rs │ └── setup │ │ ├── Cargo.toml │ │ └── src │ │ ├── lib.rs │ │ ├── local.rs │ │ └── main.rs ├── da │ └── movement │ │ ├── protocol │ │ ├── README.md │ │ ├── celestia-runners │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── bin │ │ │ │ ├── celestia-appd.rs │ │ │ │ ├── celestia-bridge.rs │ │ │ │ └── celestia-light.rs │ │ │ │ ├── celestia_appd │ │ │ │ ├── local.rs │ │ │ │ └── mod.rs │ │ │ │ ├── celestia_bridge │ │ │ │ ├── local.rs │ │ │ │ └── mod.rs │ │ │ │ ├── celestia_light │ │ │ │ ├── arabica.rs │ │ │ │ ├── mainnet.rs │ │ │ │ ├── mocha.rs │ │ │ │ └── mod.rs │ │ │ │ └── lib.rs │ │ ├── client │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── http1.rs │ │ │ │ ├── http2.rs │ │ │ │ └── lib.rs │ │ ├── da │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── mock │ │ │ │ └── mod.rs │ │ ├── light-node-signer │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── light-node │ │ │ ├── Cargo.toml │ │ │ ├── README.md │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ ├── light_node.rs │ │ │ │ ├── main.rs │ │ │ │ ├── manager.rs │ │ │ │ ├── passthrough.rs │ │ │ │ └── sequencer.rs │ │ ├── prevalidator │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── aptos.rs │ │ │ │ └── lib.rs │ │ ├── proto │ │ │ ├── Cargo.toml │ │ │ ├── build.rs │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── setup │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── arabica.rs │ │ │ │ ├── bin │ │ │ │ └── setup.rs │ │ │ │ ├── common │ │ │ │ ├── celestia.rs │ │ │ │ ├── file.rs │ │ │ │ ├── memseq.rs │ │ │ │ └── mod.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── local.rs │ │ │ │ ├── mainnet.rs │ │ │ │ └── mocha.rs │ │ ├── tests │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── test │ │ │ │ ├── e2e │ │ │ │ ├── mod.rs │ │ │ │ └── raw │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── passthrough.rs │ │ │ │ │ └── sequencer.rs │ │ │ │ └── mod.rs │ │ ├── util │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── bin │ │ │ │ └── wait_for_light_node.rs │ │ │ │ ├── blob │ │ │ │ ├── ir │ │ │ │ │ ├── blob.rs │ │ │ │ │ ├── data.rs │ │ │ │ │ ├── id.rs │ │ │ │ │ └── mod.rs │ │ │ │ └── mod.rs │ │ │ │ ├── config │ │ │ │ ├── appd.rs │ │ │ │ ├── bridge.rs │ │ │ │ ├── da_light_node.rs │ │ │ │ ├── default.rs │ │ │ │ ├── digest_store.rs │ │ │ │ ├── light.rs │ │ │ │ └── mod.rs │ │ │ │ └── lib.rs │ │ └── verifier │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ ├── lib.rs │ │ │ └── signed │ │ │ └── mod.rs │ │ └── providers │ │ ├── celestia │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── blob │ │ │ ├── ir.rs │ │ │ └── mod.rs │ │ │ ├── da │ │ │ └── mod.rs │ │ │ └── lib.rs │ │ ├── digest-store │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── da │ │ │ ├── db.rs │ │ │ └── mod.rs │ │ │ └── lib.rs │ │ └── disk-fifo │ │ ├── Cargo.toml │ │ └── src │ │ ├── da │ │ ├── db.rs │ │ └── mod.rs │ │ └── lib.rs ├── execution │ └── maptos │ │ ├── dof │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── lib.rs │ │ │ ├── services.rs │ │ │ └── v1.rs │ │ ├── fin-view │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── fin_view.rs │ │ │ ├── lib.rs │ │ │ └── service.rs │ │ ├── framework │ │ ├── migrations │ │ │ ├── README.md │ │ │ ├── biarritz-rc1-to-pre-l1-merge │ │ │ │ ├── Cargo.toml │ │ │ │ └── src │ │ │ │ │ ├── dot_movement.rs │ │ │ │ │ └── lib.rs │ │ │ └── elsa-to-biarritz-rc1 │ │ │ │ ├── Cargo.toml │ │ │ │ └── src │ │ │ │ ├── dot_movement.rs │ │ │ │ └── lib.rs │ │ └── releases │ │ │ ├── README.md │ │ │ ├── biarritz-rc1 │ │ │ ├── Cargo.toml │ │ │ ├── build.rs │ │ │ ├── mrb_cache │ │ │ │ ├── 27397b5835e6a466c06c884a395653c9ff13d1fe-biarritz-rc1.mrb │ │ │ │ ├── aa45303216be96ea30d361ab7eb2e95fb08c2dcb-biarritz-rc1.mrb │ │ │ │ ├── biarritz-rc1.mrb │ │ │ │ └── d86339c130c3a9afd9413db95412b7586b78c905-biarritz-rc1.mrb │ │ │ └── src │ │ │ │ ├── bin │ │ │ │ └── release.rs │ │ │ │ ├── cached.rs │ │ │ │ └── lib.rs │ │ │ ├── elsa │ │ │ ├── Cargo.toml │ │ │ ├── README.md │ │ │ ├── build.rs │ │ │ ├── mrb_cache │ │ │ │ ├── 9dfc8e7a3d622597dfd81cc4ba480a5377f87a41-elsa.mrb │ │ │ │ └── elsa.mrb │ │ │ └── src │ │ │ │ ├── bin │ │ │ │ └── release.rs │ │ │ │ ├── cached.rs │ │ │ │ └── lib.rs │ │ │ ├── feature-flags │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ │ ├── head │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── bin │ │ │ │ └── release.rs │ │ │ │ └── lib.rs │ │ │ ├── known-release │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ │ ├── latest │ │ │ ├── Cargo.toml │ │ │ ├── README.md │ │ │ └── src │ │ │ │ └── lib.rs │ │ │ ├── parent │ │ │ ├── Cargo.toml │ │ │ ├── README.md │ │ │ └── src │ │ │ │ └── lib.rs │ │ │ ├── pre-l1-merge │ │ │ ├── Cargo.toml │ │ │ ├── build.rs │ │ │ ├── mrb_cache │ │ │ │ └── edafe2e5ed6ce462fa81d08faf5d5008fa836ca2-pre-l1-merge.mrb │ │ │ └── src │ │ │ │ ├── bin │ │ │ │ └── release.rs │ │ │ │ ├── cached.rs │ │ │ │ └── lib.rs │ │ │ ├── release-script │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ │ ├── upgrade-gas │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ │ └── util │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ ├── compiler.rs │ │ │ ├── lib.rs │ │ │ └── voter.rs │ │ ├── opt-executor │ │ ├── Cargo.toml │ │ ├── src │ │ │ ├── background │ │ │ │ ├── error.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── read_only.rs │ │ │ │ ├── task.rs │ │ │ │ └── transaction_pipe.rs │ │ │ ├── bootstrap.rs │ │ │ ├── context.rs │ │ │ ├── executor │ │ │ │ ├── execution.rs │ │ │ │ ├── initialization.rs │ │ │ │ └── mod.rs │ │ │ ├── gc_account_sequence_number.rs │ │ │ ├── indexer.rs │ │ │ ├── lib.rs │ │ │ └── service.rs │ │ └── transaction-pipe.md │ │ └── util │ │ ├── Cargo.toml │ │ └── src │ │ ├── config │ │ ├── chain.rs │ │ ├── client.rs │ │ ├── common.rs │ │ ├── da_sequencer.rs │ │ ├── faucet.rs │ │ ├── fin.rs │ │ ├── indexer.rs │ │ ├── indexer_processor.rs │ │ ├── load_shedding.rs │ │ ├── mempool.rs │ │ └── mod.rs │ │ └── lib.rs ├── mempool │ ├── move-rocks │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ └── util │ │ ├── Cargo.toml │ │ └── src │ │ └── lib.rs ├── movement-rest │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── sequencing │ ├── README.md │ ├── memseq │ │ ├── sequencer │ │ │ ├── Cargo.toml │ │ │ ├── README.md │ │ │ └── src │ │ │ │ └── lib.rs │ │ └── util │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ └── lib.rs │ └── util │ │ ├── Cargo.toml │ │ └── src │ │ └── lib.rs ├── settlement │ ├── README.md │ └── mcr │ │ ├── README.md │ │ ├── client │ │ ├── Cargo.toml │ │ ├── abis │ │ │ ├── MCR.json │ │ │ ├── MOVEToken.json │ │ │ └── MovementStaking.json │ │ └── src │ │ │ ├── bin │ │ │ └── e2e │ │ │ │ └── test_client_settlement.rs │ │ │ ├── eth_client.rs │ │ │ ├── lib.rs │ │ │ ├── mock.rs │ │ │ └── send_eth_transaction.rs │ │ ├── config │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── common │ │ │ ├── deploy.rs │ │ │ ├── eth_connection.rs │ │ │ ├── mod.rs │ │ │ ├── settlement.rs │ │ │ ├── staking.rs │ │ │ ├── testing.rs │ │ │ └── transactions.rs │ │ │ └── lib.rs │ │ ├── contracts │ │ ├── .gitignore │ │ ├── .prettierrc │ │ ├── README.md │ │ ├── artifacts │ │ │ └── MOVEToken-v1-eth-mainnet │ │ │ │ ├── AccessControl.sol │ │ │ │ └── AccessControl.json │ │ │ │ ├── AccessControlUpgradeable.sol │ │ │ │ └── AccessControlUpgradeable.json │ │ │ │ ├── Address.sol │ │ │ │ └── Address.json │ │ │ │ ├── Base.sol │ │ │ │ ├── CommonBase.json │ │ │ │ ├── ScriptBase.json │ │ │ │ └── TestBase.json │ │ │ │ ├── BaseSettlement.sol │ │ │ │ └── BaseSettlement.json │ │ │ │ ├── BaseStaking.sol │ │ │ │ └── BaseStaking.json │ │ │ │ ├── BaseToken.sol │ │ │ │ └── BaseToken.json │ │ │ │ ├── Bytes32AddressLib.sol │ │ │ │ └── Bytes32AddressLib.json │ │ │ │ ├── CREATE3.sol │ │ │ │ └── CREATE3.json │ │ │ │ ├── CREATE3Factory.sol │ │ │ │ └── CREATE3Factory.json │ │ │ │ ├── CompatibilityFallbackHandler.sol │ │ │ │ └── CompatibilityFallbackHandler.json │ │ │ │ ├── Context.sol │ │ │ │ └── Context.json │ │ │ │ ├── ContextUpgradeable.sol │ │ │ │ └── ContextUpgradeable.json │ │ │ │ ├── CoreDeployer.s.sol │ │ │ │ └── CoreDeployer.json │ │ │ │ ├── CustodianToken.sol │ │ │ │ ├── CustodianToken.json │ │ │ │ └── ICustodianToken.json │ │ │ │ ├── ECDSA.sol │ │ │ │ └── ECDSA.json │ │ │ │ ├── EIP712Upgradeable.sol │ │ │ │ └── EIP712Upgradeable.json │ │ │ │ ├── ERC1155Holder.sol │ │ │ │ └── ERC1155Holder.json │ │ │ │ ├── ERC1155TokenReceiver.sol │ │ │ │ └── ERC1155TokenReceiver.json │ │ │ │ ├── ERC165.sol │ │ │ │ └── ERC165.json │ │ │ │ ├── ERC165Upgradeable.sol │ │ │ │ └── ERC165Upgradeable.json │ │ │ │ ├── ERC1967Proxy.sol │ │ │ │ └── ERC1967Proxy.json │ │ │ │ ├── ERC1967Utils.sol │ │ │ │ └── ERC1967Utils.json │ │ │ │ ├── ERC20 │ │ │ │ └── IERC20.sol │ │ │ │ │ └── IERC20.json │ │ │ │ ├── ERC20PermitUpgradeable.sol │ │ │ │ └── ERC20PermitUpgradeable.json │ │ │ │ ├── ERC20Upgradeable.sol │ │ │ │ └── ERC20Upgradeable.json │ │ │ │ ├── ERC721Holder.sol │ │ │ │ └── ERC721Holder.json │ │ │ │ ├── ERC721TokenReceiver.sol │ │ │ │ └── ERC721TokenReceiver.json │ │ │ │ ├── ERC777TokensRecipient.sol │ │ │ │ └── ERC777TokensRecipient.json │ │ │ │ ├── Enum.sol │ │ │ │ └── Enum.json │ │ │ │ ├── EnumerableSet.sol │ │ │ │ └── EnumerableSet.json │ │ │ │ ├── Executor.sol │ │ │ │ └── Executor.json │ │ │ │ ├── FallbackManager.sol │ │ │ │ └── FallbackManager.json │ │ │ │ ├── GuardManager.sol │ │ │ │ ├── BaseGuard.json │ │ │ │ ├── Guard.json │ │ │ │ └── GuardManager.json │ │ │ │ ├── Helper.sol │ │ │ │ └── Helper.json │ │ │ │ ├── IAccessControl.sol │ │ │ │ └── IAccessControl.json │ │ │ │ ├── IBeacon.sol │ │ │ │ └── IBeacon.json │ │ │ │ ├── ICREATE3Factory.sol │ │ │ │ └── ICREATE3Factory.json │ │ │ │ ├── IERC1155Receiver.sol │ │ │ │ └── IERC1155Receiver.json │ │ │ │ ├── IERC165.sol │ │ │ │ └── IERC165.json │ │ │ │ ├── IERC1967.sol │ │ │ │ └── IERC1967.json │ │ │ │ ├── IERC20.sol │ │ │ │ └── IERC20.json │ │ │ │ ├── IERC20Metadata.sol │ │ │ │ └── IERC20Metadata.json │ │ │ │ ├── IERC20Permit.sol │ │ │ │ └── IERC20Permit.json │ │ │ │ ├── IERC5267.sol │ │ │ │ └── IERC5267.json │ │ │ │ ├── IERC721.sol │ │ │ │ ├── IERC721.json │ │ │ │ ├── IERC721Enumerable.json │ │ │ │ ├── IERC721Metadata.json │ │ │ │ └── IERC721TokenReceiver.json │ │ │ │ ├── IERC721Receiver.sol │ │ │ │ └── IERC721Receiver.json │ │ │ │ ├── IMCR.sol │ │ │ │ └── IMCR.json │ │ │ │ ├── IMovementStaking.sol │ │ │ │ └── IMovementStaking.json │ │ │ │ ├── IMulticall3.sol │ │ │ │ └── IMulticall3.json │ │ │ │ ├── IProxyCreationCallback.sol │ │ │ │ └── IProxyCreationCallback.json │ │ │ │ ├── ISignatureValidator.sol │ │ │ │ ├── ISignatureValidator.json │ │ │ │ └── ISignatureValidatorConstants.json │ │ │ │ ├── Initializable.sol │ │ │ │ └── Initializable.json │ │ │ │ ├── LockedToken.sol │ │ │ │ └── LockedToken.json │ │ │ │ ├── LockedTokenStorage.sol │ │ │ │ └── LockedTokenStorage.json │ │ │ │ ├── MCR.sol │ │ │ │ └── MCR.json │ │ │ │ ├── MCRDeployer.s.sol │ │ │ │ └── MCRDeployer.json │ │ │ │ ├── MCRStorage.sol │ │ │ │ └── MCRStorage.json │ │ │ │ ├── MOVEToken.sol │ │ │ │ └── MOVEToken.json │ │ │ │ ├── MOVETokenDeployer.s.sol │ │ │ │ └── MOVETokenDeployer.json │ │ │ │ ├── MOVETokenDev.sol │ │ │ │ └── MOVETokenDev.json │ │ │ │ ├── MOVETokenV1.sol │ │ │ │ └── MOVEToken.json │ │ │ │ ├── Math.sol │ │ │ │ └── Math.json │ │ │ │ ├── MessageHashUtils.sol │ │ │ │ └── MessageHashUtils.json │ │ │ │ ├── MintableToken.sol │ │ │ │ ├── IMintableToken.json │ │ │ │ └── MintableToken.json │ │ │ │ ├── MockERC20.sol │ │ │ │ └── MockERC20.json │ │ │ │ ├── MockERC721.sol │ │ │ │ └── MockERC721.json │ │ │ │ ├── ModuleManager.sol │ │ │ │ └── ModuleManager.json │ │ │ │ ├── MovementStaking.sol │ │ │ │ └── MovementStaking.json │ │ │ │ ├── MovementStakingStorage.sol │ │ │ │ └── MovementStakingStorage.json │ │ │ │ ├── NativeCurrencyPaymentFallback.sol │ │ │ │ └── NativeCurrencyPaymentFallback.json │ │ │ │ ├── NoncesUpgradeable.sol │ │ │ │ └── NoncesUpgradeable.json │ │ │ │ ├── Ownable.sol │ │ │ │ └── Ownable.json │ │ │ │ ├── OwnerManager.sol │ │ │ │ └── OwnerManager.json │ │ │ │ ├── Proxy.sol │ │ │ │ └── Proxy.json │ │ │ │ ├── ProxyAdmin.sol │ │ │ │ └── ProxyAdmin.json │ │ │ │ ├── Safe.sol │ │ │ │ └── Safe.json │ │ │ │ ├── SafeERC20.sol │ │ │ │ └── SafeERC20.json │ │ │ │ ├── SafeMath.sol │ │ │ │ └── SafeMath.json │ │ │ │ ├── SafeProxy.sol │ │ │ │ ├── IProxy.json │ │ │ │ └── SafeProxy.json │ │ │ │ ├── SafeProxyFactory.sol │ │ │ │ └── SafeProxyFactory.json │ │ │ │ ├── Script.sol │ │ │ │ └── Script.json │ │ │ │ ├── SecuredTokenTransfer.sol │ │ │ │ └── SecuredTokenTransfer.json │ │ │ │ ├── SelfAuthorized.sol │ │ │ │ └── SelfAuthorized.json │ │ │ │ ├── SignatureDecoder.sol │ │ │ │ └── SignatureDecoder.json │ │ │ │ ├── SignedMath.sol │ │ │ │ └── SignedMath.json │ │ │ │ ├── Singleton.sol │ │ │ │ └── Singleton.json │ │ │ │ ├── StakingDeployer.s.sol │ │ │ │ └── StakingDeployer.json │ │ │ │ ├── StdAssertions.sol │ │ │ │ └── StdAssertions.json │ │ │ │ ├── StdChains.sol │ │ │ │ └── StdChains.json │ │ │ │ ├── StdCheats.sol │ │ │ │ ├── StdCheats.json │ │ │ │ └── StdCheatsSafe.json │ │ │ │ ├── StdError.sol │ │ │ │ └── stdError.json │ │ │ │ ├── StdInvariant.sol │ │ │ │ └── StdInvariant.json │ │ │ │ ├── StdJson.sol │ │ │ │ └── stdJson.json │ │ │ │ ├── StdMath.sol │ │ │ │ └── stdMath.json │ │ │ │ ├── StdStorage.sol │ │ │ │ ├── stdStorage.json │ │ │ │ └── stdStorageSafe.json │ │ │ │ ├── StdStyle.sol │ │ │ │ └── StdStyle.json │ │ │ │ ├── StdToml.sol │ │ │ │ └── stdToml.json │ │ │ │ ├── StdUtils.sol │ │ │ │ └── StdUtils.json │ │ │ │ ├── StlMoveDeployer.s.sol │ │ │ │ └── StlMoveDeployer.json │ │ │ │ ├── StorageAccessible.sol │ │ │ │ └── StorageAccessible.json │ │ │ │ ├── StorageSlot.sol │ │ │ │ └── StorageSlot.json │ │ │ │ ├── Strings.sol │ │ │ │ └── Strings.json │ │ │ │ ├── Test.sol │ │ │ │ └── Test.json │ │ │ │ ├── TimelockController.sol │ │ │ │ └── TimelockController.json │ │ │ │ ├── TokenCallbackHandler.sol │ │ │ │ └── TokenCallbackHandler.json │ │ │ │ ├── TransparentUpgradeableProxy.sol │ │ │ │ ├── ITransparentUpgradeableProxy.json │ │ │ │ └── TransparentUpgradeableProxy.json │ │ │ │ ├── UUPSUpgradeable.sol │ │ │ │ └── UUPSUpgradeable.json │ │ │ │ ├── Vm.sol │ │ │ │ ├── Vm.json │ │ │ │ └── VmSafe.json │ │ │ │ ├── WrappedToken.sol │ │ │ │ └── WrappedToken.json │ │ │ │ ├── WrappedTokenStorage.sol │ │ │ │ └── WrappedTokenStorage.json │ │ │ │ ├── build-info │ │ │ │ └── 2a750ab17d39e89d8d971bc24ea5d307.json │ │ │ │ ├── console.sol │ │ │ │ └── console.json │ │ │ │ ├── console2.sol │ │ │ │ └── console2.json │ │ │ │ ├── draft-IERC1822.sol │ │ │ │ └── IERC1822Proxiable.json │ │ │ │ ├── draft-IERC6093.sol │ │ │ │ ├── IERC1155Errors.json │ │ │ │ ├── IERC20Errors.json │ │ │ │ └── IERC721Errors.json │ │ │ │ ├── interfaces │ │ │ │ ├── IERC165.sol │ │ │ │ │ └── IERC165.json │ │ │ │ └── IERC20.sol │ │ │ │ │ └── IERC20.json │ │ │ │ ├── introspection │ │ │ │ └── IERC165.sol │ │ │ │ │ └── IERC165.json │ │ │ │ ├── safeconsole.sol │ │ │ │ └── safeconsole.json │ │ │ │ └── stlMoveToken.sol │ │ │ │ └── stlMoveToken.json │ │ ├── foundry.toml │ │ ├── minter │ │ │ ├── Move.toml │ │ │ └── sources │ │ │ │ └── minter.move │ │ ├── remappings.txt │ │ ├── script │ │ │ ├── DeployMCRDev.s.sol │ │ │ └── helpers │ │ │ │ ├── Create3 │ │ │ │ ├── CREATE3Factory.sol │ │ │ │ └── ICREATE3Factory.sol │ │ │ │ ├── config.json │ │ │ │ ├── deployments.json │ │ │ │ └── upgrade │ │ │ │ ├── deploymove.json │ │ │ │ ├── mcr.json │ │ │ │ ├── staking.json │ │ │ │ └── stlmove.json │ │ ├── src │ │ │ ├── settlement │ │ │ │ ├── MCR.sol │ │ │ │ ├── MCRStorage.sol │ │ │ │ ├── interfaces │ │ │ │ │ └── IMCR.sol │ │ │ │ └── settlement │ │ │ │ │ └── BaseSettlement.sol │ │ │ ├── staking │ │ │ │ ├── MovementStaking.sol │ │ │ │ ├── MovementStakingStorage.sol │ │ │ │ ├── base │ │ │ │ │ └── BaseStaking.sol │ │ │ │ └── interfaces │ │ │ │ │ └── IMovementStaking.sol │ │ │ └── token │ │ │ │ ├── MOVEToken.sol │ │ │ │ ├── base │ │ │ │ ├── BaseToken.sol │ │ │ │ ├── MintableToken.sol │ │ │ │ ├── WrappedToken.sol │ │ │ │ └── WrappedTokenStorage.sol │ │ │ │ ├── custodian │ │ │ │ └── CustodianToken.sol │ │ │ │ ├── faucet │ │ │ │ └── MOVEFaucet.sol │ │ │ │ └── locked │ │ │ │ ├── LockedToken.sol │ │ │ │ └── LockedTokenStorage.sol │ │ └── upgrader │ │ │ ├── README.md │ │ │ ├── accept.sh │ │ │ ├── accept.ts │ │ │ ├── acceptKms.sh │ │ │ ├── acceptKms.ts │ │ │ ├── kmsSign.ts │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── propose.sh │ │ │ ├── propose.ts │ │ │ ├── safeDeploy.sh │ │ │ └── safeDeploy.ts │ │ ├── manager │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── lib.rs │ │ │ └── manager.rs │ │ ├── runner │ │ ├── Cargo.toml │ │ └── src │ │ │ └── main.rs │ │ └── setup │ │ ├── Cargo.toml │ │ └── src │ │ ├── deploy │ │ └── mod.rs │ │ ├── lib.rs │ │ ├── local │ │ └── mod.rs │ │ └── main.rs ├── storage │ ├── jelly-move │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── lib.rs │ │ │ ├── rocksdb.rs │ │ │ └── types.rs │ ├── move-access-log │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── access_log.rs │ │ │ └── lib.rs │ └── mpt-move │ │ ├── Cargo.toml │ │ └── src │ │ └── lib.rs ├── syncing │ └── syncup │ │ ├── Cargo.toml │ │ ├── README.md │ │ └── src │ │ └── lib.rs └── tokens │ └── mock │ ├── README.md │ ├── devnet │ ├── m1 │ │ └── mevm │ │ │ ├── .github │ │ │ └── workflows │ │ │ │ └── test.yml │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── broadcast │ │ │ └── Deploy.s.sol │ │ │ │ └── 30730 │ │ │ │ ├── run-1721161288.json │ │ │ │ ├── run-1721162313.json │ │ │ │ └── run-latest.json │ │ │ ├── foundry.toml │ │ │ ├── script │ │ │ └── Deploy.s.sol │ │ │ ├── src │ │ │ ├── MockToken.sol │ │ │ ├── WETH10.sol │ │ │ └── interfaces │ │ │ │ ├── IERC20.sol │ │ │ │ ├── IERC2612.sol │ │ │ │ ├── IERC3156FlashBorrower.sol │ │ │ │ ├── IERC3156FlashLender.sol │ │ │ │ └── IWETH10.sol │ │ │ └── test │ │ │ └── Deploy.t.sol │ └── m2 │ │ └── sui │ │ ├── .gitignore │ │ ├── Move.lock │ │ ├── Move.toml │ │ └── sources │ │ ├── usdc.move │ │ ├── usdt.move │ │ ├── wbtc.move │ │ └── weth.move │ └── testnet │ ├── .gitignore │ ├── holesky │ ├── .github │ │ └── workflows │ │ │ └── test.yml │ ├── .gitignore │ ├── README.md │ ├── foundry.toml │ ├── remappings.txt │ ├── src │ │ └── MOVEFaucet.sol │ └── test │ │ └── Faucet.t.sol │ ├── imola │ ├── mevm │ │ ├── .github │ │ │ └── workflows │ │ │ │ └── test.yml │ │ ├── .gitignore │ │ ├── README.md │ │ ├── broadcast │ │ │ └── Deploy.s.sol │ │ │ │ ├── 30730 │ │ │ │ ├── run-1721161288.json │ │ │ │ ├── run-1721162313.json │ │ │ │ └── run-latest.json │ │ │ │ └── 30732 │ │ │ │ ├── run-1721856353.json │ │ │ │ └── run-latest.json │ │ ├── foundry.toml │ │ ├── script │ │ │ └── Deploy.s.sol │ │ ├── src │ │ │ ├── Faucet.sol │ │ │ ├── MockToken.sol │ │ │ ├── WETH10.sol │ │ │ └── interfaces │ │ │ │ ├── IERC20.sol │ │ │ │ ├── IERC2612.sol │ │ │ │ ├── IERC3156FlashBorrower.sol │ │ │ │ ├── IERC3156FlashLender.sol │ │ │ │ └── IWETH10.sol │ │ └── test │ │ │ └── Deploy.t.sol │ └── sui │ │ ├── .gitignore │ │ ├── Move.lock │ │ ├── Move.toml │ │ └── sources │ │ ├── usdc.move │ │ ├── usdt.move │ │ ├── wbtc.move │ │ └── weth.move │ └── suzuka │ └── aptos │ ├── Move.toml │ └── sources │ ├── faucet.move │ └── tokens.move ├── public_key.der ├── rust-toolchain.toml ├── rustfmt.toml ├── scripts ├── README.md ├── cargo │ └── choose ├── devops │ ├── conv-commit-check │ └── tag-semantic-release ├── docker │ ├── build-push-container │ ├── build-push-image │ ├── build-push-manifest │ └── manifest ├── fixup │ └── zlib ├── movement │ ├── build-push-image │ ├── docker-compose │ ├── manifest │ ├── native │ ├── run │ └── setup-dirs ├── postgres │ └── start-dev ├── services │ ├── indexer │ │ ├── build │ │ └── test_indexer │ ├── m1-da-light-node │ │ └── build │ ├── mcr │ │ └── build │ ├── movement-full-node │ │ └── build │ └── wait-for-celestia-light-node │ │ └── build ├── suzuka │ └── faucet └── tests │ └── container-tests ├── types └── move-vm-ext │ ├── Cargo.toml │ └── src │ ├── lib.rs │ └── storage │ ├── basic_storage_operations.rs │ ├── change_set.rs │ ├── mod.rs │ └── proofs.rs └── util ├── buildtime ├── Cargo.toml ├── README.md ├── buildtime-helpers │ ├── Cargo.toml │ └── src │ │ ├── cargo.rs │ │ ├── lib.rs │ │ └── proto.rs ├── buildtime-macros │ ├── Cargo.toml │ └── src │ │ └── lib.rs └── src │ ├── lib.rs │ └── macro_tests.rs ├── collections ├── Cargo.toml ├── README.md └── src │ ├── garbage │ ├── atomic │ │ ├── counted.rs │ │ └── mod.rs │ ├── counted.rs │ ├── map.rs │ ├── mod.rs │ └── set.rs │ └── lib.rs ├── commander ├── Cargo.toml └── src │ └── lib.rs ├── dot-movement ├── Cargo.toml └── src │ ├── lib.rs │ ├── path.rs │ └── sync.rs ├── flocks ├── Cargo.toml ├── src │ ├── lib.rs │ └── tfrwlock │ │ ├── mod.rs │ │ ├── read_guard.rs │ │ └── write_guard.rs └── test.txt ├── godfig ├── Cargo.toml ├── README.md ├── godfig.png └── src │ ├── backend │ ├── config_file │ │ └── mod.rs │ └── mod.rs │ ├── godfig │ └── mod.rs │ └── lib.rs ├── movement-algs ├── Cargo.toml └── src │ ├── grouping_heuristic │ ├── apply.rs │ ├── binpacking │ │ ├── first_fit.rs │ │ ├── first_fit_decreasing.rs │ │ └── mod.rs │ ├── chunking.rs │ ├── drop_success.rs │ ├── mod.rs │ ├── skip.rs │ └── splitting.rs │ └── lib.rs ├── movement-types ├── Cargo.toml └── src │ ├── actor.rs │ ├── application.rs │ ├── atomic_transaction_bundle.rs │ ├── block.rs │ ├── lib.rs │ └── transaction.rs ├── signing ├── integrations │ ├── aptos │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── key_rotation │ │ │ ├── mod.rs │ │ │ └── signer.rs │ │ │ ├── lib.rs │ │ │ └── release_signer.rs │ └── eth │ │ ├── Cargo.toml │ │ └── src │ │ └── lib.rs ├── interface │ ├── Cargo.toml │ └── src │ │ ├── cryptography │ │ ├── ed25519.rs │ │ ├── mod.rs │ │ └── secp256k1.rs │ │ ├── key │ │ └── mod.rs │ │ └── lib.rs ├── providers │ ├── aws-kms │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── cryptography │ │ │ ├── mod.rs │ │ │ └── secp256k1 │ │ │ │ └── mod.rs │ │ │ ├── hsm │ │ │ ├── key.rs │ │ │ └── mod.rs │ │ │ └── lib.rs │ ├── hashicorp-vault │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── cryptography │ │ │ ├── ed25519 │ │ │ │ └── mod.rs │ │ │ └── mod.rs │ │ │ ├── hsm │ │ │ ├── key.rs │ │ │ └── mod.rs │ │ │ └── lib.rs │ └── local │ │ ├── Cargo.toml │ │ └── src │ │ ├── cryptography │ │ ├── ed25519 │ │ │ └── mod.rs │ │ ├── mod.rs │ │ └── secp256k1 │ │ │ └── mod.rs │ │ ├── lib.rs │ │ └── signer │ │ ├── ed25519.rs │ │ ├── mod.rs │ │ └── secp256k1.rs ├── signing-admin │ ├── Cargo.toml │ └── src │ │ ├── application │ │ └── mod.rs │ │ ├── backend │ │ ├── aws.rs │ │ ├── mod.rs │ │ └── vault.rs │ │ ├── cli │ │ ├── mod.rs │ │ └── rotate_key.rs │ │ ├── key_manager.rs │ │ ├── lib.rs │ │ └── main.rs ├── testing │ ├── Cargo.toml │ ├── src │ │ ├── ed25519.rs │ │ └── lib.rs │ └── tests │ │ └── signer.rs └── util │ └── loader │ ├── Cargo.toml │ └── src │ ├── identifiers │ ├── aws_kms.rs │ ├── hashi_corp_vault.rs │ ├── local.rs │ └── mod.rs │ └── lib.rs ├── syncador ├── Cargo.toml └── src │ ├── backend │ ├── archive │ │ ├── gzip │ │ │ ├── mod.rs │ │ │ ├── pull.rs │ │ │ └── push.rs │ │ └── mod.rs │ ├── clear │ │ ├── glob │ │ │ ├── mod.rs │ │ │ └── pull.rs │ │ └── mod.rs │ ├── constant │ │ └── mod.rs │ ├── glob │ │ ├── file.rs │ │ ├── mod.rs │ │ └── package.rs │ ├── mod.rs │ ├── pipeline │ │ ├── mod.rs │ │ ├── pull.rs │ │ └── push.rs │ └── s3 │ │ ├── bucket_connection.rs │ │ ├── mod.rs │ │ └── shared_bucket │ │ ├── metadata.rs │ │ ├── mod.rs │ │ ├── pull.rs │ │ └── push.rs │ ├── cli │ └── mod.rs │ ├── files │ ├── mod.rs │ └── package │ │ └── mod.rs │ └── lib.rs ├── tracing ├── Cargo.toml └── src │ ├── lib.rs │ └── main.rs └── whitelist ├── Cargo.toml └── src ├── file └── mod.rs └── lib.rs /.dockerignore: -------------------------------------------------------------------------------- 1 | .movement 2 | .etc 3 | target -------------------------------------------------------------------------------- /.envrc: -------------------------------------------------------------------------------- 1 | if [[ -f "$PWD/.envrc.local" ]]; then 2 | echo direnv: using .envrc.local 3 | source "$PWD/.envrc.local" 4 | fi 5 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/actions/gali/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.12 2 | 3 | RUN apk add --no-cache git openssh-client bash curl jq 4 | 5 | # Install GitHub CLI 6 | RUN curl -L https://github.com/cli/cli/releases/download/v1.9.2/gh_1.9.2_linux_amd64.tar.gz | tar xz && \ 7 | mv gh_1.9.2_linux_amd64/bin/gh /usr/bin/gh 8 | 9 | COPY entrypoint.sh /entrypoint.sh 10 | RUN chmod +x /entrypoint.sh 11 | 12 | ENTRYPOINT ["/entrypoint.sh"] 13 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | - **RFCs**: [Link to RFC](#./link/to/rfc), [Link to RFC](#./link/to/rfc), or $\emptyset$. 3 | - **Categories**: any of `protocol-units`, `networks`, `scripts`, `util`, `cicd`, or `misc`. 4 | 5 | 8 | 9 | # Changelog 10 | 11 | 14 | 15 | # Testing 16 | 17 | 20 | 21 | # Outstanding issues 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | proc-compose.temp.log 3 | methods/guest/Cargo.lock 4 | networks/movement/movement-client/src/move-modules/build/* 5 | .idea/ 6 | target/ 7 | ledger_db/ 8 | state_merkle_db/ 9 | .etc 10 | .movement 11 | .movement* 12 | .idea 13 | .vscode 14 | .data 15 | node_modules/ 16 | .env 17 | .aptos 18 | profile.json 19 | ./docker/compose/grafana-alloy/.env 20 | *.dat 21 | *.log 22 | test_log.txt 23 | test_result.txt 24 | venv 25 | *.pem 26 | *.jot.* 27 | *.jot 28 | *.env 29 | *.envrc.local 30 | .debug 31 | .out 32 | .direnv 33 | -------------------------------------------------------------------------------- /benches/howzit/howzit/.gitignore: -------------------------------------------------------------------------------- 1 | .aptos 2 | build -------------------------------------------------------------------------------- /benches/howzit/howzit/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "howzit" 3 | version = "1.0.0" 4 | authors = [] 5 | 6 | [addresses] 7 | howzit = '_' 8 | 9 | [dev-addresses] 10 | 11 | [dependencies.AptosFramework] 12 | git = "https://github.com/aptos-labs/aptos-core.git" 13 | rev = "mainnet" 14 | subdir = "aptos-move/framework/aptos-framework" 15 | 16 | [dev-dependencies] 17 | -------------------------------------------------------------------------------- /cache/solidity-files-cache.json: -------------------------------------------------------------------------------- 1 | {"_format":"ethers-rs-sol-cache-3","paths":{"artifacts":"out","build_infos":"out/build-info","sources":"src","tests":"test","scripts":"script","libraries":["lib"]},"files":{"protocol-units/bridge/contracts/src/WETH9.sol":{"lastModificationDate":1719952198135,"contentHash":"30d8ed71e435253bfb1585a363d9ced3","sourceName":"protocol-units/bridge/contracts/src/WETH9.sol","solcConfig":{"settings":{"optimizer":{"enabled":true,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"]}},"evmVersion":"paris","viaIR":false,"libraries":{}}},"imports":[],"versionRequirement":"^0.8.22","artifacts":{"WETH9":{"0.8.26+commit.8a97fa7a.Darwin.appleclang":"WETH9.sol/WETH9.json"}}}}} -------------------------------------------------------------------------------- /cog.toml: -------------------------------------------------------------------------------- 1 | from_latest_tag = true 2 | ignore_merge_commits = true 3 | disable_changelog = false 4 | disable_bump_commit = false 5 | generate_mono_repository_global_tag = false 6 | generate_mono_repository_package_tags = false 7 | branch_whitelist = [ 8 | "main", 9 | ] 10 | skip_ci = "[skip ci]" 11 | skip_untracked = true 12 | pre_bump_hooks = [ 13 | "echo {{version}}", 14 | "cargo set-version {{version}} --exclude movement-faucet-service" 15 | ] 16 | post_bump_hooks = [] 17 | pre_package_bump_hooks = [] 18 | post_package_bump_hooks = [] 19 | 20 | [git_hooks] 21 | 22 | [commit_types] 23 | 24 | [changelog] 25 | path = "CHANGELOG.md" 26 | template = "remote" 27 | remote = "github.com" 28 | repository = "movement" 29 | owner = "movementlabsxyz" 30 | 31 | [bump_profiles] 32 | 33 | [packages] -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/config.json -------------------------------------------------------------------------------- /demo/hsm/src/action_stream/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod join; 2 | pub mod notify_verify; 3 | pub mod random; 4 | -------------------------------------------------------------------------------- /demo/hsm/src/action_stream/notify_verify.rs: -------------------------------------------------------------------------------- 1 | use crate::{ActionStream, Message}; 2 | use std::collections::VecDeque; 3 | 4 | /// Adds all verify messages of which the stream is notified back to the stream 5 | pub struct NotifyVerify { 6 | buffer: VecDeque, 7 | } 8 | 9 | impl NotifyVerify { 10 | /// Creates a new `NotifyVerify` stream. 11 | pub fn new() -> Self { 12 | Self { buffer: VecDeque::new() } 13 | } 14 | } 15 | 16 | #[async_trait::async_trait] 17 | impl ActionStream for NotifyVerify { 18 | /// Notifies the stream of a message emitted from elsewhere in the system. 19 | async fn notify(&mut self, message: Message) -> Result<(), anyhow::Error> { 20 | self.buffer.push_back(message); 21 | Ok(()) 22 | } 23 | 24 | /// Gets the message to act upon. 25 | async fn next(&mut self) -> Result, anyhow::Error> { 26 | Ok(self.buffer.pop_front()) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /demo/hsm/src/action_stream/random.rs: -------------------------------------------------------------------------------- 1 | use crate::{ActionStream, Bytes, Message}; 2 | use rand::{Rng, RngCore}; 3 | 4 | /// A stream of random messages. 5 | pub struct Random; 6 | 7 | #[async_trait::async_trait] 8 | impl ActionStream for Random { 9 | /// Notifies the stream of a message emitted from elsewhere in the system. 10 | async fn notify(&mut self, _message: Message) -> Result<(), anyhow::Error> { 11 | Ok(()) 12 | } 13 | 14 | /// Gets the message to act upon. 15 | async fn next(&mut self) -> Result, anyhow::Error> { 16 | // Generate a random vec of bytes 17 | let mut rng = rand::thread_rng(); 18 | let len = rng.gen_range(32, 256); 19 | let mut bytes = vec![0u8; len]; 20 | rng.fill_bytes(&mut bytes); 21 | 22 | Ok(Some(Message::Sign(Bytes(bytes)))) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /demo/hsm/src/cli/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod server; 2 | use clap::Parser; 3 | 4 | #[derive(Parser)] 5 | #[clap(rename_all = "kebab-case")] 6 | pub enum HsmDemo { 7 | #[clap(subcommand)] 8 | Server(server::Server), 9 | } 10 | 11 | impl HsmDemo { 12 | pub async fn run(&self) -> Result<(), anyhow::Error> { 13 | match self { 14 | HsmDemo::Server(server) => server.run().await, 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /demo/hsm/src/cli/server/ed25519/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod hashi_corp_vault; 2 | 3 | use clap::Subcommand; 4 | 5 | #[derive(Subcommand, Debug)] 6 | #[clap(rename_all = "kebab-case", about = "Commands for signing with Ed25519")] 7 | pub enum Ed25519 { 8 | HashiCorpVault(hashi_corp_vault::HashiCorpVault), 9 | } 10 | 11 | impl Ed25519 { 12 | pub async fn run(&self) -> Result<(), anyhow::Error> { 13 | match self { 14 | Ed25519::HashiCorpVault(hcv) => hcv.run().await, 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /demo/hsm/src/cli/server/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod ed25519; 2 | pub mod secp256k1; 3 | 4 | use clap::Subcommand; 5 | 6 | #[derive(Subcommand, Debug)] 7 | #[clap(rename_all = "kebab-case", about = "Commands for signing")] 8 | pub enum Server { 9 | #[clap(subcommand)] 10 | Ed25519(ed25519::Ed25519), 11 | #[clap(subcommand)] 12 | Secp256k1(secp256k1::Secp256k1), 13 | } 14 | 15 | impl Server { 16 | pub async fn run(&self) -> Result<(), anyhow::Error> { 17 | match self { 18 | Server::Ed25519(ed) => ed.run().await, 19 | Server::Secp256k1(sk) => sk.run().await, 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demo/hsm/src/cli/server/secp256k1/mod.rs: -------------------------------------------------------------------------------- 1 | use clap::Subcommand; 2 | 3 | pub mod aws_kms; 4 | 5 | #[derive(Subcommand, Debug)] 6 | #[clap(rename_all = "kebab-case", about = "Commands for signing with Secp256k1")] 7 | pub enum Secp256k1 { 8 | AwsKms(aws_kms::AwsKms), 9 | } 10 | 11 | impl Secp256k1 { 12 | pub async fn run(&self) -> Result<(), anyhow::Error> { 13 | match self { 14 | Secp256k1::AwsKms(ak) => ak.run().await, 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /demo/hsm/src/cryptography/google_kms.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /demo/hsm/src/cryptography/hashicorp_vault.rs: -------------------------------------------------------------------------------- 1 | use crate::cryptography::Ed25519; 2 | use vaultrs::api::transit::KeyType; 3 | 4 | /// Defines the needed methods for providing a definition of cryptography used with HashiCorp Vault 5 | pub trait HashiCorpVaultCryptographySpec { 6 | /// Returns the [KeyType] for the desired cryptography 7 | fn key_type() -> KeyType; 8 | } 9 | 10 | impl HashiCorpVaultCryptographySpec for Ed25519 { 11 | fn key_type() -> KeyType { 12 | KeyType::Ed25519 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /demo/hsm/src/cryptography/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod aws_kms; 2 | pub mod google_kms; 3 | pub mod hashicorp_vault; 4 | pub mod verifier; 5 | 6 | /// The Secp256k1 curve. 7 | #[derive(Debug, Clone, Copy)] 8 | pub struct Secp256k1; 9 | 10 | /// The Ed25519 curve. 11 | #[derive(Debug, Clone, Copy)] 12 | pub struct Ed25519; 13 | -------------------------------------------------------------------------------- /demo/hsm/src/main.rs: -------------------------------------------------------------------------------- 1 | use clap::*; 2 | use dotenv::dotenv; 3 | use hsm_demo::cli; 4 | 5 | #[tokio::main] 6 | async fn main() -> Result<(), anyhow::Error> { 7 | // Load environment variables from .env file 8 | dotenv().ok(); 9 | 10 | // run the CLI 11 | let hsm_demo = cli::HsmDemo::parse(); 12 | hsm_demo.run().await?; 13 | Ok(()) 14 | } 15 | -------------------------------------------------------------------------------- /docker/README.md: -------------------------------------------------------------------------------- 1 | # `docker` 2 | 3 | The `docker` directory contains Dockerfile for building the Docker images for the Movement Network services. It also contains the `docker-compose` files for running the Movement Network services in a Docker Compose environment. 4 | 5 | `Dockerfiles` and `docker-compose` files are generally written to expect the repository root as context. 6 | 7 | ## Organization 8 | 9 | - [`build`](./build): Dockerfiles for building the Movement Network services. 10 | - [`compose`](./compose): Docker compose files for orchestrating services in the Movement Network. -------------------------------------------------------------------------------- /docker/compose/grafana-alloy/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # https://grafana.com/docs/alloy/latest/set-up/install/docker 2 | services: 3 | grafana-alloy: 4 | image: grafana/alloy:latest 5 | command: 6 | - run 7 | - --server.http.listen-addr=0.0.0.0:12345 8 | - --storage.path=/var/lib/alloy/data 9 | - /etc/alloy/config.alloy 10 | ports: 11 | - "12345:12345" 12 | volumes: 13 | - ${GRAFANA_ALLOY_PATH}/config.alloy:/etc/alloy/config.alloy 14 | - ${DOCKER_SOCKET_PATH}:/var/run/docker.sock 15 | env_file: "./.env" 16 | healthcheck: 17 | test: [ "CMD-SHELL", "nc -zv 0.0.0.0 12345" ] 18 | retries: 10 19 | interval: 15s 20 | timeout: 5s 21 | privileged: true 22 | -------------------------------------------------------------------------------- /docker/compose/grafana-alloy/img/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/docker/compose/grafana-alloy/img/1.png -------------------------------------------------------------------------------- /docker/compose/grafana-alloy/img/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/docker/compose/grafana-alloy/img/2.png -------------------------------------------------------------------------------- /docker/compose/grafana-alloy/img/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/docker/compose/grafana-alloy/img/3.png -------------------------------------------------------------------------------- /docker/compose/grafana-alloy/img/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/docker/compose/grafana-alloy/img/4.png -------------------------------------------------------------------------------- /docker/compose/movement-full-node/docker-compose.da-sequencer.yml: -------------------------------------------------------------------------------- 1 | services: 2 | movement-da-sequencer: 3 | image: ghcr.io/movementlabsxyz/movement-full-node:${CONTAINER_REV} 4 | container_name: movement-da-sequencer 5 | environment: 6 | - DOT_MOVEMENT_PATH=/.movement 7 | - RUST_BACKTRACE=1 8 | command: da run 9 | volumes: 10 | - ${DOT_MOVEMENT_PATH}:/.movement 11 | ports: 12 | - "30730:30730" 13 | - "30931:30931" 14 | healthcheck: 15 | test: [ "CMD-SHELL", "nc -zv 0.0.0.0 30931" ] 16 | retries: 10 17 | interval: 10s 18 | timeout: 5s 19 | restart: on-failure:3 20 | 21 | -------------------------------------------------------------------------------- /docker/compose/movement-full-node/docker-compose.faucet.yml: -------------------------------------------------------------------------------- 1 | services: 2 | movement-faucet-service: 3 | image: ghcr.io/movementlabsxyz/movement-faucet-service:${CONTAINER_REV} 4 | container_name: movement-faucet-service 5 | command: run-simple 6 | environment: 7 | - DOT_MOVEMENT_PATH=/.movement 8 | - RUST_BACKTRACE=1 9 | volumes: 10 | - ${DOT_MOVEMENT_PATH}:/.movement 11 | ports: 12 | - "30732:30732" 13 | depends_on: 14 | movement-full-node: 15 | condition: service_healthy 16 | healthcheck: 17 | test: [ "CMD-SHELL", "nc -zv 0.0.0.0 30732" ] 18 | retries: 10 19 | interval: 10s 20 | timeout: 5s 21 | restart: on-failure:10 22 | -------------------------------------------------------------------------------- /docker/compose/movement-full-node/docker-compose.fullnode.yml: -------------------------------------------------------------------------------- 1 | services: 2 | movement-full-node: 3 | image: ghcr.io/movementlabsxyz/movement-full-node:${CONTAINER_REV} 4 | container_name: movement-full-node 5 | command: run 6 | environment: 7 | - DOT_MOVEMENT_PATH=/.movement 8 | - MOVEMENT_TIMING=info 9 | - RUST_BACKTRACE=1 10 | volumes: 11 | - ${DOT_MOVEMENT_PATH}:/.movement 12 | ports: 13 | - "30731:30731" 14 | - "30734:30734" 15 | - "9464:9464" 16 | healthcheck: 17 | test: [ "CMD-SHELL", "echo true" ] 18 | retries: 10 19 | interval: 10s 20 | timeout: 5s 21 | restart: on-failure:5 22 | 23 | -------------------------------------------------------------------------------- /docker/compose/movement-full-node/docker-compose.fullnode_setup.yml: -------------------------------------------------------------------------------- 1 | services: 2 | setup: 3 | image: ghcr.io/movementlabsxyz/movement-full-node-setup:${CONTAINER_REV} 4 | container_name: setup 5 | environment: 6 | DOT_MOVEMENT_PATH: /.movement 7 | MAYBE_RUN_LOCAL: "false" 8 | RUST_LOG: info,aws_sdk_s3=debug 9 | MAPTOS_DA_SEQUENCER_CONNECTION_URL: ${MAPTOS_DA_SEQUENCER_CONNECTION_URL} 10 | MAPTOS_CHAIN_ID: ${MAPTOS_CHAIN_ID} 11 | MAPTOS_PRIVATE_KEY: ${MAPTOS_PRIVATE_KEY} 12 | volumes: 13 | - ${DOT_MOVEMENT_PATH}:/.movement 14 | # mount if exists 15 | - ~/.aws/:/root/.aws:ro 16 | 17 | healthcheck: 18 | test: [ "CMD-SHELL", "echo 'health check'" ] 19 | retries: 10 20 | interval: 10s 21 | timeout: 5s 22 | 23 | -------------------------------------------------------------------------------- /docker/compose/movement-full-node/docker-compose.leader.yml: -------------------------------------------------------------------------------- 1 | services: 2 | setup: 3 | environment: 4 | MOVEMENT_SYNC: ${MOVEMENT_SYNC} 5 | AWS_REGION: ${AWS_REGION:?AWS_REGION is not set} 6 | AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} 7 | AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY} 8 | volumes: 9 | # mount if exists 10 | - ~/.aws/:/root/.aws:ro -------------------------------------------------------------------------------- /docker/compose/movement-full-node/docker-compose.mainnet-follower.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/docker/compose/movement-full-node/docker-compose.mainnet-follower.yml -------------------------------------------------------------------------------- /docker/compose/movement-full-node/docker-compose.mainnet-leader.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | # turn off movement-faucet-service 4 | movement-faucet-service: 5 | image: busybox 6 | container_name: movement-faucet-service 7 | command: sleep infinity 8 | healthcheck: 9 | test: [ "CMD-SHELL", "echo 'health check'" ] 10 | retries: 3 11 | start_period: 3s -------------------------------------------------------------------------------- /docker/compose/movement-full-node/docker-compose.test.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | movement-tests-e2e-simple-interaction: 4 | image: ghcr.io/movementlabsxyz/movement-tests-e2e-simple-interaction:${CONTAINER_REV} 5 | container_name: movement-tests-e2e-simple-interaction 6 | command: run-simple 7 | environment: 8 | - DOT_MOVEMENT_PATH=/.movement 9 | volumes: 10 | - ${DOT_MOVEMENT_PATH}:/.movement 11 | depends_on: 12 | movement-faucet-service: 13 | # wait for all of the replicas to be ready 14 | condition: service_healthy 15 | -------------------------------------------------------------------------------- /docker/compose/movement-full-node/otel-collector-config.yaml: -------------------------------------------------------------------------------- 1 | receivers: 2 | otlp: 3 | protocols: 4 | grpc: 5 | endpoint: 127.0.0.1:4317 6 | http: 7 | endpoint: 127.0.0.1:4318 8 | 9 | processors: 10 | batch: 11 | timeout: 1s 12 | send_batch_size: 1024 13 | 14 | exporters: 15 | prometheus: 16 | endpoint: "127.0.0.1:8889" 17 | namespace: "movement" 18 | const_labels: 19 | label1: value1 20 | logging: 21 | loglevel: debug 22 | 23 | extensions: 24 | health_check: 25 | endpoint: 127.0.0.1:13133 26 | 27 | service: 28 | extensions: [health_check] 29 | pipelines: 30 | traces: 31 | receivers: [otlp] 32 | processors: [batch] 33 | exporters: [logging] 34 | metrics: 35 | receivers: [otlp] 36 | processors: [batch] 37 | exporters: [prometheus, logging] 38 | -------------------------------------------------------------------------------- /docker/compose/movement-full-node/prometheus.yml: -------------------------------------------------------------------------------- 1 | global: 2 | scrape_interval: 15s 3 | evaluation_interval: 15s 4 | 5 | scrape_configs: 6 | - job_name: "movement-metrics" 7 | static_configs: 8 | - targets: ["movement-full-node:9464"] 9 | metrics_path: /metrics 10 | scheme: http 11 | 12 | - job_name: "movement-celestia-da-light-node" 13 | static_configs: 14 | - targets: ["movement-celestia-da-light-node:9464"] 15 | metrics_path: /metrics 16 | scheme: http 17 | -------------------------------------------------------------------------------- /docker/compose/movement-full-node/snapshot/docker-compose.save_db.yml: -------------------------------------------------------------------------------- 1 | services: 2 | 3 | movement-backup-db: 4 | image: ghcr.io/movementlabsxyz/movement-full-node:${CONTAINER_REV} 5 | container_name: movement-save-db 6 | environment: 7 | - DOT_MOVEMENT_PATH=/.movement 8 | - MOVEMENT_TIMING=info 9 | - SUZUKA_TIMING_LOG=/.movement/movement-timing.log 10 | - RUST_BACKTRACE=1 11 | - AWS_REGION=${AWS_REGION} 12 | - MOVEMENT_SYNC=${MOVEMENT_SYNC} 13 | - SYNC_PATTERN=${SYNC_PATTERN} 14 | command: backup save $SYNC_PATTERN 15 | volumes: 16 | - ${DOT_MOVEMENT_PATH}:/.movement -------------------------------------------------------------------------------- /docs/explorer/README.md: -------------------------------------------------------------------------------- 1 | # Explorer Reference Implementation 2 | 3 | Repository: https://github.com/movementlabsxyz/explorer/tree/suzuka 4 | 5 | This implementation is a modified version of the Aptos explorer. 6 | 7 | `AptosClient` and `Types` from the [Aptos TypeScript SDK](https://github.com/aptos-labs/aptos-ts-sdk) provide methods and types for interacting with Movement Network Testnet. 8 | -------------------------------------------------------------------------------- /docs/movement-node-experimental/README.md: -------------------------------------------------------------------------------- 1 | # Movement Node Experimental 2 | If you are looking for docs covering running the latest stable Movement Node, please refer to the [Movement Node](../movement-node/README.md) documentation. 3 | 4 | ## Contents 5 | - [Open Network](./open-network.md): how to run a Movement Node on experimental open-network environments. -------------------------------------------------------------------------------- /docs/movement-node-experimental/open-network.md: -------------------------------------------------------------------------------- 1 | # Open Network 2 | "Open Network" describes a series of environments used for testing and development of permissionless versions of the Movement Network. These environments are not intended for production use and are not yet deemed ready for our mainnet, testnet, nor devnet. 3 | 4 | ## Environments 5 | - [l-monninger/open-network](./l-monninger/open-network.md): the first public and permissionless environment for the Movement Network. It is a testing environment intended for use amongst partners and early adopters. -------------------------------------------------------------------------------- /docs/movement-node/run-fullnode/ansible/devnet/README.md: -------------------------------------------------------------------------------- 1 | # Testnet Full Nodes 2 | We've provided a hardcoded Ansible playbook for joining the Movement Testnet as a full node. 3 | 4 | ```shell 5 | ansible-playbook --inventory \ 6 | --user ubuntu \ 7 | --extra-vars "movement_container_version=${CONTAINER_REV}" \ 8 | --extra-vars "movement_repo_commit=${MOVEMENT_COMMIT}" \ 9 | --extra-vars "user=ubuntu" \ 10 | docs/movement-node/run-fullnode/ansible/devnet/movement-node.yml \ 11 | --private-key your-private-key.pem 12 | ``` -------------------------------------------------------------------------------- /docs/movement-node/run-fullnode/ansible/devnet/movement-fullnode.service.j2: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Movement Full Node 3 | After=network.target 4 | 5 | [Service] 6 | Type=simple 7 | User={{ user }} 8 | WorkingDirectory=/home/{{ user }}/movement 9 | Environment="DOT_MOVEMENT_PATH=/home/{{ user }}/.movement" 10 | Environment="CONTAINER_REV={{ rev }}" 11 | Environment="MAPTOS_CHAIN_ID=27" 12 | Environment="MAPTOS_PRIVATE_KEY=random" 13 | 14 | Environment="MAPTOS_DA_SEQUENCER_CONNECTION_URL=https://da-sequencer.devnet.movementinfra.xyz" 15 | 16 | ExecStart=/usr/bin/docker compose --env-file .env -f /home/{{ user }}/movement/docker/compose/movement-full-node/docker-compose.fullnode.yml up --force-recreate --remove-orphans 17 | Restart=on-failure 18 | 19 | [Install] 20 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /docs/movement-node/run-fullnode/ansible/mainnet/README.md: -------------------------------------------------------------------------------- 1 | # Mainnet Full Nodes 2 | We've provided a hardcoded Ansible playbook for joining the Movement Mainnet as a full node. 3 | 4 | ```shell 5 | ansible-playbook --inventory \ 6 | --user ubuntu \ 7 | --extra-vars "movement_container_version=${CONTAINER_REV}" \ 8 | --extra-vars "movement_repo_commit=${MOVEMENT_COMMIT}" \ 9 | --extra-vars "user=ubuntu" \ 10 | docs/movement-node/run-fullnode/ansible/mainnet/movement-fullnode.yml \ 11 | --private-key your-private-key.pem 12 | ``` -------------------------------------------------------------------------------- /docs/movement-node/run-fullnode/ansible/mainnet/movement-fullnode.service.j2: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Movement Full Node 3 | After=network.target 4 | 5 | [Service] 6 | Type=simple 7 | User={{ user }} 8 | WorkingDirectory=/home/{{ user }}/movement 9 | Environment="DOT_MOVEMENT_PATH=/home/{{ user }}/.movement" 10 | Environment="CONTAINER_REV={{ rev }}" 11 | Environment="MAPTOS_CHAIN_ID=126" 12 | Environment="MAPTOS_PRIVATE_KEY=random" 13 | 14 | Environment="MAPTOS_DA_SEQUENCER_CONNECTION_URL=https://da-sequencer.mainnet.movementinfra.xyz" 15 | 16 | ExecStart=/usr/bin/docker compose --env-file .env -f /home/{{ user }}/movement/docker/compose/movement-full-node/docker-compose.fullnode.yml up --force-recreate --remove-orphans 17 | Restart=on-failure 18 | 19 | [Install] 20 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /docs/movement-node/run-fullnode/ansible/testnet/README.md: -------------------------------------------------------------------------------- 1 | # Testnet Full Nodes 2 | We've provided a hardcoded Ansible playbook for joining the Movement Testnet as a full node. 3 | 4 | ```shell 5 | ansible-playbook --inventory \ 6 | --user ubuntu \ 7 | --extra-vars "movement_container_version=${CONTAINER_REV}" \ 8 | --extra-vars "movement_repo_commit=${MOVEMENT_COMMIT}" \ 9 | --extra-vars "user=ubuntu" \ 10 | docs/movement-node/run-fullnode/ansible/testnet/movement-node.yml \ 11 | --private-key your-private-key.pem 12 | ``` -------------------------------------------------------------------------------- /docs/movement-node/run-fullnode/ansible/testnet/movement-fullnode.service.j2: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Movement Full Node 3 | After=network.target 4 | 5 | [Service] 6 | Type=simple 7 | User={{ user }} 8 | WorkingDirectory=/home/{{ user }}/movement 9 | Environment="DOT_MOVEMENT_PATH=/home/{{ user }}/.movement" 10 | Environment="CONTAINER_REV={{ rev }}" 11 | Environment="MAPTOS_CHAIN_ID=250" 12 | Environment="MAPTOS_PRIVATE_KEY=random" 13 | 14 | Environment="MAPTOS_DA_SEQUENCER_CONNECTION_URL=https://da-sequencer.testnet.movementinfra.xyz" 15 | 16 | ExecStart=/usr/bin/docker compose --env-file .env -f /home/{{ user }}/movement/docker/compose/movement-full-node/docker-compose.fullnode.yml up --force-recreate --remove-orphans 17 | Restart=on-failure 18 | 19 | [Install] 20 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /docs/movement-node/run-fullnode/manual/movement-full-node.service.template: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Movement Full Node 3 | After=network.target 4 | 5 | [Service] 6 | Type=simple 7 | User=${USER} 8 | WorkingDirectory=/home/${USER}/movement 9 | Environment="DOT_MOVEMENT_PATH=/home/${USER}/.movement" 10 | Environment="CONTAINER_REV=${CONTAINER_REV}" 11 | ExecStart=/usr/bin/docker compose --env-file .env -f docker/compose/movement-full-node/docker-compose.yml -f docker/compose/movement-full-node/docker-compose.setup-local.yml -f docker/compose/movement-full-node/docker-compose.celestia-local.yml up 12 | Restart=on-failure 13 | 14 | [Install] 15 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /docs/movement-node/run-fullnode/scripts/devnet/backup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | export DOT_MOVEMENT_PATH=$HOME/.movement 4 | export AWS_REGION="us-west-2" 5 | export RESTIC_PASSWORD="movebackup" 6 | export RESTIC_HOST="devnet_fullnode" 7 | export SYNC_BUCKET="movement-sync-devnet" 8 | 9 | echo "Running docker compose backup" 10 | /usr/bin/docker compose -f ./movement/docker/compose/movement-full-node/snapshot/docker-compose.backup.yml up --force-recreate 11 | -------------------------------------------------------------------------------- /docs/movement-node/run-fullnode/scripts/devnet/restore.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | export DOT_MOVEMENT_PATH=$HOME/.movement 4 | export AWS_REGION="us-west-2" 5 | export RESTIC_PASSWORD="movebackup" 6 | export RESTIC_HOST="devnet_fullnode" 7 | export SYNC_BUCKET="movement-sync-devnet" 8 | 9 | # Remove old DB files 10 | echo "Remove Maptos DB files" 11 | if [ -d "$DOT_MOVEMENT_PATH/maptos" ]; then 12 | rm -rf $DOT_MOVEMENT_PATH/maptos 13 | fi 14 | if [ -d "$DOT_MOVEMENT_PATH/maptos-storage" ]; then 15 | rm -rf $DOT_MOVEMENT_PATH/maptos-storage 16 | fi 17 | if [ -d "$DOT_MOVEMENT_PATH/movement-da-db" ]; then 18 | rm -rf $DOT_MOVEMENT_PATH/movement-da-db 19 | fi 20 | 21 | /usr/bin/docker compose -f ./movement/docker/compose/movement-full-node/snapshot/docker-compose.restore.yml up --force-recreate -------------------------------------------------------------------------------- /docs/movement-node/run-fullnode/scripts/mainnet/backup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | export DOT_MOVEMENT_PATH=$HOME/.movement 4 | export AWS_REGION="us-west-2" 5 | export RESTIC_PASSWORD="movebackup" 6 | export RESTIC_HOST="mainnet_fullnode" 7 | export SYNC_BUCKET="movement-sync-mainnet" 8 | 9 | echo "Running docker compose backup" 10 | /usr/bin/docker compose -f ./movement/docker/compose/movement-full-node/snapshot/docker-compose.backup.yml up --force-recreate 11 | -------------------------------------------------------------------------------- /docs/movement-node/run-fullnode/scripts/mainnet/restore.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | export DOT_MOVEMENT_PATH=$HOME/.movement 4 | export AWS_REGION="us-west-2" 5 | export RESTIC_PASSWORD="movebackup" 6 | export RESTIC_HOST="mainnet_fullnode" 7 | export SYNC_BUCKET="movement-sync-mainnet" 8 | 9 | # Remove old DB files 10 | # Remove old DB files 11 | echo "Remove Maptos DB files" 12 | if [ -d "$DOT_MOVEMENT_PATH/maptos" ]; then 13 | rm -rf $DOT_MOVEMENT_PATH/maptos 14 | fi 15 | if [ -d "$DOT_MOVEMENT_PATH/maptos-storage" ]; then 16 | rm -rf $DOT_MOVEMENT_PATH/maptos-storage 17 | fi 18 | if [ -d "$DOT_MOVEMENT_PATH/movement-da-db" ]; then 19 | rm -rf $DOT_MOVEMENT_PATH/movement-da-db 20 | fi 21 | 22 | /usr/bin/docker compose -f ./movement/docker/compose/movement-full-node/snapshot/docker-compose.restore.yml up --force-recreate -------------------------------------------------------------------------------- /docs/movement-node/run-fullnode/scripts/setup_migrate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | export DOT_MOVEMENT_PATH=$HOME/.movement 4 | export CONTAINER_REV="fa0f19b" 5 | export MAYBE_RUN_LOCAL="false" 6 | 7 | /usr/bin/docker compose --env-file movement/.env -f movement/docker/compose/movement-full-node/docker-compose.fullnode_setup.yml up --force-recreate 8 | -------------------------------------------------------------------------------- /docs/movement-node/run-fullnode/scripts/testnet/backup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | export DOT_MOVEMENT_PATH=$HOME/.movement 4 | export AWS_REGION="us-west-2" 5 | export RESTIC_PASSWORD="movebackup" 6 | export RESTIC_HOST="testnet_fullnode" 7 | export SYNC_BUCKET="movement-sync-testnet" 8 | 9 | echo "Running docker compose backup" 10 | /usr/bin/docker compose -f ./movement/docker/compose/movement-full-node/snapshot/docker-compose.backup.yml up --force-recreate 11 | -------------------------------------------------------------------------------- /docs/movement-node/run-fullnode/scripts/testnet/restore.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | export DOT_MOVEMENT_PATH=$HOME/.movement 4 | export AWS_REGION="us-west-2" 5 | export RESTIC_PASSWORD="movebackup" 6 | export RESTIC_HOST="testnet_fullnode" 7 | export SYNC_BUCKET="movement-sync-testnet" 8 | 9 | # Remove old DB files 10 | echo "Remove Maptos DB files" 11 | if [ -d "$DOT_MOVEMENT_PATH/maptos" ]; then 12 | rm -rf $DOT_MOVEMENT_PATH/maptos 13 | fi 14 | if [ -d "$DOT_MOVEMENT_PATH/maptos-storage" ]; then 15 | rm -rf $DOT_MOVEMENT_PATH/maptos-storage 16 | fi 17 | if [ -d "$DOT_MOVEMENT_PATH/movement-da-db" ]; then 18 | rm -rf $DOT_MOVEMENT_PATH/movement-da-db 19 | fi 20 | 21 | /usr/bin/docker compose -f ./movement/docker/compose/movement-full-node/snapshot/docker-compose.restore.yml up --force-recreate -------------------------------------------------------------------------------- /docs/movement-node/run/ansible/follower-node/README.md: -------------------------------------------------------------------------------- 1 | # Testnet Follower Nodes 2 | We've provided a hardcoded Ansible playbook for joining the Movement Testnet as a follower node. 3 | 4 | ```shell 5 | ansible-playbook --inventory \ 6 | --user ubuntu \ 7 | --extra-vars "movement_container_version=${CONTAINER_REV}" \ 8 | --extra-vars "user=ubuntu" \ 9 | docs/movement-node/run/ansible/follower-node/testnet/movement-full-follower.yml \ 10 | --private-key your-private-key.pem 11 | ``` -------------------------------------------------------------------------------- /docs/movement-node/run/ansible/follower-node/mainnet/README.md: -------------------------------------------------------------------------------- 1 | # Mainnet Follower Nodes 2 | We've provided a hardcoded Ansible playbook for joining the Movement Mainnet as a follower node. 3 | 4 | ```shell 5 | ansible-playbook --inventory \ 6 | --user ubuntu \ 7 | --extra-vars "movement_container_version=${CONTAINER_REV}" \ 8 | --extra-vars "user=ubuntu" \ 9 | docs/movement-node/run/ansible/follower-node/mainnet/movement-full-follower.yml \ 10 | --private-key your-private-key.pem 11 | ``` -------------------------------------------------------------------------------- /docs/movement-node/run/manual/movement-full-node.service.template: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Movement Full Node 3 | After=network.target 4 | 5 | [Service] 6 | Type=simple 7 | User=${USER} 8 | WorkingDirectory=/home/${USER}/movement 9 | Environment="DOT_MOVEMENT_PATH=/home/${USER}/.movement" 10 | Environment="CONTAINER_REV=${CONTAINER_REV}" 11 | ExecStart=/usr/bin/docker compose --env-file .env -f docker/compose/movement-full-node/docker-compose.yml -f docker/compose/movement-full-node/docker-compose.setup-local.yml -f docker/compose/movement-full-node/docker-compose.celestia-local.yml up 12 | Restart=on-failure 13 | 14 | [Install] 15 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /docs/testing/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/docs/testing/README.md -------------------------------------------------------------------------------- /img/movement-labs-logo-yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/img/movement-labs-logo-yellow.png -------------------------------------------------------------------------------- /img/movement-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/img/movement-logo.png -------------------------------------------------------------------------------- /justfile: -------------------------------------------------------------------------------- 1 | movement-celestia-da-light-node RUNTIME FEATURES *ARGS: 2 | ./scripts/movement/run movement-celestia-da-light-node {{ RUNTIME }} {{ FEATURES }} {{ ARGS }} 3 | monza-full-node RUNTIME FEATURES *ARGS: 4 | ./scripts/movement/run monza-full-node {{ RUNTIME }} {{ FEATURES }} {{ ARGS }} 5 | movement-full-node RUNTIME FEATURES *ARGS: 6 | ./scripts/movement/run movement-full-node {{ RUNTIME }} {{ FEATURES }} {{ ARGS }} 7 | mcr-contract-tests: 8 | cd ./protocol-units/settlement/mcr/contracts && forge test 9 | mcr-client RUNTIME FEATURES *ARGS: 10 | ./scripts/movement/run mcr-client {{ RUNTIME }} {{ FEATURES }} {{ ARGS }} 11 | build-push-container IMAGE: 12 | ./scripts/movement/build-push-image {{ IMAGE }} 13 | container-tests: 14 | ./scripts/tests/container-tests 15 | -------------------------------------------------------------------------------- /networks/README.md: -------------------------------------------------------------------------------- 1 | # `networks` 2 | This directory contains network runner entry points for the Movement Network. 3 | 4 | ## `movement` 5 | Movement is the second network released in this repository after Monza which has since been removed 6 | whilst it was not being maintained. Movement features Celestia data availability, Movement Aptos 7 | (Maptos) execution, and ETH settlement. 8 | -------------------------------------------------------------------------------- /networks/movement/faucet/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "movement-faucet-service" 3 | description = "Movement Faucet Service" 4 | version = "2.0.1" 5 | 6 | # Workspace inherited keys 7 | authors = { workspace = true } 8 | edition = { workspace = true } 9 | homepage = { workspace = true } 10 | license = { workspace = true } 11 | publish = { workspace = true } 12 | repository = { workspace = true } 13 | rust-version = { workspace = true } 14 | 15 | [dependencies] 16 | anyhow = { workspace = true } 17 | aptos-faucet-core = { workspace = true } 18 | aptos-logger = { workspace = true } 19 | clap = { workspace = true } 20 | tokio = { workspace = true } 21 | dot-movement = { workspace = true } 22 | movement-config = { workspace = true } 23 | aptos-config = { workspace = true } 24 | aptos-sdk = { workspace = true } 25 | tracing = { workspace = true } 26 | hex = { workspace = true } 27 | -------------------------------------------------------------------------------- /networks/movement/indexer/src/service.rs: -------------------------------------------------------------------------------- 1 | use anyhow::Error; 2 | use futures::prelude::*; 3 | use poem::listener::TcpListener; 4 | use poem::{get, handler, IntoResponse, Response, Route, Server}; 5 | use std::future::Future; 6 | 7 | pub fn run_service(url: String) -> impl Future> + Send { 8 | let route = Route::new().at("/health", get(health)); 9 | tracing::info!("Start health check access on :{url} ."); 10 | Server::new(TcpListener::bind(url)).run(route).map_err(Into::into) 11 | } 12 | 13 | #[handler] 14 | async fn health() -> Response { 15 | "{\"OK\": \"healthy\"}".into_response() 16 | } 17 | -------------------------------------------------------------------------------- /networks/movement/movement-client/src/move-modules/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "Rotate" 3 | version = "1.0.0" 4 | authors = [] 5 | 6 | [addresses] 7 | admin = "0x1" 8 | 9 | [dev-addresses] 10 | 11 | [dependencies.AptosFramework] 12 | git = "https://github.com/movementlabsxyz/aptos-core.git" 13 | rev = "governed-gas-pool" 14 | subdir = "aptos-move/framework/aptos-framework" 15 | 16 | [dev-dependencies] 17 | -------------------------------------------------------------------------------- /networks/movement/movement-client/src/move-modules/sources/placeholder.move: -------------------------------------------------------------------------------- 1 | module admin::placeholder_for_compiling { 2 | 3 | } 4 | 5 | -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/complex-alice/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .aptos -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/complex-alice/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "complex-alice" 3 | version = "1.0.0" 4 | authors = [] 5 | 6 | [addresses] 7 | resource_roulette = '_' 8 | 9 | [dev-addresses] 10 | 11 | [dependencies.AptosFramework] 12 | git = "https://github.com/movementlabsxyz/aptos-core.git" 13 | rev = "movement" 14 | subdir = "aptos-move/framework/aptos-framework" 15 | 16 | [dev-dependencies] 17 | -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/complex-alice/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Initializes an account if keys are not present 4 | echo "Initializing account" 5 | initialize_output=$(echo -ne '\n' | movement init --network custom --rest-url $NODE_URL --faucet-url $FAUCET_URL --assume-yes) 6 | echo "$initialize_output" 7 | 8 | echo "Publishing the module" 9 | movement move clean --assume-yes 10 | movement move publish --package-dir src/tests/complex-alice --named-addresses resource_roulette=default --assume-yes -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/hey-partners/.gitignore: -------------------------------------------------------------------------------- 1 | */build/ 2 | .movement aptos 3 | 4 | .aptos/ 5 | -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/hey-partners/Faucet/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "Faucet" 3 | version = "0.3.0" 4 | 5 | [dependencies] 6 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "bbce0f188d7bef08218f1fc1f46bbd3676b5c74b" } 7 | 8 | [addresses] 9 | SwapDeployer = "_" 10 | -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/hey-partners/LPCoin/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "LPCoin" 3 | version = "0.3.0" 4 | 5 | [dependencies] 6 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "bbce0f188d7bef08218f1fc1f46bbd3676b5c74b" } 7 | 8 | [addresses] 9 | ResourceAccountDeployer = "_" 10 | 11 | -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/hey-partners/LPCoin/sources/LPCoin.move: -------------------------------------------------------------------------------- 1 | module ResourceAccountDeployer::LPCoinV1 { 2 | struct LPCoin {} 3 | } -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/hey-partners/LPResourceAccount/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "LPResourceAccount" 3 | version = "0.3.0" 4 | 5 | [dependencies] 6 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "bbce0f188d7bef08218f1fc1f46bbd3676b5c74b" } 7 | 8 | [addresses] 9 | SwapDeployer = "_" 10 | -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/hey-partners/Swap/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "AnimeSwapV1" 3 | version = "1.0.1" 4 | 5 | [dependencies] 6 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "bbce0f188d7bef08218f1fc1f46bbd3676b5c74b" } 7 | LPCoin = { local = "../LPCoin" } 8 | LPResourceAccount = { local = "../LPResourceAccount" } 9 | U256 = { local = "../u256" } 10 | UQ64x64 = { local = "../uq64x64" } 11 | 12 | [addresses] 13 | SwapDeployer = "_" 14 | ResourceAccountDeployer = "_" 15 | -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/hey-partners/TestCoin/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "TestCoin" 3 | version = "0.3.0" 4 | 5 | [dependencies] 6 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "bbce0f188d7bef08218f1fc1f46bbd3676b5c74b" } 7 | 8 | [addresses] 9 | SwapDeployer = "_" 10 | -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/hey-partners/tests/rust-sdk/.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | rustflags = ["--cfg", "tokio_unstable"] -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/hey-partners/tests/rust-sdk/Cargo.toml: -------------------------------------------------------------------------------- 1 | [dependencies] 2 | aptos-sdk = { git = "https://github.com/aptos-labs/aptos-core", branch = "devnet" } 3 | dotenv = "0.15.0" 4 | 5 | [patch.crates-io] 6 | merlin = { git = "https://github.com/aptos-labs/merlin" } 7 | x25519-dalek = { git = "https://github.com/aptos-labs/x25519-dalek", branch = "zeroize_v1" } -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/hey-partners/tests/typescript-sdk/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/hey-partners/tests/typescript-sdk/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@aptos-labs/ts-sdk": "^1.17.0", 4 | "@types/jest": "^29.5.12", 5 | "@types/mocha": "^10.0.6", 6 | "@typescript-eslint/parser": "^7.12.0", 7 | "chai": "^5.1.1", 8 | "dotenv": "^16.4.5", 9 | "eslint-plugin-import": "^2.29.1", 10 | "jest": "^29.7.0", 11 | "sinon": "^18.0.0", 12 | "typescript": "^5.4.5" 13 | }, 14 | "devDependencies": { 15 | "@types/chai": "^4.3.16", 16 | "@types/jest": "^29.5.12", 17 | "@types/mocha": "^10.0.6", 18 | "mocha": "^10.4.0" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/hey-partners/tests/typescript-sdk/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "types": ["jest", "ts-node"] 4 | } 5 | } -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/hey-partners/u256/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "U256" 3 | version = "0.3.7" 4 | 5 | [dependencies] 6 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "bbce0f188d7bef08218f1fc1f46bbd3676b5c74b" } 7 | 8 | [addresses] 9 | u256 = "_" 10 | -------------------------------------------------------------------------------- /networks/movement/movement-client/src/tests/hey-partners/uq64x64/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "UQ64x64" 3 | version = "0.3.6" 4 | 5 | [dependencies] 6 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "bbce0f188d7bef08218f1fc1f46bbd3676b5c74b" } 7 | 8 | [addresses] 9 | uq64x64 = "_" 10 | -------------------------------------------------------------------------------- /networks/movement/movement-config/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod migrations; 2 | pub mod ops; 3 | pub mod releases; 4 | 5 | pub use releases::biarritz_rc1::*; 6 | -------------------------------------------------------------------------------- /networks/movement/movement-config/src/migrations/elsa_to_biarritz_rc1/dot_movement.rs: -------------------------------------------------------------------------------- 1 | use crate::migrations::elsa_to_biarritz_rc1::{ 2 | ElsaToBiarritzRc1, ElsaToBiarritzRc1Error, MigrateElsaToBiarritzRc1, 3 | }; 4 | use crate::Config; 5 | use dot_movement::DotMovement; 6 | 7 | impl MigrateElsaToBiarritzRc1 for DotMovement { 8 | async fn migrate_elsa_to_biarritz_rc1(&self) -> Result { 9 | // get the value 10 | let value = self 11 | .try_load_value() 12 | .await 13 | .map_err(|e| ElsaToBiarritzRc1Error::MigrationFailed(e.into()))?; 14 | 15 | // migrate the value 16 | let migrated_config = ElsaToBiarritzRc1::migrate(value)?; 17 | 18 | // write the migrated value 19 | self.try_overwrite_config_to_json(&migrated_config) 20 | .map_err(|e| ElsaToBiarritzRc1Error::MigrationFailed(e.into()))?; 21 | 22 | Ok(migrated_config) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /networks/movement/movement-config/src/migrations/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod elsa_to_biarritz_rc1; 2 | -------------------------------------------------------------------------------- /networks/movement/movement-config/src/ops/aptos/framework/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod releases; 2 | -------------------------------------------------------------------------------- /networks/movement/movement-config/src/ops/aptos/framework/releases/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod release_signer; 2 | -------------------------------------------------------------------------------- /networks/movement/movement-config/src/ops/aptos/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod framework; 2 | pub mod rest_client; 3 | pub mod rotate_key; 4 | pub mod signer; 5 | -------------------------------------------------------------------------------- /networks/movement/movement-config/src/ops/aptos/rotate_key/core_resource_account/signer.rs: -------------------------------------------------------------------------------- 1 | use movement_signer_loader::identifiers::SignerIdentifier; 2 | use movement_signing_aptos::key_rotation::signer::KeyRotationSigner; 3 | 4 | /// [CoreResourceAccountKeyRotationSigner] has to be a [KeyRotationSigner] that can also return an identifier for the signer. 5 | pub trait CoreResourceAccountKeyRotationSigner: KeyRotationSigner { 6 | /// Returns the identifier for the signer. 7 | fn signer_identifier(&self) -> SignerIdentifier; 8 | } 9 | -------------------------------------------------------------------------------- /networks/movement/movement-config/src/ops/aptos/rotate_key/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod core_resource_account; 2 | -------------------------------------------------------------------------------- /networks/movement/movement-config/src/ops/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod aptos; 2 | -------------------------------------------------------------------------------- /networks/movement/movement-config/src/releases/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod biarritz_rc1; 2 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/bring_up/biarritz_rc1_to_pre_l1_merge/downgrade.rs: -------------------------------------------------------------------------------- 1 | use crate::common_args::MovementArgs; 2 | use clap::Parser; 3 | 4 | #[derive(Debug, Parser, Clone)] 5 | #[clap(rename_all = "kebab-case", about = "Downgrades from Pre L1 Merge to Biarritz RC1")] 6 | pub struct Downgrade { 7 | #[clap(flatten)] 8 | pub movement_args: MovementArgs, 9 | } 10 | 11 | impl Downgrade { 12 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 13 | Ok(()) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/bring_up/biarritz_rc1_to_pre_l1_merge/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod downgrade; 2 | pub mod upgrade; 3 | 4 | use clap::Subcommand; 5 | 6 | #[derive(Subcommand, Debug)] 7 | #[clap( 8 | rename_all = "kebab-case", 9 | about = "Commands for migrating from Biarritz RC1 to Pre-L1 Merge" 10 | )] 11 | pub enum BiarritzRc1ToPreL1Merge { 12 | Upgrade(upgrade::Upgrade), 13 | Downgrade(downgrade::Downgrade), 14 | } 15 | 16 | impl BiarritzRc1ToPreL1Merge { 17 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 18 | match self { 19 | BiarritzRc1ToPreL1Merge::Upgrade(upgrade) => upgrade.execute().await, 20 | BiarritzRc1ToPreL1Merge::Downgrade(downgrade) => downgrade.execute().await, 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/bring_up/elsa_to_biarritz_rc1/downgrade.rs: -------------------------------------------------------------------------------- 1 | use crate::common_args::MovementArgs; 2 | use clap::Parser; 3 | 4 | #[derive(Debug, Parser, Clone)] 5 | #[clap(rename_all = "kebab-case", about = "Downgrades from Biarritz RC1 to Elsa")] 6 | pub struct Downgrade { 7 | #[clap(flatten)] 8 | pub movement_args: MovementArgs, 9 | } 10 | 11 | impl Downgrade { 12 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 13 | Ok(()) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/bring_up/elsa_to_biarritz_rc1/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod downgrade; 2 | pub mod upgrade; 3 | 4 | use clap::Subcommand; 5 | 6 | #[derive(Subcommand, Debug)] 7 | #[clap(rename_all = "kebab-case", about = "Commands for migrating from Elsa to Biarritz RC1")] 8 | pub enum ElsaToBiarritzRc1 { 9 | Upgrade(upgrade::Upgrade), 10 | Downgrade(downgrade::Downgrade), 11 | } 12 | 13 | impl ElsaToBiarritzRc1 { 14 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 15 | match self { 16 | ElsaToBiarritzRc1::Upgrade(upgrade) => upgrade.execute().await, 17 | ElsaToBiarritzRc1::Downgrade(downgrade) => downgrade.execute().await, 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/bring_up/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod biarritz_rc1_to_pre_l1_merge; 2 | pub mod elsa_to_biarritz_rc1; 3 | use clap::Subcommand; 4 | 5 | #[derive(Subcommand, Debug)] 6 | #[clap(rename_all = "kebab-case", about = "Commands for framework upgrades")] 7 | pub enum BringUp { 8 | #[clap(subcommand)] 9 | ElsaToBiarritzRc1(elsa_to_biarritz_rc1::ElsaToBiarritzRc1), 10 | #[clap(subcommand)] 11 | BiarritzRc1ToPreL1Merge(biarritz_rc1_to_pre_l1_merge::BiarritzRc1ToPreL1Merge), 12 | } 13 | 14 | impl BringUp { 15 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 16 | match self { 17 | BringUp::ElsaToBiarritzRc1(elsa_to_biarritz_rc1) => { 18 | elsa_to_biarritz_rc1.execute().await 19 | } 20 | BringUp::BiarritzRc1ToPreL1Merge(biarritz_rc1_to_pre_l1_merge) => { 21 | biarritz_rc1_to_pre_l1_merge.execute().await 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/config/migrate/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod elsa_to_biarritz_rc1; 2 | 3 | use clap::Subcommand; 4 | 5 | #[derive(Subcommand, Debug)] 6 | #[clap(rename_all = "kebab-case", about = "Commands for migrating configs")] 7 | pub enum Migrate { 8 | ElsaToBiarritzRc1(elsa_to_biarritz_rc1::ElsaToBiarritzRc1), 9 | } 10 | 11 | impl Migrate { 12 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 13 | match self { 14 | Migrate::ElsaToBiarritzRc1(cmd) => cmd.execute().await, 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/config/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod migrate; 2 | 3 | use clap::Subcommand; 4 | 5 | #[derive(Subcommand, Debug)] 6 | #[clap(rename_all = "kebab-case", about = "Commands for managing configs")] 7 | pub enum Config { 8 | #[clap(subcommand)] 9 | Migrate(migrate::Migrate), 10 | } 11 | 12 | impl Config { 13 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 14 | match self { 15 | Config::Migrate(migrate) => migrate.execute().await, 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/framework/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod upgrade; 2 | use clap::Subcommand; 3 | 4 | #[derive(Subcommand, Debug)] 5 | #[clap(rename_all = "kebab-case", about = "Commands for framework upgrades")] 6 | pub enum Framework { 7 | #[clap(subcommand)] 8 | Upgrade(upgrade::Upgrade), 9 | } 10 | 11 | impl Framework { 12 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 13 | match self { 14 | Framework::Upgrade(upgrade) => upgrade.execute().await, 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/framework/upgrade/commit_hash/mod.rs: -------------------------------------------------------------------------------- 1 | use crate::common_args::MovementArgs; 2 | use clap::Parser; 3 | 4 | #[derive(Debug, Parser, Clone)] 5 | #[clap(rename_all = "kebab-case", about = "Upgrades the framework to a provided commit hash.")] 6 | pub struct CommitHash { 7 | #[clap(flatten)] 8 | pub movement_args: MovementArgs, 9 | } 10 | 11 | impl CommitHash { 12 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 13 | unimplemented!() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/framework/upgrade/elsa/mod.rs: -------------------------------------------------------------------------------- 1 | use crate::common_args::MovementArgs; 2 | use clap::Parser; 3 | 4 | #[derive(Debug, Parser, Clone)] 5 | #[clap(rename_all = "kebab-case", about = "Upgrades the framework to Elsa.")] 6 | pub struct Elsa { 7 | #[clap(flatten)] 8 | pub movement_args: MovementArgs, 9 | } 10 | 11 | impl Elsa { 12 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 13 | Ok(()) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/framework/upgrade/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod biarritz_rc1; 2 | pub mod commit_hash; 3 | pub mod elsa; 4 | 5 | use clap::Subcommand; 6 | 7 | #[derive(Subcommand, Debug)] 8 | #[clap(rename_all = "kebab-case", about = "Commands for framework upgrades")] 9 | pub enum Upgrade { 10 | BiarritzRc1(biarritz_rc1::BiarritzRc1), 11 | CommitHash(commit_hash::CommitHash), 12 | Elsa(elsa::Elsa), 13 | } 14 | 15 | impl Upgrade { 16 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 17 | match self { 18 | Upgrade::BiarritzRc1(biarritz_rc1) => biarritz_rc1.execute().await, 19 | Upgrade::CommitHash(commit_hash) => commit_hash.execute().await, 20 | Upgrade::Elsa(elsa) => elsa.execute().await, 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/governed_gas_pool/fund/mod.rs: -------------------------------------------------------------------------------- 1 | use crate::common_args::MovementArgs; 2 | use clap::Parser; 3 | 4 | #[derive(Debug, Parser, Clone)] 5 | #[clap(rename_all = "kebab-case", about = "Funds from Biarritz RC1 to Elsa")] 6 | pub struct Fund { 7 | #[clap(flatten)] 8 | pub movement_args: MovementArgs, 9 | } 10 | 11 | impl Fund { 12 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 13 | Ok(()) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/governed_gas_pool/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod fund; 2 | 3 | use clap::Subcommand; 4 | 5 | #[derive(Subcommand, Debug)] 6 | #[clap(rename_all = "kebab-case", about = "Commands for bespoke network operations")] 7 | pub enum GovernedGasPool { 8 | Fund(fund::Fund), 9 | } 10 | 11 | impl GovernedGasPool { 12 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 13 | match self { 14 | GovernedGasPool::Fund(fund) => fund.execute().await, 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/mcr/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod force_commitment; 2 | 3 | use clap::Subcommand; 4 | 5 | #[derive(Subcommand, Debug)] 6 | #[clap(rename_all = "kebab-case", about = "Commands for administrating MCR from the node.")] 7 | pub enum Mcr { 8 | ForceCommitment(force_commitment::ForceCommitment), 9 | } 10 | 11 | impl Mcr { 12 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 13 | match self { 14 | Mcr::ForceCommitment(force_commitment) => force_commitment.execute().await, 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/ops/mint_lock.rs: -------------------------------------------------------------------------------- 1 | use crate::common_args::MovementArgs; 2 | use clap::Parser; 3 | 4 | #[derive(Debug, Parser, Clone)] 5 | #[clap(rename_all = "kebab-case", about = "Mints and locks tokens.")] 6 | pub struct MintLock { 7 | #[clap(flatten)] 8 | pub movement_args: MovementArgs, 9 | } 10 | 11 | impl MintLock { 12 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 13 | Ok(()) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/ops/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod mint_lock; 2 | 3 | use clap::Subcommand; 4 | 5 | #[derive(Subcommand, Debug)] 6 | #[clap(rename_all = "kebab-case", about = "Commands for bespoke network operations")] 7 | pub enum Ops { 8 | MintLock(mint_lock::MintLock), 9 | } 10 | 11 | impl Ops { 12 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 13 | match self { 14 | Ops::MintLock(mint_lock) => mint_lock.execute().await, 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/rotate_key/known_signer/mod.rs: -------------------------------------------------------------------------------- 1 | use crate::common_args::MovementArgs; 2 | use clap::Parser; 3 | 4 | #[derive(Debug, Parser, Clone)] 5 | #[clap(rename_all = "kebab-case", about = "Rotates the key for a known signer.")] 6 | pub struct KnownSigner { 7 | #[clap(flatten)] 8 | pub movement_args: MovementArgs, 9 | pub height: Option, 10 | } 11 | 12 | impl KnownSigner { 13 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 14 | unimplemented!() 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/rotate_key/mcr_validator/mod.rs: -------------------------------------------------------------------------------- 1 | use crate::common_args::MovementArgs; 2 | use clap::Parser; 3 | 4 | #[derive(Debug, Parser, Clone)] 5 | #[clap(rename_all = "kebab-case", about = "Rotates the key for an MCR validator.")] 6 | pub struct McrValidator { 7 | #[clap(flatten)] 8 | pub movement_args: MovementArgs, 9 | pub height: Option, 10 | } 11 | 12 | impl McrValidator { 13 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 14 | unimplemented!() 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/admin/rotate_key/mod.rs: -------------------------------------------------------------------------------- 1 | use clap::Subcommand; 2 | pub mod core_resource_account; 3 | pub mod known_signer; 4 | pub mod mcr_validator; 5 | 6 | #[derive(Subcommand, Debug)] 7 | #[clap(rename_all = "kebab-case", about = "Commands for rotating keys")] 8 | pub enum RotateKey { 9 | CoreResourceAccount(core_resource_account::CoreResourceAccount), 10 | KnownSigner(known_signer::KnownSigner), 11 | McrValidator(mcr_validator::McrValidator), 12 | } 13 | 14 | impl RotateKey { 15 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 16 | match self { 17 | RotateKey::CoreResourceAccount(core_resource_account) => { 18 | core_resource_account.execute().await 19 | } 20 | RotateKey::KnownSigner(known_signer) => known_signer.execute().await, 21 | RotateKey::McrValidator(mcr_validator) => mcr_validator.execute().await, 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/da/mod.rs: -------------------------------------------------------------------------------- 1 | mod read_block; 2 | mod run; 3 | pub mod stream_blocks; 4 | 5 | use clap::Subcommand; 6 | 7 | #[derive(Subcommand, Debug)] 8 | #[clap(rename_all = "kebab-case", about = "Commands for intereacting with the DA")] 9 | pub enum Da { 10 | StreamBlocks(stream_blocks::StreamBlocks), 11 | Run(run::DaRun), 12 | ReadBlock(read_block::ReadBlock), 13 | } 14 | 15 | impl Da { 16 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 17 | match self { 18 | Da::StreamBlocks(stream_blocks) => stream_blocks.execute().await, 19 | Da::Run(da) => da.execute().await, 20 | Da::ReadBlock(da) => da.execute().await, 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/da/run.rs: -------------------------------------------------------------------------------- 1 | use crate::common_args::MovementArgs; 2 | use clap::Parser; 3 | 4 | #[derive(Debug, Parser, Clone)] 5 | #[clap(rename_all = "kebab-case", about = "Runs Da Sequencer.")] 6 | pub struct DaRun { 7 | #[clap(flatten)] 8 | pub movement_args: MovementArgs, 9 | } 10 | 11 | impl DaRun { 12 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 13 | // get the config file 14 | let dot_movement = self.movement_args.dot_movement()?; 15 | movement_da_sequencer_node::start(dot_movement).await 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/main.rs: -------------------------------------------------------------------------------- 1 | #![forbid(unsafe_code)] 2 | 3 | use clap::*; 4 | use movement_full_node::MovementFullNode; 5 | 6 | #[tokio::main] 7 | async fn main() -> Result<(), anyhow::Error> { 8 | let suzuka_util = MovementFullNode::parse(); 9 | let result = suzuka_util.execute().await; 10 | 11 | result 12 | } 13 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/node/mod.rs: -------------------------------------------------------------------------------- 1 | mod da_db; 2 | pub mod manager; 3 | pub mod partial; 4 | mod tasks; 5 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/node/tasks/mod.rs: -------------------------------------------------------------------------------- 1 | //! Modules to separate full node processing into actor-like tasks. 2 | 3 | pub mod execute_settle; 4 | mod state_verifier; 5 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/run/mod.rs: -------------------------------------------------------------------------------- 1 | use crate::common_args::MovementArgs; 2 | use crate::node::manager::Manager; 3 | use clap::Parser; 4 | 5 | #[derive(Debug, Parser, Clone)] 6 | #[clap(rename_all = "kebab-case", about = "Runs the Suzuka Full Node")] 7 | pub struct Run { 8 | #[clap(flatten)] 9 | pub movement_args: MovementArgs, 10 | } 11 | 12 | impl Run { 13 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 14 | // get the config file 15 | let dot_movement = self.movement_args.dot_movement()?; 16 | let config_file = dot_movement.try_get_or_create_config_file().await?; 17 | 18 | let manager = Manager::new(config_file).await?; 19 | manager.try_run().await?; 20 | 21 | Ok(()) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/state/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod node; 2 | pub mod settlement; 3 | 4 | use clap::Subcommand; 5 | 6 | #[derive(Subcommand, Debug)] 7 | #[clap(rename_all = "kebab-case", about = "Commands for syncing")] 8 | pub enum State { 9 | #[clap(subcommand)] 10 | Node(node::Node), 11 | #[clap(subcommand)] 12 | Settlement(settlement::Settlement), 13 | } 14 | 15 | impl State { 16 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 17 | match self { 18 | State::Node(node) => node.execute().await, 19 | State::Settlement(settlement) => settlement.execute().await, 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/state/node/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod commitment; 2 | 3 | use clap::Subcommand; 4 | 5 | #[derive(Subcommand, Debug)] 6 | #[clap(rename_all = "kebab-case", about = "Commands for syncing")] 7 | pub enum Node { 8 | Commitment(commitment::Commitment), 9 | } 10 | 11 | impl Node { 12 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 13 | match self { 14 | Node::Commitment(commitment) => commitment.execute().await, 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/state/settlement/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod accepted_commitment; 2 | pub mod commitment; 3 | 4 | use clap::Subcommand; 5 | 6 | #[derive(Subcommand, Debug)] 7 | #[clap(rename_all = "kebab-case", about = "Commands for syncing")] 8 | pub enum Settlement { 9 | Commitment(commitment::Commitment), 10 | AcceptedCommitment(accepted_commitment::AcceptedCommitment), 11 | } 12 | 13 | impl Settlement { 14 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 15 | match self { 16 | Settlement::Commitment(commitment) => commitment.execute().await, 17 | Settlement::AcceptedCommitment(accepted_commitment) => { 18 | accepted_commitment.execute().await 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/tests/e2e/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod remote_da; 2 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/tests/e2e/remote_da.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /networks/movement/movement-full-node/src/tests/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod e2e; 2 | -------------------------------------------------------------------------------- /networks/movement/movement-util/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod common_args; 2 | pub mod syncing; 3 | use clap::Parser; 4 | 5 | #[derive(Parser)] 6 | #[clap(rename_all = "kebab-case")] 7 | pub enum MovementOpts { 8 | #[clap(subcommand)] 9 | Syncing(syncing::Syncing), 10 | } 11 | 12 | impl MovementOpts { 13 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 14 | match self { 15 | MovementOpts::Syncing(syncing) => syncing.execute().await, 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /networks/movement/movement-util/src/main.rs: -------------------------------------------------------------------------------- 1 | #![forbid(unsafe_code)] 2 | 3 | use clap::*; 4 | use movement_util::MovementOpts; 5 | 6 | #[tokio::main] 7 | async fn main() -> Result<(), anyhow::Error> { 8 | let movement_opts = MovementOpts::parse(); 9 | 10 | movement_opts.execute().await?; 11 | 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /networks/movement/movement-util/src/syncing/delete_resource.rs: -------------------------------------------------------------------------------- 1 | use crate::common_args::MovementArgs; 2 | use clap::Parser; 3 | use syncup::SyncupOperations; 4 | 5 | #[derive(Debug, Parser, Clone)] 6 | #[clap( 7 | rename_all = "kebab-case", 8 | about = "Deletes the resource used for syncing across syncer ids" 9 | )] 10 | pub struct DeleteResource { 11 | #[clap(flatten)] 12 | pub movement_args: MovementArgs, 13 | } 14 | 15 | impl DeleteResource { 16 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 17 | let config = self.movement_args.config().await?; 18 | config.remove_syncup_resources().await?; 19 | 20 | Ok(()) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /networks/movement/movement-util/src/syncing/downsync.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /networks/movement/movement-util/src/syncing/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod delete_resource; 2 | pub mod downsync; 3 | pub mod upsync; 4 | 5 | use clap::Subcommand; 6 | 7 | #[derive(Subcommand, Debug)] 8 | #[clap(rename_all = "kebab-case", about = "Commands for syncing")] 9 | pub enum Syncing { 10 | DeleteResource(delete_resource::DeleteResource), 11 | /*Downsync(downsync::Downsync), 12 | Upsync(upsync::Upsync),*/ 13 | } 14 | 15 | impl Syncing { 16 | pub async fn execute(&self) -> Result<(), anyhow::Error> { 17 | match self { 18 | Syncing::DeleteResource(delete) => delete.execute().await, 19 | /*Syncing::Downsync(downsync) => downsync.execute(), 20 | Syncing::Upsync(upsync) => upsync.execute(),*/ 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /networks/movement/movement-util/src/syncing/upsync.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /networks/movement/setup/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod local; 2 | pub mod migrate; 3 | 4 | use std::future::Future; 5 | 6 | pub trait MovementFullNodeSetupOperations { 7 | fn setup( 8 | &self, 9 | dot_movement: dot_movement::DotMovement, 10 | config: movement_config::Config, 11 | ) -> impl Future< 12 | Output = Result< 13 | (movement_config::Config, tokio::task::JoinHandle>), 14 | anyhow::Error, 15 | >, 16 | >; 17 | } 18 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "movement", 3 | "lockfileVersion": 3, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "dependencies": { 8 | "pnpm": "^9.4.0" 9 | } 10 | }, 11 | "node_modules/pnpm": { 12 | "version": "9.4.0", 13 | "resolved": "https://registry.npmjs.org/pnpm/-/pnpm-9.4.0.tgz", 14 | "integrity": "sha512-9Um4pSydK4U2di+ZwHIiBe/Fr5E+d4NdvMw7CwssqefcgCK3gGLBcpHEjoh0nHDOiOtadPH6jEv14Yu0bIvYOg==", 15 | "bin": { 16 | "pnpm": "bin/pnpm.cjs", 17 | "pnpx": "bin/pnpx.cjs" 18 | }, 19 | "engines": { 20 | "node": ">=18.12" 21 | }, 22 | "funding": { 23 | "url": "https://opencollective.com/pnpm" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "pnpm": "^9.4.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /payload.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "ecdsa-p256", 3 | "derived": false 4 | } 5 | 6 | -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: '9.0' 2 | 3 | settings: 4 | autoInstallPeers: true 5 | excludeLinksFromLockfile: false 6 | 7 | importers: 8 | 9 | .: 10 | dependencies: 11 | pnpm: 12 | specifier: ^9.4.0 13 | version: 9.4.0 14 | 15 | packages: 16 | 17 | pnpm@9.4.0: 18 | resolution: {integrity: sha512-9Um4pSydK4U2di+ZwHIiBe/Fr5E+d4NdvMw7CwssqefcgCK3gGLBcpHEjoh0nHDOiOtadPH6jEv14Yu0bIvYOg==} 19 | engines: {node: '>=18.12'} 20 | hasBin: true 21 | 22 | snapshots: 23 | 24 | pnpm@9.4.0: {} 25 | -------------------------------------------------------------------------------- /process-compose/m1-da-light-node/process-compose.arabica.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | celestia-light-node: 8 | command: | 9 | celestia light start --core.ip validator-1.celestia-arabica-11.com --p2p.network arabica 10 | readiness_probe: 11 | exec: 12 | command: echo "true" -------------------------------------------------------------------------------- /process-compose/m1-da-light-node/process-compose.build.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | build-movement-celestia-da-light-node: 8 | command: | 9 | ./scripts/services/movement-celestia-da-light-node/build 10 | 11 | build-wait-for-celestia-light-node: 12 | command: | 13 | ./scripts/services/wait-for-celestia-light-node/build 14 | 15 | build: 16 | command: | 17 | exit 0 18 | depends_on: 19 | build-movement-celestia-da-light-node: 20 | condition: process_completed_successfully 21 | build-wait-for-celestia-light-node: 22 | condition: process_completed_successfully 23 | -------------------------------------------------------------------------------- /process-compose/m1-da-light-node/process-compose.setup.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | setup: 8 | command: | 9 | cargo run --bin movement-celestia-da-light-node-setup 10 | depends_on: 11 | build: 12 | condition: process_completed_successfully -------------------------------------------------------------------------------- /process-compose/m1-da-light-node/process-compose.test.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | movement-celestia-da-light-node-e2e-tests: 8 | command: | 9 | set -e 10 | cargo test -p movement-celestia-da-light-node-verifier -- --test-threads=1 11 | cargo test -p movement-celestia-da-light-node-tests --features "sequencer" -- --test-threads=1 12 | depends_on: 13 | celestia-light-node: 14 | condition: process_healthy 15 | movement-celestia-da-light-node: 16 | condition: process_healthy 17 | availability: 18 | exit_on_end: true -------------------------------------------------------------------------------- /process-compose/mcr-client/process-compose.build.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | build: 8 | command: | 9 | ./scripts/services/mcr/build -------------------------------------------------------------------------------- /process-compose/mcr-client/process-compose.local.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | eth: 8 | command: | 9 | MAYBE_TESTING_MCR=true MAYBE_RUN_LOCAL=true MAYBE_DEPLOY_MCR=true ETH_RPC_CONNECTION_PROTOCOL=http ETH_RPC_CONNECTION_HOSTNAME="localhost" ETH_RPC_CONNECTION_PORT=8545 ETH_WS_CONNECTION_HOSTNAME="localhost" ETH_WS_CONNECTION_PORT=8545 mcr-settlement-runner 10 | depends_on: 11 | build: 12 | condition: process_completed_successfully 13 | readiness_probe: 14 | exec: 15 | command: echo "true" 16 | -------------------------------------------------------------------------------- /process-compose/mcr-client/process-compose.test.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | mcr-client-tests: 8 | command: | 9 | set -e 10 | cargo run --bin test-mcr-settlement-client 11 | depends_on: 12 | eth: 13 | condition: process_healthy 14 | availability: 15 | # NOTE: `restart: exit_on_failure` is not needed since 16 | # exit_on_end implies it. 17 | exit_on_end: true -------------------------------------------------------------------------------- /process-compose/mcr-client/process-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | eth: 8 | command: | 9 | exit 1 -------------------------------------------------------------------------------- /process-compose/movement-full-node/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/process-compose/movement-full-node/README.md -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.build.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | build: 8 | command: | 9 | ./scripts/services/movement-full-node/build 10 | availability: 11 | restart: exit_on_failure -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.celestia-arabica.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | processes: 4 | 5 | setup: 6 | environment: 7 | - "CELESTIA_NETWORK=arabica" 8 | 9 | celestia-light-node: 10 | command: | 11 | movement-celestia-light 12 | readiness_probe: 13 | initial_delay_seconds: 60 14 | exec: 15 | command: curl http://0.0.0.0:26658 16 | depends_on: 17 | setup: 18 | condition: process_healthy -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.celestia-mainnet.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | processes: 4 | 5 | setup: 6 | environment: 7 | - "CELESTIA_NETWORK=mainnet" 8 | 9 | celestia-light-node: 10 | command: | 11 | movement-celestia-light 12 | readiness_probe: 13 | initial_delay_seconds: 60 14 | exec: 15 | command: curl http://0.0.0.0:26658 16 | depends_on: 17 | setup: 18 | condition: process_healthy -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.celestia-mocha.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | processes: 4 | 5 | setup: 6 | environment: 7 | - "CELESTIA_NETWORK=mocha" 8 | 9 | celestia-light-node: 10 | command: | 11 | movement-celestia-light 12 | readiness_probe: 13 | initial_delay_seconds: 60 14 | exec: 15 | command: curl http://0.0.0.0:26658 16 | depends_on: 17 | setup: 18 | condition: process_healthy -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.complex-alice-load.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | complex-alice-tests: 8 | command: | 9 | LOADTEST_NUMBER_SCENARIOS=30 LOADTEST_SCENARIOS_PER_CLIENT=10 cargo test -p movement-tests complex_alice_load -- --nocapture 10 | depends_on: 11 | movement-full-node: 12 | condition: process_healthy 13 | movement-faucet: 14 | condition: process_healthy 15 | availability: 16 | exit_on_end: false # todo: revert -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.complex-alice-soak.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | complex-alice-tests: 8 | command: | 9 | LOADTEST_NUMBER_SCENARIOS=1 LOADTEST_SCENARIOS_PER_CLIENT=1 cargo test -p movement-tests complex_alice_soak -- --nocapture 10 | depends_on: 11 | movement-full-node: 12 | condition: process_healthy 13 | movement-faucet: 14 | condition: process_healthy 15 | availability: 16 | exit_on_end: false # todo: revert -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.complex-alice.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | complex-alice-tests: 8 | command: | 9 | cargo test -p movement-client test_complex_alice -- --nocapture 10 | depends_on: 11 | movement-full-node: 12 | condition: process_healthy 13 | movement-faucet: 14 | condition: process_healthy 15 | availability: 16 | exit_on_end: true -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.deploy.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | processes: 4 | setup: 5 | environment: 6 | - "MAYBE_DEPLOY_MCR=true" -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.eth-holesky.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | processes: 4 | setup: 5 | environment: 6 | - "ETH_RPC_CONNECTION_PROTOCOL=https" 7 | - "ETH_RPC_CONNECTION_HOSTNAME=ethereum-holesky-rpc.publicnode.com" 8 | - "ETH_RPC_CONNECTION_PORT=443" 9 | - "ETH_WS_CONNECTION_PROTOCOL=wss" 10 | - "ETH_WS_CONNECTION_HOSTNAME=ethereum-holesky-rpc.publicnode.com" 11 | - "ETH_WS_CONNECTION_PORT=443" 12 | - "MAYBE_RUN_LOCAL=false" -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.eth-local.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | processes: 4 | setup: 5 | environment: 6 | - "ETH_RPC_CONNECTION_PROTOCOL=http" 7 | - "ETH_RPC_CONNECTION_HOSTNAME=0.0.0.0" 8 | - "ETH_RPC_CONNECTION_PORT=8090" 9 | - "ETH_WS_CONNECTION_PROTOCOL=ws" 10 | - "ETH_WS_CONNECTION_HOSTNAME=0.0.0.0" 11 | - "ETH_WS_CONNECTION_PORT=8090" 12 | - "MAYBE_RUN_LOCAL=true" -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.feed.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | client-test-feed: 8 | command: | 9 | # loop the test examples 10 | while true; do 11 | cargo test -p movement-client test_example_ || break 12 | done 13 | depends_on: 14 | movement-full-node: 15 | condition: process_healthy 16 | movement-faucet: 17 | condition: process_healthy -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.flamegraph.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | processes: 4 | 5 | movement-celestia-da-light-node: 6 | command: | 7 | samply record $(which movement-celestia-da-light-node) 8 | 9 | movement-full-node: 10 | command: | 11 | samply record $(which movement-full-node) 12 | depends_on: 13 | movement-celestia-da-light-node: 14 | condition: process_healthy 15 | postgres: 16 | condition: process_healthy 17 | readiness_probe: 18 | initial_delay_seconds: 10 19 | exec: 20 | command: curl http://0.0.0.0:30731 -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.gas-dos.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | # Test whether the full node is resistant to Gas DOS 8 | gas-dos-test: 9 | command: | 10 | cargo run --bin movement-tests-gas-dos 11 | depends_on: 12 | movement-full-node: 13 | condition: process_healthy 14 | movement-faucet: 15 | condition: process_healthy 16 | availability: 17 | exit_on_end: true -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.genesis-elsa.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | - "KNOWN_FRAMEWORK_RELEASE=elsa" -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.genesis-head.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | - "KNOWN_FRAMEWORK_RELEASE=head" -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.hasura.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | processes: 4 | 5 | hasura: 6 | environment: 7 | - "POSTGRES_DB_HOST=${POSTGRES_HOST_IP}" 8 | 9 | command: | 10 | docker compose -f docker/compose/movement-indexer/docker-compose.hasura.yml up --force-recreate 11 | depends_on: 12 | indexer: 13 | condition: process_healthy 14 | readiness_probe: 15 | initial_delay_seconds: 120 16 | exec: 17 | command: curl http://localhost:8085/console/ 18 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.hey-partners-load.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | hey-partners-load: 8 | env: 9 | MOVEMENT_SWAP_PATH: ${MOVEMENT_SWAP_PATH} 10 | command: | 11 | LOADTEST_NUMBER_SCENARIOS=1 LOADTEST_SCENARIOS_PER_CLIENT=1 cargo test -p movement-tests hey_partners_load -- --nocapture 12 | depends_on: 13 | movement-full-node: 14 | condition: process_healthy 15 | movement-faucet: 16 | condition: process_healthy 17 | availability: 18 | exit_on_end: false # todo: revert -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.hey-partners-soak.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | hey-partners-soak: 8 | env: 9 | MOVEMENT_SWAP_PATH: ${MOVEMENT_SWAP_PATH} 10 | command: | 11 | LOADTEST_NUMBER_SCENARIOS=1 LOADTEST_SCENARIOS_PER_CLIENT=1 cargo test -p movement-tests hey_partners_soak -- --nocapture 12 | depends_on: 13 | movement-full-node: 14 | condition: process_healthy 15 | movement-faucet: 16 | condition: process_healthy 17 | availability: 18 | exit_on_end: false # todo: revert -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.howzit.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | 4 | processes: 5 | 6 | howzit: 7 | environment: 8 | - "AUTH_TOKEN=notrealnotneeded" 9 | - "REST_URL=http://0.0.0.0:30731" 10 | - "FAUCET_URL=http://0.0.0.0:30732" 11 | command: | 12 | cargo run --bin howzit-bench 13 | depends_on: 14 | movement-full-node: 15 | condition: process_healthy 16 | movement-faucet: 17 | condition: process_healthy 18 | availability: 19 | exit_on_end: true -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.indexer-test.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | indexer-test: 8 | environment: 9 | - "POSTGRES_DB_URL=postgres://postgres:password@${POSTGRES_HOST_IP}:5432/postgres" 10 | command: | 11 | cargo run -p movement-indexer-service --bin load_metadata 12 | ./scripts/services/indexer/test_indexer 13 | depends_on: 14 | indexer: 15 | condition: process_healthy 16 | hasura: 17 | condition: process_healthy 18 | availability: 19 | exit_on_end: true 20 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.load.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | movement-tests-load-tests: 8 | command: | 9 | LOADTEST_NUMBER_SCENARIOS=10 LOADTEST_SCENARIOS_PER_CLIENT=5 movement-tests-e2e-load-alice-bob 10 | depends_on: 11 | movement-full-node: 12 | condition: process_healthy 13 | movement-faucet: 14 | condition: process_healthy 15 | availability: 16 | exit_on_end: true 17 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.setup.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | processes: 4 | 5 | setup: 6 | environment: 7 | - "MAYBE_RUN_LOCAL=true" 8 | command: | 9 | RUST_BACKTRACE=1 movement-full-node-setup 10 | depends_on: 11 | build: 12 | condition: process_completed_successfully 13 | da-setup: 14 | command: | 15 | movement-da-sequencer-setup 16 | depends_on: 17 | build: 18 | condition: process_completed_successfull 19 | setup: 20 | condition: process_completed_successfully 21 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.soak.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | movement-tests-soak-tests: 8 | command: | 9 | LOADTEST_NUMBER_SCENARIOS=10 LOADTEST_SCENARIOS_PER_CLIENT=5 cargo run --bin movement-tests-e2e-soak-alice-bob 10 | depends_on: 11 | movement-full-node: 12 | condition: process_healthy 13 | movement-faucet: 14 | condition: process_healthy 15 | availability: 16 | exit_on_end: true 17 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.telemetry.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | - RUST_LOG=info 5 | 6 | processes: 7 | movement-telemetry: 8 | command: | 9 | cargo run -p movement-tracing 10 | environment: 11 | - MOVEMENT_METRICS_ADDR=0.0.0.0:9464 12 | - APTOS_FORCE_ENABLE_TELEMETRY=1 13 | - RUST_LOG=debug,aptos_telemetry=debug 14 | - APTOS_METRICS_PORT=9464 15 | - APTOS_DISABLE_TELEMETRY_PUSH_METRICS=1 16 | - PROMETHEUS_METRICS_ENABLED=1 17 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.test-bring-up-biarritz-rc1-to-pre-l1-merge.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | processes: 4 | 5 | setup: 6 | environment: 7 | - "KNOWN_FRAMEWORK_RELEASE=biarritz-rc1" 8 | - APTOS_ACCOUNT_WHITELIST=$DOT_MOVEMENT_PATH/default_signer_address_whitelist 9 | - MAPTOS_PRIVATE_KEY=random 10 | 11 | test-bring-up-biarritz-rc1-to-pre-l1-merge: 12 | command: | 13 | cargo run --bin movement-full-node admin bring-up biarritz-rc1-to-pre-l1-merge upgrade 0x1 0x2 0x3 14 | depends_on: 15 | movement-full-node: 16 | condition: process_healthy 17 | movement-faucet: 18 | condition: process_healthy 19 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.test-bring-up-elsa-to-biarritz-rc1.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | processes: 4 | 5 | setup: 6 | environment: 7 | - "KNOWN_FRAMEWORK_RELEASE=elsa" 8 | 9 | test-migrate-elsa-to-biarritz-rc1: 10 | command: | 11 | cargo run --bin movement-full-node admin bring-up elsa-to-biarritz-rc1 upgrade 0x1 0x2 0x3 12 | depends_on: 13 | movement-full-node: 14 | condition: process_healthy 15 | movement-faucet: 16 | condition: process_healthy 17 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.test-ggp-gas-fee.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | test-ggp-gas-fee: 7 | command: | 8 | cargo run --bin movement-tests-e2e-ggp-gas-fee 9 | depends_on: 10 | movement-full-node: 11 | condition: process_healthy 12 | movement-faucet: 13 | condition: process_healthy 14 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.test-key-rotation.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | setup: 8 | environment: 9 | - APTOS_ACCOUNT_WHITELIST=$DOT_MOVEMENT_PATH/default_signer_address_whitelist 10 | - MAPTOS_PRIVATE_KEY=random 11 | 12 | movement-faucet: 13 | command : | 14 | movement-faucet-service run-simple --do-not-delegate 15 | 16 | test-key-rotation: 17 | command : | 18 | cargo run --bin movement-tests-e2e-key-rotation 19 | depends_on: 20 | movement-full-node: 21 | condition: process_healthy 22 | movement-faucet: 23 | condition: process_healthy 24 | 25 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.test-migrate-biarritz-rc1-to-pre-l1-merge.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | processes: 4 | 5 | setup: 6 | environment: 7 | - "KNOWN_FRAMEWORK_RELEASE=biarritz-rc1" 8 | - APTOS_ACCOUNT_WHITELIST=$DOT_MOVEMENT_PATH/default_signer_address_whitelist 9 | - MAPTOS_PRIVATE_KEY=random 10 | 11 | test-migrate-biarritz-rc1-to-pre-l1-merge: 12 | command: | 13 | cargo run --bin aptos-framework-pre-l1-merge-release-tool 14 | depends_on: 15 | movement-full-node: 16 | condition: process_healthy 17 | movement-faucet: 18 | condition: process_healthy 19 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.test-migrate-elsa-to-biarritz-rc1.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | processes: 4 | 5 | setup: 6 | environment: 7 | - "KNOWN_FRAMEWORK_RELEASE=elsa" 8 | - APTOS_ACCOUNT_WHITELIST=$DOT_MOVEMENT_PATH/default_signer_address_whitelist 9 | - MAPTOS_PRIVATE_KEY=random 10 | 11 | test-migrate-elsa-to-biarritz-rc1: 12 | command: | 13 | cargo run --bin aptos-framework-biarritz-rc1-release-tool 14 | depends_on: 15 | movement-full-node: 16 | condition: process_healthy 17 | movement-faucet: 18 | condition: process_healthy 19 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.test-mock-da.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | movement-faucet: 8 | command : | 9 | movement-faucet-service run-simple --do-not-delegate 10 | depends_on: 11 | movement-full-node: 12 | condition: process_healthy 13 | 14 | test-with-mock-da: 15 | command: | 16 | cargo run --bin mock-da 17 | depends_on: 18 | movement-faucet: 19 | condition: process_healthy 20 | setup: 21 | condition: process_healthy 22 | availability: 23 | exit_on_end: true 24 | 25 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.test-sequence-number-ooo.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | # Test whether the full node is resistant to Gas DOS 8 | test-sequence-number-ooo: 9 | command: | 10 | cargo run --bin movement-tests-sequence-number-ooo 11 | depends_on: 12 | movement-full-node: 13 | condition: process_healthy 14 | movement-faucet: 15 | condition: process_healthy 16 | availability: 17 | exit_on_end: true 18 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.test-upgrade-biarritz-rc1.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | test-upgrade-biarritz-rc1: 7 | command: | 8 | cargo run --bin aptos-framework-biarritz-rc1-release-tool 9 | depends_on: 10 | movement-full-node: 11 | condition: process_healthy 12 | movement-faucet: 13 | condition: process_healthy 14 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.test-upgrade-elsa.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | test-upgrade-elsa: 7 | command: | 8 | # elsa is the earliest known release we currently have, so this will always either fail with: 9 | - backward compatibility error, if you are trying to upgrade from head 10 | - constraint error, if you are redundantly upgrading over elsa itself 11 | cargo run --bin aptos-framework-elsa-release-tool 12 | depends_on: 13 | movement-full-node: 14 | condition: process_healthy 15 | movement-faucet: 16 | condition: process_healthy 17 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.test-upgrade-pre-l1-merge.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | test-upgrade-pre-l1-merge: 7 | command: | 8 | cargo run --bin aptos-framework-pre-l1-merge-release-tool 9 | depends_on: 10 | movement-full-node: 11 | condition: process_healthy 12 | movement-faucet: 13 | condition: process_healthy 14 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.test-whitelist.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | setup: 8 | environment: 9 | - APTOS_ACCOUNT_WHITELIST=$DOT_MOVEMENT_PATH/default_signer_address_whitelist 10 | - MAPTOS_PRIVATE_KEY=random 11 | 12 | movement-faucet: 13 | command : | 14 | movement-faucet-service run-simple --do-not-delegate 15 | 16 | test-whitelist: 17 | command: | 18 | cargo run --bin movement-tests-e2e-whitelist 19 | depends_on: 20 | movement-full-node: 21 | condition: process_healthy 22 | movement-faucet: 23 | condition: process_healthy -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.test.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | environment: 4 | 5 | processes: 6 | 7 | build-movement-client-tests: 8 | command: | 9 | cargo test --no-run -p movement-client test_example_ 10 | depends_on: 11 | build: 12 | condition: process_completed_successfully 13 | 14 | movement-client-tests: 15 | command: | 16 | cargo test -p movement-client test_example_ 17 | depends_on: 18 | build-movement-client-tests: 19 | condition: process_completed_successfully 20 | movement-full-node: 21 | condition: process_healthy 22 | movement-faucet: 23 | condition: process_healthy 24 | availability: 25 | exit_on_end: true 26 | -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-compose.with-snapshot-node.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | processes: 4 | 5 | movement-snapshot-node: 6 | command: | 7 | ./scripts/movement-full-node/snapshot 8 | depends_on: 9 | movement-celestia-da-light-node: 10 | condition: process_healthy 11 | availability: 12 | exit_on_end: true 13 | 14 | # movement-full-node now depends on movement-snapshot-node having started 15 | movement-full-node: 16 | depends_on: 17 | movement-snapshot-node: 18 | condition: process_healthy -------------------------------------------------------------------------------- /process-compose/movement-full-node/process-composer.open-network-leader.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/process-compose/movement-full-node/process-composer.open-network-leader.yml -------------------------------------------------------------------------------- /protocol-units/access-control/aptos/account-whitelist/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "aptos-account-whitelist" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | [dependencies] 13 | aptos-types = { workspace = true } 14 | whitelist = { workspace = true } 15 | godfig = { workspace = true } 16 | serde = { workspace = true } 17 | anyhow = { workspace = true } 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /protocol-units/access-control/aptos/account-whitelist/src/file/mod.rs: -------------------------------------------------------------------------------- 1 | use crate::WhitelistedAccountAddress; 2 | use aptos_types::account_address::AccountAddress; 3 | pub use whitelist::file::Whitelist as GenericWhitelist; 4 | use whitelist::file::{Error, TryFromFileLine}; 5 | pub use whitelist::WhitelistOperations; 6 | 7 | impl TryFromFileLine for WhitelistedAccountAddress { 8 | fn try_from_file_line(line: &str) -> Result 9 | where 10 | Self: Sized, 11 | { 12 | Ok(Self(AccountAddress::from_hex(line).map_err(|e| Error::Internal(e.to_string()))?)) 13 | } 14 | } 15 | 16 | pub type Whitelist = GenericWhitelist; 17 | -------------------------------------------------------------------------------- /protocol-units/access-control/aptos/account-whitelist/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod config; 2 | pub mod file; 3 | use aptos_types::account_address::AccountAddress; 4 | 5 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] 6 | pub struct WhitelistedAccountAddress(pub AccountAddress); 7 | 8 | impl WhitelistedAccountAddress { 9 | pub fn new(address: AccountAddress) -> Self { 10 | Self(address) 11 | } 12 | 13 | pub fn into_inner(self) -> AccountAddress { 14 | self.0 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /protocol-units/bridge/contracts/minter/.gitignore: -------------------------------------------------------------------------------- 1 | build -------------------------------------------------------------------------------- /protocol-units/bridge/contracts/minter/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "Minter" 3 | version = "0.0.0" 4 | 5 | [dependencies.AptosFramework] 6 | git = "https://github.com/movementlabsxyz/aptos-core.git" 7 | rev = "movement" 8 | subdir = "aptos-move/framework/aptos-framework" -------------------------------------------------------------------------------- /protocol-units/cryptography/tentacles/README.md: -------------------------------------------------------------------------------- 1 | # Movement Labs' Jellyfish Merkle Tree 2 | 3 | - This repository was originally a fork of the [Diem Jellyfish Merkle Tree](https://github.com/diem/diem/tree/main/storage/jellyfish-merkle) 4 | crate, modified to inline dependencies and trim the parts not needed for Penumbra's uses. 5 | - Movement Lab's the forked [Penumbra's Jellyfish Merkle Tree](https://github.com/penumbra-zone/jmt). 6 | -------------------------------------------------------------------------------- /protocol-units/cryptography/tentacles/proptest-regressions/tests/node_type.txt: -------------------------------------------------------------------------------- 1 | # Seeds for failure cases proptest has generated in the past. It is 2 | # automatically read and these particular cases re-run before any 3 | # novel cases are generated. 4 | # 5 | # It is recommended to check this file in to source control so that 6 | # everyone who runs the test benefits from these saved cases. 7 | cc ed6e873f05fe3babf16fed6ba14db58f0fb2cde8ad7c01cd18f3ee5912042b76 # shrinks to index1 = Nibble(0), index2 = Nibble(8) 8 | -------------------------------------------------------------------------------- /protocol-units/cryptography/tentacles/proptest-regressions/tree/ics23_impl.txt: -------------------------------------------------------------------------------- 1 | # Seeds for failure cases proptest has generated in the past. It is 2 | # automatically read and these particular cases re-run before any 3 | # novel cases are generated. 4 | # 5 | # It is recommended to check this file in to source control so that 6 | # everyone who runs the test benefits from these saved cases. 7 | cc b98005d22bdb2676872782f2e1027bb3dec9efb0f549485bb20e6851ae5459df # shrinks to keys = [[]] 8 | cc 9e563e3f8e111c0a387cdb961c8b53f6e6e21f66819b8f450016ebd5857df62b # shrinks to keys = [[34, 10, 22, 0, 0, 0, 0, 2], [14, 0, 16, 4, 196, 0, 3, 0]] 9 | -------------------------------------------------------------------------------- /protocol-units/cryptography/tentacles/src/tests.rs: -------------------------------------------------------------------------------- 1 | #![cfg(test)] 2 | mod compute_vectors; 3 | mod helper; 4 | mod iterator; 5 | mod jellyfish_merkle; 6 | mod nibble_path; 7 | mod node_type; 8 | mod restore; 9 | mod tree_cache; 10 | mod update_proof; 11 | mod vectors; 12 | -------------------------------------------------------------------------------- /protocol-units/cryptography/tentacles/src/types.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) The Diem Core Contributors 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | #![forbid(unsafe_code)] 5 | 6 | pub mod nibble; 7 | pub mod proof; 8 | 9 | /// Specifies a particular version of the [`JellyfishMerkleTree`](crate::JellyfishMerkleTree) state. 10 | pub type Version = u64; // Height - also used for MVCC in StateDB 11 | 12 | /// The version before the genesis state. This version should always be empty. 13 | pub const PRE_GENESIS_VERSION: Version = u64::max_value(); 14 | -------------------------------------------------------------------------------- /protocol-units/da-sequencer/config/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "movement-da-sequencer-config" 3 | version.workspace = true 4 | edition.workspace = true 5 | license.workspace = true 6 | authors.workspace = true 7 | repository.workspace = true 8 | homepage.workspace = true 9 | publish.workspace = true 10 | rust-version.workspace = true 11 | 12 | [dependencies] 13 | serde_json = { workspace = true } 14 | serde = { workspace = true } 15 | serde_derive = { workspace = true } 16 | godfig = { workspace = true } 17 | ed25519-dalek = { workspace = true } 18 | rand = { workspace = true } 19 | tracing = { workspace = true } 20 | hex = { workspace = true } 21 | dot-movement = { workspace = true } 22 | anyhow = { workspace = true } 23 | 24 | [lints] 25 | workspace = true 26 | -------------------------------------------------------------------------------- /protocol-units/da-sequencer/node/src/main.rs: -------------------------------------------------------------------------------- 1 | #[tokio::main] 2 | async fn main() -> Result<(), anyhow::Error> { 3 | use tracing_subscriber::EnvFilter; 4 | 5 | tracing_subscriber::fmt() 6 | .with_env_filter( 7 | EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")), 8 | ) 9 | .init(); 10 | 11 | // Define da-sequencer config path 12 | let dot_movement = dot_movement::DotMovement::try_from_env()?; 13 | 14 | movement_da_sequencer_node::start(dot_movement).await 15 | } 16 | -------------------------------------------------------------------------------- /protocol-units/da-sequencer/proto/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "movement-da-sequencer-proto" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [dependencies] 15 | tonic = { workspace = true } 16 | prost = { workspace = true } 17 | 18 | [build-dependencies] 19 | tonic-build = { workspace = true, features = ["prost"] } 20 | buildtime = { workspace = true } 21 | 22 | [features] 23 | default = [] 24 | client = [] 25 | server = [] 26 | 27 | 28 | [lints] 29 | workspace = true 30 | -------------------------------------------------------------------------------- /protocol-units/da-sequencer/proto/build.rs: -------------------------------------------------------------------------------- 1 | buildtime::proto_build_main!("movementlabs/protocol_units/da/sequencer/v1.proto"); 2 | -------------------------------------------------------------------------------- /protocol-units/da-sequencer/proto/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod v1 { 2 | tonic::include_proto!("movementlabs.protocol_units.da.sequencer.v1"); // The string specified here 3 | pub const FILE_DESCRIPTOR_SET: &[u8] = 4 | tonic::include_file_descriptor_set!("movement-da-sequencer-proto-descriptor"); 5 | } 6 | 7 | // Re-export the latest version at the crate root 8 | pub use v1::*; 9 | -------------------------------------------------------------------------------- /protocol-units/da-sequencer/setup/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod local; 2 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/README.md: -------------------------------------------------------------------------------- 1 | # Celestia Data Availability for Movement 2 | 3 | The crates in this directory are used for the data availability protocol for the Movement Sequencer network (formerly M1). They are generally used to construct light node clients and servers which enable the secure ingestion of data from the Movement Sequencer network. 4 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/celestia-runners/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod celestia_appd; 2 | pub mod celestia_bridge; 3 | pub mod celestia_light; 4 | use movement_da_util::config::CelestiaDaLightNodeConfig; 5 | 6 | pub trait Runner { 7 | async fn run( 8 | &self, 9 | dot_movement: dot_movement::DotMovement, 10 | config: CelestiaDaLightNodeConfig, 11 | ) -> Result<(), anyhow::Error>; 12 | } 13 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/light-node-signer/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "movement-da-light-node-signer" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [dependencies] 15 | movement-signer = { workspace = true} 16 | 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/light-node-signer/src/lib.rs: -------------------------------------------------------------------------------- 1 | use movement_signer::{cryptography::Curve, Signing}; 2 | 3 | // A signer simply wraps a [movement_signer::Signer] instance. 4 | pub struct Signer(movement_signer::Signer) 5 | where 6 | O: Signing, 7 | C: Curve; 8 | 9 | impl Signer 10 | where 11 | O: Signing, 12 | C: Curve, 13 | { 14 | /// Creates a new [Signer] instance. 15 | pub fn new(provider: O) -> Self { 16 | Self(movement_signer::Signer::new(provider)) 17 | } 18 | 19 | /// Returns a reference to the inner [movement_signer::Signer] instance. 20 | pub fn inner(&self) -> &movement_signer::Signer { 21 | &self.0 22 | } 23 | 24 | /// Converts the [Signer] instance into the inner [movement_signer::Signer] instance. 25 | pub fn into_inner(self) -> O { 26 | self.0.into_inner() 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/light-node/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod passthrough; 2 | #[cfg(feature = "sequencer")] 3 | pub mod sequencer; 4 | 5 | pub mod light_node; 6 | 7 | pub mod manager; 8 | 9 | #[cfg(not(feature = "sequencer"))] 10 | pub use passthrough::*; 11 | 12 | #[cfg(feature = "sequencer")] 13 | pub use sequencer::*; 14 | 15 | pub use light_node::*; 16 | 17 | pub use manager::*; 18 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/prevalidator/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod aptos; 2 | 3 | use thiserror::Error; 4 | 5 | /// Domain error for the transaction pipe task 6 | #[derive(Debug, Error)] 7 | pub enum Error { 8 | #[error("prevalidator internal error: {0}")] 9 | Internal(String), 10 | #[error("prevalidator validation error: {0}")] 11 | Validation(String), 12 | } 13 | 14 | #[derive(Debug)] 15 | /// A prevalidated outcome. Indicates that input of A (from the trait [PrevalidatorOperations]) is prevalidated as an instance of B, or else invalid instance. 16 | pub struct Prevalidated(pub B); 17 | 18 | impl Prevalidated { 19 | pub fn new(blob: B) -> Self { 20 | Self(blob) 21 | } 22 | 23 | pub fn inner(&self) -> &B { 24 | &self.0 25 | } 26 | 27 | pub fn into_inner(self) -> B { 28 | self.0 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/proto/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "movement-da-light-node-proto" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [dependencies] 15 | tonic = { workspace = true } 16 | prost = { workspace = true } 17 | 18 | [build-dependencies] 19 | tonic-build = { workspace = true, features = ["prost"] } 20 | buildtime = { workspace = true } 21 | 22 | [features] 23 | default = [] 24 | client = [] 25 | server = [] 26 | 27 | 28 | [lints] 29 | workspace = true 30 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/proto/build.rs: -------------------------------------------------------------------------------- 1 | buildtime::proto_build_main!( 2 | "movementlabs/protocol_units/da/light_node/v1beta1.proto", 3 | "movementlabs/protocol_units/da/light_node/v1beta2.proto" 4 | ); 5 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/proto/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod v1beta2 { 2 | tonic::include_proto!("movementlabs.protocol_units.da.light_node.v1beta2"); // The string specified here 3 | pub const FILE_DESCRIPTOR_SET: &[u8] = 4 | tonic::include_file_descriptor_set!("movement-da-light-node-proto-descriptor"); 5 | } 6 | 7 | // Re-export the latest version at the crate root 8 | pub use v1beta2::*; 9 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/setup/src/common/file.rs: -------------------------------------------------------------------------------- 1 | use tokio::fs; 2 | 3 | pub async fn make_parent_dirs(path: &str) -> Result<(), anyhow::Error> { 4 | let parent = std::path::Path::new(path) 5 | .parent() 6 | .ok_or(anyhow::anyhow!("Failed to get parent directory."))?; 7 | fs::create_dir_all(parent).await?; 8 | Ok(()) 9 | } 10 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/setup/src/common/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod celestia; 2 | pub mod file; 3 | pub mod memseq; 4 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/tests/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![cfg(test)] 2 | 3 | pub mod test; 4 | 5 | use movement_da_light_node_proto::light_node_service_client::LightNodeServiceClient; 6 | use movement_da_light_node_proto::*; 7 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/tests/src/test/e2e/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod raw; 2 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/tests/src/test/e2e/raw/mod.rs: -------------------------------------------------------------------------------- 1 | #[cfg(not(feature = "sequencer"))] 2 | pub mod passthrough; 3 | #[cfg(feature = "sequencer")] 4 | pub mod sequencer; 5 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/tests/src/test/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod e2e; 2 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/util/src/blob/ir/id.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Debug, Clone, Serialize, Deserialize)] 4 | pub struct Id(Vec); 5 | 6 | /// The id for an Ir Blob 7 | impl Id { 8 | pub fn new(id: Vec) -> Self { 9 | Id(id) 10 | } 11 | 12 | pub fn as_slice(&self) -> &[u8] { 13 | self.0.as_slice() 14 | } 15 | 16 | pub fn into_vec(self) -> Vec { 17 | self.0 18 | } 19 | } 20 | 21 | impl From> for Id { 22 | fn from(id: Vec) -> Self { 23 | Id(id) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/util/src/blob/ir/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod blob; 2 | pub mod data; 3 | pub mod id; 4 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/util/src/blob/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod ir; 2 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/util/src/config/digest_store.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | use std::path::PathBuf; 3 | 4 | #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] 5 | pub struct Config { 6 | /// The path to the sequencer database 7 | #[serde(default = "default_sequencer_database_path")] 8 | pub digest_store_db_path: PathBuf, 9 | } 10 | 11 | pub fn default_sequencer_database_path() -> PathBuf { 12 | // check if DIGEST_STORE_DB_PATH is set otherwise randomly generate in /tmp 13 | std::env::var("DIGEST_STORE_DB_PATH").map(PathBuf::from).unwrap_or_else(|_| { 14 | let mut path = std::env::temp_dir(); 15 | path.push("digest_store_db"); 16 | path 17 | }) 18 | } 19 | 20 | impl Default for Config { 21 | fn default() -> Self { 22 | Self { digest_store_db_path: default_sequencer_database_path() } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/util/src/config/light.rs: -------------------------------------------------------------------------------- 1 | use super::default::{default_celestia_light_node_key_name, default_celestia_light_node_store}; 2 | 3 | use serde::{Deserialize, Serialize}; 4 | 5 | use std::path::PathBuf; 6 | 7 | #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] 8 | pub struct Config { 9 | /// Name of the node's signing key in the keyring 10 | #[serde(default = "default_celestia_light_node_key_name")] 11 | pub key_name: String, 12 | /// Path name of the node store directory 13 | #[serde(default)] 14 | pub node_store: Option, 15 | } 16 | 17 | impl Default for Config { 18 | fn default() -> Self { 19 | Self { 20 | key_name: default_celestia_light_node_key_name(), 21 | node_store: default_celestia_light_node_store(), 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /protocol-units/da/movement/protocol/util/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod config; 2 | pub use config::*; 3 | pub mod blob; 4 | -------------------------------------------------------------------------------- /protocol-units/da/movement/providers/celestia/src/blob/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod ir; 2 | -------------------------------------------------------------------------------- /protocol-units/da/movement/providers/celestia/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod blob; 2 | pub mod da; 3 | // pub mod verifier; 4 | -------------------------------------------------------------------------------- /protocol-units/da/movement/providers/digest-store/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod da; 2 | -------------------------------------------------------------------------------- /protocol-units/da/movement/providers/disk-fifo/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod da; 2 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/dof/src/services.rs: -------------------------------------------------------------------------------- 1 | use aptos_api::{runtime::Apis, Context}; 2 | use tokio::try_join; 3 | 4 | use std::sync::Arc; 5 | 6 | pub struct Services { 7 | opt: maptos_opt_executor::Service, 8 | fin: maptos_fin_view::Service, 9 | } 10 | 11 | impl Services { 12 | pub(crate) fn new(opt: maptos_opt_executor::Service, fin: maptos_fin_view::Service) -> Self { 13 | Services { opt, fin } 14 | } 15 | 16 | pub fn opt_api_context(&self) -> Arc { 17 | self.opt.api_context() 18 | } 19 | 20 | pub fn get_opt_apis(&self) -> Apis { 21 | self.opt.get_apis() 22 | } 23 | 24 | pub fn get_fin_apis(&self) -> Apis { 25 | self.fin.get_apis() 26 | } 27 | 28 | pub async fn run(self) -> anyhow::Result<()> { 29 | let (opt_res, fin_res) = 30 | try_join!(tokio::spawn(self.opt.run()), tokio::spawn(self.fin.run()))?; 31 | opt_res.and(fin_res) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/fin-view/src/lib.rs: -------------------------------------------------------------------------------- 1 | mod fin_view; 2 | mod service; 3 | 4 | pub use fin_view::FinalityView; 5 | pub use service::Service; 6 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/migrations/README.md: -------------------------------------------------------------------------------- 1 | # Migrations 2 | 3 | ## Proven Migrations 4 | 5 | - [`elsa` -> `biarritz-rc1`](./elsa-to-biarritz-rc1/) 6 | - [`biarritz-rc1` -> `l1-pre-merge`](./biarritz-rc1-to-pre-l1-merge/) 7 | 8 | ```mermaid 9 | graph LR 10 | A[elsa] --> B[biarritz-rc1] 11 | B --> C[l1-pre-merge] 12 | 13 | classDef default fill:#f9f,stroke:#333,stroke-width:2px; 14 | ``` -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/migrations/biarritz-rc1-to-pre-l1-merge/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "aptos-framework-biarritz-rc1-to-pre-l1-merge-migration" 3 | description = "Executor for the AptosVM" 4 | authors = { workspace = true } 5 | edition = { workspace = true } 6 | homepage = { workspace = true } 7 | license = { workspace = true } 8 | repository = { workspace = true } 9 | 10 | version = { workspace = true } 11 | 12 | [lib] 13 | path = "src/lib.rs" 14 | 15 | [dependencies] 16 | maptos-framework-release-util = { workspace = true } 17 | aptos-sdk = { workspace = true } 18 | aptos-framework-biarritz-rc1-release = { workspace = true } 19 | aptos-framework-pre-l1-merge-release = { workspace = true } 20 | thiserror = { workspace = true } 21 | dot-movement = { workspace = true } 22 | movement-config = { workspace = true } 23 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/migrations/elsa-to-biarritz-rc1/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "aptos-framework-elsa-to-biarritz-rc1-migration" 3 | description = "Executor for the AptosVM" 4 | authors = { workspace = true } 5 | edition = { workspace = true } 6 | homepage = { workspace = true } 7 | license = { workspace = true } 8 | repository = { workspace = true } 9 | 10 | version = { workspace = true } 11 | 12 | [lib] 13 | path = "src/lib.rs" 14 | 15 | [dependencies] 16 | maptos-framework-release-util = { workspace = true } 17 | aptos-sdk = { workspace = true } 18 | aptos-framework-biarritz-rc1-release = { workspace = true } 19 | thiserror = { workspace = true } 20 | dot-movement = { workspace = true } 21 | movement-config = { workspace = true } 22 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/biarritz-rc1/build.rs: -------------------------------------------------------------------------------- 1 | use maptos_framework_release_util::commit_hash_with_script; 2 | 3 | // Example usage of the macro to generate a build script for Elsa. 4 | // change 5 | commit_hash_with_script!( 6 | BiarritzRc1, // Struct name 7 | "https://github.com/movementlabsxyz/aptos-core.git", // Repository URL 8 | "27397b5835e6a466c06c884a395653c9ff13d1fe", // Commit hash 9 | 6, // Bytecode version 10 | "biarritz-rc1.mrb", // MRB file name 11 | "CACHE_BIARRITZ_RC1_FRAMEWORK_RELEASE" // Cache environment variable for Elsa 12 | ); 13 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/biarritz-rc1/mrb_cache/27397b5835e6a466c06c884a395653c9ff13d1fe-biarritz-rc1.mrb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/protocol-units/execution/maptos/framework/releases/biarritz-rc1/mrb_cache/27397b5835e6a466c06c884a395653c9ff13d1fe-biarritz-rc1.mrb -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/biarritz-rc1/mrb_cache/aa45303216be96ea30d361ab7eb2e95fb08c2dcb-biarritz-rc1.mrb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/protocol-units/execution/maptos/framework/releases/biarritz-rc1/mrb_cache/aa45303216be96ea30d361ab7eb2e95fb08c2dcb-biarritz-rc1.mrb -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/biarritz-rc1/mrb_cache/biarritz-rc1.mrb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/protocol-units/execution/maptos/framework/releases/biarritz-rc1/mrb_cache/biarritz-rc1.mrb -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/biarritz-rc1/mrb_cache/d86339c130c3a9afd9413db95412b7586b78c905-biarritz-rc1.mrb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/protocol-units/execution/maptos/framework/releases/biarritz-rc1/mrb_cache/d86339c130c3a9afd9413db95412b7586b78c905-biarritz-rc1.mrb -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/elsa/README.md: -------------------------------------------------------------------------------- 1 | # `elsa-aptos-framework-migration` 2 | Elsa was launched under commit hash [`9dfc8e7a3d622597dfd81cc4ba480a5377f87a41`](https://github.com/movementlabsxyz/aptos-core/commit/9dfc8e7a3d622597dfd81cc4ba480a5377f87a41) of the `movement` fork of the `aptos-framework`. -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/elsa/build.rs: -------------------------------------------------------------------------------- 1 | use maptos_framework_release_util::commit_hash_with_script; 2 | 3 | // Example usage of the macro to generate a build script for Elsa. 4 | commit_hash_with_script!( 5 | Elsa, // Struct name 6 | "https://github.com/movementlabsxyz/aptos-core.git", // Repository URL 7 | "9dfc8e7a3d622597dfd81cc4ba480a5377f87a41", // Commit hash 8 | 6, // Bytecode version 9 | "elsa.mrb", // MRB file name 10 | "CACHE_ELSA_FRAMEWORK_RELEASE" // Cache environment variable for Elsa 11 | ); 12 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/elsa/mrb_cache/9dfc8e7a3d622597dfd81cc4ba480a5377f87a41-elsa.mrb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/protocol-units/execution/maptos/framework/releases/elsa/mrb_cache/9dfc8e7a3d622597dfd81cc4ba480a5377f87a41-elsa.mrb -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/elsa/mrb_cache/elsa.mrb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/protocol-units/execution/maptos/framework/releases/elsa/mrb_cache/elsa.mrb -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/elsa/src/cached.rs: -------------------------------------------------------------------------------- 1 | use aptos_framework_upgrade_gas_release::generate_gas_upgrade_module; 2 | use maptos_framework_release_util::mrb_release; 3 | 4 | mrb_release!(Elsa, ELSA, "9dfc8e7a3d622597dfd81cc4ba480a5377f87a41-elsa.mrb"); 5 | 6 | generate_gas_upgrade_module!(gas_upgrade, Elsa, { 7 | let mut gas_parameters = AptosGasParameters::initial(); 8 | gas_parameters.vm.txn.max_transaction_size_in_bytes = GasQuantity::new(100_000_000); 9 | gas_parameters.vm.txn.max_execution_gas = GasQuantity::new(10_000_000_000); 10 | 11 | aptos_types::on_chain_config::GasScheduleV2 { 12 | feature_version: aptos_gas_schedule::LATEST_GAS_FEATURE_VERSION, 13 | entries: gas_parameters 14 | .to_on_chain_gas_schedule(aptos_gas_schedule::LATEST_GAS_FEATURE_VERSION), 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/head/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "aptos-framework-head-release" 3 | description = "Executor for the AptosVM" 4 | authors = { workspace = true } 5 | edition = { workspace = true } 6 | homepage = { workspace = true } 7 | license = { workspace = true } 8 | repository = { workspace = true } 9 | 10 | version = { workspace = true } 11 | 12 | [[bin]] 13 | name = "aptos-framework-head-release-tool" 14 | path = "src/bin/release.rs" 15 | 16 | [lib] 17 | path = "src/lib.rs" 18 | 19 | [dependencies] 20 | aptos-framework = { workspace = true } 21 | aptos-cached-packages = { workspace = true } 22 | maptos-framework-release-util = { workspace = true } 23 | tokio = { workspace = true } 24 | anyhow = { workspace = true } 25 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/head/src/bin/release.rs: -------------------------------------------------------------------------------- 1 | #[tokio::main] 2 | async fn main() -> Result<(), anyhow::Error> { 3 | Ok(()) 4 | } 5 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/head/src/lib.rs: -------------------------------------------------------------------------------- 1 | use aptos_framework::ReleaseBundle; 2 | use maptos_framework_release_util::{Release, ReleaseBundleError}; 3 | 4 | pub struct Head; 5 | 6 | impl Head { 7 | pub fn new() -> Self { 8 | Self 9 | } 10 | } 11 | 12 | impl Release for Head { 13 | fn release_bundle(&self) -> Result { 14 | Ok(aptos_cached_packages::head_release_bundle().clone()) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/known-release/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "aptos-framework-known-release" 3 | description = "Executor for the AptosVM" 4 | authors = { workspace = true } 5 | edition = { workspace = true } 6 | homepage = { workspace = true } 7 | license = { workspace = true } 8 | repository = { workspace = true } 9 | 10 | version = { workspace = true } 11 | 12 | [lib] 13 | path = "src/lib.rs" 14 | 15 | [dependencies] 16 | maptos-framework-release-util = { workspace = true } 17 | aptos-framework-elsa-release = { workspace = true } 18 | aptos-framework-biarritz-rc1-release = { workspace = true } 19 | aptos-framework-head-release = { workspace = true } 20 | aptos-framework = { workspace = true } 21 | tokio = { workspace = true } 22 | anyhow = { workspace = true} 23 | thiserror = { workspace = true} -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/latest/README.md: -------------------------------------------------------------------------------- 1 | # `last-aptos-framework-migration` 2 | Elsa was launched under commit hash [`9dfc8e7a3d622597dfd81cc4ba480a5377f87a41`](https://github.com/movementlabsxyz/aptos-core/commit/9dfc8e7a3d622597dfd81cc4ba480a5377f87a41) of the `movement` fork of the `aptos-framework`. -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/latest/src/lib.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/parent/README.md: -------------------------------------------------------------------------------- 1 | # `last-aptos-framework-migration` 2 | Elsa was launched under commit hash [`9dfc8e7a3d622597dfd81cc4ba480a5377f87a41`](https://github.com/movementlabsxyz/aptos-core/commit/9dfc8e7a3d622597dfd81cc4ba480a5377f87a41) of the `movement` fork of the `aptos-framework`. -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/parent/src/lib.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/pre-l1-merge/build.rs: -------------------------------------------------------------------------------- 1 | use maptos_framework_release_util::commit_hash_with_script; 2 | 3 | // Example usage of the macro to generate a build script for Elsa. 4 | // change 5 | commit_hash_with_script!( 6 | BiarritzRc1, // Struct name 7 | "https://github.com/movementlabsxyz/aptos-core.git", // Repository URL 8 | "edafe2e5ed6ce462fa81d08faf5d5008fa836ca2", // Commit hash 9 | 6, // Bytecode version 10 | "pre-l1-merge.mrb", // MRB file name 11 | "CACHE_PRE_L1_MERGE_FRAMEWORK_RELEASE" // Cache environment variable 12 | ); 13 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/framework/releases/pre-l1-merge/mrb_cache/edafe2e5ed6ce462fa81d08faf5d5008fa836ca2-pre-l1-merge.mrb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/protocol-units/execution/maptos/framework/releases/pre-l1-merge/mrb_cache/edafe2e5ed6ce462fa81d08faf5d5008fa836ca2-pre-l1-merge.mrb -------------------------------------------------------------------------------- /protocol-units/execution/maptos/opt-executor/src/background/error.rs: -------------------------------------------------------------------------------- 1 | use movement_signer_loader::LoaderError; 2 | use thiserror::Error; 3 | 4 | /// Domain error for the executor background task. 5 | #[derive(Debug, Error)] 6 | pub enum Error { 7 | #[error("internal error: {0}")] 8 | InternalError(String), 9 | #[error("mempool client request stream closed")] 10 | InputClosed, 11 | #[error("Error during sign loading: {0}")] 12 | LoadSign(#[from] LoaderError), 13 | #[error("Error serialization of transaction batch: {0}")] 14 | SerialisationFailed(#[from] bcs::Error), 15 | } 16 | 17 | impl From for Error { 18 | fn from(e: anyhow::Error) -> Self { 19 | Error::InternalError(e.to_string()) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/opt-executor/src/background/mod.rs: -------------------------------------------------------------------------------- 1 | mod task; 2 | 3 | mod read_only; 4 | mod transaction_pipe; 5 | 6 | mod error; 7 | 8 | pub use error::Error; 9 | use read_only::NullMempool; 10 | pub use task::BackgroundTask; 11 | pub use transaction_pipe::TransactionPipe; 12 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/util/src/config/fin.rs: -------------------------------------------------------------------------------- 1 | use super::common::{default_fin_rest_listen_hostname, default_fin_rest_listen_port}; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] 5 | pub struct Config { 6 | /// The URL of the Aptos REST server 7 | #[serde(default = "default_fin_rest_listen_hostname")] 8 | pub fin_rest_listen_hostname: String, 9 | 10 | /// The port of the Aptos REST server 11 | #[serde(default = "default_fin_rest_listen_port")] 12 | pub fin_rest_listen_port: u16, 13 | } 14 | 15 | impl Default for Config { 16 | fn default() -> Self { 17 | Self { 18 | fin_rest_listen_hostname: default_fin_rest_listen_hostname(), 19 | fin_rest_listen_port: default_fin_rest_listen_port(), 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/util/src/config/indexer_processor.rs: -------------------------------------------------------------------------------- 1 | use super::common::{default_indexer_processor_auth_token, default_postgres_connection_string}; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] 5 | pub struct Config { 6 | #[serde(default = "default_postgres_connection_string")] 7 | pub postgres_connection_string: String, 8 | 9 | #[serde(default = "default_indexer_processor_auth_token")] 10 | pub indexer_processor_auth_token: String, 11 | } 12 | 13 | impl Default for Config { 14 | fn default() -> Self { 15 | Self { 16 | postgres_connection_string: default_postgres_connection_string(), 17 | indexer_processor_auth_token: default_indexer_processor_auth_token(), 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /protocol-units/execution/maptos/util/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod config; 2 | -------------------------------------------------------------------------------- /protocol-units/mempool/util/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mempool-util" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [dependencies] 15 | serde = { workspace = true} 16 | movement-types = { workspace = true } 17 | anyhow = { workspace = true } 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /protocol-units/movement-rest/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "movement-rest" 3 | description = "additional movement rest api endpoints" 4 | authors = { workspace = true } 5 | edition = { workspace = true } 6 | homepage = { workspace = true } 7 | license = { workspace = true } 8 | repository = { workspace = true } 9 | 10 | version = { workspace = true } 11 | 12 | [lib] 13 | path = "src/lib.rs" 14 | 15 | [dependencies] 16 | anyhow = { workspace = true } 17 | futures = { workspace = true } 18 | poem = { workspace = true } 19 | tokio = { workspace = true } 20 | tracing = { workspace = true } 21 | 22 | aptos-api = { workspace = true } 23 | 24 | [dev-dependencies] 25 | poem = { workspace = true, features = ["test"] } 26 | -------------------------------------------------------------------------------- /protocol-units/sequencing/README.md: -------------------------------------------------------------------------------- 1 | `sequencing` 2 | 3 | - [Mempool Sequencer](./memseq/sequencer/README.md): Basic sequencer that orders transactions from a mempool into blocks. -------------------------------------------------------------------------------- /protocol-units/sequencing/memseq/sequencer/README.md: -------------------------------------------------------------------------------- 1 | `Mempool Sequencer` 2 | 3 | The `Memseq` module is responsible for managing a mempool and sequencing transactions into blocks. 4 | 5 | It is intended for use of a centralized sequencer node that manages a mempool. -------------------------------------------------------------------------------- /protocol-units/sequencing/memseq/util/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "memseq-util" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [dependencies] 15 | anyhow = { workspace = true } 16 | tempfile = { workspace = true } 17 | futures = { workspace = true } 18 | dot-movement = { workspace = true } 19 | serde = { workspace = true } 20 | serde_derive = { workspace = true } 21 | toml = { workspace = true } 22 | godfig = { workspace = true } 23 | 24 | [lints] 25 | workspace = true -------------------------------------------------------------------------------- /protocol-units/sequencing/util/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sequencing-util" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [dependencies] 15 | tokio = { workspace = true } 16 | movement-types = { workspace = true } 17 | anyhow = { workspace = true } 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /protocol-units/settlement/README.md: -------------------------------------------------------------------------------- 1 | # `settlement` 2 | 3 | - [MCR](./mcr/README.md) : Multi-Commitment Rollup (MCR) settlement. -------------------------------------------------------------------------------- /protocol-units/settlement/mcr/config/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mcr-settlement-config" 3 | description = "Configuration of the MCR settlement client" 4 | version.workspace = true 5 | edition.workspace = true 6 | license.workspace = true 7 | authors.workspace = true 8 | repository.workspace = true 9 | homepage.workspace = true 10 | publish.workspace = true 11 | rust-version.workspace = true 12 | 13 | [dependencies] 14 | serde = { workspace = true , features = ["derive"] } 15 | alloy = { workspace = true } 16 | godfig = { workspace = true } 17 | anyhow = { workspace = true } 18 | movement-signer-loader = { workspace = true } 19 | movement-signer = { workspace = true} 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /protocol-units/settlement/mcr/config/src/common/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod deploy; 2 | pub mod eth_connection; 3 | pub mod settlement; 4 | pub mod staking; 5 | pub mod testing; 6 | pub mod transactions; 7 | -------------------------------------------------------------------------------- /protocol-units/settlement/mcr/config/src/common/staking.rs: -------------------------------------------------------------------------------- 1 | use godfig::env_short_default; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[derive(Debug, Clone, Serialize, Deserialize)] 5 | pub struct Config { 6 | #[serde(default = "default_move_token_contract_address")] 7 | pub move_token_contract_address: String, 8 | #[serde(default = "default_movement_staking_contract_address")] 9 | pub movement_staking_contract_address: String, 10 | } 11 | 12 | env_short_default!(default_move_token_contract_address, String, "0x0"); 13 | 14 | env_short_default!(default_movement_staking_contract_address, String, "0x0"); 15 | -------------------------------------------------------------------------------- /protocol-units/settlement/mcr/contracts/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiler files 2 | cache/ 3 | out/ 4 | broadcast/ 5 | 6 | # Ignores development broadcast logs 7 | !/broadcast 8 | /broadcast/*/31337/ 9 | /broadcast/**/dry-run/ 10 | broadcast 11 | 12 | # Docs 13 | docs/ 14 | 15 | # Dotenv file 16 | .env 17 | 18 | .vscode/ 19 | 20 | node_modules/ -------------------------------------------------------------------------------- /protocol-units/settlement/mcr/contracts/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "singleQuote": true, 4 | "trailingComma": "all", 5 | "arrowParens": "avoid", 6 | "overrides": [ 7 | { 8 | "files": "*.sol", 9 | "options": { 10 | "singleQuote": false 11 | } 12 | } 13 | ], 14 | "plugins": ["prettier-plugin-solidity"] 15 | } 16 | -------------------------------------------------------------------------------- /protocol-units/settlement/mcr/contracts/foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | via_ir = true 3 | optimizer = true 4 | src = "src" 5 | out = "out" 6 | libs = ["lib"] 7 | ffi = true 8 | gas_limit = 9223372036854775807 # this is only needed for the multiround settlement test 9 | build_info = true 10 | extra_output = ["storageLayout"] 11 | 12 | solc = "0.8.26" 13 | evm_version = "cancun" 14 | 15 | fs_permissions = [{ access = "read-write", path = "./script/"}] 16 | 17 | [profile.dependencies] 18 | openzeppelin = { git = "https://github.com/OpenZeppelin/openzeppelin-contracts", tag = "v4.7.0" } 19 | 20 | -------------------------------------------------------------------------------- /protocol-units/settlement/mcr/contracts/minter/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "Minter" 3 | version = "0.0.0" 4 | 5 | [dependencies.AptosFramework] 6 | git = "https://github.com/movementlabsxyz/aptos-core.git" 7 | rev = "movement" 8 | subdir = "aptos-move/framework/aptos-framework" -------------------------------------------------------------------------------- /protocol-units/settlement/mcr/contracts/minter/sources/minter.move: -------------------------------------------------------------------------------- 1 | script { 2 | use std::signer; 3 | use aptos_framework::aptos_account; 4 | use aptos_framework::aptos_coin; 5 | use aptos_framework::coin; 6 | 7 | // Tune this parameter based upon the actual gas costs 8 | const GAS_BUFFER: u64 = 100000; 9 | const U64_MAX: u64 = 18446744073709551615; 10 | 11 | fun main(minter: &signer, dst_addr: address, amount: u64) { 12 | let minter_addr = signer::address_of(minter); 13 | 14 | // Do not mint if it would exceed U64_MAX 15 | let balance = coin::balance(minter_addr); 16 | if (balance < U64_MAX - amount - GAS_BUFFER) { 17 | aptos_coin::mint(minter, minter_addr, amount + GAS_BUFFER); 18 | }; 19 | 20 | aptos_account::transfer(minter, dst_addr, amount); 21 | } 22 | } -------------------------------------------------------------------------------- /protocol-units/settlement/mcr/contracts/remappings.txt: -------------------------------------------------------------------------------- 1 | @openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/ 2 | @openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ 3 | @createx/=lib/createx/src/ 4 | ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/ 5 | erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/ 6 | forge-std/=lib/forge-std/src/ 7 | murky/=lib/murky/ 8 | openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/ 9 | openzeppelin-contracts/=lib/openzeppelin-contracts/ 10 | openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/ 11 | openzeppelin/=lib/createx/lib/openzeppelin-contracts/contracts/ 12 | @safe-smart-account/=lib/safe-smart-account/ 13 | solady/=lib/createx/lib/solady/ 14 | solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/ 15 | -------------------------------------------------------------------------------- /protocol-units/settlement/mcr/contracts/src/settlement/interfaces/IMCR.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | interface IMCR { 5 | event BlockAccepted( 6 | bytes32 indexed blockHash, 7 | bytes32 stateCommitment, 8 | uint256 height 9 | ); 10 | event BlockCommitmentSubmitted( 11 | bytes32 indexed blockHash, 12 | bytes32 stateCommitment, 13 | uint256 attesterStake 14 | ); 15 | error UnacceptableBlockCommitment(); 16 | error AttesterAlreadyCommitted(); 17 | } -------------------------------------------------------------------------------- /protocol-units/settlement/mcr/contracts/src/token/base/WrappedTokenStorage.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.19; 3 | 4 | import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; 5 | import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol"; 6 | import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; 7 | import "./MintableToken.sol"; 8 | 9 | contract WrappedTokenStorage { 10 | using SafeERC20 for IERC20; 11 | 12 | IMintableToken public underlyingToken; 13 | 14 | uint256[50] internal __gap; 15 | } 16 | -------------------------------------------------------------------------------- /protocol-units/settlement/mcr/contracts/src/token/locked/LockedTokenStorage.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.19; 3 | import {LockedTokenStorage} from "./LockedTokenStorage.sol"; 4 | 5 | contract LockedTokenStorage { 6 | bytes32 public constant MINT_LOCKER_ROLE = keccak256("MINT_LOCKER_ROLE"); 7 | bytes32 public constant MINT_LOCKER_ADMIN_ROLE = 8 | keccak256("MINT_LOCKER_ADMIN_ROLE"); 9 | 10 | struct Lock { 11 | uint256 amount; 12 | uint256 releaseTime; 13 | } 14 | mapping(address => Lock[]) public locks; 15 | 16 | error AddressesAndMintLengthMismatch(); 17 | error AddressesAndLockLengthMismatch(); 18 | error AddressesAndTimeLengthMismatch(); 19 | } 20 | -------------------------------------------------------------------------------- /protocol-units/settlement/mcr/manager/src/lib.rs: -------------------------------------------------------------------------------- 1 | use movement_types::block::{BlockCommitment, BlockCommitmentEvent}; 2 | use tokio_stream::Stream; 3 | 4 | mod manager; 5 | 6 | pub use manager::Manager as McrSettlementManager; 7 | 8 | pub type CommitmentEventStream = 9 | std::pin::Pin> + Send>>; 10 | 11 | #[async_trait::async_trait] 12 | pub trait McrSettlementManagerOperations { 13 | /// Adds a block commitment to the manager queue. 14 | async fn post_block_commitment( 15 | &self, 16 | block_commitment: BlockCommitment, 17 | ) -> Result<(), anyhow::Error>; 18 | } 19 | -------------------------------------------------------------------------------- /protocol-units/storage/jelly-move/src/types.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/protocol-units/storage/jelly-move/src/types.rs -------------------------------------------------------------------------------- /protocol-units/storage/move-access-log/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod access_log; -------------------------------------------------------------------------------- /protocol-units/storage/mpt-move/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mpt-move" 3 | version = "0.0.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | anyhow = { workspace = true } 8 | tempfile = { workspace = true } 9 | 10 | # serialization, deserialization 11 | borsh = { workspace = true } 12 | serde = { workspace = true } 13 | serde_json = { workspace = true } 14 | 15 | # runtime 16 | tokio = { workspace = true } 17 | 18 | # cryptography 19 | jmt = { workspace = true } 20 | sha2 = { workspace = true } 21 | 22 | # storage 23 | rocksdb = { workspace = true } 24 | 25 | # Move dependencies. 26 | move-core-types = { workspace = true } -------------------------------------------------------------------------------- /protocol-units/storage/mpt-move/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/protocol-units/storage/mpt-move/src/lib.rs -------------------------------------------------------------------------------- /protocol-units/syncing/syncup/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "syncup" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [dependencies] 15 | syncador = { workspace = true } 16 | tokio = { workspace = true } 17 | async-stream = { workspace = true } 18 | async-trait = { workspace = true } 19 | anyhow = { workspace = true } 20 | futures = { workspace = true } 21 | tracing = { workspace = true } 22 | movement-types = { workspace = true } 23 | 24 | [lints] 25 | workspace = true 26 | -------------------------------------------------------------------------------- /protocol-units/syncing/syncup/README.md: -------------------------------------------------------------------------------- 1 | # `syncup` 2 | Used to easily setup sync for an application that downsyncs once and then upsyncs continuously. -------------------------------------------------------------------------------- /protocol-units/tokens/mock/devnet/m1/mevm/.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: test 2 | 3 | on: workflow_dispatch 4 | 5 | env: 6 | FOUNDRY_PROFILE: ci 7 | 8 | jobs: 9 | check: 10 | strategy: 11 | fail-fast: true 12 | 13 | name: Foundry project 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v4 17 | with: 18 | submodules: recursive 19 | 20 | - name: Install Foundry 21 | uses: foundry-rs/foundry-toolchain@v1 22 | with: 23 | version: nightly 24 | 25 | - name: Run Forge build 26 | run: | 27 | forge --version 28 | forge build --sizes 29 | id: build 30 | 31 | - name: Run Forge tests 32 | run: | 33 | forge test -vvv 34 | id: test 35 | -------------------------------------------------------------------------------- /protocol-units/tokens/mock/devnet/m1/mevm/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiler files 2 | cache/ 3 | out/ 4 | 5 | # Ignores development broadcast logs 6 | !/broadcast 7 | /broadcast/*/31337/ 8 | /broadcast/**/dry-run/ 9 | 10 | # Docs 11 | docs/ 12 | 13 | # Dotenv file 14 | .env 15 | lib/ -------------------------------------------------------------------------------- /protocol-units/tokens/mock/devnet/m1/mevm/foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | src = "src" 3 | out = "out" 4 | libs = ["lib"] 5 | 6 | solc = "0.8.24" 7 | 8 | # See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options 9 | -------------------------------------------------------------------------------- /protocol-units/tokens/mock/devnet/m1/mevm/src/interfaces/IERC3156FlashBorrower.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.0 <=0.9.0; 3 | 4 | interface IERC3156FlashBorrower { 5 | /** 6 | * @dev Receive a flash loan. 7 | * @param initiator The initiator of the loan. 8 | * @param token The loan currency. 9 | * @param amount The amount of tokens lent. 10 | * @param fee The additional amount of tokens to repay. 11 | * @param data Arbitrary data structure, intended to contain user-defined parameters. 12 | * @return The keccak256 hash of "ERC3156FlashBorrower.onFlashLoan" 13 | */ 14 | function onFlashLoan(address initiator, address token, uint256 amount, uint256 fee, bytes calldata data) 15 | external 16 | returns (bytes32); 17 | } 18 | -------------------------------------------------------------------------------- /protocol-units/tokens/mock/devnet/m2/sui/.gitignore: -------------------------------------------------------------------------------- 1 | build/ -------------------------------------------------------------------------------- /protocol-units/tokens/mock/devnet/m2/sui/sources/usdc.move: -------------------------------------------------------------------------------- 1 | module mock_tokens::usdc { 2 | use sui::coin; 3 | use sui::url::new_unsafe_from_bytes; 4 | 5 | public struct USDC has drop {} 6 | 7 | fun init(witness: USDC, ctx: &mut TxContext) { 8 | let (treasury_cap, metadata) = coin::create_currency( 9 | witness, 10 | 6, 11 | b"USDC", 12 | b"USD Coin", 13 | b"USD Stable Coin by Circle", 14 | option::some(new_unsafe_from_bytes(b"https://imagedelivery.net/cBNDGgkrsEA-b_ixIp9SkQ/usdc.png/public")), 15 | ctx 16 | ); 17 | 18 | transfer::public_share_object(treasury_cap); 19 | transfer::public_freeze_object(metadata); 20 | } 21 | } -------------------------------------------------------------------------------- /protocol-units/tokens/mock/devnet/m2/sui/sources/usdt.move: -------------------------------------------------------------------------------- 1 | module mock_tokens::usdt { 2 | use sui::coin; 3 | use sui::url::new_unsafe_from_bytes; 4 | 5 | public struct USDT has drop {} 6 | 7 | fun init(witness: USDT, ctx: &mut TxContext) { 8 | let (treasury_cap, metadata) = coin::create_currency( 9 | witness, 10 | 9, 11 | b"USDT", 12 | b"USD Tether", 13 | b"Stable coin", 14 | option::some(new_unsafe_from_bytes(b"https://imagedelivery.net/cBNDGgkrsEA-b_ixIp9SkQ/usdt.png/public")), 15 | ctx 16 | ); 17 | 18 | transfer::public_share_object(treasury_cap); 19 | transfer::public_freeze_object(metadata); 20 | } 21 | } -------------------------------------------------------------------------------- /protocol-units/tokens/mock/devnet/m2/sui/sources/wbtc.move: -------------------------------------------------------------------------------- 1 | module mock_tokens::wbtc { 2 | use sui::coin; 3 | use sui::url::new_unsafe_from_bytes; 4 | 5 | public struct WBTC has drop {} 6 | 7 | fun init(witness: WBTC, ctx: &mut TxContext) { 8 | let (treasury_cap, metadata) = coin::create_currency( 9 | witness, 10 | 9, 11 | b"WBTC", 12 | b"Bitcoin", 13 | b"The first cryptocurrency!", 14 | option::some(new_unsafe_from_bytes(b"https://imagedelivery.net/cBNDGgkrsEA-b_ixIp9SkQ/btc.png/public")), 15 | ctx 16 | ); 17 | 18 | transfer::public_share_object(treasury_cap); 19 | transfer::public_freeze_object(metadata); 20 | } 21 | } -------------------------------------------------------------------------------- /protocol-units/tokens/mock/devnet/m2/sui/sources/weth.move: -------------------------------------------------------------------------------- 1 | module mock_tokens::weth { 2 | use sui::coin; 3 | use sui::url::new_unsafe_from_bytes; 4 | 5 | public struct WETH has drop {} 6 | 7 | fun init(witness: WETH, ctx: &mut TxContext) { 8 | let (treasury_cap, metadata) = coin::create_currency( 9 | witness, 10 | 9, 11 | b"WETH", 12 | b"WETH", 13 | b"Wrapped Ethereum", 14 | option::some(new_unsafe_from_bytes(b"https://imagedelivery.net/cBNDGgkrsEA-b_ixIp9SkQ/eth.png/public")), 15 | ctx 16 | ); 17 | 18 | transfer::public_share_object(treasury_cap); 19 | transfer::public_freeze_object(metadata); 20 | } 21 | } -------------------------------------------------------------------------------- /protocol-units/tokens/mock/testnet/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .aptos/ 3 | -------------------------------------------------------------------------------- /protocol-units/tokens/mock/testnet/holesky/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiler files 2 | cache/ 3 | out/ 4 | 5 | # Ignores development broadcast logs 6 | !/broadcast 7 | /broadcast/*/31337/ 8 | /broadcast/**/dry-run/ 9 | 10 | # Docs 11 | docs/ 12 | 13 | # Dotenv file 14 | .env 15 | -------------------------------------------------------------------------------- /protocol-units/tokens/mock/testnet/holesky/foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | src = "src" 3 | out = "out" 4 | libs = ["lib"] 5 | 6 | # See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options 7 | -------------------------------------------------------------------------------- /protocol-units/tokens/mock/testnet/holesky/remappings.txt: -------------------------------------------------------------------------------- 1 | @openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ 2 | ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/ 3 | erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/ 4 | forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/ 5 | openzeppelin-contracts/=lib/openzeppelin-contracts/ 6 | -------------------------------------------------------------------------------- /protocol-units/tokens/mock/testnet/imola/mevm/.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: test 2 | 3 | on: workflow_dispatch 4 | 5 | env: 6 | FOUNDRY_PROFILE: ci 7 | 8 | jobs: 9 | check: 10 | strategy: 11 | fail-fast: true 12 | 13 | name: Foundry project 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v4 17 | with: 18 | submodules: recursive 19 | 20 | - name: Install Foundry 21 | uses: foundry-rs/foundry-toolchain@v1 22 | with: 23 | version: nightly 24 | 25 | - name: Run Forge build 26 | run: | 27 | forge --version 28 | forge build --sizes 29 | id: build 30 | 31 | - name: Run Forge tests 32 | run: | 33 | forge test -vvv 34 | id: test 35 | -------------------------------------------------------------------------------- /protocol-units/tokens/mock/testnet/imola/mevm/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiler files 2 | cache/ 3 | out/ 4 | 5 | # Ignores development broadcast logs 6 | !/broadcast 7 | /broadcast/*/31337/ 8 | /broadcast/**/dry-run/ 9 | 10 | # Docs 11 | docs/ 12 | 13 | # Dotenv file 14 | .env 15 | lib/ -------------------------------------------------------------------------------- /protocol-units/tokens/mock/testnet/imola/mevm/foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | src = "src" 3 | out = "out" 4 | libs = ["lib"] 5 | 6 | solc = "0.8.24" 7 | 8 | # See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options 9 | -------------------------------------------------------------------------------- /protocol-units/tokens/mock/testnet/imola/mevm/src/interfaces/IERC3156FlashBorrower.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.0 <=0.9.0; 3 | 4 | interface IERC3156FlashBorrower { 5 | /** 6 | * @dev Receive a flash loan. 7 | * @param initiator The initiator of the loan. 8 | * @param token The loan currency. 9 | * @param amount The amount of tokens lent. 10 | * @param fee The additional amount of tokens to repay. 11 | * @param data Arbitrary data structure, intended to contain user-defined parameters. 12 | * @return The keccak256 hash of "ERC3156FlashBorrower.onFlashLoan" 13 | */ 14 | function onFlashLoan(address initiator, address token, uint256 amount, uint256 fee, bytes calldata data) 15 | external 16 | returns (bytes32); 17 | } 18 | -------------------------------------------------------------------------------- /protocol-units/tokens/mock/testnet/imola/sui/.gitignore: -------------------------------------------------------------------------------- 1 | build/ -------------------------------------------------------------------------------- /protocol-units/tokens/mock/testnet/imola/sui/sources/usdc.move: -------------------------------------------------------------------------------- 1 | module mock_tokens::usdc { 2 | use sui::coin; 3 | use sui::url::new_unsafe_from_bytes; 4 | 5 | public struct USDC has drop {} 6 | 7 | fun init(witness: USDC, ctx: &mut TxContext) { 8 | let (treasury_cap, metadata) = coin::create_currency( 9 | witness, 10 | 6, 11 | b"USDC", 12 | b"USD Coin", 13 | b"USD Stable Coin by Circle", 14 | option::some(new_unsafe_from_bytes(b"https://imagedelivery.net/cBNDGgkrsEA-b_ixIp9SkQ/usdc.png/public")), 15 | ctx 16 | ); 17 | 18 | transfer::public_share_object(treasury_cap); 19 | transfer::public_freeze_object(metadata); 20 | } 21 | } -------------------------------------------------------------------------------- /protocol-units/tokens/mock/testnet/imola/sui/sources/usdt.move: -------------------------------------------------------------------------------- 1 | module mock_tokens::usdt { 2 | use sui::coin; 3 | use sui::url::new_unsafe_from_bytes; 4 | 5 | public struct USDT has drop {} 6 | 7 | fun init(witness: USDT, ctx: &mut TxContext) { 8 | let (treasury_cap, metadata) = coin::create_currency( 9 | witness, 10 | 6, 11 | b"USDT", 12 | b"USD Tether", 13 | b"Stable coin", 14 | option::some(new_unsafe_from_bytes(b"https://imagedelivery.net/cBNDGgkrsEA-b_ixIp9SkQ/usdt.png/public")), 15 | ctx 16 | ); 17 | 18 | transfer::public_share_object(treasury_cap); 19 | transfer::public_freeze_object(metadata); 20 | } 21 | } -------------------------------------------------------------------------------- /protocol-units/tokens/mock/testnet/imola/sui/sources/wbtc.move: -------------------------------------------------------------------------------- 1 | module mock_tokens::wbtc { 2 | use sui::coin; 3 | use sui::url::new_unsafe_from_bytes; 4 | 5 | public struct WBTC has drop {} 6 | 7 | fun init(witness: WBTC, ctx: &mut TxContext) { 8 | let (treasury_cap, metadata) = coin::create_currency( 9 | witness, 10 | 8, 11 | b"WBTC", 12 | b"Bitcoin", 13 | b"The first cryptocurrency!", 14 | option::some(new_unsafe_from_bytes(b"https://imagedelivery.net/cBNDGgkrsEA-b_ixIp9SkQ/btc.png/public")), 15 | ctx 16 | ); 17 | 18 | transfer::public_share_object(treasury_cap); 19 | transfer::public_freeze_object(metadata); 20 | } 21 | } -------------------------------------------------------------------------------- /protocol-units/tokens/mock/testnet/imola/sui/sources/weth.move: -------------------------------------------------------------------------------- 1 | module mock_tokens::weth { 2 | use sui::coin; 3 | use sui::url::new_unsafe_from_bytes; 4 | 5 | public struct WETH has drop {} 6 | 7 | fun init(witness: WETH, ctx: &mut TxContext) { 8 | let (treasury_cap, metadata) = coin::create_currency( 9 | witness, 10 | 8, 11 | b"WETH", 12 | b"WETH", 13 | b"Wrapped Ethereum", 14 | option::some(new_unsafe_from_bytes(b"https://imagedelivery.net/cBNDGgkrsEA-b_ixIp9SkQ/eth.png/public")), 15 | ctx 16 | ); 17 | 18 | transfer::public_share_object(treasury_cap); 19 | transfer::public_freeze_object(metadata); 20 | } 21 | } -------------------------------------------------------------------------------- /protocol-units/tokens/mock/testnet/suzuka/aptos/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mock-tokens" 3 | version = "1.0.0" 4 | authors = [] 5 | 6 | [addresses] 7 | mock="0x275f508689de8756169d1ee02d889c777de1cebda3a7bbcce63ba8a27c563c6f" 8 | 9 | [dev-addresses] 10 | 11 | [dependencies.AptosFramework] 12 | git = "https://github.com/aptos-labs/aptos-core.git" 13 | rev = "mainnet" 14 | subdir = "aptos-move/framework/aptos-framework" 15 | 16 | [dev-dependencies] 17 | -------------------------------------------------------------------------------- /public_key.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/public_key.der -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "1.85" 3 | components = ["rustfmt", "rust-src", "clippy"] 4 | profile = "minimal" 5 | -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- 1 | # Basic 2 | edition = "2021" 3 | hard_tabs = true 4 | max_width = 100 5 | use_small_heuristics = "Max" 6 | 7 | # Imports 8 | reorder_imports = true 9 | 10 | # Consistency 11 | newline_style = "Unix" 12 | 13 | # Misc 14 | chain_width = 80 15 | -------------------------------------------------------------------------------- /scripts/cargo/choose: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # change symbolic link to be Cargo.$1.toml 5 | ln -sf Cargo.$1.toml Cargo.toml 6 | 7 | 8 | -------------------------------------------------------------------------------- /scripts/devops/conv-commit-check: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # check if git is installed 4 | if ! command -v git &> /dev/null; then 5 | echo "git is not installed" 6 | exit 1 7 | fi 8 | 9 | # check if cog is installed 10 | if ! command -v cog &> /dev/null; then 11 | echo "cocogitto (cog) is not installed" 12 | exit 1 13 | fi 14 | 15 | echo "Checking for conventional commits" 16 | 17 | # get current commit hash 18 | COMMIT_HASH_CURRENT=$(git rev-parse HEAD) 19 | 20 | # check for conventional commits 21 | CONVENTIONAL_COMMITS=$(cog check $COMMIT_HASH_CURRENT..$COMMIT_HASH_CURRENT) 22 | 23 | if echo "$CONVENTIONAL_COMMITS" | grep -qi "Error:"; then 24 | echo "Failures found in conventional commit" 25 | exit 1 26 | fi 27 | 28 | exit 0 29 | 30 | -------------------------------------------------------------------------------- /scripts/fixup/zlib: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export LDFLAGS="-L/opt/homebrew/opt/zlib/lib" 3 | export CPPFLAGS="-I/opt/homebrew/opt/zlib/include" -------------------------------------------------------------------------------- /scripts/movement/build-push-image: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | FILE_PATH=./docker/build/$1/Dockerfile 3 | ./scripts/docker/build-push-image $FILE_PATH ghcr.io/movementlabsxyz $1 4 | -------------------------------------------------------------------------------- /scripts/movement/docker-compose: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | set -euo pipefail 4 | 5 | if [ "$#" -lt 3 ]; then 6 | echo "Usage: $0 [docker-compose flags...]" 7 | echo "Example: $0 movement-full-node docker-compose setup.local.test" 8 | exit 1 9 | fi 10 | 11 | SERVICE=$1 12 | RUNTIME=$2 # runtime is already known, but we reuse 13 | FEATURES=$3 14 | 15 | IFS='.' read -r -a split <<< "$FEATURES" 16 | 17 | override_files=() 18 | for element in "${split[@]}"; do 19 | override_files+=("-f") 20 | override_files+=("docker/compose/$SERVICE/docker-compose.$element.yml") 21 | done 22 | 23 | echo "Running docker-compose for $SERVICE with override files: ${override_files[@]}..." 24 | docker compose --env-file .env -f docker/compose/$SERVICE/docker-compose.yml "${override_files[@]}" up "${@:4}" -------------------------------------------------------------------------------- /scripts/movement/manifest: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | IMAGE_NAME=$1 3 | FILE_PATH=./docker/build/"${IMAGE_NAME}"/Dockerfile 4 | ./scripts/docker/manifest "${FILE_PATH}" ghcr.io/movementlabsxyz "${IMAGE_NAME}" -------------------------------------------------------------------------------- /scripts/movement/native: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | set -euo pipefail 4 | 5 | if [ "$#" -lt 3 ]; then 6 | echo "Usage: $0 [process-compose flags...]" 7 | echo "Example: $0 movement-full-node native setup.local.test" 8 | exit 1 9 | fi 10 | 11 | SERVICE=$1 12 | RUNTIME=$2 # runtime is already known, but we reuse 13 | FEATURES=$3 14 | 15 | IFS='.' read -r -a split <<< "$FEATURES" 16 | 17 | override_files=() 18 | for element in "${split[@]}"; do 19 | override_files+=("-f") 20 | override_files+=("process-compose/$SERVICE/process-compose.$element.yml") 21 | done 22 | 23 | echo "Running process-compose for $SERVICE with override files: ${override_files[@]}..." 24 | process-compose -f process-compose/$SERVICE/process-compose.yml "${override_files[@]}" "${@:4}" -------------------------------------------------------------------------------- /scripts/movement/setup-dirs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | mkdir -p $DOT_MOVEMENT 3 | mkdir -p $DOT_MOVEMENT/env -------------------------------------------------------------------------------- /scripts/services/indexer/build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | cat ./.data/logfile 5 | echo "after cat db" 6 | 7 | echo "Building Indexer..." 8 | cargo build $CARGO_PROFILE_FLAGS -p movement-indexer-service 9 | echo "Built Indexer!" 10 | -------------------------------------------------------------------------------- /scripts/services/indexer/test_indexer: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | sleep 10 4 | result=$(PGPASSWORD=password psql -h $POSTGRES_HOST_IP -U postgres -d postgres -t -c "SELECT COUNT(*) FROM public.transactions;") 5 | result=$(echo $result | xargs) 6 | if (( result >= 1 )); then 7 | response=$(curl -s -X POST -H "Content-Type: application/json" -d '{"query":"query {user_transactions { block_height } }"}' "http://localhost:8085/v1/graphql") 8 | # If "block_height" is present in the response, it mean the meta data has been loaded 9 | echo "$response" | grep -q '"block_height"' 10 | if [ $? -eq 0 ]; then 11 | echo "Indexer test OK." 12 | exit 0 13 | else 14 | echo "Indexer test Failed, no metadata. Curl response: ${response}" 15 | exit 1 16 | fi 17 | else 18 | echo "Indexer test Failed, db not populated." 19 | exit 1 20 | fi 21 | -------------------------------------------------------------------------------- /scripts/services/m1-da-light-node/build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | : ${MOVEMENT_PREBUILT:=false} 5 | export MOVEMENT_PREBUILT 6 | : ${CARGO_PROFILE:=debug} 7 | export CARGO_PROFILE 8 | 9 | if [ "$CARGO_PROFILE" = "release" ]; then 10 | CARGO_PROFILE_FLAGS="--release" 11 | else 12 | CARGO_PROFILE_FLAGS="" 13 | fi 14 | 15 | echo "Building movement-celestia-da-light-node..." 16 | cargo build $CARGO_PROFILE_FLAGS -p movement-celestia-da-light-node --features "sequencer" 17 | echo "Built movement-celestia-da-light-node!" 18 | 19 | echo "Building movement-celestia-da-light-node-runners..." 20 | cargo build $CARGO_PROFILE_FLAGS -p movement-celestia-da-light-node-runners 21 | echo "Built movement-celestia-da-light-node-runners!" 22 | -------------------------------------------------------------------------------- /scripts/services/mcr/build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | : ${MOVEMENT_PREBUILT:=false} 5 | export MOVEMENT_PREBUILT 6 | : ${CARGO_PROFILE:=debug} 7 | export CARGO_PROFILE 8 | 9 | if [ "$CARGO_PROFILE" = "release" ]; then 10 | CARGO_PROFILE_FLAGS="--release" 11 | else 12 | CARGO_PROFILE_FLAGS="" 13 | fi 14 | 15 | echo "Building mcr-settlement-runner..." 16 | cargo build $CARGO_PROFILE_FLAGS -p mcr-settlement-runner 17 | echo "Built mcr-settlement-runner!" -------------------------------------------------------------------------------- /scripts/services/wait-for-celestia-light-node/build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | : ${MOVEMENT_PREBUILT:=false} 5 | export MOVEMENT_PREBUILT 6 | : ${CARGO_PROFILE:=debug} 7 | export CARGO_PROFILE 8 | 9 | if [ "$CARGO_PROFILE" = "release" ]; then 10 | CARGO_PROFILE_FLAGS="--release" 11 | else 12 | CARGO_PROFILE_FLAGS="" 13 | fi 14 | 15 | echo "Building wait-for-celestia-light-node..." 16 | cargo build $CARGO_PROFILE_FLAGS -p movement-da-util --bin wait-for-celestia-light-node 17 | echo "Built wait-for-celestia-light-node!" 18 | -------------------------------------------------------------------------------- /types/move-vm-ext/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "move-vm-ext" 3 | version = "0.0.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | anyhow = { workspace = true } 8 | tempfile = { workspace = true } 9 | 10 | # Move dependencies. 11 | move-core-types = { workspace = true } 12 | move-vm-runtime = { workspace = true } 13 | move-vm-test-utils = { workspace = true } 14 | move-binary-format = { workspace = true } 15 | move-vm-types = { workspace = true } 16 | move-compiler = { workspace = true } 17 | move-stdlib = { workspace = true } 18 | move-vm-integration-test-helpers = { workspace = true } -------------------------------------------------------------------------------- /types/move-vm-ext/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod storage; -------------------------------------------------------------------------------- /types/move-vm-ext/src/storage/basic_storage_operations.rs: -------------------------------------------------------------------------------- 1 | use move_core_types::language_storage::ModuleId; 2 | 3 | pub trait BasicStorageOperations { 4 | 5 | fn publish_or_overwrite_module(&self, id: ModuleId, blob: Vec) -> Result<(), anyhow::Error>; 6 | 7 | } -------------------------------------------------------------------------------- /types/move-vm-ext/src/storage/change_set.rs: -------------------------------------------------------------------------------- 1 | use move_core_types::effects::ChangeSet; 2 | 3 | pub trait ChangeSetWriter { 4 | 5 | /// Write a change set to storage 6 | fn write_change_set(&self, change_set: ChangeSet) -> Result<(), anyhow::Error>; 7 | 8 | } -------------------------------------------------------------------------------- /types/move-vm-ext/src/storage/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod change_set; 2 | pub use change_set::ChangeSetWriter; 3 | pub mod basic_storage_operations; 4 | pub use basic_storage_operations::BasicStorageOperations; 5 | pub mod proofs; -------------------------------------------------------------------------------- /types/move-vm-ext/src/storage/proofs.rs: -------------------------------------------------------------------------------- 1 | pub trait MerkleProofs { 2 | 3 | 4 | } -------------------------------------------------------------------------------- /util/buildtime/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "buildtime" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | [dependencies] 13 | buildtime-helpers = { workspace = true } 14 | buildtime-macros = { workspace = true } 15 | anyhow = { workspace = true } 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /util/buildtime/buildtime-helpers/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "buildtime-helpers" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [dependencies] 15 | anyhow = { workspace = true } 16 | serde_json = { workspace = true } 17 | 18 | [dev-dependencies] 19 | toml = { workspace = true} 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /util/buildtime/buildtime-helpers/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod cargo; 2 | pub mod proto; 3 | -------------------------------------------------------------------------------- /util/buildtime/buildtime-helpers/src/proto.rs: -------------------------------------------------------------------------------- 1 | use crate::cargo::cargo_workspace; 2 | use std::path::PathBuf; 3 | 4 | pub fn proto() -> Result { 5 | let workspace = cargo_workspace()?; 6 | let proto_dir = workspace.join("proto"); 7 | Ok(proto_dir) 8 | } 9 | 10 | #[cfg(test)] 11 | pub mod test { 12 | 13 | use super::*; 14 | 15 | #[test] 16 | fn test_proto() -> Result<(), anyhow::Error> { 17 | // Get the proto directory 18 | let proto = proto()?; 19 | 20 | // check that it exists 21 | assert_eq!(proto.exists(), true); 22 | 23 | Ok(()) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /util/buildtime/buildtime-macros/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "buildtime-macros" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | [lib] 13 | proc-macro = true 14 | 15 | [dependencies] 16 | quote = { workspace = true } 17 | syn = { workspace = true } 18 | 19 | # tonic 20 | # todo: extra to feature flag 21 | tonic-build = { workspace = true } 22 | 23 | # buildtime 24 | buildtime-helpers = { workspace = true } 25 | 26 | [lints] 27 | workspace = true 28 | -------------------------------------------------------------------------------- /util/buildtime/src/lib.rs: -------------------------------------------------------------------------------- 1 | #[cfg(test)] 2 | pub mod macro_tests; 3 | 4 | pub use buildtime_helpers::*; 5 | pub use buildtime_macros::*; 6 | -------------------------------------------------------------------------------- /util/buildtime/src/macro_tests.rs: -------------------------------------------------------------------------------- 1 | #[test] 2 | pub fn test_cargo_workspace() -> Result<(), anyhow::Error> { 3 | let macro_result = buildtime_macros::cargo_workspace!(); 4 | let runtime_result = buildtime_helpers::cargo::cargo_workspace()?; 5 | 6 | assert_eq!(macro_result, runtime_result); 7 | 8 | Ok(()) 9 | } 10 | 11 | #[test] 12 | pub fn test_proto() -> Result<(), anyhow::Error> { 13 | let macro_result = buildtime_macros::proto!(); 14 | let runtime_result = buildtime_helpers::proto::proto()?; 15 | 16 | assert_eq!(macro_result, runtime_result); 17 | 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /util/collections/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "movement-collections" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | [dependencies] 13 | anyhow = { workspace = true } 14 | uuid = { workspace = true } 15 | 16 | [features] 17 | default = [] 18 | unstable = [] 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /util/collections/README.md: -------------------------------------------------------------------------------- 1 | # `movement-collections` 2 | The `movement-collections` crate provides various collection utilities used throughout this workspace. 3 | 4 | ## `garbage` 5 | Collections which feature garbage collection functionality, i.e., the ability to remove members whose lifetimes have expired periodically. -------------------------------------------------------------------------------- /util/collections/src/garbage/atomic/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod counted; 2 | -------------------------------------------------------------------------------- /util/collections/src/garbage/mod.rs: -------------------------------------------------------------------------------- 1 | #[cfg(feature = "unstable")] 2 | pub mod atomic; 3 | pub mod counted; 4 | pub mod map; 5 | pub mod set; 6 | use std::num::NonZeroU64; 7 | 8 | #[derive(Debug, Clone)] 9 | pub struct Duration(NonZeroU64); 10 | 11 | impl Duration { 12 | pub fn try_new(value: u64) -> Result { 13 | Ok(Duration( 14 | NonZeroU64::new(value).ok_or_else(|| anyhow::anyhow!("Duration must be non-zero"))?, 15 | )) 16 | } 17 | 18 | pub fn get(&self) -> u64 { 19 | self.0.get() 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /util/collections/src/lib.rs: -------------------------------------------------------------------------------- 1 | /// Collections that feature garbage collection methods. 2 | pub mod garbage; 3 | -------------------------------------------------------------------------------- /util/commander/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "commander" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [dependencies] 15 | anyhow = { workspace = true } 16 | tokio = { workspace = true } 17 | futures = { workspace = true } 18 | tracing = { workspace = true } 19 | itertools = { workspace = true } 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /util/dot-movement/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "dot-movement" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [dependencies] 15 | anyhow = { workspace = true } 16 | serde_json = { workspace = true } 17 | serde = { workspace = true } 18 | tokio = { workspace = true } 19 | syncup = { workspace = true } 20 | movement-types = { workspace = true } 21 | thiserror = { workspace = true } 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /util/dot-movement/src/path.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /util/dot-movement/src/sync.rs: -------------------------------------------------------------------------------- 1 | use crate::DotMovement; 2 | /*use movement_types::application; 3 | use syncup::{syncup, Target};*/ 4 | 5 | impl DotMovement { 6 | /*pub async fn syncup( 7 | &self, 8 | is_leader: bool, 9 | glob: &str, 10 | bucket: String, 11 | application_id: application::Id, 12 | ) -> Result>, anyhow::Error> { 13 | let sync_task = 14 | syncup(is_leader, self.0.clone(), glob, Target::S3(bucket), application_id).await?; 15 | Ok(sync_task) 16 | } 17 | 18 | pub async fn delete_sync_bucket( 19 | &self, 20 | bucket: String, 21 | ) -> Result>, anyhow::Error> { 22 | let sync_task = 23 | syncup(false, self.0.clone(), "", Target::S3(bucket), application_id).await?; 24 | Ok(sync_task) 25 | }*/ 26 | } 27 | -------------------------------------------------------------------------------- /util/flocks/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "flocks" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [dependencies] 15 | serde = { workspace = true, features = ["derive"] } 16 | anyhow = { workspace = true } 17 | tokio = { workspace = true } 18 | futures = { workspace = true } 19 | rustix = { workspace = true, features = ["fs"]} 20 | thiserror = { workspace = true } 21 | tempfile = { workspace = true } 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /util/flocks/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod tfrwlock; 2 | 3 | pub mod tokio { 4 | 5 | use rustix::{ 6 | fd::AsFd, 7 | fs::{flock as sync_flock, FlockOperation}, 8 | }; 9 | use thiserror::Error; 10 | 11 | #[derive(Debug, Error)] 12 | pub enum AsyncFlockError { 13 | #[error("File error: {0}")] 14 | IOError(#[from] rustix::io::Errno), 15 | #[error("Misc: {0}")] 16 | Internal(String), 17 | } 18 | 19 | pub async fn flock( 20 | file: Fd, 21 | operation: FlockOperation, 22 | ) -> Result<(), AsyncFlockError> { 23 | // spawn block and wait for it to finish 24 | let fd = file 25 | .as_fd() 26 | .try_clone_to_owned() 27 | .map_err(|e| AsyncFlockError::Internal(e.to_string()))?; 28 | tokio::task::spawn_blocking(move || sync_flock(fd, operation)) 29 | .await 30 | .map_err(|e| AsyncFlockError::Internal(e.to_string()))??; 31 | 32 | Ok(()) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /util/flocks/src/tfrwlock/read_guard.rs: -------------------------------------------------------------------------------- 1 | use rustix::{ 2 | fd::AsFd, 3 | fs::{flock, FlockOperation}, 4 | }; 5 | use std::ops::Deref; 6 | use tokio::sync::RwLockReadGuard; 7 | 8 | pub struct FileRwLockReadGuard<'a, T: AsFd> { 9 | pub(crate) guard: RwLockReadGuard<'a, T>, 10 | } 11 | 12 | impl Deref for FileRwLockReadGuard<'_, T> { 13 | type Target = T; 14 | 15 | fn deref(&self) -> &Self::Target { 16 | &*self.guard 17 | } 18 | } 19 | 20 | impl Drop for FileRwLockReadGuard<'_, T> { 21 | fn drop(&mut self) { 22 | flock(&*self.guard, FlockOperation::Unlock).expect("Failed to unlock file"); 23 | // self.guard drops here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /util/flocks/src/tfrwlock/write_guard.rs: -------------------------------------------------------------------------------- 1 | use rustix::{ 2 | fd::AsFd, 3 | fs::{flock, FlockOperation}, 4 | }; 5 | use std::ops::{Deref, DerefMut}; 6 | use tokio::sync::RwLockWriteGuard; 7 | 8 | pub struct FileRwLockWriteGuard<'a, T: AsFd> { 9 | pub(crate) guard: RwLockWriteGuard<'a, T>, 10 | } 11 | 12 | impl Deref for FileRwLockWriteGuard<'_, T> { 13 | type Target = T; 14 | 15 | fn deref(&self) -> &Self::Target { 16 | &*self.guard 17 | } 18 | } 19 | 20 | impl DerefMut for FileRwLockWriteGuard<'_, T> { 21 | fn deref_mut(&mut self) -> &mut Self::Target { 22 | &mut *self.guard 23 | } 24 | } 25 | 26 | impl Drop for FileRwLockWriteGuard<'_, T> { 27 | fn drop(&mut self) { 28 | flock(&*self.guard, FlockOperation::Unlock).expect("Failed to unlock file"); 29 | // self.guard drops here 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /util/flocks/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/util/flocks/test.txt -------------------------------------------------------------------------------- /util/godfig/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "godfig" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [dependencies] 15 | serde = { workspace = true, features = ["derive"] } 16 | anyhow = { workspace = true } 17 | tokio = { workspace = true } 18 | futures = { workspace = true } 19 | flocks = { workspace = true } 20 | async-stream = { workspace = true } 21 | serde_json = { workspace = true } 22 | tempfile = { workspace = true } 23 | thiserror = { workspace = true } 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /util/godfig/README.md: -------------------------------------------------------------------------------- 1 | # `godfig` 2 | 3 | ![Godfig](godfig.png) 4 | 5 | Godfig is a simple persistent key-value store intended for configuration data. It is designed to be used in a distributed system where setups are performed and configurations may change. Godfig is designed to support multiple backends. It's original backends is file-based. -------------------------------------------------------------------------------- /util/godfig/godfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/util/godfig/godfig.png -------------------------------------------------------------------------------- /util/movement-algs/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "movement-algs" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [dependencies] 15 | movement-types = { workspace = true } 16 | anyhow = { workspace = true } 17 | itertools = { workspace = true } 18 | 19 | [dev-dependencies] 20 | tokio = { workspace = true } 21 | 22 | [lints] 23 | workspace = true 24 | -------------------------------------------------------------------------------- /util/movement-algs/src/grouping_heuristic/drop_success.rs: -------------------------------------------------------------------------------- 1 | use crate::grouping_heuristic::{GroupingHeuristic, GroupingOutcome}; 2 | 3 | pub struct DropSuccess; 4 | 5 | impl DropSuccess { 6 | pub fn new() -> Self { 7 | DropSuccess 8 | } 9 | 10 | pub fn boxed() -> Box { 11 | Box::new(DropSuccess) 12 | } 13 | } 14 | 15 | impl GroupingHeuristic for DropSuccess { 16 | fn distribute( 17 | &mut self, 18 | distribution: Vec>, 19 | ) -> Result>, anyhow::Error> { 20 | // remove all of the success outcomes 21 | let distribution = distribution 22 | .into_iter() 23 | .filter(|outcome| outcome.0.iter().any(|outcome| !outcome.is_success())) 24 | .collect::>(); 25 | 26 | Ok(distribution) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /util/movement-algs/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod grouping_heuristic; 2 | -------------------------------------------------------------------------------- /util/movement-types/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod actor; 2 | pub mod application; 3 | pub mod atomic_transaction_bundle; 4 | pub mod block; 5 | pub mod transaction; 6 | -------------------------------------------------------------------------------- /util/signing/integrations/eth/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "movement-signing-eth" 3 | version.workspace = true 4 | edition.workspace = true 5 | license.workspace = true 6 | authors.workspace = true 7 | repository.workspace = true 8 | homepage.workspace = true 9 | publish.workspace = true 10 | rust-version.workspace = true 11 | 12 | [dependencies] 13 | movement-signer = { workspace = true } 14 | movement-signer-aws-kms = { workspace = true } 15 | async-trait.workspace = true 16 | 17 | # Alloy needed crates 18 | alloy-primitives.workspace = true 19 | alloy-signer.workspace = true 20 | alloy-network.workspace = true 21 | alloy-consensus.workspace = true 22 | alloy-transport-http = { workspace = true, features = ["reqwest-rustls-tls"] } 23 | k256 = "0.13.4" 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /util/signing/interface/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "movement-signer" 3 | description = "Common signing API used throughout Movement" 4 | version.workspace = true 5 | edition.workspace = true 6 | license.workspace = true 7 | authors.workspace = true 8 | repository.workspace = true 9 | homepage.workspace = true 10 | publish.workspace = true 11 | rust-version.workspace = true 12 | 13 | [dependencies] 14 | thiserror = { workspace = true } 15 | ed25519-dalek = { workspace = true } 16 | k256 = { workspace = true, features = ["ecdsa"] } 17 | anyhow = { workspace = true } 18 | sha2 = { workspace = true } 19 | serde = { workspace = true, features = ["derive"] } 20 | async-trait = { workspace = true } 21 | tracing = { workspace = true } 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /util/signing/providers/aws-kms/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "movement-signer-aws-kms" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | [dependencies] 13 | anyhow = { workspace = true } 14 | aws-sdk-kms = { workspace = true } 15 | aws-types = { workspace = true } 16 | aws-config = { workspace = true } 17 | movement-signer = { workspace = true } 18 | secp256k1 = "0.24" 19 | async-trait = { workspace = true } 20 | 21 | alloy-signer = { workspace = true } 22 | k256 = "0.13.4" 23 | spki = "0.7.3" 24 | simple_asn1 = { workspace = true} 25 | 26 | [dev-dependencies] 27 | tokio = { workspace = true } 28 | 29 | [lints] 30 | workspace = true 31 | -------------------------------------------------------------------------------- /util/signing/providers/aws-kms/src/cryptography/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod secp256k1; 2 | use aws_sdk_kms::types::{KeySpec, KeyUsageType, SigningAlgorithmSpec}; 3 | 4 | /// Defines the needed methods for providing a definition of cryptography used with AWS KMS 5 | pub trait AwsKmsCryptographySpec { 6 | /// Returns the [KeySpec] for the desired cryptography 7 | fn key_spec() -> KeySpec; 8 | 9 | /// Returns the [KeyUsageType] for the desired cryptography 10 | fn key_usage_type() -> KeyUsageType; 11 | 12 | /// Returns the [SigningAlgorithmSpec] for the desired cryptography 13 | fn signing_algorithm_spec() -> SigningAlgorithmSpec; 14 | } 15 | -------------------------------------------------------------------------------- /util/signing/providers/aws-kms/src/cryptography/secp256k1/mod.rs: -------------------------------------------------------------------------------- 1 | use crate::cryptography::AwsKmsCryptographySpec; 2 | use aws_sdk_kms::types::{KeySpec, KeyUsageType, SigningAlgorithmSpec}; 3 | use movement_signer::cryptography::secp256k1::Secp256k1; 4 | 5 | impl AwsKmsCryptographySpec for Secp256k1 { 6 | fn key_spec() -> KeySpec { 7 | KeySpec::EccSecgP256K1 8 | } 9 | 10 | fn key_usage_type() -> KeyUsageType { 11 | KeyUsageType::SignVerify 12 | } 13 | 14 | fn signing_algorithm_spec() -> SigningAlgorithmSpec { 15 | SigningAlgorithmSpec::EcdsaSha256 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /util/signing/providers/aws-kms/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod cryptography; 2 | pub mod hsm; 3 | -------------------------------------------------------------------------------- /util/signing/providers/hashicorp-vault/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "movement-signer-hashicorp-vault" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | [dependencies] 13 | movement-signer = { workspace = true } 14 | vaultrs = { workspace = true } 15 | base64 = { workspace = true } 16 | anyhow = { workspace = true } 17 | async-trait = { workspace = true } 18 | uuid = { workspace = true } 19 | tracing = { workspace = true } 20 | 21 | [dev-dependencies] 22 | tokio = { workspace = true } 23 | dotenv = { workspace = true } 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /util/signing/providers/hashicorp-vault/src/cryptography/ed25519/mod.rs: -------------------------------------------------------------------------------- 1 | use crate::cryptography::HashiCorpVaultCryptographySpec; 2 | use movement_signer::cryptography::ed25519::Ed25519; 3 | use vaultrs::api::transit::KeyType; 4 | 5 | impl HashiCorpVaultCryptographySpec for Ed25519 { 6 | fn key_type() -> KeyType { 7 | KeyType::Ed25519 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /util/signing/providers/hashicorp-vault/src/cryptography/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod ed25519; 2 | use vaultrs::api::transit::KeyType; 3 | 4 | /// Defines the needed methods for providing a definition of cryptography used with HashiCorp Vault 5 | pub trait HashiCorpVaultCryptographySpec { 6 | /// Returns the [KeyType] for the desired cryptography 7 | fn key_type() -> KeyType; 8 | } 9 | -------------------------------------------------------------------------------- /util/signing/providers/hashicorp-vault/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod cryptography; 2 | pub mod hsm; 3 | -------------------------------------------------------------------------------- /util/signing/providers/local/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "movement-signer-local" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | [dependencies] 13 | movement-signer = { workspace = true } 14 | anyhow = { workspace = true } 15 | k256 = { workspace = true } 16 | ed25519 = { workspace = true } 17 | ecdsa = { workspace = true } 18 | rand = { version = "0.8.5" } 19 | async-trait = { workspace = true } 20 | hex = { workspace = true } 21 | ed25519-dalek = { workspace = true, features = ["rand_core"]} 22 | 23 | [dev-dependencies] 24 | tokio = { workspace = true } 25 | sha3 = "0.10.8" 26 | 27 | [lints] 28 | workspace = true 29 | -------------------------------------------------------------------------------- /util/signing/providers/local/src/cryptography/ed25519/mod.rs: -------------------------------------------------------------------------------- 1 | //! ed25519 is unimplemented for local cryptography spec 2 | use crate::cryptography::LocalCryptographyNoSpec; 3 | use movement_signer::cryptography::ed25519::Ed25519; 4 | 5 | impl LocalCryptographyNoSpec for Ed25519 {} 6 | -------------------------------------------------------------------------------- /util/signing/providers/local/src/cryptography/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod ed25519; 2 | pub mod secp256k1; 3 | 4 | /// A marker trait for cryptography implementations that do not have a spec. 5 | /// 6 | /// Note: 7 | /// In theory, we could have an exploded signer spec where one type is specified for signing and the other for getting the public key. But, this adds little utility at this point. 8 | pub trait LocalCryptographyNoSpec {} 9 | 10 | /// Local cryptography specs have a curve associated with them. 11 | pub trait LocalCryptographySpec { 12 | type Curve; 13 | } 14 | -------------------------------------------------------------------------------- /util/signing/providers/local/src/cryptography/secp256k1/mod.rs: -------------------------------------------------------------------------------- 1 | use crate::cryptography::LocalCryptographySpec; 2 | use movement_signer::cryptography::secp256k1::Secp256k1; 3 | 4 | impl LocalCryptographySpec for Secp256k1 { 5 | type Curve = k256::Secp256k1; 6 | } 7 | 8 | #[cfg(test)] 9 | mod tests { 10 | use super::*; 11 | use crate::signer::LocalSigner; 12 | use movement_signer::{Signing, Verify}; 13 | 14 | #[tokio::test] 15 | pub async fn test_signs_and_verifies() -> Result<(), anyhow::Error> { 16 | let signer = LocalSigner::::random(); 17 | let message = b"hello world"; 18 | let signature = signer.sign(message).await?; 19 | let public_key = signer.public_key().await?; 20 | 21 | assert!(Secp256k1::verify(message, &signature, &public_key)?); 22 | 23 | Ok(()) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /util/signing/providers/local/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod cryptography; 2 | pub mod signer; 3 | -------------------------------------------------------------------------------- /util/signing/signing-admin/src/cli/mod.rs: -------------------------------------------------------------------------------- 1 | use clap::{Parser, Subcommand}; 2 | 3 | pub mod rotate_key; 4 | 5 | #[derive(Parser, Debug)] 6 | #[clap(name = "signing-admin", about = "CLI for managing signing keys")] 7 | pub struct CLI { 8 | #[clap(subcommand)] 9 | pub command: Commands, 10 | } 11 | 12 | #[derive(Subcommand, Debug)] 13 | pub enum Commands { 14 | RotateKey { 15 | #[clap(long, help = "Canonical string of the key (alias for the backend key)")] 16 | canonical_string: String, 17 | 18 | #[clap(long, help = "Application URL to notify about the key rotation")] 19 | application_url: String, 20 | 21 | #[clap(long, help = "Backend to use (e.g., 'vault', 'aws')")] 22 | backend: String, 23 | }, 24 | } 25 | -------------------------------------------------------------------------------- /util/signing/signing-admin/src/key_manager.rs: -------------------------------------------------------------------------------- 1 | use anyhow::Result; 2 | use movement_signer::Signing; 3 | use super::application::Application; 4 | use super::backend::SigningBackend; 5 | 6 | pub struct KeyManager { 7 | pub application: A, 8 | pub backend: B, 9 | } 10 | 11 | impl KeyManager 12 | where 13 | A: Application, 14 | B: SigningBackend, 15 | { 16 | pub fn new(application: A, backend: B) -> Self { 17 | Self { application, backend } 18 | } 19 | 20 | pub async fn rotate_key(&self, key_id: &str) -> Result<()> { 21 | self.backend.rotate_key(key_id).await 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /util/signing/signing-admin/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod application; 2 | pub mod backend; 3 | pub mod key_manager; 4 | 5 | -------------------------------------------------------------------------------- /util/signing/signing-admin/src/main.rs: -------------------------------------------------------------------------------- 1 | use anyhow::Result; 2 | use clap::Parser; 3 | 4 | mod cli; 5 | 6 | #[tokio::main] 7 | async fn main() -> Result<()> { 8 | let cli = cli::CLI::parse(); 9 | 10 | match cli.command { 11 | cli::Commands::RotateKey { 12 | canonical_string, 13 | application_url, 14 | backend, 15 | } => { 16 | cli::rotate_key::rotate_key(canonical_string, application_url, backend).await?; 17 | } 18 | } 19 | 20 | Ok(()) 21 | } 22 | -------------------------------------------------------------------------------- /util/signing/testing/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod ed25519; 2 | -------------------------------------------------------------------------------- /util/signing/util/loader/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "movement-signer-loader" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | [dependencies] 13 | movement-signer = { workspace = true } 14 | movement-signer-aws-kms = { workspace = true } 15 | movement-signer-hashicorp-vault = { workspace = true } 16 | movement-signer-local = { workspace = true } 17 | 18 | anyhow = { workspace = true } 19 | async-trait = { workspace = true } 20 | hex = { workspace = true } 21 | serde = { workspace = true } 22 | thiserror = { workspace = true } 23 | tracing = { workspace = true } 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /util/signing/util/loader/src/identifiers/local.rs: -------------------------------------------------------------------------------- 1 | use movement_signer::key::TryFromCanonicalString; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq)] 5 | pub struct Local { 6 | pub private_key_hex_bytes: String, 7 | } 8 | 9 | impl TryFromCanonicalString for Local { 10 | fn try_from_canonical_string(s: &str) -> Result { 11 | Ok(Local { private_key_hex_bytes: s.to_string() }) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /util/syncador/src/backend/archive/gzip/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod pull; 2 | pub mod push; 3 | -------------------------------------------------------------------------------- /util/syncador/src/backend/archive/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod gzip; 2 | -------------------------------------------------------------------------------- /util/syncador/src/backend/clear/glob/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod pull; 2 | -------------------------------------------------------------------------------- /util/syncador/src/backend/clear/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod glob; 2 | -------------------------------------------------------------------------------- /util/syncador/src/backend/constant/mod.rs: -------------------------------------------------------------------------------- 1 | use crate::backend::{PullOperations, PushOperations}; 2 | use crate::files::package::Package; 3 | 4 | #[derive(Debug, Clone)] 5 | pub struct Constant { 6 | pub package: Package, 7 | } 8 | 9 | #[async_trait::async_trait] 10 | impl PullOperations for Constant { 11 | async fn pull(&self, _package: Option) -> Result, anyhow::Error> { 12 | Ok(Some(self.package.clone())) 13 | } 14 | } 15 | 16 | #[async_trait::async_trait] 17 | impl PushOperations for Constant { 18 | async fn push(&self, package: Package) -> Result { 19 | Ok(package) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /util/syncador/src/backend/glob/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod file; 2 | pub mod package; 3 | -------------------------------------------------------------------------------- /util/syncador/src/backend/mod.rs: -------------------------------------------------------------------------------- 1 | // pub mod archive; 2 | // pub mod copy; 3 | pub mod archive; 4 | pub mod clear; 5 | pub mod constant; 6 | pub mod glob; 7 | pub mod pipeline; 8 | pub mod s3; 9 | use crate::files::package::Package; 10 | #[async_trait::async_trait] 11 | pub trait PushOperations { 12 | async fn push(&self, package: Package) -> Result; 13 | } 14 | 15 | #[async_trait::async_trait] 16 | pub trait PullOperations { 17 | async fn pull(&self, package: Option) -> Result, anyhow::Error>; 18 | } 19 | -------------------------------------------------------------------------------- /util/syncador/src/backend/pipeline/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod pull; 2 | pub mod push; 3 | -------------------------------------------------------------------------------- /util/syncador/src/backend/pipeline/push.rs: -------------------------------------------------------------------------------- 1 | use crate::backend::PushOperations; 2 | use crate::files::package::Package; 3 | 4 | pub struct Pipeline { 5 | pub backends: Vec>, 6 | } 7 | 8 | impl Pipeline { 9 | pub fn new(backends: Vec>) -> Self { 10 | Self { backends } 11 | } 12 | 13 | pub fn boxed(backends: Vec>) -> Box { 14 | Box::new(Self::new(backends)) 15 | } 16 | } 17 | 18 | #[async_trait::async_trait] 19 | impl PushOperations for Pipeline { 20 | async fn push(&self, package: Package) -> Result { 21 | let mut package = package; 22 | for backend in &self.backends { 23 | package = backend.push(package.clone()).await?; 24 | } 25 | Ok(package) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /util/syncador/src/backend/s3/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod bucket_connection; 2 | pub mod shared_bucket; 3 | -------------------------------------------------------------------------------- /util/syncador/src/cli/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/movementlabsxyz/movement/06b1562d151c846f932f39f69bc39a102387b9ad/util/syncador/src/cli/mod.rs -------------------------------------------------------------------------------- /util/syncador/src/files/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod package; 2 | -------------------------------------------------------------------------------- /util/tracing/src/main.rs: -------------------------------------------------------------------------------- 1 | use aptos_logger::info; 2 | 3 | #[tokio::main] 4 | async fn main() { 5 | // Initialize logger (for debugging) 6 | aptos_logger::Logger::builder().level(aptos_logger::Level::Debug).build(); 7 | 8 | // Initialize telemetry 9 | movement_tracing::ensure_telemetry_initialized(); 10 | 11 | let endpoint = movement_tracing::get_metrics_endpoint(); 12 | info!("Starting telemetry server at {}", endpoint); 13 | 14 | loop { 15 | tokio::time::sleep(std::time::Duration::from_secs(1)).await; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /util/whitelist/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "whitelist" 3 | version = { workspace = true } 4 | edition = { workspace = true } 5 | license = { workspace = true } 6 | authors = { workspace = true } 7 | repository = { workspace = true } 8 | homepage = { workspace = true } 9 | publish = { workspace = true } 10 | rust-version = { workspace = true } 11 | 12 | [dependencies] 13 | tonic = { workspace = true } 14 | prost = { workspace = true } 15 | thiserror = { workspace = true } 16 | 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /util/whitelist/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod file; 2 | use std::collections::HashSet; 3 | use thiserror::Error; 4 | 5 | /// Domain error for the whitelist 6 | #[derive(Debug, Error)] 7 | pub enum Error { 8 | #[error("prevalidator internal error: {0}")] 9 | Internal(String), 10 | } 11 | 12 | #[tonic::async_trait] 13 | pub trait WhitelistOperations { 14 | async fn is_whitelisted(&self, item: &T) -> Result; 15 | 16 | fn try_into_set(self) -> Result, Error>; 17 | } 18 | --------------------------------------------------------------------------------