Skip to content

Commit 462f8c2

Browse files
Merge pull request #12 from Remmeauth/r-v0.3.0-alpha
R v0.3.0 alpha
2 parents 1ed57e1 + ad26999 commit 462f8c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1649
-272
lines changed

.circleci/config.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ jobs:
3939
command: |
4040
docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD && \
4141
docker tag remme/remme-core:latest remme/remme-core:$CIRCLE_TAG && \
42-
docker tag remme/remme-core-dev:latest remme/remme-core-dev:$CIRCLE_TAG && \
43-
docker push remme/remme-core && \
44-
docker push remme/remme-core-dev
42+
docker push remme/remme-core
4543
4644
workflows:
4745
version: 2

.env

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Total amount of tokens to be issued on a new REMME network.
2+
REMME_TOKEN_SUPPLY=10000000000000
3+
# Port for running Sphinx autobild
4+
REMME_DOCS_SERVER_PORT=8000
5+
# The port the REST API server will listen to.
6+
REMME_REST_API_PORT=8080
7+
# The port for communications between validators (blockchain protocol).
8+
REMME_VALIDATOR_PORT=8800
9+
# The real IP of the validator (required for validator discovery).
10+
REMME_VALIDATOR_IP=127.0.0.1
11+
# Peering mode: in `dynamic` mode validator connects to validators listed in
12+
# `REMME_SEEDS_LIST` and then starts to connect to other validators dynamically
13+
# building the network. In `static` mode validator connects only to validators
14+
# listed in `REMME_PEERS_LIST`.
15+
REMME_PEERING_MODE=dynamic
16+
# REMME_PEERS_LIST=tcp://hostname:port,tcp://hostname:port
17+
REMME_PEERS_LIST=
18+
# REMME_SEEDS_LIST=tcp://hostname:port,tcp://hostname:port
19+
REMME_SEEDS_LIST=
File renamed without changes.

.gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
**/__pycache__
2-
.idea/
2+
.idea/*
3+
!.idea/runConfigurations/
4+
!.idea/runConfigurations/*
35
keys/
46
*.pyc
57
*.DS_Store
68
remme/genesis/data
79
remme/genesis/batch/token-proposal.batch
10+
docs/generated
11+
docs/README.rst

.idea/runConfigurations/rest_api.xml

+21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/transaction_processor.xml

+21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/unittests.xml

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

+24-4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [0.3.0-alpha] - 2018-04-16
8+
### Added
9+
- REST API implementation based on OpenAPI specification and [Connexion](https://github.com/zalando/connexion).
10+
**NOTE**: this API is not suitable for public usage (use it only for clients on a local machine) for now and is a demo
11+
version. New version of API suitable for public use will be rolled out in the next release.
12+
- Certificate handling: registration, revocation and status checks.
13+
- Token handling: transfers and balance view.
14+
- Key pairs management.
15+
- Sphinx-based documentation for source code and overall architecture.
16+
- Capable of running a network of masternodes with DevMode consensus. The next release will contain setup for running it
17+
with [PoET (Proof of elapsed time)](https://sawtooth.hyperledger.org/docs/core/releases/1.0.1/architecture/poet.html).
18+
### Changed
19+
- Updated file hierarchy for Docker Compose.
20+
- All configuration was moved out to `.env` file.
21+
- No directories generated from Docker mounts. Now all mounts are done to named volumes.
22+
723
## [0.2.1-alpha] - 2018-03-09
824
### Added
925
- Enter parameters for certificate from CLI.
@@ -15,12 +31,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1531
- A fixed amount of token is burnt on a certificate issuance.
1632
### Changed
1733
- Transactions: unified data structures and transaction processors.
18-
- Faster startup in Docker containers for end users and separate Docker container for development purposes (instant source code updates).
34+
- Faster startup in Docker containers for end users and separate Docker container for development purposes (instant
35+
source code updates).
1936
### Security
2037
- Reviewed and fixed security issues on token operations.
2138

2239
## [0.1.0-alpha] – 2018-02-22
2340
### Added
24-
- The architecture and high-level logic of working with SSL / TLS certificates have been developed: issuing and revoked certificates on the REMME blockchain (REMchain) level;
25-
- The basic elements of the economy of the REM token have been integrated in the form of a mechanism for the token emission and the possibility of their transfer between users at the REMchain level;
26-
- A command-line interface (CLI) for convenient access to the core functionality (issuing and revoking certificates, transferring REM tokens between users) has been incorporated.
41+
- The architecture and high-level logic of working with SSL / TLS certificates have been developed: issuing and revoked
42+
certificates on the REMME blockchain (REMchain) level;
43+
- The basic elements of the economy of the REM token have been integrated in the form of a mechanism for the token
44+
emission and the possibility of their transfer between users at the REMchain level;
45+
- A command-line interface (CLI) for convenient access to the core functionality (issuing and revoking certificates,
46+
transferring REM tokens between users) has been incorporated.

Dockerfile

+5-8
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,16 @@
1313
# limitations under the License.
1414
# ------------------------------------------------------------------------
1515

16-
FROM ubuntu:xenial AS development
16+
FROM ubuntu:xenial
1717
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD && \
1818
echo "deb http://repo.sawtooth.me/ubuntu/1.0/stable xenial universe" >> /etc/apt/sources.list && \
1919
apt-get update && \
2020
apt-get install -y sawtooth && \
21-
apt-get install -y python3-pip
21+
apt-get install -y python3-pip && \
22+
apt-get install -y libssl-dev
2223
WORKDIR /root
23-
COPY ./requirements.txt .
24-
RUN pip3 install -r ./requirements.txt
25-
26-
FROM remme/remme-core-dev:latest AS production
27-
WORKDIR /root
28-
RUN mkdir remme
2924
COPY ./bash/.bashrc /root/.bashrc
25+
RUN mkdir remme
3026
COPY . ./remme
27+
RUN pip3 install -r ./remme/requirements.txt
3128
RUN pip3 install ./remme

Makefile

+19-18
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,35 @@
1515

1616
PROTO_SRC_DIR = ./protos
1717
PROTO_DST_DIR = ./remme/protos
18+
RELEASE_NUMBER ?= $(shell git describe --abbrev=0 --tags)
1819

19-
TOTAL_SUPPLY ?= 10000000000000
20+
include .env
2021

21-
run:
22-
docker-compose up
22+
.PHONY: release
2323

24-
run_dev:
25-
docker-compose -f docker-compose.dev.yml up
24+
run_dev_no_genesis:
25+
docker-compose -f docker-compose.dev.yml -f docker-compose.run.yml up
2626

27-
shell:
28-
docker exec -it $(shell docker-compose ps -q shell) bash
27+
run_dev:
28+
docker-compose -f docker-compose.dev.yml -f docker-compose.genesis.yml -f docker-compose.run.yml up
2929

3030
test:
31-
docker-compose -f docker-compose.test.yml up --abort-on-container-exit
32-
33-
genesis:
34-
docker-compose -f docker-compose.genesis.yml run -e REM_TOKEN_SUPPLY=$(TOTAL_SUPPLY) genesis
35-
36-
reload_module:
37-
pip3 install --upgrade /remme
31+
docker-compose -f docker-compose.test.yml -f docker-compose.run-test.yml up --abort-on-container-exit
3832

3933
build_protobuf:
4034
protoc -I=$(PROTO_SRC_DIR) --python_out=$(PROTO_DST_DIR) $(PROTO_SRC_DIR)/*.proto
4135

4236
build_docker:
43-
docker build --target development --tag remme/remme-core-dev:latest .
44-
docker build --target production --tag remme/remme-core:latest .
37+
docker-compose -f docker-compose.dev.yml build
4538

4639
rebuild_docker:
47-
docker build --target development --tag remme/remme-core-dev:latest --no-cache .
48-
docker build --target production --tag remme/remme-core:latest --no-cache .
40+
docker-compose -f docker-compose.dev.yml build --no-cache
41+
42+
release:
43+
mkdir $(RELEASE_NUMBER)-release
44+
cp {run,genesis}.sh ./$(RELEASE_NUMBER)-release
45+
cp docker-compose.{dev,run,genesis}.yml ./$(RELEASE_NUMBER)-release
46+
cp .env ./$(RELEASE_NUMBER)-release
47+
find ./$(RELEASE_NUMBER)-release -type f -name "docker-compose.{dev,run,genesis}.yml" | xargs sed -i "/.*build: \..*/d"
48+
zip -r $(RELEASE_NUMBER)-release.zip $(RELEASE_NUMBER)-release
49+
rm -rf $(RELEASE_NUMBER)-release

