{"id":20060622,"url":"https://github.com/oasisprotocol/cipher-paratime","last_synced_at":"2025-05-05T15:33:14.748Z","repository":{"id":37858416,"uuid":"371375410","full_name":"oasisprotocol/cipher-paratime","owner":"oasisprotocol","description":"Official Oasis Protocol Foundation's ParaTime.","archived":false,"fork":false,"pushed_at":"2025-04-29T16:03:20.000Z","size":487,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-04-29T17:22:49.666Z","etag":null,"topics":["blockchain","chain","confidential","crypto","enclave","network","oasis","official","paratime","privacy","rust","sgx","tee","wasm"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oasisprotocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-05-27T13:02:56.000Z","updated_at":"2025-04-29T16:02:34.000Z","dependencies_parsed_at":"2024-01-12T12:38:54.970Z","dependency_job_id":"a797eb7e-c6c7-4dcc-8296-04b0bcb5e160","html_url":"https://github.com/oasisprotocol/cipher-paratime","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oasisprotocol%2Fcipher-paratime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oasisprotocol%2Fcipher-paratime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oasisprotocol%2Fcipher-paratime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oasisprotocol%2Fcipher-paratime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oasisprotocol","download_url":"https://codeload.github.com/oasisprotocol/cipher-paratime/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252524293,"owners_count":21762070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","chain","confidential","crypto","enclave","network","oasis","official","paratime","privacy","rust","sgx","tee","wasm"],"created_at":"2024-11-13T13:15:59.640Z","updated_at":"2025-05-05T15:33:14.366Z","avatar_url":"https://github.com/oasisprotocol.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Cipher ParaTime\n\n[![CI lint status][github-ci-lint-badge]][github-ci-lint-link]\n[![CI audit status][github-ci-audit-badge]][github-ci-audit-link]\n\n\u003c!-- markdownlint-disable line-length --\u003e\n[github-ci-lint-badge]: https://github.com/oasisprotocol/cipher-paratime/workflows/ci-lint/badge.svg\n[github-ci-lint-link]: https://github.com/oasisprotocol/cipher-paratime/actions?query=workflow:ci-lint+branch:main\n[github-ci-audit-badge]: https://github.com/oasisprotocol/cipher-paratime/workflows/ci-audit/badge.svg\n[github-ci-audit-link]: https://github.com/oasisprotocol/cipher-paratime/actions?query=workflow:ci-audit+branch:main\n\u003c!-- markdownlint-enable line-length --\u003e\n\nThis is the Cipher ParaTime, an official [Oasis Protocol Foundation]'s ParaTime\nfor the [Oasis Network] built using the [Oasis SDK].\n\n[Oasis Protocol Foundation]: https://oasisprotocol.org/\n[Oasis Network]: https://docs.oasis.dev/oasis-network-primer/\n[Oasis SDK]: https://github.com/oasisprotocol/oasis-sdk\n\n## Note\n\n* **This ParaTime currently depends on an unreleased version of [Oasis SDK].**\n* **The code has not yet been audited.**\n\n## SGX and Non-SGX Variants of the Binary\n\nThe non-SGX variant is a regular ELF binary that can be used by Oasis nodes\nwithout SGX support to operate as client nodes.\n\nThis allows (non-SGX) Oasis nodes to interact with the Cipher ParaTime (e.g.\nperform non-confidential queries and validate transactions they send out) but\nthey cannot participate in the execution of Cipher ParaTime's transactions and\nthey cannot see its confidential state.\n\n## Building\n\n### Prerequisites\n\n#### Rust\n\nEnsure you have [Rust] and [rustup] installed on your system.\nFor more details, see [Oasis Core's Development Setup Prerequisites]\ndocumentation, the Rust section.\n\nThe version of the Rust toolchain we use for the Cipher ParaTime is specified in\nthe [rust-toolchain] file.\n\nThe rustup-installed versions of `cargo`, `rustc` and other tools will\n[automatically detect this file and use the appropriate version of the Rust\ntoolchain][rust-toolchain-precedence] when invoked from the Cipher ParaTime git\ncheckout directory.\n\nTo install the appropriate version of the Rust toolchain, make sure you are\nin an Cipher ParaTime git checkout directory and run:\n\n```\nrustup show\n```\n\nThis will automatically install the appropriate Rust toolchain (if not\npresent) and output something similar to:\n\n```\n...\n\nactive toolchain\n----------------\n\nnightly-2021-08-17-x86_64-unknown-linux-gnu (overridden by '/code/rust-toolchain')\nrustc 1.56.0-nightly (0035d9dce 2021-08-16)\n```\n\nThen add the Fortanix SGX Rust target to this version of the Rust toolchain by\nrunning:\n\n```\nrustup target add x86_64-fortanix-unknown-sgx\n```\n\n[Rust]: https://www.rust-lang.org/\n[rustup]: https://rustup.rs/\n[Oasis Core's Development Setup Prerequisites]:\n  https://docs.oasis.dev/oasis-core/development-setup/prerequisites\n[rust-toolchain]: rust-toolchain\n[rust-toolchain-precedence]:\n  https://github.com/rust-lang/rustup/blob/master/README.md#override-precedence\n\n#### System Packages\n\nBuilding Cipher ParaTime requires the following system packages:\n\n- [GCC]\n- [Clang] (for compiling the [wasm3-rs] crates)\n\n_NOTE: On Ubuntu/Debian systems, compiling [wasm3-rs] crates when building the\nSGX binary requires having the `gcc-multilib` package installed._\n\nOn Fedora 35+, you can install the above with:\n\n```\nsudo dnf install gcc clang\n```\n\nOn Ubuntu 20.04+, you can install the above with:\n\n```\nsudo apt install gcc gcc-multilib clang\n```\n\n[GCC]: http://gcc.gnu.org/\n[Clang]: https://clang.llvm.org/\n[wasm3-rs]: https://github.com/wasm3/wasm3-rs\n\n### Mock SGX Binary\n\nMock SGX allows a developer to run the Cipher ParaTime binary without\nperforming the attestation and requiring actual SGX hardware. While you can't\nconnect to a production Mainnet or Testnet with such a setup, it is useful for\ntesting Cipher locally and/or testing dApps that require\nCipher-specific features, for example in the CI environments.\n\nTo build the unsafe, mock SGX binary of the Cipher ParaTime for Localnet\ncheckout the appropriate version and run:\n\n```shell\nexport OASIS_UNSAFE_SKIP_AVR_VERIFY=1 OASIS_UNSAFE_ALLOW_DEBUG_ENCLAVES=1\ncargo build --release --features debug-mock-sgx\n```\n\nThe resulting ELF binary is located at `target/release/cipher-paratime`.\n\n_NOTE: The mock SGX binary is dynamically linked so it may not be portable\nbetween machines with different versions of shared libraries._\n\n### SGX Binary\n\nTo build the SGX binary of the Cipher ParaTime, checkout the appropriate version\nand run:\n\n```\ncargo build --release --target x86_64-fortanix-unknown-sgx\ncargo elf2sgxs --release\n```\n\nThe resulting SGX binary is located at\n`target/x86_64-fortanix-unknown-sgx/release/cipher-paratime.sgxs`.\n\n_NOTE: The SGX binary is always statically linked so it doesn't exhibit the\nportability issues the ELF binary has._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foasisprotocol%2Fcipher-paratime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foasisprotocol%2Fcipher-paratime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foasisprotocol%2Fcipher-paratime/lists"}