Skip to content

Commit

Permalink
Merge pull request #19 from trackback-blockchain/feature/implementati…
Browse files Browse the repository at this point in the history
…on_cleanup

Implementation cleanup
  • Loading branch information
Gayan authored Nov 15, 2021
2 parents 6caf219 + 1744249 commit 79b4360
Show file tree
Hide file tree
Showing 41 changed files with 2,217 additions and 4,298 deletions.
31 changes: 23 additions & 8 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
binop_separator = "Front"
brace_style = "SameLineWhere"
edition = "2018"
format_code_in_doc_comments = true
imports_granularity = "Preserve"
imports_layout = "Mixed"
indent_style = "Block"
match_arm_leading_pipes = "Always"
# Basic
hard_tabs = true
max_width = 100
use_small_heuristics = "Max"
# Imports
imports_granularity = "Crate"
reorder_imports = true
# Consistency
newline_style = "Unix"
# Format comments
comment_width = 100
wrap_comments = true
# Misc
chain_width = 80
spaces_around_ranges = false
binop_separator = "Back"
reorder_impl_items = false
match_arm_leading_pipes = "Preserve"
match_arm_blocks = false
match_block_trailing_comma = true
trailing_comma = "Vertical"
trailing_semicolon = false
use_field_init_shorthand = true
15 changes: 0 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
18 changes: 18 additions & 0 deletions Limitations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# TrackBack Node Limitations (Minimum Viable Product).


## Disclaimer
* This node created as minimum viable product
* Do not use ina production environment
* Released for test purposes only

## Limitations
* No [token](https://docs.substrate.io/how-to-guides/v3/basics/mint-token/) economic models around managing Decentralised Identifiers
* No staking rewards
* Default configuration has 2 validators and a not well known node ( 3 node network )
* OnChain data will recycle after 6 weeks ( subject to change )
* Does not have the complete functionality for [DIDComms](https://identity.foundation/didcomm-messaging/spec/)
* Covers the functionality for creation, revocation, update and retrieve a DID only
* Provides support for Ledger based DIDs only.
* Does not cover Ledger Middleware DIDs, Peer DIDs, Static DIDs and Alternative DIDs
* Tight bindings between a Controller and the Chain limited to default accounts
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

<p>
<a href="https://trackback.co.nz/">
<img src="https://user-images.githubusercontent.com/2051324/127407635-236f8a7a-4ca6-410a-9fc4-add396743cfa.png" alt="TrackBack"></a>
</p>

Blockchain for decentralised identifiers and verifiable credentials.
Blockchain for `Self Sovereign Identity`, `Decentralised Identifiers` and `Verifiable Credentials` .
<br>
<a href="https://github.com/paritytech/substrate/tree/v3.0.0" target="_blank">
<img src="https://img.shields.io/badge/Substrate-3.0.0-green" alt="Substrate 3.0.0">
Expand All @@ -15,9 +14,16 @@ Blockchain for decentralised identifiers and verifiable credentials.
<a href="https://github.com/paritytech/substrate/tree/v3.0.0" target="_blank">
<img src="https://img.shields.io/badge/terraform-1.0.0-8ca" alt="Substrate 3.0.0">
</a>
<a>
<img src="https://img.shields.io/badge/TrackBack--Node-0.0.1-00AAFF" alt="TrackBack-Node 0.0.1">
</a>

## Features
* DID Pallet
* Verifiable Credential Pallet (Late 2021)
* DID Pallet
* Verifiable Credentials Pallet (Q2-2021)

# Limitations
* [Limitations](Limitations.md)

## Setting up the chain
* [Install](https://substrate.dev/docs/en/knowledgebase/getting-started/) substrate
Expand Down
2 changes: 1 addition & 1 deletion buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ phases:
- COMMIT_HASH=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7)
- IMAGE_TAG=latest
- echo "Build docker image"
- docker build -t ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${IMAGE_NAME}:${IMAGE_TAG} .
- docker build -f ./docker/Dockerfile.prod -t ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/${IMAGE_NAME}:${IMAGE_TAG} .
build:
commands:
- echo "Login to ECR"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions Dockerfile → docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ WORKDIR /build
ARG FEATURES=default

COPY ./.git/ /build/.git/
COPY ./node /build/node
COPY ./pallets /build/pallets
COPY ./runtime /build/runtime
COPY ./Cargo.lock /build/Cargo.lock
COPY ./Cargo.toml /build/Cargo.toml
COPY ../node /build/node
COPY ../pallets /build/pallets
COPY ../runtime /build/runtime
COPY ../Cargo.lock /build/Cargo.lock
COPY ../Cargo.toml /build/Cargo.toml

RUN cargo build --release --features $FEATURES

Expand All @@ -20,7 +20,7 @@ ARG WEB_SOCKET_PORT=9944
ARG P2P_PORT=30333
ARG NODE_TYPE=trackback-node

COPY ./LICENSE /build/LICENSE
COPY ../LICENCE /build/LICENSE
COPY --from=builder /build/target/release/$NODE_TYPE /usr/local/bin/node-executable

RUN useradd -m -u 1000 -U -s /bin/sh -d /node node && \
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docker/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ARG WEB_SOCKET_PORT=9944
ARG P2P_PORT=30333
ARG NODE_TYPE=trackback-node

COPY ./LICENSE /build/LICENSE
COPY ./LICENCE /build/LICENCE
COPY --from=builder /build/target/release/$NODE_TYPE /usr/local/bin/node-executable

RUN useradd -m -u 1000 -U -s /bin/sh -d /node node && \
Expand Down
11 changes: 1 addition & 10 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!make

SHELL:=/bin/bash
.DEFAULT=all

export PROJECT_NAME := tanz-demo-node
export TARGET_PORT := 80
Expand All @@ -10,11 +9,6 @@ export ECR_REPO_URL := 533545012068.dkr.ecr.ap-southeast-2.amazonaws.com
export VERSION := latest
export BRANCH_NAME :=$(shell git branch --show-current)

all: deploy

destroy:
cd terraform/ap-southeast-2/deployec2 && terraform destroy -var="branch_name=$(BRANCH_NAME)" --auto-approve

ecr:
aws ecr get-login-password \
--region ${REGION} \
Expand All @@ -28,8 +22,5 @@ build: ecr
docker tag $(PROJECT_NAME):latest $(ECR_REPO_URL)/$(PROJECT_NAME):$(VERSION)
docker push $(ECR_REPO_URL)/$(PROJECT_NAME):$(VERSION)

deploy: destroy
cd terraform/ap-southeast-2/deployec2 && terraform apply -var="branch_name=$(BRANCH_NAME)" --auto-approve

run-dev: ecr
docker-compose -f docker-compose.dev.yml up --build --force-recreate --remove-orphans -d
docker-compose -f ./deployment/docker-compose.dev.yml up --build --force-recreate --remove-orphans -d
4 changes: 2 additions & 2 deletions node/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};

fn main() {
generate_cargo_keys();
rerun_if_git_head_changed();
generate_cargo_keys();
rerun_if_git_head_changed();
}
Empty file removed node/chain_specs/live-net.json
Empty file.
3 changes: 1 addition & 2 deletions node/chain_specs/test-net.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,4 @@
"key": "5FA9nQDVg267DEd8m1ZypXLBnvN7SFxYwV7ndqSYGiN9TTpu"
}
}
}
}
},
Loading

0 comments on commit 79b4360

Please sign in to comment.