README.md

-33
This file was deleted.

README.rst

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
REMME Core
2+
==========
3+
4+
|CircleCI| |Docker Stars|
5+
6+
**This is an alpha version! It is not suitable for any use in production
7+
and is intended to demonstrate capabilities of Hyperledger Sawtooth in
8+
the scope of REMME.**
9+
10+
How to run
11+
----------
12+
13+
You will need Docker and Docker Compose installed on your machine.
14+
15+
For an end-user
16+
~~~~~~~~~~~~~~~
17+
18+
1. Download the latest release from `Releases`_ section
19+
(``<version_number>-release.zip``). Unpack it.
20+
2. Start node: Open a terminal inside the unpacked folder and run
21+
``./run.sh``.
22+
3. You can now use our REST API. By default it is started on http://localhost:8080. Fancy Swagger UI
23+
with documentation is available on http://localhost:8080/ui. The API port can be changed in `.env`
24+
file.
25+
26+
On the first run you will need to initialize the genesis block. To make
27+
that just run ``./genesis.sh``. This will generate a new key pair and
28+
genesis block.
29+
30+
For developers & contributors
31+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32+
33+
Clone this repository to your machine:
34+
``git clone https://github.com/Remmeauth/remme-core.git``
35+
36+
When you have this repository cloned go the project directory run the
37+
following commands:
38+
39+
- ``make build_docker``
40+
- ``make run_dev``
41+
42+
You can run ``make test`` to run automated tests.
43+
44+
.. _Releases: https://github.com/Remmeauth/remme-core/releases
45+
46+
.. |CircleCI| image:: https://img.shields.io/circleci/project/github/Remmeauth/remme-core.svg
47+
:target: https://circleci.com/gh/Remmeauth/remme-core
48+
.. |Docker Stars| image:: https://img.shields.io/docker/stars/remme/remme-core.svg
49+
:target: https://hub.docker.com/r/remme/remme-core/

docker-compose.debug-rest.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2018 REMME
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# ------------------------------------------------------------------------
15+
16+
version: '2.1'
17+
18+
services:
19+
remme-tp:
20+
entrypoint: python3 -m remme tcp://validator:4004
21+
22+
remme-rest-api:
23+
depends_on:
24+
- rest-api
25+
- remme-tp

docker-compose.debug-tp.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2018 REMME
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# ------------------------------------------------------------------------
15+
16+
version: '2.1'
17+
18+
services:
19+
remme-tp:
20+
depends_on:
21+
- remme-rest-api
22+
23+
remme-rest-api:
24+
entrypoint: python3 -m remme.rest_api

0 commit comments

Comments
 (0)