Unverified Commit 48a895df authored by Chadwick Strange's avatar Chadwick Strange Committed by GitHub

Merge pull request #92 from skalenetwork/enhancement/fix-codacy

Enhancement/fix codacy
parents 1b65b688 4fa294de
......@@ -2,3 +2,4 @@
exclude_paths:
- 'scripts/**'
- '.github/**'
- 'trusted_libff/**'
# sgxwallet: SKALE SGX-based hardware crypto wallet
<!-- SPDX-License-Identifier: (AGPL-3.0-only OR CC-BY-4.0) -->
[![Discord](https://img.shields.io/discord/534485763354787851.svg)](https://discord.gg/vvUtWJB)
## Intro
......
# Building SGX wallet from source
<!-- SPDX-License-Identifier: (AGPL-3.0-only OR CC-BY-4.0) -->
## Clone this repository and its submodules
`git clone --recurse-submodules https://github.com/skalenetwork/sgxwallet.git`
......@@ -10,8 +12,6 @@
cd scripts; sudo ./install_packages.sh; cd ..
```
## Build dependencies
Dependencies only need to be built once.
......@@ -19,7 +19,8 @@ Dependencies only need to be built once.
```bash
cd scripts; ./build_deps.py; cd ..
```
## Set SGX environment variables
## Set SGX environment variables
```bash
source sgx-sdk-build/sgxsdk/environment
......@@ -47,7 +48,6 @@ make
The base container includes software common to hardware mode and simulation mode.
```bash
sudo docker build -t sgxwallet_base .
......@@ -66,7 +66,6 @@ sudo docker build -t sgxwalletsim -f ./DockerfileSimulation .
sudo docker build -t sgxwallet -f ./Dockerfile .
```
## Adding new source files
Note that `configure, Makefile` and `Makefile.in` files are created by `automake` tools on the fly.
......
......@@ -9,7 +9,6 @@
- [Contributing source code](../.github/CONTRIBUTING.md)
- [Security Bug Reporting](../SECURITY.md)
## Community
- [SKALE Discord](http://skale.chat)
# Enabling SGX
<!-- SPDX-License-Identifier: (AGPL-3.0-only OR CC-BY-4.0) -->
### Verify Intel SGX is enabled in BIOS
......@@ -11,10 +10,11 @@ The BIOS key varies by manufacturer and could be F10, F2, F12, F1, DEL, or ESC.
Usually Intel SGX is disabled by default.
To enable:
* find the Intel SGX feature in BIOS Menu
(it is usually under the "Advanced" or "Security" menu)
* Set SGX in BIOS as `enabled` (preferrably) or `software-controlled`.
* save your BIOS settings and exit BIOS.
- find the Intel SGX feature in BIOS Menu
(it is usually under the "Advanced" or "Security" menu)
- Set SGX in BIOS as `enabled` (preferably) or `software-controlled`.
- save your BIOS settings and exit BIOS.
## Enable "software-controlled" SGX
......@@ -42,7 +42,6 @@ Install make and gcc if you do not have it
apt-get install build-essential
```
Run the following command:
```bash
......@@ -57,14 +56,13 @@ If you do not see the `isgx` device, you need to troubleshoot your driver instal
If driver installation fails, you can also try installing driver from the
Intel github repository. Do
```bash
```bash
git clone https://github.com/intel/linux-sgx-driver
```
And then follow instructions in README.md
# Troubleshooting Installation
- If the message `intel_sgx: SGX is not enabled` appears in `/var/log/syslog`
......
......@@ -7,7 +7,6 @@ software components. These must be installed and configured before
running sgxwallet.
This document describes how to install and configure these required components.
## Recommended host system
sgxwallet should be ran on Ubuntu 18.04. Sgxwallet has been tested on Ubuntu 18.04.
......@@ -16,8 +15,7 @@ Sgxwallet may run on other Linux distributions,
but the installation process is likely to be more complicated,
and the use of other distributions is not supported by their respective communities at this time.
### Install Docker engine ngine:
### Install Docker engine
Docker engine is pre-installed on Ubuntu 18.04. You can re-install it as
described below
......@@ -28,7 +26,7 @@ sudo apt-get install -y docker-io
To verify a correct installation, run `sudo docker run hello-world`
### Install Docker Compose:
### Install Docker Compose
```bash
sudo apt-get install -y docker-compose
......@@ -38,8 +36,7 @@ To verify a correct installation, run `docker-compose version`
For details on Docker installation, see <https://docs.docker.com/engine/installation/linux/ubuntu> and <https://docs.docker.com/compose/install/#install-compose>
### Verify thatyour machine supports SGX
### Verify SGX support
Install cpuid and libelf-dev packages:
......@@ -47,16 +44,10 @@ Install cpuid and libelf-dev packages:
sudo apt-get install -y libelf-dev cpuid
```
Verify your processor supports Intel SGX with:
Verify processor support of Intel SGX:
```bash
cpuid | grep SGX:
```
The printout shoud read `SGX: Software Guard Extensions supported = true`
The printout should read `SGX: Software Guard Extensions supported = true`
......@@ -54,7 +54,6 @@ Note: sgxwallet operates on network ports 1026 (https) and 1027 (http for initia
If you have a firewall on your network, please make sure these ports are open so clients are able to
connect to the server.
## Logging
By default, sgxwallet will log into default Docker logs, which are rotated into four files 10M each.
......
#!/usr/bin/env python
# ------------------------------------------------------------------------------
# Bash script to build cpp-ethereum within TravisCI.
# Copyright (C) 2018-Present SKALE Labs
#
# The documentation for cpp-ethereum is hosted at http://cpp-ethereum.org
# This file is part of sgxwallet.
#
# ------------------------------------------------------------------------------
# This file is part of cpp-ethereum.
#
# cpp-ethereum is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cpp-ethereum 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>
#
# (c) 2016 cpp-ethereum contributors.
# ------------------------------------------------------------------------------
#
# Copyright (C) 2018-2019 SKALE Labs
#
# This file is part of skale-consensus.
#
# skale-consensus is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, eithe r version 3 of the License, or
# (at your option) any later version.
# libBLS is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# skale-consensus 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 General Public License for more details.
# sgxwallet 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.
#
# You should have received a copy of the GNU General Public License
# along with skale-consensus. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU Affero General Public License
# along with sgxwallet. If not, see <https://www.gnu.org/licenses/>.
#
# @file build.py
# @file build_deps.py
# @author Stan Kladko
# @date 2018
#
......
#!/usr/bin/env python
# ------------------------------------------------------------------------------
# Bash script to build cpp-ethereum within TravisCI.
#
# The documentation for cpp-ethereum is hosted at http://cpp-ethereum.org
#
# ------------------------------------------------------------------------------
# This file is part of cpp-ethereum.
#
# cpp-ethereum is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cpp-ethereum 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>
#
# (c) 2016 cpp-ethereum contributors.
# ------------------------------------------------------------------------------
#
# Copyright (C) 2019-Present SKALE Labs
#
# This file is part of sgxwallet.
#
# sgxwallet is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# sgxwallet 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.
#
# You should have received a copy of the GNU Affero General Public License
# along with sgxwallet. If not, see <https://www.gnu.org/licenses/>.
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment