Skip to content

SamPse/EthOn

 
 

Repository files navigation

EthOn - The Ethereum Ontology

An Ethereum ontology (https://github.com/ethereum/yellowpaper).

An ontology is a formalization of concepts and relations within a domain. EthOn is written in RDF and OWL.

Status and scope

Status of the specification build: Build Status

EthOn is currently under heavy development. It is not complete, nor ever will be, probably. The goal is to model Ethereum as a State Transition System.

EthOn is not canonical (i.e. "official"). However, it might be submitted as an EIP at some point in the future.

For information on contributing, versioning and usage, please have a look at the wiki.

Extensions

  • ERC-20 - Adds modeling of ERC-20 tokens
  • Contracts - Adds modeling of smart contracts

EthOn can be used

  • as a learning ressource for understanding Ethereum and the yellow paper
  • as a means to improve communication (among developers, among technical and non-technical people, ...)
  • for checking the consistency of modeled aspects of blockchain data via reasoning
  • to semantically annotate content provided by Ethereum based tools and dApps (e.g. block explorers, analysis tools, markets, ...)
  • much more

EthOn covers the following major Ethereum concepts:

The following aspects are not covered (yet):

  • EVM states and EVM execution
  • Relation to other blockchain implementations, e.g. Bitcoin

Five approaches to understanding EthOn

1. Look at simplified EthOn model of Ethereum

EthOn model

Find more illustrations here: EthOn illustrations

2. Visualize the Ontology

Visualize the ontology using WebVOWL. It should be enough to click this link. WebVOWL is also developed on GitHub: https://github.com/VisualDataWeb/WebVOWL

3. Check out the specification

You can look at the automatically generated EthOn specification.

4. Open the ontology in Protégé

Download Protégé and open the ontology file to browse around and view all assertions.

5. Look at some examples

Among other things, EthOn can be used to formally describe Ethereum artefacts. The following Turtle snippet is a description of the Genesis Block of the current Ethereum main net.

Describing an Account

@prefix ethon: <http://ethon.consensys.net/>
@prefix ethereum: <http://ethereum.ethstats.io/>

ethereum:Account_0x0x0000000000000000000000000000000000000000
    a ethon:Account ;
    rdfs:label "Genesis Address" ;
    rdfs:label "Coinbase" ;
    ethon:address "0x0000000000000000000000000000000000000000"^^xsd:hexBinary ;
    [...]
    rdfs:seeAlso <https://etherscan.io/address/0x0000000000000000000000000000000000000000> .

ethereum:AccountState0
    ethon:accountBalance 0 ;
    [...]
    ethon:accountNonce 0 .

Describing a Block

ethereum:Block_0
    a ethon:Block ;
    rdfs:label "Genesis Block" ;
    rdfs:comment "This is the block with block number 0. It is the Genesis Block of the Ethereum blockchain." ;
    ethon:number 0 ;
    ethon:authorBeneficary ethereum:Account_0x0x0000000000000000000000000000000000000000 ;
    ethon:blockReward 5000000000000000000 ;
    ethon:gasLimit 5000 ;
    ethon:blockNonce "0000000000000042"^^xsd:hexBinary ;
    [...]
    rdfs:seeAlso <https://etherscan.io/block/0> .

"EthOn"?

Ethon is in Greek, Latin and Indian mythology the name of one of the horses that pull the sun across the sky.

About

EthOn - The Ethereum Ontology

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 99.5%
  • Shell 0.5%