{"id":13511277,"url":"https://github.com/scrtlabs/enigma-core","last_synced_at":"2025-03-30T20:32:50.061Z","repository":{"id":57625062,"uuid":"145532117","full_name":"scrtlabs/enigma-core","owner":"scrtlabs","description":"Enigma Core library. The domain: Trusted and Untrusted App in Rust. ","archived":true,"fork":false,"pushed_at":"2020-03-10T14:44:28.000Z","size":7931,"stargazers_count":94,"open_issues_count":14,"forks_count":21,"subscribers_count":16,"default_branch":"develop","last_synced_at":"2024-10-29T20:54:31.898Z","etag":null,"topics":["blockchain","decentralized","enigma","rust","rust-lang","sgx","tee"],"latest_commit_sha":null,"homepage":"https://enigma.co","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scrtlabs.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":null,"security":null,"support":null}},"created_at":"2018-08-21T08:30:20.000Z","updated_at":"2024-10-29T20:52:45.000Z","dependencies_parsed_at":"2022-08-27T10:01:24.100Z","dependency_job_id":null,"html_url":"https://github.com/scrtlabs/enigma-core","commit_stats":null,"previous_names":["enigmampc/enigma-core"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrtlabs%2Fenigma-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrtlabs%2Fenigma-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrtlabs%2Fenigma-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrtlabs%2Fenigma-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scrtlabs","download_url":"https://codeload.github.com/scrtlabs/enigma-core/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246379366,"owners_count":20767694,"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","decentralized","enigma","rust","rust-lang","sgx","tee"],"created_at":"2024-08-01T03:00:46.045Z","updated_at":"2025-03-30T20:32:49.520Z","avatar_url":"https://github.com/scrtlabs.png","language":"Rust","funding_links":[],"categories":["Blockchains"],"sub_categories":[],"readme":"# Enigma Core library \n\n| Service | Master | Develop |\n|---------|--------|---------|\n| CI Badge | [![Build Status](https://drone.enigma.co/api/badges/enigmampc/enigma-core/status.svg)](https://drone.enigma.co/enigmampc/enigma-core) | [![Build Status](https://drone.enigma.co/api/badges/enigmampc/enigma-core/status.svg?ref=/refs/heads/develop)](https://drone.enigma.co/enigmampc/enigma-core) |\n\nPure Rust Enclave \u0026\u0026 Untrusted in Rust. \nCore is part of the Enigma node software stack. The Core component as it's name suggests is responsible for the core operations. The core includes Remote Attestation (SGX SDK), Cryptography and execution of WASM secret contracts.\n\n\n## Getting Started (With the Enigma Docker)\n\n\n### Prerequisites\n\n* [RUST-SGX-Intel SGX SDK 2.1.3 for Linux](https://github.com/baidu/rust-sgx-sdk) installed.\n* clone this repo into /some/path/enigma-core.\n* [Docker](https://docs.docker.com/install) - Install.\n\n### Build and Compile \n\n* build the enigma docker image\n\n```\n cd /some/path/enigma-core/dockerfile\n docker build -t enigma_core .\n```\n\nThe output should look like that: \n\n```\nSending build context to Docker daemon  2.048kB\nStep 1/7 : FROM baiduxlab/sgx-rust:1.0.0\n ---\u003e 44a7928943e4\nStep 2/7 : MAINTAINER enigmampc\n ---\u003e Using cache\n ---\u003e 2a1b994a20f4\nStep 3/7 : WORKDIR /root\n ---\u003e Using cache\n ---\u003e 33fc66f979b8\nStep 4/7 : RUN rm -rf /root/sgx\n ---\u003e Using cache\n ---\u003e da313d0a4471\nStep 5/7 : RUN git clone https://github.com/baidu/rust-sgx-sdk.git sgx -b v1.0.0\n ---\u003e Using cache\n ---\u003e 704631bc2d68\nStep 6/7 : RUN apt-get install -y libzmq3-dev\n ---\u003e Using cache\n ---\u003e 141b17bb1564\nStep 7/7 : RUN echo '/opt/intel/sgxpsw/aesm/aesm_service \u0026' \u003e\u003e /root/.bashrc\n ---\u003e Using cache\n ---\u003e cd6787969fd1\nSuccessfully built cd6787969fd1\n```\n* run docker:\n\n```\ndocker run -v /some/path/enigma-core/:/root/enigma-core -ti -p 5552:5552 --device /dev/isgx enigma_core\n```\n\n* build the project \n\n```\ncd enigma-core/enigma-core\nmake \n```\n\nIf the following error occurs then this is an open issue that will be solved.\n\n```\nerror[E0463]: can't find crate for `std`\n  --\u003e /root/.cargo/git/checkouts/rust-sgx-sdk-fc8771c5c45bde9a/378a4f0/xargo/sgx_tunittest/../../sgx_tunittest/src/lib.rs:88:1\n   |\n88 | extern crate sgx_tstd as std;\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate\n\nerror: aborting due to previous error\n\nFor more information about this error, try `rustc --explain E0463`.\nerror: Could not compile `sgx_tunittest`.\n```\ncheck out [Troubleshooting](https://github.com/enigmampc/enigma-core/tree/develop#troubleshooting) and then make clean \u0026\u0026 make\n\n \n### Run the tests (inside Docker)\n\n* Build the project \n```\nmake\ncd app/\n```\nRun the tests (no std)\n```\ncargo test\n```\nRun the test (with std)\n```\ncargo test -- --nocapture\n```\n\n### Run the project\n\n```\ncd root/enigma-core/enigma-core/bin\n./app\n```\n\n### Simulation Mode\n\nIf you want to run this in a computer that doesn't support SGX you can run both `enigma-core` and `surface` in simulation mode.  \nTo do this, run `surface` with `--simulation`, then fire up the docker and run:   \n```\n$ cd enigma-core\n$ make full-clean\n$ export SGX_MODE=SW\n$ make # Here you can add JOBS=N to pass on to cargo the number of jobs to run simultaneously.\n```\n\n### Principal Node \n\n[Principal Node README](https://github.com/enigmampc/enigma-core/blob/master/enigma-principal/README.md). \n\nTBD\n\n### Installing\n\nTBD  \n\n## Deployment\n\n\n## Built With\n\nTBD\n\n## Contributing\nThe `master` branch always contain the latest release, `develop` branch is used for continuous developing  \nTags will be used to signify releases.\n\n### Pull Request\nEvery new feature or a bug fix will be presented in a pull request while it's a work in progress under the correct label.  \nWhen finished change the label to `3 - Ready` for reviewing, every pull request is required to pass a code review from at least 1 member before merging.\n\n### Issues\nPlease use the templates accordingly.\n\u003cbr\u003e\n\n## Versioning\n\nTBD \n\n## Troubleshooting\n\n#### Errors while building with make \n##### 1. wrong sgx_tstd:\n```\nerror[E0463]: can't find crate for `std`\n  --\u003e /root/.cargo/git/checkouts/rust-sgx-sdk-fc8771c5c45bde9a/378a4f0/xargo/sgx_tunittest/../../sgx_tunittest/src/lib.rs:88:1\n```\n* Temp Solution: \n```\nrm -rf ~/.cargo/git/checkouts/rust-sgx-sdk-fc8771c5c45bde9a/378a4f0/xargo/\n```\n##### 1. wrong wasmi:\n```\nerror[E0599]: no function or associated item named `new` found for type `std::ops::RangeInclusive\u003c_\u003e` in the current scope\n    --\u003e /root/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.76/src/de/impls.rs:2084:12\n     |\n2084 |         Ok(RangeInclusive::new(start, end))\n     |            ^^^^^^^^^^^^^^^^^^^ function or associated item not found in `std::ops::RangeInclusive\u003c_\u003e`\n\n```\n* Temp Solution:  \n```\nrm -rf ~/.cargo/git/checkouts/rust-sgx-sdk-fc8771c5c45bde9a/378a4f0/samplecode/wasmi\n```\n\n\n## Authors\n\n* **Enigma Team** - [enigma](https://enigma.co/)\n\n## License\n\nThe Enigma Core is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.\n\nYou should have received a [copy](LICENSE) of the GNU Affero General Public License along with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n\n## Acknowledgements\n\nThanks to [Baidu X-Lab](https://github.com/BaiduXLab) for their great work on [Rust SGX SDK](https://github.com/baidu/rust-sgx-sdk).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrtlabs%2Fenigma-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscrtlabs%2Fenigma-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrtlabs%2Fenigma-core/lists"}