Coder Social home page Coder Social logo

dorucioclea / town-crier Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bl4ck5un/town-crier

0.0 2.0 0.0 25.16 MB

Town Crier: an Authenticated Data Feeds for Smart Contracts

Home Page: https://town-crier.netlify.app/

License: Other

Makefile 1.08% C++ 8.42% C 82.21% CMake 0.81% Tcl 0.01% Shell 4.67% Perl 1.30% Python 0.37% M4 0.02% JavaScript 0.57% HTML 0.18% Dockerfile 0.01% SmPL 0.01% Roff 0.02% Solidity 0.33% SCSS 0.02%

town-crier's Introduction

Town Crier: An Authenticated Data Feed For Smart Contracts

Build Status

Smart contracts systems today lack trustworthy sources of data, as currently deployed oracles provide only weak provenance and confidentiality guarantees. The Town Crier (TC) system leverages trusted hardware (Intel SGX) to provide a strong guarantee that data comes from an existing, trustworthy source. It also provides confidentiality, enabling smart contracts to support confidential queries and manage user credentials.

Please read on for build instructions for the TC enclave. If you want to learn how Town Crier works and how to use TC in smart contract systems, please visit https://town-crier.netlify.app.

To run a TC node

TC docker images (configured to serve the Rinkeby testnet) are released online for evaluation purposes.

git clone https://github.com/bl4ck5un/Town-Crier-docker-sevices
cd rinkeby
docker-compose up  

You can find more information about the Rinkeby deployment here.

Build instructions

The above docker images are built using this script.

We also provide devel docker which provides a more interactive dev environment. The devel docker has all the dependencies installed and configured, and it gives you more control and flexibility of the compilation process.

Here is an example to compile the TC backend using the devel docker:

git clone https://github.com/bl4ck5un/Town-Crier
cd Town-Crier
./scripts/sgx-enter.sh

# in docker
cmake -DCMAKE_INSTALL_PREFIX=/tc /code
make -j && make install

The main executable is installed at /tc/bin/tc. You'll need a config file to start Town Crier. For example, using the dummy config we provided for testing purposes, you can do,

# in docker
/tc/bin/tc -c /tc/conf/config-privatenet-sim
# omit logging
2020-02-05 18:12:35,256 [tc.cpp:107] INFO  - Enclave 4733053960194 created
2020-02-05 18:12:35,264 [tc.cpp:122] INFO  - using wallet address at 0x89B44E4D3C81EDE05D0F5DE8D1A68F754D73D997
2020-02-05 18:12:35,265 [tc.cpp:123] INFO  - using hybrid pubkey: BLtIrjcmxXNzRKVLNGP+xJnLEIp9EboTe6PH0EO9bX4UmU9gRio/kVUHSbsq5UEfIrf5vueZVqRjwwitUI81V98=
2020-02-05 18:12:35,265 [tc.cpp:138] INFO  - RPC server started at 8123

To build and run tests:

# in docker
make tc-test
cd src/Enclave
./tc-test

You can use the Dockerfile as a guidance for setting up a local dev environment, if you want.

LICENSE

The permission granted herein is solely for the purpose of compiling the TownCrier source code. See the LICENSE file for details.

town-crier's People

Contributors

bl4ck5un avatar ethancecchetti avatar oaz2 avatar diffpriv avatar cromak4 avatar madebymars avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.