Coder Social home page Coder Social logo

cristicmf / town-crier Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bl4ck5un/town-crier

0.0 1.0 0.0 24.21 MB

Town Crier: an Authenticated Data Feeds for Smart Contracts

License: Other

JavaScript 0.61% Shell 4.68% HTML 0.17% CSS 0.02% Python 0.20% CMake 0.77% C++ 10.78% C 80.39% Makefile 1.06% Tcl 0.01% Perl 1.29% M4 0.02%

town-crier's Introduction

Town Crier: An Authenticated Data Feed For Smart Contracts

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 http://town-crier.org.

Build Status

Build with Docker

git clone https://github.com/bl4ck5un/Town-Crier
cd Town-Crier
./scripts/sgx-enter.sh
cmake ../code
make && make install

To print MRENCLAVE,

root@08119b795b16:/build# /tc/bin/tc -m
# omit logging
E1FBB750A350798ADBECAFEE8A1BFC5B229E3BC007212E92102B55CE30EA0C01

Alternatively, MRENCLAVE can be extracted manually from the sgx_metadata section of the enclave binary.

Launch TC

TC relies on geth to communicate with Ethereum blockchain. By default TC connects to geth via RPC at http://localhost/8200. The RPC entrypoint can be changed in the configuration file. After make install, a sample configuration is installed at /tc/conf/config-sim-test.

root@3405273772d1:/build# cat /tc/conf/config-sim-test 
[RPC]
RPChost = http://localhost:8200

[init]
enclave_path = /tc/enclave/enclave.debug.so

[daemon]
pid_file = tc.pid

[status]
enabled = true
port = 8123

[sealed]
sig_key = blahblah
hybrid_key = blahblah

To launch TC (in the above docker where tc is built):

Status Server

curl -d '{"id": 123, "jsonrpc": "2.0", "method": "attest"}' server.town-crier.org:8123

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

Cristic 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.