Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
An initiative for purchasing clean, carbon-free energy every hour on a regional grid where consumption occurs. An entity's clean energy demands are correlated with its energy generation on an hourly basis.
A new role in energy service provision that groups local participants in a power system (energy consumers, energy producers, energy prosumers) to determine and moderate how much energy they will need to consume from the grid, and, in some cases help them sell their excess electricity from distributed energy resources (DERs) back to the regional or wholesale electricity market.
The aggregator is an intermediary between prosumers, Transmission System Operators (TSOs), and Distribution System Operators (DSOs) that want to serve this group or use their DER services on the grid.
Application registries are the logic to manage permissions, enrollments, and relationships between market participants in an automated way.
The Charge Point Operator (CPO) is responsible for technical operation and maintenance of (public and semi-public) charging stations. Its revenue comes mainly from providing electrical energy to EVs.
The Crypto Climate Accord (CCA) is a global private sector-led initiative co-launched by Energy Web to build, test, and implement digital solutions that will decarbonize the crypto and blockchain industry by 2040. Learn more here.
A decentralized application (dApp) is an application built on a decentralized network that combines a smart contract and a frontend user interface.
DIDs **** are persistent identifiers that identify DID subjects such as assets, customers, organizations, and other market participants. DIDs allow the controller of a DID to prove control over it without requiring permission from any other party. DIDs associate a DID subject with a DID document to allow trustable interactions with that subject.
The DSB is the messaging service of the Energy Web Decentralized Operating System’s (EW-DOS) utility layer. Unlike any other centralised and managed pub/sub messaging systems, EW-DSB is designed and implemented to be fully decentralised and scalable. Messages shared on EW-DSB can be traced back to its original sender using cryptographic signatures; it adds extra security to data exchanges. One of the key benefits of the EW-DSB is to be schema agnostic, meaning any type of schema can be shared as a message between users/systems.
Physical and virtual assets that are deployed across the distribution grid can be used individually or in aggregate to provide value to the grid, individual customers, or both.
DERs can for example include solar, batteries, flexible loads and are also often referred to as “devices” or “assets”.
The operating managers (and sometimes owners) of energy distribution networks that operate at a regional or local level. DSOs manage high-voltage incoming electricity from larger transmission grids (via TSOs), convert it to a lower voltage, and distribute it throughout the local network. They are, in essence, the middle-man between the raw, high-voltage electricity from transmission grids and the local consumers of electricity.
The eMobility Service Provider (eMSP) provides e-mobility services such as access to charging services, payment and more to EV drivers. It requires certain data exchange for those services, e.g. charging locations for routing.
The movement of high-voltage electricity from sub-stations to customers through distribution lines.
The movement of high-voltage electricity from initial generation sites to substations.
Energy Attribute Certificates (EACs) describe global instruments which certify that a specific unit (historically 1 MWh, but sometimes 1 KWh) of electricity was produced from a renewable source.
Globally there are various EAC systems to claim the use of renewable or low-carbon energy. Some well-known standards include Guarantees of Origin (EU), I-RECs (global), and RECs (US/Canada).
Redeemed EAC = an EAC that has been bought by someone can't be resold to anyone else
Claimed or Cancelled EAC = other ways of calling Redeemed EACs
Bundled Certificates = contracts that sell consumable energy + EACs together
Unbundled Certificates = contracts that sell EACs separately from the energy that produced them
The EWC is a public, enterprise-grade blockchain platform designed for the energy sector’s regulatory, operational, and market needs. Launched in mid-2019, it serves as a foundational digital infrastructure on which companies can build and run blockchain-based decentralized applications (dApps). Learn more here.
EW-DOS is the acronym for Energy Web Decentralized Operating System. EW-DOS is an open-source stack of decentralized software and standards. **** Learn more here.
The EWT is the Energy Web Chain native first-layer utility token.
The ability of the grid to balance how much power it generates with how much demand there is for it. Flexibility services include any service that meets a requirement to provide more or less demand on the system. ****
At a basic level, Transmission System Officers (TSOs) and Distribution Service Operators (DSOs) procure flexibility services. Aggregators and prosumers offer flexibility services using distributed energy resources.
A distributed messaging node which can send OCPI messages between OCN Parties.
A decentralized network for enabling use-cases in the EV charging domain. Consists of many OCN Nodes and a single OCN Registry. Can also be considered as an implementation of the OCPI 2.2 Hub concept.
A self-sovereign identity of a party on the Open Charging Network based on an Energy Web Chain public/private key-pair.
Open Charge Network (OCN) Node
A single node of the Open Charging Network which forwards OCPI/OCN messages between parties based on a routing system. Consists of a message broker, a connection to an Energy Web Chain Node, a blockchain wallet and more. A network of nodes constructs the Open Charging Network.
A protocol that allows for a scalable, automated roaming setup between Charge Point Operators and eMobility Service Providers. See OCPI documentation here.
Smart contracts on the Energy Web Chain that contain important information about registered OCN Nodes, OCN Parties and OCN Services. These contracts act as the addressing, identity, and permissions system of the OCN. A command line interface and libraries are provided for interaction.
A company that manufactures and sells products or parts of a product that their buyer, another company, sells to its own customers while putting the products under its own branding.
Anyone who both consumes and produces energy. Prosumers produce energy through Distributed Energy Resources (DER), such as rooftop solar panels.
SSI is a digital paradigm that promotes an individual’s control over their identity and their data. This is in contrast to the current paradigm where most of our official identifiers (driver’s license, birth certificate, usernames, etc.) are given to us and maintained by a central authority, and where our data can be shared without our knowledge or consent.
DIDs and VCs are the two most critical components of SSI. Together they allow users to have control over both their identity and any data associated with them.
An SDK is a collection of software development tools in one installable package. They facilitate the creation of applications. In the context of Energy Web, they are open-source “blueprints” for building apps on EW-DOS.
Energy Web launched staking on the Volta Test Network in August 2021. This is a first step towards a Decentralized Software as a Service (dSaaS) infrastructure, allowing for decentralized, community-driven service provision for Energy Web utility services and applications.
The Energy Web staking model extends blockchain tokens staking to SaaS provisioning. Ultimately, anyone will be able to stake tokens with service providers of their choosing, and both parties will be rewarded for providing fast, stable and secure services based on EW's decentralized, open-source software. Staking in the way Energy Web is implementing it, applies the benefits of decentralization and network resiliency of blockchain technology to software and IT services more broadly.
Supervisory control and data acquisition (SCADA) is a system of software and hardware elements that allows industrial organizations to i) control industrial processes locally or at remote locations; ii) monitor, gather, and process real-time data; iii) directly interact with devices such as sensors, valves, pumps, motors, and more through human-machine interface (HMI) software; and iv) record events into a log file.
Switchboard is an identity and access management dApp (decentralized app). Switchboard allows for the definition of organization and application structures to be used for role-based permissioning within applications that relate to decarbonization.
It enables a user-centric, decentralized approach where users are in control of their identity (identifier, keys, credentials). Switchboard enables the digitization of assets by giving them unique identities and allowing them to interact with the decentralized operating system and decarbonization use cases.
Responsible for transmitting electrical power from power generation plants to distribution local or regional operators (Distribution Service Operators) via the electrical grid. This involves determining how much electricity needs to be on the grid at any given time, and managing reserve capacity and ancillary energy providers to keep the grid balanced.
The UL is composed of decentralized cloud services like messaging, key manager, and storage that form the “middle” layer of the EW-DOS tech stack.
"Validators" refer to both a node and an organization; the companies operating the EWC. Validators on the Energy Web Chain have three main responsibilities: i) Create Blocks, ii) Provide Network Security, and iii) Participate in the EWC Governance.
VCs are a set of statements made about a subject (such as a DID) by an authority. They can be used to convince others (who trust the authority) of the truth of the statements and can be linked from a DID document.
Leading examples of Data Exchange Implementations include:
E-Mobility Management [coming soon]
This page describes how the EW Data Exchange solution can be applied to e-mobility use cases in general. As of Q2 2023, several features specific to e-mobility are under development for the DDHub Client Gateway.
Adoption of electric vehicles (EVs) is growing exponentially around the world, and EVs are on pace to represent a significant share of the global transportation sector this decade. Collectively, EVs represent an opportunity to both accelerate decarbonization in the energy sector and introduce innovative new business models. Emerging opportunities for EVs include:
Grid balancing and demand response: EVs can provide multiple grid services (e.g. peak shaving, voltage support, etc.) by adjusting their charging patterns based on grid conditions. Smart charging systems can optimize charging schedules to avoid overloading the grid during peak demand periods, or consume excess variable renewable energy duriong periods of low demand. By acting as demand response resources EVs can help flatten demand peaks and reduce strain on the grid, thus enhancing its efficiency and reliability.
Grid flexibility and storage: EVs can act as distributed energy storage units. With smart charging infrastructure and vehicle-to-grid (V2G) technology, EV batteries can be used to store excess electricity during times of high renewable energy production. This stored energy can then be fed back into the grid during periods of high demand or when renewable generation is low. V2G technology allows bidirectional power flow between the grid and EVs, enhancing the grid's flexibility and stability.
Accelerating deployment and increasing utilization of renewables: As a major consumer of electricity, EVs can drive demand for carbon-free electricity through clean energy tariffs, purchases of environmental attribute certificates, or even carbon-optimized charging. EV charging infrastructure can be colocated and powered directly by renewable energy installations, and EV charging strategies can be optimized to charge EVs during hours with plentiful supply of renewables.
While these opportunities are promising, fully realizing their potential is challenging due to complex relationships between multiple stakeholders, the highly distributed and diverse nature of EV and EV charging infrastructure, and the sheer volume of EVs.
EW Data Exchange builds on the capabilities first introduced in the Open Charging Network to deliver EV drivers, grid operators, charge point operators, vehicle manufacturers, retailers, and other EV service providers with a comprehensive and cohesive solution for sharing and validating data.
Open Charging Network 2.0: A next-generation implementation of the OCN is currently under development. OCN2.0 will share many architectural features with the Digital Spine toolkit, but include several e-mobility specific features including built-in standards (e.g. OCPI) within the DDHub Client Gateway, as well as the ability to run the gateway within EV and EVSE equipment, to simplify integration between EV equipment and channels hosted in the DDHub Message Broker. OCN2.0 will also feature dedicated Worker Node networks to verify and validate message routing between participants, as well as execute custom business logic involving multiple companies (e.g. smart charging, V2G, etc.).
Real-time Locational Green Charging: Combining the Data Exchange solution with the 24x7 Green Proofs toolkit enables advanced green charging tariffs and programs that match locally-available carbon-free generation with specific EV charging events in near real-time.
Open-source software and digital infrastructure for a decarbonized energy system
Energy Web is an independent nonprofit accelerating the global energy transition by developing open-source Web3 software solutions that help companies unlock business value from clean and distributed energy resources. This site provides an overview of the foundational concepts, technical components, and use cases of the Energy Web Decentralized Operating System (EW-DOS).
EW-DOS gives companies simple tools to deploy custom applications and business networks that combine established protocols and platforms with pioneering technologies and novel architectures.
Energy Web's tech stack is designed to address two primary challenges in the current energy and renewables market:
Click on any of the boxes below to learn more about the EW-DOS technical components.
For a deep-dive into the motivation and methodology behind our technical solutions, we encourage you to read our White Papers:
Energy Web X Light Paper (2023)
Energy Web White Paper on Vision and Purpose (2020)
Energy Web White Paper on Technology Detail (2020)
EW-DOS builds on the foundations of other open-source technologies and uses many well-known libraries and technologies in the stack, so this documentation provides references and links to other articles and sources of documentation throughout.
We encourage you to become familiar with the core concepts of blockchain technology and self-sovereign identity if you are new to this space. The Foundational Concepts section provides brief explainers for what we think is essential to understand our technology. They point you toward more in-depth resources and documentation.
We are an open-source foundation and we want our solutions to be accessible and our community to be wide. Please provide feedback or questions on the documentation by reaching out on Telegram, Twitter, or Discord.
Decarbonizing electric grids around the world is the single most impactful step we can take to mitigate climate change. Luckily, we are headed in the right direction: renewables and small scale clean energy assets called distributed energy resources or DERs—assets like electric vehicles, rooftop solar systems, batteries, and other flexible electric loads—are being deployed at an unprecedented rate. Unfortunately, it’s not fast enough: to achieve net-zero emissions by 2050, annual clean energy through at least 2030. And if we want to get there, we have to overcome a serious obstacle: today’s electric utilities are not equipped with the tools needed to manage a renewable grid populated with millions upon millions of DERs.
The grid works by maintaining a precise balance between supply and demand. Today, utilities achieve this via a century-old model: generate power in large, centralized stations and feed it one-way to customers. This model assumes 1) utilities have direct visibility and control over generation (supply) and 2) customer demand for electricity is both passive and predictable. These axioms are no longer valid: renewable energy output is variable and largely a function of weather while demand for electricity from customers—who now own DERs capable of storing electricity, shifting when it’s used, or even injecting power back into the grid— is anything but predictable. A grid composed of vast amounts of renewables and DERs presents a complete paradigm shift for electric utilities.
Utilities have never faced a challenge like this before, nor are they equipped with the tools needed to manage this new paradigm. We aim to change this with a Digital Spine.
In its simplest form, a Digital Spine is a thin layer of interoperability that connects and communicates information between all of the hardware, software, and organizational systems comprising a grid in near real time. In contrast to the existing information technology landscape that utilities rely on today (which features limited information sharing between isolated and fragmented systems) a Digital Spine offers an open-access, cohesive infrastructure that is jointly governed and operated as a public good.
Today the concept of a Digital Spine - a common digital layer for transactions and interoperability for all actors and processes in an energy system - is being developed in multiple energy markets globally, most .
Energy Web's Digital Spine toolkit includes four elements:
Identity and Access Management (IAM): this component implements a unified authentication and authorization framework using self-managed, sovereign digital identities. This gives utilities and other grid participants the ability to mutually authenticate each other’s identity and authorize selective disclosure or communication of information based on their respective roles and responsibilities. A key benefit of this approach, in contrast to existing piecemeal systems, is delivering a “single sign on” user experience that improves interoperability and streamlines trusted integrations between devices, systems, and organizations without relying on a central administrator.
Data and Message Exchange Module: this component is a secure, open-access messaging infrastructure that 1) allows market participants to send, receive, and authenticate messages based on the roles that have been issued to and associated with their self-managed identity; 2) allows market participants to exchange diverse datasets, ranging from real-time telemetry to bulk file uploads; and 3) requires only a single integration mechanism with a central infrastructure in order to communicate via one:one (unicast), one:many (broadcast), and many:many (multicast) channels.
Data Hub Client Gateway: this component is an independent application that Digital Spine participants deploy in order to access the shared message broker. The Client Gateway provides a standardized interface to read and write messages in specific channels within the message broker.
Joint Business Processing: for DERs to be fully utilized, in many instances information needs to be transmitted amongst three or more parties in a way that does not reveal all data to all parties. In these instances, Energy Web has developed an open source, decentralized technology called “Worker Nodes” that ingest data from external sources, execute custom workflows based on predefined business logic, and vote on results in order to establish consensus without revealing or modifying the underlying data. This technology borrows concepts from public distributed ledger solutions, namely distributed consensus protocols which use cryptographic techniques to establish provably correct and timely results.
Collectively, these four components provide a shared digital infrastructure that facilitates communication and coordination between utility hardware and software systems–from smart meters to network planning tools–and DERs and the companies who manage them. Ultimately, a Digital Spine exists to enable new applications provided by other software vendors and utilities themselves, including:
Demand Response / Transactive Energy / Virtual Power Plants: Though there are many different names for it, the concept of using market mechanisms and dynamic pricing to influence DER behavior is well established globally. The Digital Spine enables distribution utilities to construct sophisticated transactive energy programs that procure grid services from DERs at specific locations and/or at specific times of day. For this use case, the role of the Spine is to facilitate data exchange and validation between the utility’s operations center and multiple third-party DER operators.
Moving forward, our full vision for a Digital Spine includes additional applications where consortium building and technology integrations with existing vendors is critical:
Distribution network modeling / analytics solutions: Utilities need partners that can ingest both traditional system data and DER data to construct digital twins of entire networks in different ways and provide advanced analytical capabilities to utilities to support both operations and planning.
Optimization solutions: Dynamic line ratings (also called operating envelopes) are one way of optimizing dispatch of DER at the distribution level. There are many other companies that offer solutions to help optimize dispatch and management of DER who can use a Digital Spine to efficiently communicate distribution network conditions and constraints to other market participants.
Forecasting solutions: Today many companies offer forecasting capabilities (e.g. system demand, power flows within specific network lines, renewable output, etc.). A Spine can enhance forecasting capabilities by making additional datasets that are currently too complex or costly to integrate available to forecasting providers.
Real time operations solutions: Today there are many companies offering DER management systems and advanced distribution network management systems, but they are not ubiquitous. A Spine could make it easier to bring these solutions to utilities who currently lack them.
Network Optimization via Operating Envelopes: (also called ) are an emerging solution for dynamically modifying import (consumption) or export (generation) of DERs to the distribution network. The core function of an operating envelope is to define limits on how much power can be injected or drawn by DER based on physical constraints within the distribution system. For this use case, the role of a Digital Spine is to ingest and partition (i.e. route) operating envelopes to the appropriate DER operators so DER can safely sell services wholesale and to the distribution utility.
Introduction to Energy Web Data Exchange
Enterprise Data Exchange is a customizable solution for authorizing, delegating, and delivering messages between a multiplicity of companies, systems, and assets operating in a common market environment without relying on a central administrator or broker. It is an extension of electricity market flexibility and e-mobility solutions developed in the Energy Web community over the last five years.
Energy Web Data Exchange simplifies communication and business logic execution in complex markets by replacing heterogeneous point-to-point integrations among participants with a hub-and-spoke model in which all participants maintain a single integration to communicate with all other parties. Unlike conventional hub architectures that rely on a central broker to administer access and host the infrastructure, EW Data Exchange combines multiple open-source technologies to establish a shared platform that is owned, operated, and governed by multiple participants.
EW Data Exchange is tailored to execute high-volume, business-critical communications in electricity markets and e-mobility applications, but can be customized to support any business process involving data exchange between multiple organizations. Enterprise Data Exchange is protocol agnostic, and supports established standards including IEEE 2030.5, XML, OADR, and OCCP.
In its simplest form, Data Exchange is a secure, open-access messaging infrastructure that:
Allows multiple parties to send, receive, and authenticate messages based on the roles that have been issued to and associated with their self-managed identity;
Allows parties to exchange diverse datasets, ranging from real-time telemetry to bulk file uploads, in support of multiple DER and e-mobility use cases;
Provides end-to-end encryption for all messages and data transfers, using cryptographic signatures from self-managed identities;
Requires only a single integration mechanism with a central infrastructure in order to communicate via one:one (bilateral), one:many (broadcast), and many:many (multicast) channels.
Data Exchange can support a wide variety of use cases, including:
Coordinating DER installation data among installers grid operators
Streamlining DER registration in wholesale and/or local markets
Enabling seamless roaming and advanced tariffs for electric vehicles
Coordinating real-time grid operations between transmission and distribution system operators (operating envelopes, local constraints)
Facilitating customer switching between retailers in deregulated markets
Consolidating disparate market operations communications channels and processes (e.g. registration, nomination, bids/offers, dispatch, settlement)
Establishing dynamic registries for DERs and EVs
A use case is defined by a particular configuration of a messaging channel (i.e. who is allowed to read/write, how messages are routed) and data schema (the format, frequency, and logic governing messages). Thus Data Exchange is a practically infinitely customizable solution; much like the way a road supports many types of transportation (from cars, to bicycles, scooters, trucks, etc.) Data Exchange provides a foundation for many types of business processes in electricity markets.
EW Data Exchange can be applied in any energy market context where many-to-many data exchanges are critical. Companies or consortia can design how user roles are defined and acquired; what data structures and protocols are supported; and what types of integration options are made available to participants.
Wholesale market & transmission system operators who need a solution to facilitate data exchange among market participants and distribution system operators in order.
Distribution utilities who need to coordinate local services and non-wires alternatives with multiple vendors or aggregators.
E-mobility service providers and charge point operators who want to reduce the cost and complexity of managing e-roaming and advanced charging programs.
Industry consortia
EW Data Exchange allows companies seeking to offer / build / operate market-wide data exchange hubs to define the following aspects:
Configuring role-based permissions, conditions, and restrictions for users
Scheduling jobs for batch processing and caching of data
Use the channels for passing data between participants
Participant Environment
Hosting environment (e.g. public cloud instance, or on-premise server) where participants deploy and operate the DDHub Client Gateway Application.
Participant System:
Participant applications (e.g. DER management system, market operation systems) that send and receive messages on relevant channels (within the shared message broker) via the Client Gateway.
The interface presenting UI, and API for interacting with the Message Broker to send and receive messages. Client gateway repo is available at https://github.com/energywebfoundation/ddhub-client-gateway or on Azure cloud marketplace.
The component that routes messages between Client gateways (using API to control NATS messaging). Authentication and authorization for interacting with the message broker is done via the DID Authorization Proxy. Message broker repositor is available at https://github.com/energywebfoundation/ddhub-message-broker
SSI Toolkit
Libraries and components that implement identity and access management functionalities. Learn more in the IAM page.
IPFS
Distributed file storage system used to store and manage identity and role definitions. Learn more at https://docs.ipfs.tech/
If you have followed the previous steps in this tutorial you should now have the following things ready for making your connection to the Open Charging Network:
(TOKEN_A in OCPI Terms)
Access the full OCN technical documentation .
There are three methods of interacting with the OCN Registry:
ocn-registry get-node 0xEada1b2521115e07578DBD9595B52359E9900104
Where 0xEada1b2521115e07578DBD9595B52359E9900104
is the operator's public address.
The Public URL could look something like this: https://test-node.emobilify.com
Once connected to the registry, you can use the getNode method to return the operator's public URL:
We will first send a GET request to the OCN Node’s versions endpoint, using the TOKEN_A we received from the faucet. Note that curl requests can be imported into e.g. Postman or Insomnia if desired.
Do the same for this endpoint:
You should see a long list of OCPI version 2.2 endpoints implemented by the OCN Node. You will want to save these endpoints for future reference in your application’s database.
For now though, we just need one endpoint. Find the endpoint URL for the module identifier “credentials”. This will be the one we use to connect to the node:
The OCN Node needs to know where to contact us in case there is a message from another party that needs to be routed to us. It can also help to filter requests, in the case that we have not implemented a specific OCPI module that another party is requesting from us.
This will create an authorization token that the OCN Node should use to access our own endpoints. It is logged on start. Be sure to make a note of the authorization token as we will need it later.
Note also the PUBLIC_IP
. We want the OCN Node to be able to access these endpoints from the outside, so we should make sure that the server is reachable via the public IP we set.
Now we are ready to connect to the OCN Node.
The credentials request is detailed below. Make sure to replace the variables TOKEN_A
, TOKEN_B
and PUBLIC_IP
, PARTY_ID
and COUNTRY_CODE
where described:
TOKEN_A
should match the one generated for you by the faucet
TOKEN_B
should match the authorization token that you have created
PUBLIC_IP
should point to your publicly accessible web service
If the request is successful, you should see a response with OCPI status code 1000 and the OCN Node’s credentials returned in the body.
Now that we have connected to the Open Charging Network we can make use of OCPI to find point of interest data, issue remote commands at charge points and authorize RFID cards of any other OCPI party that is connected to the network.
The Open Charging Network allows you to exchange OCPI messages with anybody on the network with just one single OCPI connection, regardless of the OCN Node that you or your counterpart are connected to.
There are some cases in which you want to restrict the list of parties that can communicate with you. For this, the OCN Node provides you with a white- and blacklisting module, called OCN Rules.
Note: This service is an optional feature that needs to be enabled in your own OCN Node or by your OCN Node Operator.
Example: add party to blacklist
You can find a documentation of how you can use this service on the under OcnRules module.
See the source code for the OCN node Rules service .
Access the full OCN technical documentation .
In order to connect a service to the OCN, you must choose which OCN node you want to connect to, and know the node's public wallet address. You will then request a registration token (Token_A) from your selected node.
Access the full OCN technical documentation .
In order to connect a service to the Open Charging Network, you must decide which OCN Node you want to connect to.
To view public nodes available on the public test network and their wallet address, see "".
To view public nodes available on the public test network and their wallet address, see "".
Once you select a node operator that you want to connect to, you must:
Know the OCN Identity (wallet address) of that OCN Node Operator ().
Request a registration token (TOKEN_A in OCPI terms). Note that this token is only temporary and will become invalid once the registration is complete.
Access the Decentralized Data Hub and on Github
Access the on Github
Onboarding and issuing roles to organizations, systems, assets and users with DIDs, via the
Defining
Defining (e.g. self-hosting clients, exposing APIs)
Establishing between participants
If you are using the on GitHub, you can check the Public URL of your selected OCN Node by doing this:
You can find documentation on how to install and use the library .
Please visit the for further details about this step.
Use the documentation provided to connect to the OCN Registry using the Java library.
You should see a JSON response with OCPI status code 1000. The response data will tell you that version 2.2 can be found at .
During the credentials handshake, the OCN Node will attempt to request our own versions and endpoints, just as we did before in
If you have not already done so, we can spin up a quick server and execite a node script that will display our versions and endpoints as follows (note: requires , and ):
PARTY_ID
and COUNTRY_CODE
refer to the same OCPI credentials that you used
After you have the public address of your public node and your registration token, you are now ready to create / update your OCN Identity on the OCN Registry. Follow the steps provided here:
In order for your backend service to be OCN-ready, it must:
Implement the OCPI 2.2 API, the shared communication protocol for the OCN
Implement the OCN Notary in order to sign and verify OCN messages
Access the full OCN technical documentation here.
The OCPI protocol is the common communication protocol for the OCN. Each OCN node implements the OCPI 2.2 API (see, for example, the Kotlin implementation of the OCPI 2.2 API for the OCN node here), and every backend-service that communicates with an OCN node must also implement the OCPI 2.2 API.
Using the OCN Bridge is an alternative to implementing the full OCPI 2.2 API in your backend service. The OCN Bridge provides an OCPI interface using pluggable backend APIs. You can instantiate an instance of the Bridge, which will proxy your requests and responses with other OCN parties.
In addition to the OCPI 2.2 implementation, the OCN Bridge also provides services to interact with an OCN node (i.e. register with a node, get connection status to a node) and the OCN Registry.
Examples:
You can view documentation on how to to implement the OCN Bridge here.
The OCN Bridge simplifies the implementation of the OCPI interface, but it is not required to use in your backend service. Note that the OCN Bridge can only be implemented in JavaScript environments.
The OCN Notary is a package that enables the verification of OCN signature, which are used to sign and verify OCN requests using public/private key-pairs.
Taking a cue from the blockchain community, we have developed a message signing and verifying system for the Open Charging Network.
Under the hood it uses the Elliptic Curve Digital Signature Algorithm (ECDSA) as implemented by Ethereum. The signature itself holds a JSON Object containing all the necessary data for the recipient to verify the data it is receiving.
Not only do requests need to be signed, but responses too.
For requests, the signature is appended to the outgoing OCPI 2.2 headers:
Authorization: Token 0ea32164-515f-418b-8bef-39f3817ea090
X-Request-ID: 71d62c5b-5017-493e-be00-3f5ad4e34fff
X-Correlation-ID: 9881b6f7-63aa-40d2-b9c2-d6daa69c11fb
OCPI-From-Country-Code: CH OCPI-From-Party-Id:
MSP OCPI-To-Country-Code: CH OCPI-To-Party-Id:
CPO OCN-Signature: eyJmaWVsZHMiOlsiJFsnaGVhZGVycyddWyd4L (truncated)...
For responses, the signature is appended to the outgoing OCPI 2.2 JSON response body:
{
"status_code": 1000,
"data": { "result": "ACCEPTED" },
"timestamp": "2020-03-02T12:48:33.005Z",
"ocn_signature": "eyJmaWVsZHMiOlsiJFsnaGVhZGVycyddWyd4L (truncated)..."
}
The idea is that the recipient can use this signature to verify that the message has been signed correctly and has not been modified by an unauthorized party.
For the OCN to function properly, there are cases where an intermediary (i.e. an OCN node) needs to modify the request/response. Such an example would be the response_url
in the JSON body of requests made to the receiver interface of the OCPI commands module. As the recipient does not have access to the response_url
defined by the sender, the OCN Node must modify the value. In an OCN signature, this is known as “stashing”. The signature object contains the history of rewrites, with the previous signature being stashed by the party modifying the data. When a recipient then verifies a signature, the rewrites are also verified.
Let’s take a closer look at what the signature actually is:
interface Signature {
val fields: Array val hash: String
val rsv: String
val signatory: String
val rewrites: Array
}
interface Rewrite {
val rewrittenFields: Map<String, Any?>
val hash: String
val rsv: String
val signatory: String
}
The signature itself contains everything needed to verify the most-recent version of the sent data, i.e. by the sender or OCN node depending on whether any values needed to be modified. Provided is a list of jsonpath fields which can be used to recreate the message as signed by the sender, with the original order of values preserved. The values are hashed using keccak-256, as implemented by Ethereum. The resultant hash is actually the message which is signed. The RSV is the signature, produced by ECDSA using an Ethereum wallet’s private key. The signatory refers to the address of the wallet that was used to sign the message.
The list of rewrites contains an object containing the previous hash, rsv and signatory. It also allows the original message to be recreated by storing the fields which have been rewritten. For example, a commands receiver request might have the following rewrite by the OCN node:
1Rewrite( 2 rewrittenFields = mapOf("$['body']['response_url']" to "https://emsp.net/ocpi/2.2/sender/commands/START_SESSION/acfbb8d2-bd49-4837-97e2-d2c38f6bae55"), 3 hash = "0x1ce93f156bc5b3a5c26c5f2499db7bfa2b38c37fd32616fc6487175b86f41eb2", 4 rsv = "0x16e8b9c4e44f4646235fca85a594b5a31057930676d338d111ae985a4f0d9d4214705a0a2ae18c4dfd014581e96eb4625137a937853d4b2d17a0f3a22750f6ac1c", 5 signatory = "0x25e4fca0a0e5107d06d71ed78f687827208d5ff9" 6)
Of course, the signatory of both the OCN Signature and its rewrites should be independently validated. The verification of the signature only tells us that the message was signed by the signatory provided. The signatory itself could be any Ethereum wallet address. The address of both the original sender and their OCN node can be found in the OCN Registry[link to repo]
.
Now that we know how the signature functions, how do we actually use it? Enter the OCN Notary.
The OCN Notary implements the above Signature and Rewrite interfaces. It can deserialize an incoming OCN Signature and verify its contents. It can be used to sign an OCPI request, and likewise to stash/rewrite values in a request.
Currently the Notary library is available as an NPM package and as a Maven package for languages targeting the JVM. See the OCN Notary repository to find more information for each package.
You can find the API specification document in the OCN Node repository, here: Open API 3.0 specs
Using this specification, it is possible to generate client code and test implementations. For more information, see https://swagger.io/docs/specification/about/.
Note that this document was generated using unmodified source code in the master branch. As such, certain features of the specification format might be missing, such as examples for HTTP requests and responses.
The OCN Service Interface enables third-party services (such as billing, settlement, location data enrichment) to offer their products to the OCPI community by accessing communication between two OCPI parties on the Open Charging Network without the need for endless API development work.
This is done using OCN Permissions, and requires no additional integration work to be done by the OCPI parties.
It reduces the cost for integration work beyond the EV roaming use-case, helping everyone involved climbing the API mountain of Electric Vehicle charging.
We consider this as crucial to a seamless mass-consumer experience and an efficient EV charging value-chain.
A detailed description of the benefits and functionality of the OCN Service Interface can be found on our Medium blog (based on a billing example)
Access the full OCN technical documentation here.
Learn how to connect your OCN Service to the OCN and to define what OCPI-based information your service needs from OCN Parties / Service Users (OCN Permissions). Get started here.
Learn how to sign up for an OCN Service by agreeing to OCN Permissions. Get started here.
To get started with the OCN Service Interface and to see how the above given example works in action, see our OCN Demo. It mocks a full set-up of an Open Charging Network with two OCN Nodes, two CPOs, one eMSP and one billing service and allows developers to run through the scenario outlined in this article. Get started here.
The Production Network is the live network of the Open Charging Network. Services and features should only be used in a production network after performing robust quality assurance environment.
Access the full OCN technical documentation here.
The Energy Web Main Network (mainnet) is the production network of the Energy Web Chain.
The OCN Registry for the main network can be found under the following public key: 0x184aeD70F2aaB0Cd1FC62261C1170560cBfd0776
You can view transactions and the log history for this contract on the Block Explorer here. If you're unfamiliar with the Block Explorer, you can read more here.
Follow the steps outlined in the "Connect your Service to an OCN Node" in order to connect your service to one of the nodes listed below.
The following test OCN production network nodes are currently known to Energy Web Foundation:
eMobilify GmbH with OCN-Identity 0x34F160573b96D3Db5928Ae804D7d99DdD0aF222c
Reach out to eMobilify GmbH via info@emobilify.com to get connected.
eMobility Easy with OCN-Identity 0x79d2D88A1F668296c96150139366ff507eFeD618
Reach out to eMobility East via info@emobility-east.de to get connected.
Follow the steps outlined in the "Connect your Service to an OCN Node" in order to connect your service to one of the nodes listed above.
For the running of a production node, we advise that a few extra steps are taken. These include configuring HTTPS, enabling message signing, and running against a relational database.
You can see all OCN node configuration settings here.
Running the OCN Node in production mode (by default or with the configuration setting ocn.node.dev=false
) will require HTTPS. On startup in this mode, the OCN Node will look to see if HTTPS is enabled and properly working. If not, the node will shutdown.
We recommend using an Nginx reverse proxy and Let’s Encrypt certificate, but other solutions are not discouraged.
This feature allows recipients to verify the integrity of the data they are receiving. When the configuration setting ocn.node.signatures=true
, request senders should include an OCN-Signature
header that all entities that the request passes through (i.e. OCN Nodes and the recipient) sign to verify that the data has not been modified without consent. Likewise, for responses, an ”ocn_signature”
property should be placed in the JSON response body by the recipient.
Read more about OCN signatures here.
In some cases an OCN Node will need to modify data (typically to make URLs work for recipients). The signature can be modified by an OCN Node, but they must state the properties that they changed, and sign any new data. More information about message signing and verification can be found here.
By default message signing is turned on, but it can also be set with ocn.node.signatures=true
if it is not.
The default dev
properties configuration file only connects to an in-memory database, for ease of quickly testing the OCN Node. When running a Node on the test or production environment, a database should be set up to persist data across restarts. The example application.prod.properties
file provided with the OCN Node provides the configuration necessary to use PostgreSQL.
If necessary, the OCN Node can be load balanced. To do so, the nodes operating under the load balancer should have the same configuration:
The operator should also list the load balancer as the domain name using the same private key in the registry listing:
The OCN allows you to have simple, cost-efficient and secure technical connections to other EV charging players like Charge Point Operators and eMobility Service Providers. To run your EV charging service in production, you may need to enter into different legal relationships.
You might want to consider establishing the following agreements when setting up your charging service:
The OCN Node is responsible for your technical connection to other parties on the OCN. If you are not running your own OCN Node, but using the OCN Node of a third party (OCN Node Operator), you might want to sign a Service Level Agreement (SLA) with the OCN Node Operator. The agreement should make sure the OCN Node is hosted properly and has a high uptime.
Engaging with other parties on the Open Charging Network (like charge points or electric vehicles) requires in many cases a formal legal relationship between you and your counter party. An eRoaming Agreement stipulates the terms and conditions for the eRoaming connections between you and your counter party.
The E-Mobility Dashboard is in a beta release, and is not recommended for production applications. The purpose of making the dashboard client publicly available is to provide an example of how the OCN can be used to develop new applications.
The EV Dashboard is an application which aggregates OCPI data (via the OCN) and Blockchain data for both EVs and charge points. It also facilitate the request and issuance process for credentials relating to a flexibility market.
The dashboard client is available on Github at
{coming soon}
An open and decentralized communication network for digital eMobility services.
The Open Charging Network (OCN) is a decentralized eRoaming hub.
Using the Open Charge Point Interface 2.2, the OCN provides the network for communication between Charge Point Operators (CPOs), eMobility Service Providers (eMSPs), and other industry players involved in EV charging services.
The primary purpose of the OCN is to make technical connection between these EV charging industry players as simple and secure as possible, without creating technical and commercial lock-in effects.
The two primary actors are eMobility Service Provider (eMSP) and Charge Point Operator.
eMobility Service Providers (eMSPs) provide EV drivers with network access to electric vehicle charge points, typically through software applications and platforms. Their primary end-user is the EV driver.
Charge Point Operators (CPOs) install and manage the physical charge point operation infrastructure and the network operations that allow for EV-charging. Their primary end-users are e-MSPs, who in turn make these charge points available to EV drivers through their products and services.
You can see a full list of roles in the OCPI 2.2 documentation 2.3. EV Charging Market Roles.
The OCN is made up of a distributed network of server nodes running the OCN Node software. These nodes share a registry that stores network participant data, which exists as a smart contract that is deployed on the Energy Web Chain.
Below you will find an overview of OCN functionality and technical components, as well as how to get started using the OCN.
Access the full OCN technical documentation here or download the PDF below:
The OCN supports all use-cases described in the OCPI 2.2 protocol, including:
Authorization
Reservation
Tariff Information
Billing Stating Charge Point Information
Real-time charge point status information
Real-time charge session information
Charge Detail Record (CDR) information
Remote start/stop
Smart charging
Calibration law (eichrect) support
Platform monitoring
The OCN implements the Open Charge Point Interface (OCPI) 2.2 protocol. This protocol provides a common communication infrastructure for e-mobility service providers, Charge Point Operators and other market participants involved in supplying and delivering electric vehicle charging services.
These actors implement the OCPI on their back-end IT infrastructure.
The OCPI protocol can be used for peer-to-peer (bilateral) communication, but is more widely used as a communication hub that connects multiple CPOs with multiple eMSPs.
This allows end-users to, for example, locate and use EV chargers that are managed by one CPO, even if they are using an application created by a different CPO or eMSP. It provides a broader network of access to services and charge points that are critical for eRoaming.
The OCPI is broken down into modules that provide the protocol's core functionality, which includes:
Bilateral (peer-to-peer) and multilateral communication
Real-time information about charge point locations, availability and pricing
Exchange of data related to charging services (i.e. Charging Data Records)
Mobile access to Charge Points
Access the full OCPI technical documentation here or download the PDF below:
The OCN performs the role of communication hub as described by the OCPI 2.2, meaning OCN nodes handle the communication and message routing between relevant parties (CPOs, eMSPs, service providers).
The primary difference between the OCN and traditional hub networks is that the OCN is an open and decentralized network:
There is no centralized server that participants must connect to in order to use the network. The OCN is comprised of a distributed network of server nodes, and anyone is able to run or connect their service to a node. Nodes are responsible for brokering messages between parties.
There is no centralized database for storing participant user information. This data is stored in a smart contract on the Energy Web Chain, which is a public, decentralized blockchain. Anyone is able to register with this contract, provided they have required information. The OCN provides a whitelisting/blacklisting permissioning system to manage messaging preferences.
In the context of the OCN, a 'node' is a server running an instance of the OCN node software. Each node of the OCN forwards OCPI and OCN messages between parties based on a routing system and a shared registry that is anchored on the Energy Web Chain in a smart contract. As mentioned above, these parties are typically Charge Point Operators or eMobility Service Providers.
A node consists of a message broker, blockchain wallet, and connection to an Energy Web Chain node. The network of nodes together constructs the Open Charging Network.
Anyone can run a node if they choose, or connect to a node remotely.
OCN parties (those who are using the network - eMSPs, CPOs, third party service providers) are identified in the registry smart contract that is deployed on the Energy Web Chain. Every node on the OCN has access to this smart contract.
A participant is identified in the Registry by their public key, which is mapped to the public url of the OCN node that they are registered with:
Users can interact with the Registry smart contract to fetch, set or update their registered node or their party information.
Parties are required to sign messages that they send through the OCN with their private key as a means for security and verification. Learn more about how to create a public/private key pair and register as an OCN party here.
Most implementations of OCPI are centralized applications, where a third-party platform provides the 'hub' network connection between multiple eMSPs and CPOs that enable actors to send and receive information.
This approach brings certain advantages and convenience, but also creates commercial and technical limitations:
Participant identities are siloed within a network, creating a lock-in effect to that specific network
Network service providers can choose to not provide particular services on a proprietary platform, creating commercial restraints for the network's users
Centralized networks are typically less resilient and scalable than decentralized networks
Participation can be restrictive due to cost or commercial agreements
A decentralized, open source architecture provides a solution for some of these challenges:
Network participant identities are accessible to anyone on the network through a public, shared registry, reducing network and user silos.
Anyone can register and use the network for free. (Read more about how to create an OCN identity here)
Anyone can run a node. This makes the network scalable, resilient, and reduces potential points of failure. Read more about how to run a node here
The OCN is open-source. Anyone can build applications and provide services on top of the network for all to use. Read more about the OCN Service interface here
To get started with the OCN, you first need to create your own OCN Identity. Follow the steps outlined here: Create and manage an OCN Identity.
To connect your EV charging service to an OCN Node (as a Charge Point Operator or an eMobility Service Provider), follow the steps outlined here: Connecting an OCPI/OCN Party to a Node.
To operate your own OCN Node, follow the steps outlined here: Run an OCN node.
To provide a service like settlement, payment, smart charging, etc. (OCN Service) to OCN Parties (Charge Point Operators, eMobility Service Providers, etc.), follow the steps outlined here: Use the OCN Service Interface.
Provides an entry point to the network, which enables communication with other eRoaming parties using the Open Charge Point Interface 2.2.
Repository: https://github.com/energywebfoundation/ocn-node
A pluggable OCPI API interface for eRoaming parties with no OCPI API.
The OCN bridge can be used by CPO/eMSP backends to implement the OCPI protocol, which is a required step in connecting a backend to an OCN node, however it is not required to use the OCN Bridge to do so. Manages the OCPI interfaces, connection to an OCN client and registration with the OCN registry. JavaScript implementation only.
Repository: https://github.com/energywebfoundation/ocn-bridge
The shared address, identity and permissions system of the OCN.
The OCN Registry is a smart contract on the Energy Web Chain that contains important identifying information about registered OCN Nodes, Parties and Services. It acts as the shared address, identity and permissions system of the OCN.
Repository: https://github.com/energywebfoundation/ocn-registry
Utilities to securely verify and sign OCN messages using public/private cryptographic key-pairs.
Currently targeting JavaScript and JVM only.
Note that the OCN Bridge already implements the OCN Notary. If you are connecting a party to an OCN node, and you are not implementing the OCN Bridge, you will need to implement the OCN Notary in your backend setup.
Repository: https://github.com/energywebfoundation/ocn-notary
Common tools for aiding development of applications built on top of the OCN.
You can run a mock E-Mobility Service Provider (MSP) or Charge Point Operator (CPO) with these tools, which can be helpful for local development. Uses the OCN Bridge as a dependency.
Repository: https://github.com/energywebfoundation/ocn-tools
The Open Charging Network is a community project by and for the Electric Vehicle Charging community. Its mission is to provide the EV Charging industry players an open, secure and decentralized network for digital interoperability. This is why the core components are developed open source under the .
The development of the Open Charging Network is driven and steered by the non-profit Energy We Foundation. Many users and community members are contributing to it in the form of feedback, raised issues, pull requests and dedicated working groups. This article should provide you with some guidance on how you can contribute to this project.
Access the full OCN technical documentation .
The production-ready version of every Open Charging Network component can be found in its MASTER BRANCH
Development of each component can be found in its DEVELOP BRANCH. Pull requests should therefore generally derive from the develop branch, which will be eventually merged into the master branch to coincide with the release of a new version.
Bare in mind that new features that are big enough may warrant their own feature branch so that multiple contributors can work on them before being merged into the development branch.
The current state of development is made transparent with a maturity model, which describes the current and planned feature set:
Monthly Developer Community Calls are being hosted to align the development of all software components. Anyone is invited to join. Learn more about it
If you need support in using or contributing to the Open Charging Network, use our .
Before we can include your contributions to the Open Charging Network code, you need to give us permission. As the author of any creative work (including source code, or documentation), you control the copyright for that work. Energy Web Foundation Foundation can’t legally use your contribution unless you allow us to.
Please take the following steps so that we can include your work:
Your sign-off certifies that you are either the author of the contribution or have the right to submit it under the Apache 2.0 license used by the Share&Charge project. The sign-off is done by adding the following line to your source code:
You must use your real name. Pseudonyms or anonymous contributions are not allowed.
If you set your user.name
and user.email
as part of your Git configuration, you can sign your commit automatically with git commit -s
.
The full text of the DCO is:
You can contribute fixes to bugs or new features by sending via the GitHub repository. Using the GitHub UI, a pull request can be initiated from a branch in a fork of repository.
To manage this process, we use a mechanism called a popularized by The Linux Foundation. The DCO is a legally binding statement that asserts that you are the creator of your contribution, and that you license the work under the .
More tips on how to sign-off your work with Git can be found on this website:
If an OCN user wants to make use a particular OCN Service, it has to agree on to the Service's permissions. The OCN Node tied to the customer will automate any such required permissions, lessening the cost of integration with a service
To make use of an OCN OCN Service via the OCN Service Interface, make sure the following pre-requisites are met
Your preferred OCN Service is connected to the OCN
You are now ready to give the OCN Service its required permissions.
Learn more about how to do that on our OCN Registry repository.
Access the full OCN technical documentation here.
An OCN Service Provider develops and provides OCN services that can be used by CPOs, eMSPs and other parties to improve their charging services - such as contracting, billing, payment systems etc.
The OCN Service is - similar to any other OCPI role - an OCN Party. We make this distinction from other "Services" that might only require customers to send OCPI messages (including custom OCPI modules) directly.
To offer your OCN Service via the OCN Service Interface, make sure the following prerequisites are met:
Now you are ready to publish your OCN Service on the OCN Registry.
An OCN Service is an OCPI party that requires additional permissions from their customers. Such permissions could include the forwarding of session or charge detail record data, for example in a payment service.
Once a customer/user has agreed to the Service's permissions, the OCN Node tied to the customer will automate any such required permissions, lessening the cost of integration with a service.
To be granted the aforementioned permissions, you must then list your OCN Service and the permissions required in a separate smart contract, entitled "Permissions". Thereafter, a user can make their agreement explicit in the same smart contract. Learn more on how to list your OCN Service on our OCN Registry Repository.
You can find a full list of currently implemented OCN Permissions here.
Access the full OCN technical documentation here.
Possible credential metadata
In a verifiable credential ecosystem, there are various metadata that are useful for effectively using the data in the credentials. This page aims to describe possible metadata specifications and technologies that may be used with credential data.
Note: Not all of the following metadata is available for all credentials within the Energy Web credentials ecosystem.
Data semantics refers to the meaning of the data. This includes semantic disambugation (know precisely what a term is refering to) as well as data descriptions and relationships.
Linked Data provides semantic disbiguation by requiring that terms be IRIs.
Linked Data context maps terms to IRIs. This allows JSON-LD documents to be written in more concise, readable manner, without sacrificing accuracy.
The VC Implementation Guide also has instructions on how to create new contexts for verifiable credentials.
Linked Data can also be used to provide further information about the semantics of a term. This is provided in a data vocabulary or ontology.
For example, the RDF Schema comment property can be used to provide further description of a resource.
Note that vocabularies can be used to infer data validation but this is non-standard and violates the open-world assumption of W3C ontology languages.
This point is made in SHACL and OWL Compared
Although data validation is an important practical use case for the RDF stack, until SHACL came around, there was no W3C standard mechanism for defining data constraints. Over time, people became creative in working around this limitation. Many tools simply decided that for all practical purposes, the open-world and non-unique-name assumptions should simply be ignored. OWL-aware tools including TopBraid and Protégé, for example, provide data entry forms that restrict users from entering more than one value if there is a corresponding owl:maxCardinality 1 restriction, or require the selection of a specific instance of ex:Person if that class is the rdfs:range of the property. The GAIA-X FAQ makes a similar point SHACL shapes are not an ontological models. They serve a different purpose. Ontologies describe concepts and help in inferring additional knowledge. Firstly, the W3C ontology languages follow the Open World Assumption, secondly SHACL follows the Closed World Assumption. If a self-description is missing an attribute, it is an error in the shape validation (and that’s how it should be!). From the ontology’s point of view, the attribute could be defined somewhere else in the WWW, if not in the JSON-LD file at hand (but this extremely decentralised view is not compatible with Gaia-X’s trust-building approach).
Data structure validation is used to validate that data, for example, contains specific properties or that properties have specific values.
There does not seem to be a single way of describing data structures in the Verifiable Credentials ecosystem as different methods have different tradeoffs.
For verifiable credentials, the schema of a credential can optionally be linked using the credentialSchema property.
JSON Schema can be used to describe the precise shape required by the a credential.
The JsonSchemaValidator2018 credentialSchema
type
is defined in the Verifiable Credentials Vocabulary
SHACL is the W3C standard for validating RDF graphs.
SHACL is being used by GAIA-X for their self-descriptions.
To check whether the claims in a Self-Description follow all constraints, such as including all mandatory attributes, the claims are validated against a shape. Technically, these shapes follow the W3C Shapes Constraint Language (SHACL). The claims themselves are represented as an RDF graph, serialised in the W3C JSON-LD format, where JSON is a data interchange format widely supported by programming languages, and JSON-LD (LD = “linked data”) makes it compatible with RDF.
JSON-LD Schema is a pre-alpha project that attempts to reconcile the trade-offs of JSON Schema and SHACL.
It notes:
JSON-LD documents can be seen from two points of view: as regular JSON documents following certain conventions or as RDF graphs encoded using JSON syntax. Validation mechanisms indeed exist for both ways of looking at the information in a JSON-LD document, but each of them has important drawbacks when working with JSON-LD:
JSON-Schema can be used to validate JSON-LD as plain JSON documents. However, the information in a JSON-LD document can be encoded through multiple, syntactically different, documents, so it is hard to write a generic JSON-Schema validation without going through a normalisation step, and even if the validation is written for a normalised JSON-LD document, the description of the validation becomes verbose and complex to write, relying, for example, on the usage fo fully expanded URIs. There is also the issue of the implications for the validity of the RDF information encoded in the document when we are just validating the JSON syntax.
SHACL can be used to validate the RDF graph encoded in the JSON-LD document. SHACL is powerful and expressive but difficult to write and learn, especially for users that do not want to work with JSON-LD as an RDF format. Additionally, the performance of SHACL validators is far from the performance of syntactical JSON-Schema validators
The Wallet Rendering specification describes how a credential can be displayed.
Monthly Developer Community Calls are being hosted to align the development of all Open Charging Network software components.
Anyone is invited to jointly discuss current status of development, upcoming releases, development contributions from the community, and other related topics.
Calls will take place every second Tuesday of the month via the video conferencing platform Zoom. The call will be recorded and published on this page.
Join the call via Zoom:
Meeting ID: 819 3980 1778
Passcode: 009142
Dial by your location
13.04.2021 - Watch recording on Youtube
09.03.2021 - Watch recording on Youtube
09.02.2021 - Watch recording on Youtube
12.01.2021 - Watch recording on Youtube
08.12.2020 - Watch recording on Youtube
10.11.2020 - Watch recording on Youtube
13.10.2020 - Watch recording on Youtube
08.09.2020 - Watch recording on Youtube
11.08.2020 - Watch recording on Youtube
Being part of the Open Charging Network requires participants to set up and manage a self-sovereign identity (OCN Identity).
A 'self-sovereign identity’ is an identity where an individual maintains control over their own credentials, as opposed to having them stored in a centralized server by a third-party. A user's self-sovereign identity could, for example, be partially derived from their cryptocurrency wallet address, which the user maintains control of at all times.
You can read more about self-sovereign identity in our documentation here.
Secure identities are critical for the automated routing of OCPI-messages, and for being able to use applications on top of the Open Charging Network.
Below are details on how to complete the steps necessary to create your OCN identity:
Select your country_code and party_id* (and register at your country’s national registry**) (not required for node operators)
Access the full OCN technical documentation here.
* This step is NOT required for OCN Node Operators
Your unique identity on the Open Charging Network is based on an eMI3 compliant name constructed from a country_code (e.g. “CH”) and party_id (e.g. “SNC”).
Today, in many countries, national registries exist to ensure uniqueness of IDs. Please refer to the OCPI documentation for further information both on the Provider and Operator abbreviation as well as for a list of existing authorities: OCPI 2.2 Documentation.
Note that currently not all countries have a national registry. To see a list of countries that currently have a national registry, see the OCPI 2.2 documentation, section 2.5. Provider and Operator abbreviation.
The Open Charging Network uses a cryptographic wallet structure to provide security and unique identities. Wallets are used to construct your OCN identity, and to sign (authorize) actions on the OCN, such as sending and receiving messages. Your wallet (or private/public key-pair), along with your country_code and party_id (Step 1) form your identity on the Open Charging Network.
As such, you must have an Ethereum-compatible wallet to create your OCN identity. If you do not already have an Ethereum-compatible cryptocurrency wallet, we recommend using MetaMask.
You can read more about what cryptocurrency wallets are, and how they are used in the context of the Energy Web Chain here.
A public-private key pair is generated programmatically by a wallet through a cryptographic algorithm. The algorithm produces a private key and a corresponding public key. The public key can be exposed and shared with others (it is used to identify participants in the OCN Registry smart contract), but the private key should not be shared with anyone. The algorithm used to generate the key-pair makes it virtually impossible for any outsider to guess your private key.
After completing Step 1 and Step 2, you are now ready to register your OCN Identity with the OCN Registry. This registry serves as the address book for all OCN Identities.
The OCN Registry is implemented as a smart contract deployed on the Energy Web Chain. Anyone is allowed to register with the OCN Registry.
As a neutral platform, the Energy Web Foundation holds the administration key to this smart contract. The initial implementation requires a centralized authority to have administration rights (e.g. for updates). As the governance of the OCN Registry is a crucial piece to ensure openness of the Open Charging Network, Energy Web Foundation will further develop this governance together with the community (e.g. enable decentralized administration).
There are several ways to manage your OCN Registry entry. We recommend using the Command Line Interface, Java or TypeScript library provided in the OCN Registry repository on GitHub.
The required information varies according to your role within the network and whether you are running a node or not.
You will need to determine your party's role. The most common roles are "CPO" (Charge Point Operator) and "MSP" (Mobility Service Provider).
You can see a full list of supported roles within OCPI 2.2 in the documentation at 6.4.2 Role.
Required Information
Country_code
Party_id
Role (e.g. "CPO" or "MSP")
OCN Node Operator wallet address
Public URL of OCN Node
Optional Information
As a a final preparation step, you need to fund your Ethereum wallet that you created in Step 2. The funds will be used to enter our data into the registry. The transaction cost associated with entering the data into the registry is very low - less than 1 EWT.
Depending on whether you want to connect to the Energy Web Public Test Network (Volta) or the Energy Web Production Network (Energy Web Mainnet) there are two ways of getting funds for your wallet:
After funding your wallet, you are now ready to make OCN Registry entries. Please follow the technical instructions on the OCN Registry repository on GitHub "Listing a Party" for more detailed steps on how to do this using the CLI library, TypeScript library or Java library.
Your OCN Identity is your key to participate in the Open Charging Network. Your private key from your cryptographic wallet (Step 2) is required for managing your OCN Registry entry (your self-sovereign identity). Keep your private key safe! It is advised to follow best-practices for secure storage and usage (similar to API Token Management, management of cryptocurrencies, etc.)
If you have any issues with your OCN Identity, please reach out to us.
This guide demonstrates how to launch a Digital Spine Integration Client (DSI Client) instance from App ‘Digital Spine Integration Client by EnergyWeb’ on the Azure marketplace.
The public Digital Spine Integration Client and associated message broker service is currently offered free of charge for Energy Web Member organizations and on a free trial basis for non-members. Please note that the message broker is rate-limited in the free version, and thus may not be suitable for high volume / high frequency data exchange use cases. For assistance in configuring a custom DSI Client and Message Broker solution for your organization, please fill out this form.
Things to know before you start:
Each section of this guide is demonstrated in a short video clip and accompanied with step by step instructions.
Integration and identity access management (IAM) for the DSI Client is performed with Energy Web's self-sovereign identity technology stack (i.e DIDs and verifiable credentials). To manage your DID you will need a Digital Wallet and Metamask, with a minimum balance of 0.1 EWT, to execute IAM transactions in the Switchboard application including requesting roles and publishing credentials to your DID document. You can read more about Switchboard and IAM processes here.
NOTE: Sending and receiving messages via the DSI Client Gateway does not directly use or interact with the Energy Web Chain; you do NOT need EWT to send and receive messages. EWT is required only for the IAM and enrollment processes.
You need an active Azure subscription to access the DSI Client via the Azure marketplace. Additional cloud providers and self-hosted options will be available later in 2023.
You will need access to one of the following Secret Engines, with full Read & Write privileges required:
- Azure KeyVault (Vault URI, Service principle’s appId, password, tenantid)
- Hashicorp Vault (Vault URI, access token)
To integrate the DSI Client with the Energy Web-hosted message broker, you will need to acquire and manage roles on Switchboard (https://switchboard.energyweb.org/). Metamask is used to log into the Switchboard dApp and sign transactions.
We recommend using Chrome (or Chromium-based, e.g. Brave) or Firefox desktop browsers to interact with the Switchboard dApp. To download MetaMask plugin to your browser, you can use the links below;
Chrome (or Chromium-based): https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn
Go to Settings > Networks and click Add Network button to add Energy Web Chain. Enter the details below to add Energy Web Chain as a new network.
Network Name
Energy Web Chain
New RPC URL
Chain ID
246
Currency Symbol (optional)
EWT
Block Explorer URL (optional)
You can also use ChainList to quickly add Energy Web Chain as a new network to your MetaMask. To use this tool, please follow this link and click “Add to MetaMask” button.
Select Energy Web Chain from the dropdown (by default, the Ethereum Mainnet will be selected) before navigating to the Switchboard dApp homepage.
1.1.a Funding Account
The Switchboard dApp does require users to use Energy Web Tokens (EWT) in order send transactions, sign messages or acquire credentials on the Energy Web Chain.
To learn how to acquire EWT in your wallet, click here
Azure KeyVault
Suppose you have a role-based-access-control service principle (sp) created, which is granted full Read and Write permissions to the KeyVault, your sp details may look like
You will need above details and the KeyVault uri on the resource creation page.
Learn more about
Hashicorp Vault
You just need
vault server url
The access token
Login to Azure portal and go to ‘Marketplace’ page.
On the marketplace page, search ‘energyweb’ in the search box as shown below:
You will see the ‘Digital Spine Integration Client by EnergyWeb’ in the search results.
Click ‘Create’ on the Offer tile. It will take you to the resource creation page.
Follow the user guide on the UI to fill in the required fields for ‘Basics’ and ‘Virtual Machine Settings’.
On the ‘Digital Spine Integration Client Settings’ tab, you can set the configuration for the DSI Client.
Most configurations are pre populated, you just need to select the desired application to integrate with from the `Application Name` dropdown .
There are 3 applications to choose from
Global Data Exchange
Greenproofs
Open Charging Network
If you want to run any other applications, you need to make sure the application is available on the EWC chain. Or feel free to contact digital-spine.support@energweb.org for assistance (responses are within 1-2 business days)
If you are an Energy Web member organization, you can also use the Member Slack channel #digital_spine.
At the 'Vault Configuration' put in the secret engine details, below is the example for KeyVault.
The VM you are creating must have access to the chosen Secret Engine from a network perspective.
Once all the required fields have been filled. You can proceed to ‘Review + create’ tab, you can double check all the inputs. Then click ‘Create’ to start creating the resources.
After a couple of minutes, the resource creation will complete. You'll find a Virtual Machine under the resource group.
On the VM’s overview page like below, the Digital Spine Integration Client can be accessed at the VM’s DNS in the browser.
2.2.a Visit Client Application
Open a browser and type in the DSI VM’s DNS; you will be directed to the DSI Client landing page as shown below:
2.3 Configure DID on the DSI Client
Reminder: Integration and identity access management (IAM) for the DSI Client is performed with Energy Web's self-sovereign identity technology stack (i.e DIDs and verifiable credentials). To manage your DID you will need a Digital Wallet and Metamask, with a minimum balance of 0.1 EWT, to execute IAM transactions in the Switchboard application including requesting roles and publishing credentials to your DID document. You can read more about Switchboard and IAM processes here.
NOTE: Sending and receiving messages via the DSI Client Gateway does not directly use or interact with the Energy Web Chain; you do NOT need EWT to send and receive messages. EWT is required only for the IAM and enrollment processes.
You will need to acquire the role of 'user' on your DID in order to enroll your DSI Client to the public message broker. Please complete this enrollment form for approval.
The DID will be the public address of the account you are using with your Digital Wallet and MetaMask.
The Energy Web team will review the enrollment request and grant approval within one business day of receipt.
On DSI Client landing page, enter the private key for your DID you will use for enrollment (note: the wallet address will be the DID) and hit ‘Import’.
To extract your private key for your Metamask account:
Click on the Account list dropdown, then click the kebab / three dot icon next to the account, then click 'Account Details'.
That will display a QR code with the Account address, and a button to "Show private key"; click that button and enter your password when prompted to reveal the private key.
Copy the private key and enter it into the form field in the DSI Client landing page.
Entering your private key at this step is a one-time configuration that is necessary to assign your DID to the DSI Client. When you enter the key in this step, it will be securely stored in the secret engine of your choice (i.e. Azure Key Vault or Hashicorp Vault). Energy Web will not have access to your key, and we will never ask you for it.
Be careful to never reveal, share, or paste your private key in any other steps within the DSI configuration and enrollment process.
It can take up to a minute for the DID to be verified and configured (assuming that your DID already has the role 'user'; if not, complete the enrollment form here).
If your wallet does not have sufficient balance (a minimum of 0.1 EWT is recommended) you may receive an ‘insufficient fund’ error message. To learn about transactions and transactions costs, click here; to learn how to acquire EWT in your wallet, click here.
You'll need to have a sufficient balance of EWT in your wallet to pay for gas fees associated with DID enrollment transactions in order to proceed; a minimum balance of 0.1 EWT is recommended. REMINDER: You will only need to pay transaction costs for the IAM and enrollment processes.
Once you have a sufficient balance of EWT to cover the transaction cost, the application will proceed to the next stage of access validation.
2.4 Enroll the DSI Client with DID
If your DID doesn't have the required 'user' role to the application you selected for the Integration Client at resource creation step. You'll see an ‘Unauthorized’ error.
To proceed, click ‘Enroll’ to submit the enrollment request.
Please complete this enrollment form for approval.
The Energy Web team will review the enrollment request and grant approval within one business day of receipt.
When the user role for your selected application is approved, you will see the status is changed to ‘waiting for role to sync’.
2.5 Manually sync role on Switchboard (dApp)
After submitting the enrollment request for your DID, the Energy Web team will contact you via email to notify you of approval. Upon receipt of the approval email, you can publish the newly issued role(s) to your DID document by following the instructions below.
In this guide, we use Metamask, it is the same process for other wallet option to logon dApp Switchboard. Make sure you have Metamask configured.
In a new browser tab, visit Switchboard (https://switchboard.energyweb.org/), click on the Use MetaMask button on the welcome screen of the Switchboard dApp to log in.
The MetaMask plug-in will pop up in the top right corner of the browser and request a signature to log in.
If you are logging in with a MetaMask account, you will be prompted to sign the message in the MetaMask Extension.
If you are logging in with a hardware wallet account (via MetaMask), you will also be prompted to connect to your hardware wallet and sign the message on that device.
After providing the signature, you will be logged in into Switchboard dApp.
The top right menu icon has a notification. Click to open, you will find one publication available.
Click ‘publish’, on the confirmation modal click ‘CONFIRM’.
The MetaMask plug-in will pop up in the top right corner of the browser and request a signature for the transaction.
Follow along to sign the transaction in Metamask, then you'll see the ‘publish is successful ‘ notification.
When the publish is completed, you can return to the the DSI Client browser tab.
This guide is based on the application name ‘marketplace.apps.energyweb.iam.ewc’, It is the same concept and flow for your chosen application
At the time of revisiting the DSI Client, it should successfully redirect you to the dashboard page. If not, check to make sure your Metamask extension is connected to the correct (enrolled) account. If the correct account is active, you may need to refresh the DSI Client landing page and re-enter your private key as described in the previous section.
You may see fewer items under the ‘Scheduler’ section at the first time you log in. Just wait a few moments and refresh the page, there should be more scheduled tasks shown, the time under the task names is when the task was recently completed
When you can see ‘Application refresh’ and ‘Topic Refresh’ with ‘Success’ status, you can navigate to ‘Topic management’ OR ‘Channels’ > ‘My apps and topics’ from the left navigation menu.
Your application will be shown on the list. There is one sample topic created for the application (*one is available at the time of writing, but additional topics will be added over time. You may see more topics available for your application).
If you click on the application, it will show you all the topics
You can also view the topic by clicking on it
Topic is a definition of the data schema. Which will be strictly validated during data exchanging.
You can learn more about topics here
Next we'll explain how to use the topic.
The DSI Client lets you easily create more sophisticated topics based on different business requirements.
You will need the ‘topiccreator’ role to manage(create/update/delete) topic/schema within an application scope.
Please contact digital-spine.support@energweb.org for ‘topiccreator’ role enrolment or other assistances.
You can have a better understanding about Digital Spine channels here. Few summarised Key points to bear in mind.
"Publish" type channel is for sending data and "Subscribe" type channel is used for retrieving data
Channels can be configured to enable one:one, one:many, and/or many:many communications by changing settings for who can receive or send data in the channel scope
Topics are used by channels, and it defines what kind of data can be send/retrieved to/from a channel, A channel can have multiple different topics
On the UI, from the left navigation menu, under ‘Channels’, navigate to the ‘Channel management’. Here is the section you manage all your channels
To create a channel, simply click ‘Create’ on the page.
In the pop-up modal, you can define the channel details.
The example below shows creating a ‘Messaging’ Publish channel named ‘demo.pub’; when you have defined your channel details click ‘Next’,
At the ‘Restrictions’ tab, you are able to restrict the recipients by `DID` or ‘Role’, this will make sure only defined recipients will receive messages from this channel.
In Energy Web ecosystem, DIDS and Roles have below format
EW main chain DID format: `did:ethr:ewc:WALLET_ADDRESS`
EW volta chain DID format: `did:ethr:volta:WALLET_ADDRESS`
EW role format: `ROLE_NAME.roles.APP_NAME`
Make sure you click the ‘Save’ button after you put in the recipient DID or Role. To add multiple recipients, repeat this step as necessary.
To proceed to the next step, click “Next”.
On the next screen, you will define what topics to add to this channel.
You can select your desired application from the ‘Select Application’ dropdown, then the available topics belonging to the application will be shown in the ‘topics’ dropdown, click on the topic to add, you can select multiple topics to this channel.
At the last step you can review all the channel details; if you need to revise any settings, click back. When you have confirmed all settings, click "submit" to create the channel.
After clicking ‘submit’, The channel will be shown on the channel list.
A ‘Publish’ channel is used to send data to other recipients. You will need a separate ‘Subscribe’ channel to receive data from others. You can create as many channels as necessary by following the above steps.
Creating a ‘Subscribe’ channel is exactly the same process as 'Publish' channel, but selecting the channel type ‘Subscribe’
And at the ‘Restrictions’ section, we can restrict whom we only want to receive data from.
For demonstration purposes, we restrict to only receive data from senders who has role ‘‘admin.roles.marketplace.energyweb.iam.ewc’
On the Topics tab, same concept as above publish channel, here we restrict what kind of data we want to retrieve from this channel.
And review all the details and submit our ‘Subscribe’ channel.
We should have both channels shown under ‘Channel management’
This is all about channel creating and how to implement a topic.
The above video demonstrates client A (DID ends 49Cc9) sends a message by API to client B (DID ends 64946), and client B successfully retrieved the message by API.
The Digital Spine Integration Client has an API swagger page, which shows you the list of endpoints available for integration.
You can access the swagger integration APIs page from ‘Integration APIs’ from the left side nav.
Click ‘Open’ Rest API.
On the swagger page, scroll down to the ‘Messaging’ section
You can find detailed information about how to integrate with those endpoints.
To post a message to the newly created ‘demo.pub’ channel, the example payload will be formatted as shown below:
You can POST above payload to the D.S.I Client’s endpoint `/api/v2/messages`
You can get all the payload info from the channel details on the D.S.I Client’s UI, click to open the 'demo.pub' channel from the channel list under ‘Channels’ > ‘Channel management’
Here are the channel and topic details
So payload info has below relationship with what is shown on the channel detail and topic detail modals.
fqcn
Namespace on Channel details
demo.pub
topicName
Topic Name
sample_topic
topicVersion
Version on Topic details
0.0.1
topicOwner
Namespace on Topic details
marketplace.apps.energyweb.iam.ewc
5.2 Example Get data from a Channel
To receive data from a channel, by following the documentation, You can retrieve data from GET endpoint '/api/v2/messages'
An example request path can be /api/v2/messages?fqcn=demo.sub&amount=10&topicName=sample_topic&topicOwner=marketplace.apps.energyweb.iam.ewc&clientId=demo_user
Query breakdown will be
fqcn = demo.sub
amount = 10
topicName = sample_topic
topicOwner = marketplace.apps.energyweb.iam.ewc
clientId = demo_user
The query information can also be retrieved from the channel detail as explained in the previous step.
Those are the main steps to get you started with the Digital Spine Integration interface, You can start communicating with other DSI clients integrated with the same application.
And contact us at digital-spine.support@energweb.org to acquire the 'topiccreator' role to create topics to test scenarios based on your business requirement.
The Open Charging Network is a decentralized implementation of the OCPI 2.2 hub concept. Unlike traditional, centralized hub architecture, the OCN does not rely on a centralized server - the network is made up of a distributed network of server nodes. Anybody can run an OCN node.
In the context of OCN, running a node means running and hosting an instance of the OCN node software.
There are several benefits to running your own node of the network.
From an individual perspective, running a node makes you less dependent on external service providers
From a network perspective, the Open Charging Network becomes more reliable the more nodes that are running
The following steps below help you to successfully set up and run your own OCN Node:
Access the full OCN technical documentation here.
Before running a node and connecting it to a local, test or production environment, it is recommended to become acquainted with how the network operates first.
For this, a demonstration of a network simulation with two OCN Nodes and mock parties (CPO and eMSP) has been provided. Please visit this page to learn more and to find the necessary repositories for running the demo: Examples
If you are familiar with the concept behind the Open Charging Network you can start the setup and configuration of your OCN Node. We recommend first running the node on the Test Environment before moving to Production.
Visit the OCN Node README page in the GitHub repository for a step-by-step guide and all necessary resources: OCN Node Repository
After you have set up and configured your OCN Node, you can now set up administration and access restrictions, and allow others to access your node using the OCN Node APIs.
The HTTP API Documentation for the OCN Node describes the available endpoints which can be used by administrators and parties.
Outside of the full OCPI v2.2 API, OCN Nodes provide additional features, such as the custom OCPI module, OcnRules, as well as ways for admins to restrict use and users to query the OCN Registry.
Every OCN Node is a crucial part of the overall Open Charging Network. As soon as you run your own node, you are responsible for keeping it up to date. This helps to keep the Open Charging Network efficient and secure.
The Energy Web Foundation is steering the development of all Open Charging Network Open Source components, and will release regular updates.
The release date of an update will be announced on our Gitter community at least two weeks before it will come into effect (be pushed from its DEVELOP BRANCH to the MASTER BRANCH). It is planned to keep the components downwards compatible at least one version, but this may not always be possible. Please make sure that you update your OCN Node within 24 hours after the publication of a new release.
The credential lifecycle in the IAM stack
This page documents the role and lifecycle of credentials in the IAM stack.
Credentials are documents that allow individuals to show that they possess certain accreditations (this is discussed further in depth below - 'Credentials Overview'). Credentials are traditionally document or paper-based, such as a driver's license or a passport, and are typically registered in a centralized repository under the stewardship of the issuing body.
Verifiable credentials are purely digital components that can be verified cryptographically. Verifiable credentials are a secure and self-sovereign alternative to traditional paper-based credentials or documents, which typically must be physically or electronically transmitted for verification, and have the potential to be intercepted, altered or tampered with.
In general, verifiable credentials do not rely on Decentralized Identifiers (DIDs) but they are often used together. If DIDs are used, decentralized ledger technology (i.e. a blockchain) can provide the public key infrastructure for the cryptographic verification.
The specification that defines verifiable credentials was established and is maintained by the World Wide Web Consortium (W3C). This protocol continues to evolve. Verifiable credentials are one of the three core pillars of self-sovereign identity, along with decentralized identifiers (DID) and distributed ledger technology.
See the W3Cs use cases and requirements for verifiable credentials here
Verifiable credentials are a key component of Energy Web's Identity, authorization and access management. In current use cases, credentials are used to authorize users' or assets' enrolment into applications and organizations. Each credential is associated with the subject's DID that is anchored on the Energy Web Chain. Energy Web's Switchboard application provides a user interface for creating, requesting, issuing and revoking role-based credentials. Energy Web's IAM libraries and APIs facilitate the full lifecycle of verifiable credentials. The Energy Web blockchain serves as the trust or verification layer for digital proof. This documentation provides references to these libraries, and to supporting W3C documentation that is used to guide and inform the development of Energy Web's IAM solution.
Click below to see a current diagram of Energy Web IAM architecture:
A claim is an assertion that is made about a subject. A claim could assert, for example, that a battery meets specific manufacturing standards.
A credential is a claim(s) made by an issuer about a subject. When the credential issuer makes a claim about a subject, they issue a verifiable credential. For example_,_ an issuer can issue a credential for a battery that asserts that it was manufactured on a specific date in a specific location.
In order for a credential to be verifiable, it must contain a proof mechanism and supporting information to evaluate the proof. The proof must be able to be verified through cryptographic (i.e. algorithmic) means, typically through a digital signature. Energy Web's IAM libraries support digital signatures of Ethereum-compatible wallets, such as MetaMask.
Proofs provide two primary functions:
To verify the authorship of a credential
To detect tampering or alteration to the credential/presentation
In the example of the battery mentioned directly above, the proof will verify that
The issuer is authorized to assert that the battery was manufactured on a specific date and in a specific location
That the credential data and digital signature has not been changed or compromised
Note that proof mechanisms do not validate the facts that the claim asserts (in the example above, the providence of the battery). It only verifies the issuer of the claim and the integrity of the claim's data over time (i.e. has the data been altered or tampered with).
There are two main proof mechanisms for verifying credentials, both of which are used in the IAM stack. These will be discussed further below.
External proofs, which are commonly expressed by JSON Web Tokens. An external proof is one that wraps an expression of the credential data model, such as a JSON Web Token. See the W3C JSON payload encoding standards for verifiable credentials here. Verifiable Credentials expressed as JSON Web Tokens in the IAM stack is discussed below.
Embedded proofs, in which the proof is included directly in the credential's JSON data. To be compatible with W3C Verifiable Credentials standard, the credential JSON must have a property of 'proof'. Verifiable credentials expressed as JSON/JSON Linked Data in the IAM stack are discussed below.
The Energy Web IAM stack provides API methods to request, issue, publish, verify and revoke credentials.
Our ecosystem offers persistence for credentials on the Energy Web blockchain, and off the blockchain using the decentralized file system IPFS.
Credentials that are persisted on the Energy Web Chain are referred to as 'on-chain' credentials
Credentials that are persisted off-chain are referred to as 'off-chain' credentials
The distinctions are discussed in the following section.
Note that whether a user chooses to persist credentials on-chain and/or off-chain, credential data is also persisted in the SSI Hub. SSI Hub facilitates credential exchange by persisting credential request and issuance messages
On-chain credentials are registered on the Energy Web blockchain in the Claim Manager smart contract. The contract source code can be found here. A credential is registered in the contract when the credential is published by the holder.
The Energy Web Chain is a public blockchain. This means that smart contracts and their data are public, and their public methods can be called by anyone. This is an important point of consideration when deciding whether to publish credentials to the blockchain.
There are currently two smart contracts deployed on the Energy Web Chain that are used for verifying and persisting verifiable credential data (for 'on-chain credentials' only). The source code for these contracts can be found in the @energyweb/onchain-claims
package.
Holds mapping of issued verifiable credentials; Provides methods for credential verification
Off-Chain credentials are not referenced on the blockchain. Off-chain credential data is persisted as a JSON web token on IPFS, a decentralized public filesystem. IPFS, like a blockchain, is a decentralized system and relies on a network of peer nodes to create a distributed system.
When a token is stored on IPFS, it has a content identifier (CID) that points to its location on the file system. This CID is linked to the credential's corresponding DID Document through a service endpoint. A service endpoint points to any service that supports or acts on behalf of a DID. The CID is used to fetch and resolve the full credential from IPFS when necessary.
DID Document data, including service endpoints, are publicly available on the Energy Web Chain. IPFS data is accessible to anyone who has the service endpoint that contains its location on IPFS. This is an important consideration when deciding to publish credentials to IPFS.
For each off-chain credential request, iam-client-library
issues two credentials of different format and proof type.
Both signature mechanisms can be performed by Ethereum-based wallets such as MetaMask.
A JSON web token is a common standard for transferring encoded, verifiable data between parties. The JSON web token payload is generated from the claim data.
Proof Mechanism: EIP-191 signature standard
Data Model: The JWT payload partially conforms to the properties established by W3C for verifiable credentials as a JWT. You can view these properties here.
Persistence: The issued token is included in an object that contains other data about the issued credential request. (Read more about claim issuance below). The token is persisted in the SSI Hub's database when the credential is issued, and persisted in IPFS when a credential is published by the subject. The credential's location in IPFS is referenced in the user's DID Document's service endpoints.
Proof Mechanism: EIP-712 signature specification. This allows the credential data to be displayed in a human-readable format when digitally signing the message:
See the W3C documentation on the EIP-712 signature here.
Data Model/Interface: The Verifiable Presentation interface conforms to W3C credential schema, which includes JSON-LD (JSON Linked Data) data format. JSON linked data ensure that credentials and presentations are universally machine readable and compatible. Read more about JSON-LD formatting in verifiable presentations and credentials in the W3C documentation here.
Persistence: The verifiable presentation is included in an object that contains other data about the issued credential. This object is persisted in SSI Hub database.
In addition to the above, there are a few distinctions to consider when deciding to register credentials off-chain or on-chain.
On-chain credentials can be read by any smart contract deployed on the Energy Web Chain, and thus used in many decentralized applications. This allows for greater application interoperability.
Off-chain credentials in IPFS do not require any transaction costs that are associated with a blockchain, and can be resolved by an IPFS client in any application.
A credential request occurs when a user requests to enrol to an organization or application’s pre-defined role. The role may have specified criteria that the subject must meet in order to take on the role. The user who is requesting to take on the role is the claim ‘subject’.
iam-client-library
contains high-level methods to initiate credential requests. These methods indicate whether a credential should be registered 'on-chain' or 'off-chain'.
Claim requests are persisted in the SSI Hub.
A user makes a request to the credential issuer to enrol into Organization A as a 'Battery Installer'. This role is pre-defined by Organization A, and has a designated set of issuers (each with a DID) who are authorized to approve and issue a credential for the 'Battery Installer' role. At the time of request, the subject must specify if they want this credential to be persisted on-chain or off-chain.
The credential's issuer approves and issues (or rejects) a subject’s credential request. By issuing the credential, they are verifying that the subjects meets the requirements needed to obtain the credential.
Using the example **** above, the issuer is issuing a credential of 'Battery Installer' to the subject. In doing so they are asserting that the subject meets the requirements to hold this credential. They are signing the credential (providing proof) with their digital signature using an Ethereum- compatible wallet such as MetaMask.
If a credential has an **'**on-chain' registration type, the verified credential is registered in the Claim Manager smart contract.
As discussed above, off-chain credentials are issued in two formats:
A verifiable presentation ****
A signed JSON Web token****
The verifiable presentation and issued token are appended to the claim data, which is updated in the SSI Hub.
Once an issuer has issued a credential, the subject has the option to publish (persist) the credential. The persistence location depend on if the credential is registered on-chain and/or off-chain. Persistence for on-chain credentials is discussed above here. Persistence for off-chain credentials is discussed above here.
The W3C Verifiable Credential protocol includes revocation as a standard operation in the credential lifecycle. Credentials can be revoked due to a breach in proof integrity (digital signature), or because the subject no longer meets the requirements to hold the credential.
The IAM stack provides methods for a revoker to revoke a credential after it has been issued.
Revocation for Energy Web credentials is executed based on the Role Governance. Only an authorised revoker (a DID or any DID with specific role credential) can revoke a credential.
When an on-chain credential is revoked, the revocation is registered in the ClaimsRevocationRegistry smart contract. This smart contract holds a reference to every revoked credential. The ClaimsRevocationRegistry contract references the ENSRegistry contracts to ensure that the revoker has the right authority to execute revocation and ClaimManager contract to validate if the subject has the role credential (to be revoked) and if revoker's authoritative credential has either expired or revoked (for the case where revoker's authority is based on a specific role credential).
For a revoker to be able to revoke an on-chain credential, their authoritative credential should also be published on-chain.
For a credential to be verifiable on-chain, a verifier should be able to check the revocation status of the issued credential along with the issuance.
It should be possible to get a single source of truth for a revocation status i.e. a verifier should be able to get a valid revocation from a registry without the need to verify it again.
For a revocation to be registered on-chain it is necessary that the credential first be registered on-chain with ClaimManager, where holder has provided their consent to make the credential publicly available.
The publishing of a holder's credential reduces the privacy and allows someone to determine if a holder has been issued a role credential or not.
In other words, revocation of a credential which has not been published yet would imply that the holder holds the role credential reducing the privacy of the holder's credential.
Therefore, the revocation registry requires that the holder consent to their credential being on-chain and publishing it to the ClaimManager registry.
Having the credential in the ClaimManager allows the ClaimsRevocationRegistry to provide verifiability of:
Only verified and valid credential being revoked, ClaimManager verifies credential's integrity and its issuer's authority before registration.
Credential's validity with regards to expiration.
Revoker's authority who revoked Holder's credential.
Thus establishing a design which provides Verifier with a trusted mechanism for revocation status check which ensures that a valid credential can only be revoked by an authoritative revoker.
When an off-chain credential is revoked, the credential JSON is updated with a "credentialStatus" property that is conformant to W3C's StatusList2021 data model. This data model provides a link for verifiers to use to see the status of a credential (i.e. if a credential has been revoked by the revoker). The verifier can verify this credentialStatus property and derive the revocation status of the credential. You can view the properties of the StatusList2021 data model here.
When a credential is revoked using iam-client-library
, which utilises status-list module to append this credentialStatus property to credentials, the credentialStatus will have a statusPurpose that reflects it has been revoked:
Status list credentials are persisted in SSI Hub. The credentialStatus object has an attribute statusListCredential that provides a URL thorugh to fetch the credential's status for verification purposes.
More detailed documentation around StatusList2021 can be found here
A verifier is responsible for verifying the authenticity of a credential. The criteria for this evaluation is specified by the W3C Verification standards here. iam-client-library
provides verification methods that evaluates these criteria, namely:
The credential proof (typically the digital signature) is valid.
The credential is not revoked.
The credential is not expired.
Beyond the scope of basic verification, iam-client-library's
verification methods also validate the issuer's authorization to issue the credential and does this for all the issuers in the hierarchy.
This verification is executed for off-chain credentials and relies on the subject's (holder or issuer) DID Document resolution.
The Energy Web Decentralized Operating System gives companies simple tools to deploy custom applications and business networks that combine established protocols and platforms with pioneering technologies and novel architectures.
The development of the Open Charging Network is steered by community needs with the non-profit Energy Web Foundation curating the development.
For this purpose, transparency about the current feature set is required, which the following OCN maturity model (inspired by Gitlab) shall provide. The maturity model and the roadmap of the Open Charging Network development is discussed quarterly during the Share&Charge Foundation and Tech Call.
The maturity model is based on different categories (columns):
Messaging: How messages between OCN Parties are transmitted and secured
Service interfaces: Interfaces that can be used by OCN Parties to connect their services to the OCN
Connection & Community: Tools for the community to test and use the OCN
Maturity is indicated with different-sized black boxes or a heart:
Planned: Requirements are getting defined
Minimal: First implementations are tested
Viable: Can be used in production
Lovable: Functionality set is complete and used by community
A reference to the open source repositories is provided in parenthesis after the feature description.
Messaging
Service interfaces
Community & Network tools
Release 1.0.0 (03.03.2020)
Release 1.1.0 (16.10.2020)
On Roadmap
Ideas / Requirements / Addons
The Public Test Network is the pre-production test network of the Open Charging Network.
It should be used to test services and features in a robust quality assurance environment. To develop on the test network, you can connect to an OCN test node and the OCN Registry that is deployed on the Volta Test Network. See more details on this below:
Please note, that it is not advised to run a service in production on the Public Test Network. Energy Web Foundation reserves the right to make changes to the testing components on this environment, that could affect your service.
Access the full OCN technical documentation .
The Volta Test Network is the pre-production test network (testnet) of the Energy Web Chain. It is the blockchain equivalent of a test server or test environment in traditional software development.
The for the test network can be found on Volta under the following public key: 0xd57595D5FA1F94725C426739C449b15D92758D55.
You can view transactions and the log history for this contract on the Volta Block Explorer . If you're unfamiliar with the Block Explorer, you can read more .
The Public Test Network of the Open Charging Network provides you with some public test OCN Nodes that you can use for testing the features of the Open Charging Network.
The following test OCN test nodes are currently known to Energy Web Foundation:
The Public Test Network should give you the option to test your OCN Node operation in a QA environment.
The Open Charging Network provides mock OCPI parties for exchanging simple OCPI requests over the Public Test Network.
One Mock CPO and one Mock eMSP are available on the Public Test Network (i.e. registered in the Registry contract that is deployed on the Volta Testnet)
Implemented OCPI modules. To see the full list of OCPI modules, and which modules each party typically implements, see the 2.3.1. Typical OCPI implementations per Role
Take your generated public wallet address and visit the . Enter the address and request 1 Volta Ether. This will be more than enough to pay for the transaction to add our details to the registry.
You can purchase Energy Web Token (EWT) at the , the and the . Create an account at the exchange, fund it with your preferred currency and purchase Energy Web Token. One token should be enough cover the transaction cost. Then, transfer the tokens to the wallet address of your OCN Identity.
Claim Manager
Claims Revocation Registry
Holds mapping of
OCPI 2.2 messaging (OCN-Node)
Address book for message routing (OCN-Registry)
Signed OCPI messages (OCN-Notary)
White-/Blacklisting of OCPI parties (OCN-Node)
OCPI 2.2 CPO & eMSP interface (OCN-Node)
CPO & eMSP testing tools (OCN-Tools & OCN-Demo)
OCN Service Permissions (OCN-Registry)
OCPI 2.2 HubClientInfo Module (OCN-Node)
Custom OCN / OCPI message (OCN-Node)
OCN Service Interface (OCN-Node)
OCN Service Interface testing tools (OCN-Demo)
Non-OCPI API connections (OCN-Bridge)
Decentralized Identifiers for OCN Registry
OCN Service Interface with Interception / Changing functionality
ERC20 Token interface (Settlement & Token Bridge)
OCPI 2.1.1 bridge
OCN / OCPI 2.2 testkit
eMobilify GmbH with OCN Identity 0x4174161e7B8f137De780C024D0e988f4039F8C70
- You can obtain a for this node here: Temporarily unavailable
- By using the Public Test node provided by eMobilify GmbH, you accept the Terms&Conditions and Data Protection Guidelines by eMobilify GmbH. Please visit the to learn more, or reach out to
Elaad NL with PublicURL (Reach out to to obtain the OCN Identity and the registration token)
Follow the steps outlined in the in order to connect your service to one of the nodes listed above.
The OCN-Registry for the Public Test Environment can be found on the under the following public key: 0xd57595D5FA1F94725C426739C449b15D92758D55
Follow the steps outlined in the for guidance on how to run a node.
Please note that the functionality of both mock parties is limited, and does not implement or cover all OCPI modules and use-cases. Details can be found on the Bitbucket repository: .
Mock
Country Code
Party ID
Charge Point Operator
CH
CPO
eMobility Service Provider
CH
MSP
Worker Nodes are a new technology developed by Energy Web that enable enterprises to construct distributed computing networks that securely execute sensitive business operations impacting multiple companies.
Worker Nodes were originally developed to solve a paradox that hinders advanced renewable energy tracking solutions like 24x7 matching and green electric vehicle charging: credibility relies on accurate, publicly verifiable results (e.g., proof that digital representations of renewables are not double-counted). But inputs from separate organizations, such as granular renewable energy production and electricity demand data, are commercially sensitive and need to remain private. Complex commercial, legal, and technical requirements often make it challenging for a single actor to unilaterally access and process all requisite data. The ability to establish a shared source of truth from segregated, individual information sources has been an ongoing challenge in multilateral settings; the challenge is even greater for energy market participants seeking to exchange and process granular data in order to procure services from distributed energy resources.
The Energy Web Worker Node toolkit solves these challenges by enabling enterprises to configure, launch, and maintain distributed computing networks that ingest data from external sources, execute custom workflows based on business logic, and vote on results in order to establish consensus without revealing or modifying the underlying data. Worker Nodes apply concepts and components from blockchain technology in a novel, enterprise-friendly architecture to provide all stakeholders with cryptographic proof that mutually-agreed rules and and processes are followed correctly, ensure computational outputs from business processes are correct, and preserve the privacy and integrity of underlying data for auditing purposes.
Decarbonizing the global energy sector is the most important solution to mitigate climate change. Worker Nodes can help accelerate decarbonization in two specific areas that require coordination and information sharing among multiple independent actors. The first is helping electric utilities digitize and integrate distributed energy resources (e.g., rooftop solar systems, batteries, electric vehicles, electric vehicle charging stations, heat pumps) to the grid. The second is bringing deep levels of transparency and verifiability to emerging green product supply chains—including but not limited to 24/7 matched renewable electricity, sustainable aviation fuel, and sustainably produced bitcoin.
The solutions we apply to these areas, dubbed Data Exchange and Green Proofs, are powered by a brand-new web 3 technology that has significant business value for energy enterprises: worker node networks. Each worker node network is a decentralized group of computers that jointly execute sensitive business processes that involve or impact multiple companies. Though worker nodes establish consensus about the results of a business process, they are not blockchains. Whereas the “work” performed by traditional blockchain miners or validators—validating and sealing blocks—has limited value for energy enterprises, worker node networks are fine-tuned to execute custom logic that is specific to an actual business problem. Worker node networks are only useful in cases where multiple businesses need the capability to transmit complex datasets amongst three or more parties in a way that does not reveal all data to all parties, and/or the capability to provide public verification of outputs while maintaining privacy and integrity of inputs.
Today worker nodes are implemented as independent off-chain computing nodes that communicate with a smart contract deployed on the Energy Web Chain. Worker nodes can be implemented in any development framework, including node.js, python, and rust.
Each worker node is programmed to execute a specific conditional logic workflow based on a predefined dataset (i.e. source and schema) and event trigger (e.g. a regular time interval, or a specific external event). Workers are given read-only access to one or more external data sources via API or message broker. When the workflow “event” is triggered, the workers initiate a round of calculation and voting (worker nodes can be configured to either poll an external data source at regular intervals, or “listen” to an external source for a specific trigger).
In the calculation step, each worker node independently executes the conditional logic based on the data it received during the trigger. Then, each worker submits its results (i.e. output of the logic workflow) to the smart contract, which collates the worker nodes’ votes into a unique voting round and keeps track of each round to maintain continuity. The smart contract defines a voting threshold (typically a simple majority, such as 2 of 3, or 4 of 7, etc.) that must be reached in order to establish consensus on the results of each voting round. Each voting round is defined by a voting ID, the number of unique votes (from worker nodes), and a consensus result. If the threshold is reached (i.e. a majority of nodes independently reach the same conclusion and submit identical results to the vote), then the voting round is closed and the result is hashed on the Energy Web Chain; this creates a connected tree of results that can be queried and validated for auditing purposes. If consensus is not reached in the voting round, the entire process from event trigger through voting is repeated; if a second round fails, a custom workflow is executed (this can include alerts, failover to other nodes, or acceptance of results from a plurality of workers).
In addition to collating the voting results, the smart contract is configured to issue rewards for workers in the pool based on performance criteria. A base reward can be issued simply for workers being available in the pool, and additional rewards can be issued based on metrics such as consistency (i.e. availability for all voting rounds), accuracy (i.e. being part of the winning consensus), and speed (i.e. being fastest to submit voting results following the event trigger).
Sign-in with Ethereum (SIWE) is an open standard for decentralized authentication that allows users to sign in to websites and applications using their Ethereum accounts. Unlike traditional centralized authentication methods, this innovative approach allows users to access various online services and applications using their Ethereum wallet address and cryptographic keys. This groundbreaking login solution represents a significant step forward in the evolution of decentralized identity management, empowering users with enhanced privacy and ownership of their digital identities.
The Ethereum Foundation and Ethereum Name Service (ENS) had put forward a Request for Proposal for Sign-in with Ethereum in 2021, based on EIP-4361 (ERC-4361: Sign-In with Ethereum). The reference implementation of Sign-In with Ethereum by SpruceID (SpruceID ) provides an easy integration with Application’s Identity services and assures smooth Sign-In user experience. It has numerous benefits over other PKI based signatures, such as :
A standard human readable verifiable message to confirm signatures.
An EIP-standard message schema to incorporate all the information needed for a secure authentication.
Verification for domain
and uri
, this assures the authenticity of the requester / verifier. Users can validate the domain the transaction was initiated from and the URI
to which the access would be provided to (redirection) upon signing for authentication / authorization.
Preventing replay attacks with a nonce
, which could be a challenge
from a server or a random token
.
authority
is the RFC 3986 authority that is requesting the signing.
address
is the Ethereum address performing the signing conformant to capitalization encoded checksum specified in EIP-55 where applicable.
statement
(optional) is a human-readable ASCII assertion that the user will sign, and it must not contain '\n' (the byte 0x0a).
uri
is an RFC 3986 URI referring to the resource that is the subject of the signing (as in the subject of a claim).
version
is the current version of the message, which MUST be 1 for this specification.
chain-id
is the EIP-155 Chain ID to which the session is bound, and the network where Contract Accounts must be resolved.
nonce
is a randomized token used to prevent replay attacks, at least 8 alphanumeric characters.
issued-at
is the ISO 8601 datetime string of the current time.
expiration-time
(optional) is the ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid.
not-before
(optional) is the ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid.
request-id
(optional) is an system-specific identifier that may be used to uniquely refer to the sign-in request.
resources
(optional) is a list of information or references to information the user wishes to have resolved as part of authentication by the relying party. They are expressed as RFC 3986 URIs separated by "\n- ".
Given all these advantages, Sign in with Ethereum proved to be an ideal choice for Energy Web in implementing authentication for our decentralized applications (DApps). Authentication with SIWE is supported by our Passport strategy (available in passport-did-auth from v2.0.0 ).
A signature request with Metamask SIWE will look something like :
Note: The text block in the above MetaMask pop-up for signing is the SIWE message.
During each session initiation, it is crucial to select a nonce
with sufficient entropy to thwart replay attacks – a type of man-in-the-middle attack where an adversary intercepts the user's signature and uses it to initiate a new session on their behalf.
To ensure security, implementers have the option to utilize privacy-preserving but readily accessible nonce
values. For instance, they may consider using a nonce
derived from a recent Ethereum block hash or a recent Unix timestamp. These methods offer a balance between safeguarding privacy and ensuring widespread applicability.
Wallets are required to verify that the domain
aligns with the actual source of the signing request.
It is recommended to cross-check this value with a trusted data source, such as the browser window, or through another reliable protocol. By doing so, wallets can enhance security and mitigate potential risks associated with fraudulent or unauthorized signing requests.
Many organizations aim to deploy a unified Identity Service that can be utilized across all federated services, employing OpenID Connect for efficient user session management. Thanks to SIWE-OIDC (OpenID Connect Identity Provider for Sign-In with Ethereum), this objective has now become achievable.
SpruceID has deployed an OpenID Connect Provider (OP) which has support for SIWE and hosted under SIWE Open ID Connect . This deployment is a DAO-governed OP supported by ENS DAO.
To use the hosted OIDC server it is required to register the application as an OIDC client using the OIDC client registration of SIWE Open ID Connect . Currently, no user interface for OIDC client registration is supported. For that reason, developers will need to use the REST API.
The following is an example response:
A client can then be updated or deleted using the registration_client_uri with the registration_access_token as a Bearer token. The authentication could be similar to
Note : This flow is just a possible flow, it could be different for a different use case.
Apart from the existing functionalities offered by SIWE, there is potential for future extensions, including support for Decentralized Identifiers and Verifiable Credentials, as well as integration with EIP-712 for Type structured data hashing and signing.
The Energy Web Blockchain
The Energy Web Chain (EWC) is the foundational “trust layer” of the stack. The Energy Web Chain (EW Chain) is an open-source, Proof-of-Authority public blockchain derived from Ethereum blockchain technology. It is the foundational trust and persistence layer of EW-DOS.
The blockchain performs three key functions in EW-DOS:
Provides the smart contract mechanism to store decentralized identities (DIDS)
Facilitates on-chain verification and transactions between parties
Executes smart contracts that are used by EW-DOS's decentralized applications, SDKs and utility packages.
You can read more about the Proof-of-Authority consensus mechanism here.
The blockchain provides trust in several ways that allow for a decentralized system that is self-executing and without central authority or oversight of on-chain transactions:
The data in each block is immutable and unchangeable. Each block in a blockchain is linked to the previous block by a cryptographically created hash. If one block is tampered with, the hash of every subsequent block in the chain would be need to be updated. Because Validators' consensus is required to create new blocks, a block with an alternative transaction history would be rejected by Validators.
Smart contracts provide automated logic for on-chain actions. Transactions on the chain are governed by code called smart contracts that contain explicit logic and requirements for actions to occur. When specific conditions are met, the code will self-execute. Once a smart contract is deployed on the blockchain, it cannot be changed or reversed, removing the risk that anyone can update the logic of the contract for personal gain.
Cryptographic verification is required for on-chain transactions. In order for an individual to verify any on-chain transaction, they must sign the transaction using their private key. This makes it impossible to perform a transaction unless you have the private key.
The Energy Web Chain stores the following information:
Smart contracts for Decentralized Identities (DIDs) that are created through EW-DOS's identity and access management library.
Smart contracts that govern validator consensus behavior and remuneration. These are known as system contracts.
Smart contracts that implement other Ethereum network protocols, such as permissioning and the OpenEthereum client protocols.
Smart contracts that contain logic and functionality specific to applications deployed on the Energy Web Chain and the utility packages that connect them and their users to the Energy Web Chain.
When using Switchboard, users can create and update data that is stored in smart contracts on the Energy Web Chain. These actions require users to pay a small transaction cost. Users pay transaction costs using their cryptocurrency wallet such as MetaMask. Transaction costs on the Energy Web Chain are in Energy Web Token. Transaction costs on the Volta Test Network on are in Volta Tokens.
Read more about transactions and transaction costs in the Energy Web Tech Stack here.
The transaction cost amount depends on what action the user is performing, and the current gas cost. Actions and their estimated associated total transaction cost are listed below. They are organized according to the three main domains of Switchboard: Enrolments, Governance and Assets.
The total costs calculated below is the sum of the cost to process the metadata and the current gas cost. The costs below are approximate values per operation. The total cost can change:
Based on the user input data (e.g. number of input fields)
Based on congestion (i.e. how many transaction requests are currently in the pool to be processed), which affects gas price
Switchboard is used to request, issue, publish and revoke role-based credentials. These credentials are persisted on the Energy Web Chain (read more about on-chain credentials here). As such, they require transaction costs to cover their on-chain lifecycle events.
0.00031849
Revoke on-chain role
0.00016711
Switchboard is used to create and manage organizations, applications, and roles associated with them. These elements are persisted in Energy Web's Ethereum Name Service smart contract. ٍ Each time a user creates or updates one of these entities, they must pay a small transaction cost
Read our documentation on SSI Credential Governance using ENS Domains here.
Create Organization
0.00077047
Create Sub-Organization
0.00077047
Create an organization-level role
0.00085867
Transfer organization ownership
0.00013159
Edit organization details
0.0001474
Delete organization
Not Available
Create application
0.00064152
Create an application-level role
0.00085867
Edit application-level role details
0.00032897
Edit application details
0.0001474
Delete application
0.00010978
Edit application role details
0.00032897
Switchboard is used to create (register), manage and transfer Assets. Each Asset is registered in a smart contract on the Energy Web Chain (read more about Assets as ownable smart contracts here.) Each time a user interacts with these contracts for Asset management, they must pay a small transaction cost:
0.0002375
0.0000956
0.00010972
Accept/decline Asset offering
0.00007288
VC-API is specification of a data model and HTTP protocols to issue, verify, present, and manage data in a Verifiable Credentials ecosystem.
Energy Web provides an implementation of VC-API to reduce difficulties for organizations to start issuing and verifying Verifiable Credentials. Using these APIs it becomes easy for anyone to do Proof of Concepts for SSI use cases.
VC-API can be easily integrated with existing systems and are configurable for complex exchanges. Implementers can choose to implement APIs that fits their use case. One can keep it simple with minimal set of APIs even for complex data exchanges (presentation).
Refer VC-API specification for more information.
Portable, can be easily deployed to any environment and can be kept generic.
Easy integration and configuration.
Selective implementation of APIs based on the use case. For an application that provides feature to issue a credential only need to consume APIs specific to issuance.
Supports both Mediated and Unmediated exchange.
The Verifiable Credentials data model introduces three actors Issuers, Holders and Verifier. VC-API defines components that these actors may use for credential issuance, verification and exchange.
Each actors can have their own set of components to participate in the credential exchange.
Coordinators : execute the business rules and policies set by the actors. Also acts as mediator between these actors.
Services : enable general VC-API functionality.
Status Service : facilitate publishing and checking of status of Verifiable Credentials.
Admin : responsible for configuring and managing all the other components.
Storage Services : provide mechanisms to store and manage Verifiable Credential of the associated actor.
Energy Web's implementation of VC-API only provides services which enable VC-API functionality. A developer can implement their own components that are mentioned above.
Applications can perform authorisation, issuance, verification and presentation exchanges using VC-API.
Servers implementing VC-API can confirm clients to utilise authorisation mechanism when performing certain requests. The request APIs endpoint can specify whether authorisation is needed or not.
For issuance of Verifiable Credentials, a holder can request any authority (Issuer) to issue a credential or can self-sign a credential.
A Holder can present their Verifiable Credential to the Verifier for verification. The Verifier can request the required credential from the holder using presentation-exchange protocol.
The sharing / exchange of Verifiable Credentials happen through presentation. These exchanges are executed based on the exchange-definition that are configured at run time.
A general exchange flow would look like :
The VC-API implementation can be easily deployed to any environment and can be kept generic, in other words exchanges are configured rather than coded in the application. This configuration is done at runtime via the use of Exchange Definitions.
In order to configure the credential exchange, you can use the exchange definition data transfer object. For reference see the Exchange Definition Data Transfer Object implemented by Energy Web.
Some different types of exchange definitions are :
Sample DIDAuth
query VP Request
Sample PresentationDefinition
query VP request
Exchange Definition Structure and Properties
exchangeId
exchangeId
is definition identifier, used to fetch exchange-definition
Exchange Queries
The Exchange Definition has a query
property that tells which data needs to be requested. The type of queries that are supported are defined by VerifiablePresentationQueryType, for reference see VpRequestQueryType.
The DIDAuth
query type is used for exchange needed for authorisation, while PresentationDefinition
could be used to request certain data from the Holder.
Exchange Callbacks
When defining an exchange, callbacks can be configured to allow parties to receive notice of a VP submitted in response to an exchange. Notifications consist of POST requests to the configured URLs. A callback is configured by adding an entry to the callback array in the Exchange Definition.
Exchange Interact Services
The exchange interaction types used by this VC-API implementation are directly related to Verifiable Presentation Request Interaction Types. The interaction types indicate to the receiver of the presentation request how they can expect to interact further with the issuer/verifier.
Mediated Exchange Interactions
Mediated exchange interactions signal to the receiver of the presentation request that the exchange is mediated by an additional component and may not be automatically processed. Mediated exchanges therefore allow for a review of presentation submission by a human or automated process as well as the issuance of credentials based on this review.
Due to the duration of the mediation process being unknown, the submitter of the verifiable presentation may have to query repeatedly in order to check if the result of the mediation is available.
Unmediated Exchange Interactions
Mediated exchange interactions signal to the receiver of the presentation request that the exchange is not mediated by an additional component and can be automatically processed.
serviceEndpoint
serviceEndpoint
is used to continue exchanges
Presentation Definitions.
These presentation exchange take place on the basis of presentation-definition. Verifiers articulate these definitions of what they require for proofs. The issuer then wraps their Verifiable Credentials on the basis of presentation-definition in a VP and provide a response to the Verifier.
The presentation_definition
are constructed of inputs, that describe the format and details for proofs required. They may also contain selection or filter rules for the presented Verifiable Credentials.
A presentation_definition
has input_descriptors
property which has an array of objects with properties describing what type of input data (credential) or sub-fields are required for submission.
See input_descriptors to know more.
Presentation exchange between Holder and Issuer
Presentation exchange between Holder and Verifier
Example for a VC issuance and presentation using VC-API can be seen in Resident Card Tutorial.
The Block Reward contract manages block reward payouts to validators. Block rewards are issued as native Energy Web tokens that are minted by the engine.
Two entities are rewarded by each created block:
The block author (validator)
Block authors are rewarded each time they seal a block. The amount issued to block authors decreases over time, as depicted by the Discreet S Curve.
Calculator: https://github.com/energywebfoundation/discrete-scurve-calculator
A portion of block rewards goes to the Community Fund. Unlike the amount awarded to block authors, the amount that goes to the Community Fund remains constant over time.
The amount is chosen to add up to roughly 37.9 million tokens over a 10 year period. The community fund can change its own address and set a payout address too.
With 5 second step size: Payout-per-block = 600900558100000000 wei
Visual representation of the community reward distribution is depicted below in Fig. 3.
Name
Address
JSON ABI
RewardContract
0x1204700000000000000000000000000000000002
Function Name
Description
mintedTotally()
Returns the token amount that was minted totally in wei
mintedForCommunity()
Return the token amount that was totally minted for the community fund in wei
mintedForCommunityForAccount(address)
Returns the total token amount that was minted for a certain address for the community so far in wei
mintedForAccount(address)
Return how much was minted for an account so far in wei
mintedInBlock(uint256)
Returns how much was minted in certain block in wei
mintedForAccountInBlock(address, uint256)
Returns how much was minted for a certain account in a certain block in wei
communityFundAmount()
Returns the constant payout for the community per block in wei
communityFund()
Returns community fund address
payoutAddresses(address)
Returns an address' payout address
setPayoutAddress(address)
Sets payout address for sender
resetPayoutAddress()
Resets payout address for sender
getBlockReward(uint256)
Returns blockreward amount for a certain block number
checkRewardPeriodEnded()
Returns true if blockreward period has ended (based on blocknumber), false otherwise. The blockreward period right now ends after 10 years. After that no blockrewards or community fund payouts are minted.
The worker node is containerized and can be run on a virtual machine.
CPU: 2 vCPUs
Memory: 4 GB
Disk Space: 100 GB
Operating System: Ubuntu 20.04 LTS
To create a virtual machine in your cloud provider. Ensure the virtual machine matches the minimum requirements listed in the above section.
Clone the following repository -
It contains the guide and files required to run the worker image.
Once connected to the VM. Follow the steps to run the container image.
Install docker
sudo snap install docker
Confirm docker and docker-compose are installed
docker -v docker-compose -v
Application setup
Once done, ensure to the .env file contains all environment variables required in the same directory as the docker-compose.yml file.
Finally, run the command
docker-compose up -d
Identity and access management (IAM) refers to the frameworks and procedures that provide the users of a technology with appropriate access to the technology’s resources (i.e. what a user is allowed to do and access within a system). It includes the processes for validating user identities and establishing the hierarchies they exist in.
IAM plays a critical role in Energy Web tech stack. The IAM components are responsible for creating user identities and defining and enforcing that identities participate in. These governance structures that users must have in order to take on roles within an application or organization, and provide the mechanisms to request, verify and issue these roles.
The Energy Web IAM architecture is informed by and implements the principles of . SSI is a paradigm that promotes an individual’s control over their digital identity and how it is used. This is in contrast to traditional, centralized IAM approaches, where a third party is responsible for storing a user's identity and/or their data in a proprietary database.
Self-sovereign identity exists to address the shortcomings and vulnerabilities of centralized identity approaches. Some of these include:
Users lack custody over their digital identity and its associated data (what data is shared and with whom).
Applications and systems do not provide interoperability or portability of user data. User identifiers and data are typically sequestered within an application and are not accessible to the user outside of that context.
Centralized systems are vulnerable to attack, resulting in exposure and dissemination of sensitive user data.
The (Decentralized Identifiers (DIDs) and Verifiable Credentials (VCs) serve as the fundamental components of Energy Web's IAM framework.
Similar to a traditional 'username', A DID is a user's primary identifier in the Energy Web ecosystem. A DID is , and is anchored on the in the DID Registry. See further documentation on DIDs in self-sovereign identity and the IAM stack .
Verifiable credentials are digital credentials that can be verified cryptographically using public-key infrastructure. In the Energy Web ecosystem, verifiable credentials are used to authorize a user's or enrolment into an application or organization. See further documentation on verifiable credentials in self-sovereign identity and the IAM stack
DIDs and Verifiable Credentials are used together within a framework of role-based hierarchies to create permissioning systems. You can read more about the role of DIDs and verifiable credentials in our governance framework .
For further documentation on our IAM stacks:
You will need to (or another Ethereum wallet) to connect to EW-DOS applications on the Volta test network or the main network, and to sign transactions on the blockchain.
Read more about using MetaMask .
If you are using applications or smart contracts on the , you will need .
Learn how to get Volta Tokens .
Once you have Volta tokens, you will need to .
If you are using or developing applications or smart contracts deployed on the , you will need to have .
Learn how to get EWT .
Once you have EWT, you will need to .
The most common use case of the Open Charging Network describes an or connecting their backend service to an . An OCN node provides an entry point into the system, so a party must connect to an OCN node in order to participate in the network.
Follow these steps in order to successfully connect your own backend service.
*Note that not only MSPs and CPOs can use the Open Charging Network, but these are the most common roles.
This is a walk-through covering the main functionality of the system released to date. It assumes you already have a wallet in either a WalletConnect-compatible mobile application or MetaMask browser
-> The of the system leverages the Energy Web Volta test network. Therefore, all chain transaction fees use Volta tokens, which have no value and are freely obtainable . Here you can try and become familiar with what the system can do for you.
-> The of the system is on the Energy Web Chain and uses Energy Web Tokens for transactions. You can view the cost of transactions for each operation using this .
We recommend using Switchboard on Chromium (Google Chrome, Brave, etc.) or FireFox browsers.
Please note that some privacy-related browser extensions could cause problems with the system. Therefore, if you find that you are unable to complete a step described below, please try disabling your privacy extensions and reloading the page.
Using a web browser on your computer, visit the system landing page. It should appear similar to the image below.
->
->
The system is a progressive web app, meaning that if you access the system website via a browser on your mobile device, you can add the system as an app on your device’s home screen (without using the iOS App Store or Google Play Store).
To do this, first, open your browser and navigate to the system landing page.
Using Chrome on an Android device, click the three-dot overflow menu in the upper-right corner to reveal a menu similar to that shown at the right. Click on “install app” to initiate the download. You should then see the system logo as an app on your home screen.
On an iOS device, the process is similar. Navigate to the welcome page in Safari, then tap the “share” button and scroll down to “add to the home screen.” the system will now appear on your home screen.
As noted above, you may connect to the system using either a WalletConnect-compatible mobile wallet app (on your mobile device) or a MetaMask browser extension. Each of these methods is described below. You can complete either one and skip the other option.
This step requires that you have two devices: a primary device (e.g., a computer) with a browser displaying the system landing page, and a mobile device (tablet or smartphone) on which you have installed a WalletConnect-compatible application.
First, on your primary device, click “use mobile wallet” to view a QR code similar to that in the image at the right. Next, on your mobile device, open the mobile application you use as a wallet, and use that mobile app to scan the QR code on your primary device’s screen.
The app on your mobile device will ask you to confirm that you wish to connect to the system. Your mobile app might then ask you to sign one or more messages. Finally, your mobile app might ask to confirm the connection. After signing and confirming as instructed in your mobile app, your primary device should automatically bring you to the Switchboard dashboard screen.
When you click the “use MetaMask” button, the MetaMask browser extension should open automatically. After you sign in to MetaMask, click the “connect” button. You will be requested to sign a message; do this to complete the connection to the system. You should land on the Switchboard dashboard screen.
The Switchboard dashboard contains functionality related to assets (creating managing an asset DID), governance (managing organizations, applications, and roles), and enrolments (issuing, viewing and revoking roles).
If you click "Manage Profile" button on the top right corner of the dashboard, you can access the user profile menu.
You can add a human-readible name label to your DID account using this menu item. The name is only stored locally and viewable by you.
DIDs are not very human-readible and hard to memorize, therefore you can use the DID Book function to store the most used DIDs with labels to access them quickly.
You can use this function to scan DID encoded QR Codes.
You can use this function to see the DID document in raw JSON format and copy it.
You can use this function to logout from the current DID account.
An asset is a virtual representer of the user’s solar panels, smart energy meters, batteries and other devices in the system. Each asset is assigned its own DID that gives them the ability to be a part of the Energy Web Network, so they can be transferred or enrolled in a role.
By clicking on the “Register Asset” button on my assets tab, you add one more asset to your list. It will get its own DID automatically.
You should see a general list of assets similar in appearance to the image below.
As an owner, you can perform several options under the three vertical dots button (next to the last updated date in the list).
Assets can be enroled to a role credential. By clicking on the Enrolments
button (next to the asset name) you can see all roles that the chosen asset has. We recommend adding this issued claim to the asset's DID document so that you have the credentials you need in order to access the application with the appropriate role, you can use the Publish
button to do this operation.
One set of functionality in the system relates to governance: managing organizations and applications. To explore this, click on the “governance” button from the system main screen. You should see a governance dashboard similar in appearance to the image below.
The development version of the system is built on Energy Web’s Volta test chain. As you set up your organization, applications, and roles, these will be anchored to Volta. We hope that you test out all available functionality, but we also recommend that you do not enter any sensitive information into the fields at this time. For example, when you create an application in part B below, use a test name if you wish to keep secret the real name of your application for now.
The first tab within governance relates to organization management.
If you haven’t had an organization yet, you can add it by clicking on the “Create Organization” button. The system asks you to fill the form and submit the request.
The “Create Organization” button allows creating only one organization per wallet. After using, the button is hidden from UI.
Assume that you already own an organization, on the Organization management tab you can perform several options related to your organization and its EWNS namespace, each using the options under the three vertical dots button (next to an organization namespace in the list).
After you have created an organization and set its root namespace, you may wish to set the namespace for decentralized applications your organization will own/operate.
The first step is to create the new application namespace, using the “create an application” option on the organization management tab. You will then see a pop-up with several fields to complete. Starting with step 5 of this process (registering the namespace for the app), you will be asked to confirm the transaction using your linked wallet.
Note that any application namespace you define will automatically be created under an “apps” subdomain within your organization’s namespace. For example, if your organization’s namespace is “exampleco.iam.ewc
" and you wish to create a new subdomain for an application you call "DERmanager," then your resulting namespace will be "dermanager.apps.exampleco.iam.ewc
" (the "apps" subdomain is added automatically, to organize applications separately from other subdomains).
After you have completed all steps to create the new application, your application management tab should appear similar to the image below.
You have several possible actions, similar to your options under organization management. Note that you also have the option to filter your applications by the organization; this may be helpful if, for example, different subsidiaries within your corporate umbrella wish to manage applications separately, but you as a designated super admin need to be able to view all of them.
The final governance task is perhaps the most powerful use of the system, and it builds on the organization and application management functionalities described above. It is governance related to roles—not only roles within your organization but also roles that different users might have in your applications.
As noted above, the system allows you to define two types of roles:
Roles associated with an organization - these roles are independent of any particular application. For example, you might create the role “global dApp admin” to manage all of your organization’s applications. This role is created under your organization or chosen sub-organization on the Organization management tab.
Roles associated with an application - these roles are specific to a particular application. For example, you might create the role “installer” or “renewable energy buyer” in an application that you own. These roles relate to your application but are not necessarily part of your organization. This role is created under your application on the Application management tab.
For creating a role, you should fill the role definition form. You can find detailed explanation of the each step below;
At this step, you will choose an unique role name to host the role definition, full domain path will be shown including application and organization names. The system will prompt if the name is already in-use.
At this step, you will select who is allowed to issue this role. As a role definition creator, your DID will be listed as an issuer by default. You can easily override it by adding another DID or even a role name.
At this step, you will select who is allowed to revoke this role. As a role definition creator, your DID will be listed as a revoker by default. You can easily override it by adding another DID or even a role name.
At this step, you can define a precondition for the user to request this role from the issuer. The user needs to obtain the precondition role and publish it to its DID document and afterwards can continue to requesting this role.
At this step, you can define a default validity period to guide the issuers. The issuers have authority to override it at the time of the issuence.
At this step, you can create custom input fields that will be used to collect data from the user at the time of the role request. This data is only for the issuer to get some more information about the user before the issuence. The data is not stored on the role credential.
At this step, you can create custom input fields that will be used to collect data from the issuer at the time of the issuence. The data will be stored on the role credential.
When you have at least one role, the role governance tab should look similar to the image below.
Each role in the list has the same list of options: View Details, Edit and Copy Role Enrolment URL. The first two are the same as we described above. By choosing the latter one you will copy a link to a URL that others can use to enroll as that role type. You will try this in the next section of this document below.
Users of the system can use the enrolments functionality in two ways. Recall that, because the system uses a decentralized system of identity and access management, any person can own a DID and add claims verified by authorities, which are then used to take on roles in applications. This system of enrolment has three key users:
An authority (issuer) who can verify claims about users, so that the users can add the verified claims to their DID documents (and use them to enroll in an application).
Users who request claims from authorities, so that users can add the verified claims to their DID documents.
The owner of an application, who specifies what claims (the content of the claim, and from whom) are required in order to enroll in that application.
Example: Imagine you wish to deploy an application related to electric vehicle smart charging. Your application might include the roles of vehicle owner, vehicle manufacturer, __ and vehicle dealer. In order for a DID to enroll in your application as a vehicle owner, you might require a verified claim from a vehicle dealer that this DID is in fact the person to whom it sold a particular vehicle (you might require many more claims, including claims from the manufacturer about the vehicle’s model, identification number, battery capacity, and other things, but let us keep the example simple for now). In this example, you can use the system to set up these roles and requirements: a DID can enroll in you application as a vehicle owner only if it has a verified claim from a dealer that the DID is the owner of the vehicle.
Returning to the work you have done so far, you have set up the required claims and issuers. Now let us see how a new user can enroll in an example application. First, ensure you have the enrolment URL. Next, open a new browser window, and paste that URL in the navigation bar. This will load the sign-in page, and you can sign in with your existing address (i.e., the same DID and thus the same user) or create and sign in with a new wallet address (simply create one in your mobile wallet or MetaMask browser extension) if you wish to test this from the perspective of a new user. Either way, you will see an enrolment screen similar to the example below.
When you complete these fields and register, the system sends the enrolment request to the issuer(s) who had previously been specified to approve the role.
Return now to your sign-in as the issuer who can approve the role. The issue will be informed about the new request by Task Manager in the top navigation. The notification’s bubble disappears as soon as the task has been completed.
Your enrolments screen should display the request from the new user.
“View Request” pop-up under the three vertical dots button contains information about the requestor, chosen role, and the fields from the enrolment form. If you approve this request, you have issued a verified claim that the new user can add to that user’s DID document and thereby access your application in the appropriate role.
Return one final time to the new user’s sign-in. You can view this pending role request on your “my enrolments” screen, which should appear similar to the image below.
You can add this newly received role credential to your DID document and publish it to on-chain ClaimManager smart contract, so that you have the credentials you need in order to access the application with the appropriate role. Use the “Publish” button, in order to publish the role credential.
You can also revoke a role credential if your DID is listed as one of the revokers. In order to revoke a role credential, you should navigate to "Revocable Enrolments" tab and click "Revoke Off-Chain Enrolment" or "Revoke On-Chain Enrolment" to revoke.
Because the system leverages EWNS, it is instantly possible for any user to search for organizations and applications that have defined namespaces.
To see an example, return to the main landing page by clicking on the system logo in the top left of your browser window. Your screen should appear similar to the image below.
In the search bar below your name and address, enter any search term. Try “flex” for an example. The system will display all organizations and applications that have the word “flex” in their EWNS namespaces. You are likely to see many examples and test applications. When you click on any of these, you will see the relevant public information associated with this namespace. For example, clicking on the Energy Web Flex (example) “application” displays information about that app, including the roles defined in that app’s namespace. In this way, you can view what roles (user types) are part of a given application.
You can even request to enroll your DID in one of these roles directly from this screen, using the action buttons in the roles list at right. Your enrolment request will be submitted to the relevant issuer, as defined by that app owner via the process described in Part V of this document.
Publish role to
(offer) of Asset
to DID Document
This would bring up all services. You can reach out to the team for further help or check out the Docker Compose cheat sheet for more debugging tips .
(how to use IAM stack apps)
(cross-cutting concepts across the IAM stack):
: the role and lifecycle of verifiable credentials in the IAM stack
: defining and managing digital identities for assets (digital representation of a physical or virtual device)
: Energy Web's role-based governance frameworks
Access the full OCN technical documentation
This step requires that you already have installed the MetaMask browser extension and created a wallet in MetaMask. See the page on for more details.
The system leverages the (an implementation of the Ethereum Name Service for Energy Web). With EWNS, you can organize your organization, any applications your organization owns/operates, and all roles within your organization or those applications.
If you wish to use more than one DID, then it is recommended to either (a) use a different browser for each user or (b) use a browser extension that manages multiple sign-ins to a single website, such as .
As a Proof-of-Authority network, the Energy Web Chain is governed by its community of known, vetted validators: https://validators.energyweb.org/
The fundamental tenet of the EW Chain governance mechanism is "one validator = one vote", so each validator is equal in terms of decision-making power. The primary function of the governance mechanism is to make decisions regarding:
Validator eligibility & operational standards / procedures
Technical changes & updates to the EW Chain (e.g. network upgrades, client updates, etc.)
Utilization of the Energy Web Community Fund
Evolution of the governance mechanism itself
All decisions are made via a formal voting process, with a simple majority of "yes" votes required to adopt a proposal.
Within the EW Chain validator set, there are three committees that provide leadership and recommendations in three areas as follows:
The Technical Committee focuses on technical upgrades and modifications of the core EW Chain system components as well as the security and performance of validator nodes.
The Community Fund Committee focuses the utilization of the EW Community Fund, including proposals and grants.
The Operations Committee focuses on day-to-day operations of the EW Chain and validator community, including facilitating governance meetings/voting events and managing the governance process itself.
The Energy Web Chain (EWC) is a public, Proof-of-Authority EVM blockchain.
Unlike other consensus mechanisms that depend on solving arbitrary difficult mathematical puzzles (Proof-of-Work) or locking up funds (Proof-of-Stake), Proof-of-Authority (PoA) relies on a trusted set of "authorities" - nodes that are explicitly permissioned to create blocks and secure the network. The EWC uses a specific PoA algorithm called AuRa (for a technical specification of AuRa, see here).
In the EWC, these authorities are called validator nodes; the organizations who host these nodes are referred to as Validators. To maintain credibility and trust, EWC Validators must be known, reputable entities with valid market influence and/or activity in the global energy sector.
EWC Validators have three primary responsibilities:
Securely host validator nodes: Each Validator organization is expected to host a validator node on the main EWC as well as the Volta test network (maintaining both is critical to have a test environment that mirrors the production EWC as closely as possible). Hosting a node includes installing, maintaining, and monitoring their node while following best practices for key management, regular maintenance / updates to the node host environment, and proactively alerting the EWC community if they identify any potential bugs, vulnerabilities, or risks that can impact validator nodes.
Participate in the EWC Governance: Validators are expected to offer opinions and contribute to technical and non-technical decisions (i.e. voting) relating to modifications of the Energy Web client, protocol, and governance mechanism itself.
Actively participate and contribute to the EWC community: All validators are expected to proactively contribute to the EWC community in one or more of the following ways on a regular basis: Developing Applications & projects on the EWC; Contributing to open-source EW-DOS code; Contributing to Community Fund Proposals; Contributing to Governance Proposals; Community Building.
To view the current list of EWC validators, visit https://validators.energyweb.org/
At the time of the launch of the EWC in June 2019, the initial cohort of 10 Validators (all of whom were founding EWF Affiliates) decided that organizations must meet the following criteria to be eligible to become EWC Validators:
Be legally registered organizations (not individuals);
Be an official Member of EWF (i.e. have an active Membership in good standing), and;
Demonstrate technical and security competence
In February 2020, the Validators asked for greater transparency and a formal structure for the EW membership program. The primary objective is to ensure that all members have sufficient reputation (i.e. good standing) and operational capabilities to strengthen the EW Chain and EW-DOS utility layer. Based on this feedback, the eligibility criteria for EW Membership was updated as follows:
To be eligible for EW Membership, organizations must:
Have legitimate operational activities that will contribute to the mission of EWF and the success of the EW Chain; this includes energy market participants (e.g. grid/market operators, utilities/retailers, aggregators), organizations who provide products and services to energy market participants (e.g. OEMs/technology providers, regulatory/research organizations, financial services), and organizations who actively contribute to the development of open-source technology that enhances the Energy Web Decentralized Operating System.
Have sufficient reputation (or “authority”) to credibly strengthen the Proof-of-Authority consensus mechanism (i.e. must have a minimum of three customer/project references that demonstrate the nature of the operational activities described above).
If you are part of an organization interested in becoming an Energy Web Member and EWC validator, please visit https://www.energyweb.org/workwithus/
EWC validator nodes can:
Establish consensus about the state of the network by verifying the work / behavior of other validator nodes;
Reject blocks / transactions that violate input/output protocols defined by AuRa and the EVM state transition function;
Implement permissioning functions as described here (note: permissoining functions can only be implemented via a majority governance decision).
EWC validator nodes CANNOT:
Inspect or approve the contents of individual transactions;
Unilaterally verify transactions (any given transaction is only finalized after n/2 blocks, with n=total validators);
Associate identities with on-chain accounts;
Unilaterally modify account permissions, network topology, or network state.
All governance decisions impacting the EW Chain begin with a formal proposal, which is reviewed and ultimately decided by a vote among all validators. The process for making and implementing decisions is as follows:
Validators coordinate proposals via monthly meetings and a dedicated governance forum (this is only available to active validators; a public summary of governance meetings and decisions is published separately).
Proposals are specific changes to the EW Chain protocol, governance mechanism, or operating procedures that require a collective decision by the EW Chain validators. All Proposals are evaluated on an individual, case-by-case basis. Any validator is free to make a Proposal by creating a new Proposal Page in the Governance Forum.
When a Proposal is created, it is announced to the entire validator community via Slack, email, and meetings. It is then open for comment and review for a period of up to 10 days to provide the validators with an opportunity to offer feedback or revisions to the Proposal language. Once the feedback period expires, the language of the Proposal is finalized.
One or more Proposals are batched into a Voting Event; there is maximum of one Voting Event in any given month. When one or more Proposals are finalized and ready for a vote, the Operations Committee administers the voting process itself:
On average there are 1-2 voting events per quarter (note: the frequency of voting events varies depending on the volume and complexity of proposals, but the intent is to maintain a voting schedule at regular intervals so all validators know in advance when they should expect to evaluate and decide on Proposals).
A voting event is defined as a ten-day period during which Proposal polls will be open for voting.
Each voting event will feature all Proposals that have not been formally decided since the preceding voting event (i.e. all new or pending Proposals).
Voting events are announced at least one week in advance via the regular monthly validator governance call, and via Slack, email, and the Discuss Forum. This announcement will also specify which Proposal(s) shall be decided in the current voting event.
Voting is performed via a binary poll on each Proposal page in the Governance Forum. A “Yes” vote means adopting the proposal exactly as worded and a “No” vote means rejecting the proposal in its entirety.
For a Proposal to be accepted (i.e. a change will be implemented as described in the Proposal) greater than 50% of active validators must vote “Yes”. Any Proposal that does not achieve greater than 50% approval will be rejected; this means the status quo is the default position.
Each validator organization is entitled to one vote, therefore the total number of votes is equal to the total number of validator nodes. The Operations Committee acts as an administrator capable of reviewing vote submissions and will delete any duplicate votes from validator organizations.
Non-participation (i.e. a validator does not cast a vote) is counted as a “No” vote by default. This means that in order to implement the change as described in the Proposal, a majority of validators must proactively vote “Yes”.
For example, if there are 20 validator nodes then there are 20 total votes in the current voting event. In this case a Proposal will only be adopted if 11 or more validators vote “Yes”.
Validators are required to participate in at least 90% of voting events each year. During each voting event, all validators receive multiple instructions / reminders via email and Slack to ensure that they have the requisite knowledge and capacity for casting a vote. Failure to participate in at least 90% voting events violates the Validator Code of Conduct, and may result in penalties.
Each validator organization designates only one representative to cast its vote during the voting period. Each voting representative acknowledges that they are responsible for casting a vote on behalf of their company, and that their company’s vote will be shared with the other validators. Every validator organization is responsible for its own internal policies and procedures for voting event participation. Validators recognize that casting a vote for or against a given Proposal is binding for that Proposal only.
If multiple users from a single validator organization accidentially cast congruent votes (i.e. all votes are aligned), the Operations Committee will automatically de-duplicate the results and the company’s vote will be recorded accordingly.
If multiple users from a single validator organization cast conflicting votes (e.g. some “yes” and some “no”), the Operations Committee will attempt to contact the representative(s) of the validator to clarify which position is correct. If the validator’s position is not confirmed by the end of the voting period, then the conflicting votes shall be collectively be counted as a “No” vote by the validator for that Proposal.
The voting poll automatically closes 10 days after opening, giving validators two full business weeks to cast their vote. Upon closing of the voting period, the anonymized results (i.e. distribution of votes between “Yes” and “No”) will be automatically viewable on the Proposal Topic page.
Following the close of the voting period, the Operations Committee reviews the votes to ensure that only one vote per validator organization is counted.
Though the vote itself is “secret” voting, meaning no voters have knowledge of how other voters have cast their ballot, the final results indicating how each validator votes are shared with the rest of the validator set (and no other parties) after the voting period closes via documentation in the Proposal Topic page in order to maintain accountability, establish a robust audit trail for posterity, and reduce the potential for vote buying or collusion.
For accepted proposals (defined as greater than 50% of total votes cast in favor / “Yes”):
The relevant validator Committee works with the validator(s) who initiated the proposal to formulate an implementation plan and timeline.
For rejected proposals (defined as less than or equal to 50% of total votes cast in favor / “Yes”):
The validator(s) who initiated the proposal or who voted in favor of the failed proposal may revise the language and/or parameters of the proposal and present the revised proposal to the community for consideration. Revised proposals that materially differ from the original rejected proposals may be put to a vote the following month.
Rejected proposals that are not materially revised may be re-considered for a vote after a period of 6 months following the rejection vote has elapsed.
The defining feature of the Energy Web Chain is its Proof of Authority consensus mechanism, which relies on reputable entities with valid authority in the global energy sector (i.e. actual market influence) to credibly maintain trust in the network. The adoption and success of the EW Chain is dependent on maintaining an engaged, active community of validators.
Like any community, the EWC validators must be aligned on a common set of principles and follow mutually-agreed upon rules. This Code of Conduct defines the operational and governance expectations and responsibilities for EWC validator organizations. The Code was formally adopted by a supermajority vote in December 2020 and amended by majority vote in December 2021.
Organizations hosting validator nodes must:
Proactively contribute to the EW Chain community in one or more of the following ways:
Developing Applications & projects: Building or participating in projects, applications, or markets that utilize the open-source EW-DOS technology stack.
Contribution to EW-DOS open-source code: Submitting pull requests to any of the open-source EW-DOS repositories, including the EW Chain, Utility Layer, and Toolkits.
Contributing to Community Fund Proposals: Identifying opportunities to leverage the Community Fund to support the development or integration of other relevant technologies/projects into the EW Chain or broader EW-DOS stack.
Contributing to Governance Proposals: Creating, responding to, and participating in threads (topic discussions) and formal voting proposals in the governance forum on a regular basis.
Community Building: Identifying and recruiting other organizations (e.g. energy market participants, regulators, researchers, technology partners) to participate in projects and/or the EWF community.
Actively participate in the EWC Validator Community:
At least one representative from each validator organization should attend the monthly governance meetings on a regular basis.
At least one representative from each validator organization should regularly (at least monthly) engage in the EWC governance forum to create or respond to different topics and proposals.
Engaging in discussions and helping answer questions from peers in the dedicated validator communication and support channels.
Hold themselves and peer validators accountable to:
Act with honesty, integrity, and openness in working in the best interest of the EWC community.
Comply with all applicable laws, rules, and regulations, particularly anti-bribery, anti-corruption, and anti-money-laundering laws, rules, and regulations.
Avoid conflicts of interest between the validator organization (and its core business) and the EWC (and EWC community).
Refrain from the following unacceptable behavior:
Non-participation: Organizations cannot just “set it and forget it”; if an organization sets up a validator node and subsequently never joins calls, participates in discussions, or contributes the the EWC community in any way then they will face a penalty or be removed from the validator set.
Obvious rent-seeking: The EW Chain is operated by and designed for the energy industry; its purpose (i.e. utility) is to support novel digital solutions that help advance the global energy transition. Validators who are transparently motivated solely by EWT block rewards, abuse their position as validators to create deleterious effects on EWT markets, and/or do not contribute to the mission and success of the EWC ecosystem as described above, will face temporary suspension and/or expulsion from the validator set. Rent-seeking is defined as validators liquidating greater than 10% of their block reward balance within any given 30-day period.
Lack of communication: Organizations who do not respond to official validator communications in the event of an operational or governance task will face temporary suspension and/or possible expulsion.
Organizations who host EW Chain validator nodes are responsible for the following:
Keeping their node healthy and private keys secure. This includes implementing best practices for key management, regular maintenance / updates to the node host environment, and proactively alerting the EWC community if they identify any potential bugs, vulnerabilities, or risks that can impact validator nodes. Validator organizations are expected to perform node updates in a timely manner to support EWC network upgrades.
Monitoring their node. Proactively monitoring their node for issues and identifying faults that result in the node failing to successfully seal blocks.
Maintaining internal technical expertise to be self-sufficient. Each organization must possess sufficient internal technical resources to perform routine maintenance on the node / host environment as well as independent troubleshooting and fault diagnosis using the Wiki, Github, and the validator Slack channels (i.e. other validators in the community) as primary support tools.
Responding to official EWC validator communications in a timely manner. Validator organizations are expected to maintain an accurate contact list and respond to communications related to the operation and governance of the EWC.
Dedicating time to participate in meetings and governance decisions. At least one representative from each validator organization should plan on dedicating sufficient time each month to participate in calls, review documentation, and engage in the governance forum.
The following requirements were adopted by a majority vote in December 2021 and are effective immediately. These requirements are in addition to all existing terms of the Code and will be automatically monitored on a forward basis using the Validator dashboard (2022 onwards).
Validator Node Health Requirements
Each Validator node must achieve at least 95% uptime on a rolling 30-day basis (equivalent to no more than 36 hours of unplanned outages over the preceding 30-day period). A node is considered failed if it falls more than 120 blocks behind the latest block and/or fails to seal a block at its designated slot for 5 or more consecutive authority rounds. Node outages during regularly-scheduled network upgrades or planned maintenance windows are excluded from this requirement.
Governance & Community Participation Requirements
Energy Web Validators must participate in at least 75% of governance meetings and 90% of voting events on a rolling 6-month basis. Participation is defined as having one or more representatives from the Validator organization attending meetings and having one representative from the organization casting a vote in open proposals within the governance forum, respectively.
Each quarter, all Energy Web Validators must demonstrate at least one specific example of community participation as defined in the Code (i.e. Developing Projects & Applications, Contribution to open-source EW-DOS source code, Contributing to Governance Proposals, Contributing to Community Fund Proposals, Community Building).
Energy Web Token (EWT) Block Reward Requirements
As leaders and stewards of the EWC, Validators commit to responsibly managing liquidation of EWT reward balances so as to not create deleterious effects on EWT markets. Validators qualify to transfer block rewards from payout addresses to known exchanges if three requirements are met:
Time requirement: Validators must successfully host a node and comply with the Validator Code of Conduct for a period of 6 consecutive months following initial Validator node activation.
Balance requirement: Validators must maintain a minimum balance of block rewards equal to or greater than the trailing 6-month average reward earned per validator (for example, if the average validator earned 15,000 EWT total in block rewards in the preceding 6 months, all validators must maintain a balance of at least 15,000 EWT in their payout addresses to remain eligible).
Rent-seeking requirement: Once the time and balance requirements above are met, Validators may only transfer a maximum of 10% of their current block reward balance within any given 30-day period to known exchange addresses.
Current block reward balance is defined as the sum of EWT held in the Validator’s payout address(es) and EWT used in the Energy Web ecosystem on a rolling 12 month basis for business activity including but not limited to paying Energy Web Membership dues, Energy Web Chain transaction fees, procuring Utility Layer services, and staking EWT.
These requirements are designed to incentivize Validators to use EWT earned from block rewards in the Energy Web ecosystem.
Validator adherence to the Code of Conduct will be automatically monitored using the Energy Web Validator dashboard, which will collect data from the Validator governance forum, node telemetry, and the EWC itself to assign a quantitative performance score for each of the above categories.
The performance of each Validator will be made public via the dashboard so Validators and the wider community can hold each Validator accountable for maintaining compliance.
The Code will be enforced objectively as follows:
Single violation, defined as an initial breach of any one of the above categories, will result in an immediate two-week suspension of the validator node.
Secondary violation, defined as a breach of two categories concurrently, a breach of the code as listed below, or a second violation of a single category within a rolling 12-month period, will result in an immediate four-week suspension of the validator node. Reinstatement of the node is contingent upon the Validator submitting a written plan to remedy past violations and maintain compliance with the Code of Conduct within the governance forum.
Failure to perform necessary node updates as part of a planned network upgrade;
Significant violation, defined as a breach of all three categories concurrently, a breach of the code as listed below, or two or more secondary violations within a rolling 12-month period, will result in permanent expulsion from the EW Chain validator community.
Experiencing a major security failure in which a validator node's host machine and/or private keys are compromised by unauthorized actors;
Engaging in illegal, unethical, or anticompetitive behavior;
In the context of EW-DOS, an Asset is a digital representation of a physical or virtual device on the Energy Web Chain. An Asset could represent, for example, a solar photovoltaic panel, a battery, an electric vehicle, or an IOT device.
Assets must have a Decentralized Identifier - DID in the Energy Web Chain's DID Registry in order to participate in applications and marketplace activities. Once an Asset has a DID, it can take on roles within an organization or application. This is discussed further below.
Assets and their chain of custody are managed by smart contracts that are deployed on the Energy Web Chain.
When an Asset is first created, it is registered in the IdentityManager smart contract as an owned identity (the owner
address being the Asset owner, discussed below).
The main purpose of the IdentityManager smart contract is to have a on-chain location which aggregates known assets. In other words, it provides a kind of "asset-registry" functionality. This can allow one for instance, to more easily answer questions such as "how many assets have been registered in total?".
While there are many OfferableIdentity smart contracts, there is intended to be fewer IdentityManager smart contracts as the IdentityManager's main purpose is the aggregation of OfferableIdentity information. For instance, an enterprise could have a single IdentityManager to all assets which are registered by their employees.
The Asset owner can offer ownership to another DID. The OfferableIdentity smart contract provides methods to verify, offer and transfer ownership of Assets (these concepts are discussed in further detail below).
Other contracts in the Ethereum ecosystem exist which track ownership such as popular NFT contract or contracts which implement ERC-173 such as ERC-725. However, a key requirement of Energy Web's asset implementation was that ownership transfers cannot be performed unilaterally and so these aforementioned options were not used.
Every Asset must have an owner. Asset owners initiate the registration, transference and enrolment activity of their Assets. This requires them to make transactions on behalf of their Asset, so the owner must have an address on the Energy Web Chain that is connected to an Ethereum-compatible crypto-currency wallet such as MetaMask. The owner of an Asset is recorded in the Asset's identity on-chain.
The iam-client-library
Asset service provides high-level methods to facilitate the chain of custody for an Asset.
Chain-of-custody events (registration, ofference and transference) for an Asset are emitted from the IdentityManager smart contract. SSI Hub listens for and persists the details of these events. All historical owners of an Asset and the dates of offer, transference and acceptance are accessible through SSI Hub's API.
Registering as Asset involves creating an OfferableIdentity smart contract for the Asset on the Energy Web Chain, and registering its identity in the IdentityManager smart contract. This is initiated by the Asset owner. Because each Energy Web Chain address is a valid DID under the did:ethr
DID method, each asset inherently has a DID.
The owner of a registered Asset can transfer ownership to another address on the Energy Web Chain. (The new owner's address must have signing capabilities in order to sign transactions associated with asset management).
The OfferableIdentity smart contract provides methods to facilitate Asset transferance. This contract makes calls to the IdentityManager smart contract so that the state of the Asset is updated at each phase of the transfer.
When a transfer is initialized, an 'offer' of transfer is made to the recipient DID.
The state of the Asset identity is marked as 'offered' in the IdentityManager smart contract.
The DID that the Asset was offered to must accept the Offer before it is transferred to them. iam-client-library
provides a method to accept the transfer. The Asset's owner is updated in the IdentityManager smart contract to reflect the new ownership.
The DID that the Asset was offered to has the option to reject the transfer. The Asset's 'offered' status in the IdentityManager smart contract is set to 'false'.
An Asset can take on (enrol to) roles within an organization or an application. If their enrolment request is approved by the role issuer, the Asset is issued a role-based verifiable credential.
If the Asset's owner is an authorized issuer of the desired role, the Asset owner can directly issue a role-based verifiable credential to their Asset.
If the Asset's owner is not an authorized issuer of the desired role, the owner can submit an enrolment request on behalf of their Asset to the issuer.
iam-client-library
provides the high-level methods to request and issue enrolments. See the API documentation here.
Switchboard provides an interface for users to register, transfer and enroll Assets. If you are logged into Switchboard, you can view the Asset management interface here.
iam-client-library
contains the high-level functions for managing (registering, fetching, transferring, etc.) assets and their corresponding data. You can view the service API documentation for Assets in the library here.
Energy Web and the distribution system operator (DSO) Stedin jointly developed a decentralized energy asset management system leveraging the EW-DOS components and architecture discussed above.
The goal of this collaboration was to:
Facilitate secure, encrypted communication between distributed energy resources (DERs) (i.e. solar panels, batteries, etc) and the grid
Enable DERs to provide grid services (e.g. selling excess energy back to the grid)
Grid assets (e.g, smart meters, distribution automation devices), and distrubuted energy resources (DERs) were assigned DIDs. The DID is anchored on the asset's pre-existing SIM cards. Each asset exists as an identity in the IdentityManager smart contract on the Energy Web Chain. Cryptographically signed information (such as control signals and commands) from the DSO (Stedin) can then be sent to targeted assets. This allows for an awareness and exchange of grid services between the DSO and DERs.
You can read more about this use case in the official press release here.
Symbol
Name
Description
View Ownership History
View the history of owners and transaction of chosen asset.
Verification Method
Existence of the asset can be verified by a third-party. For this you should know the third-party public DID and type of Network.
Transfer Ownership
Transfer ownership of your asset. For this you should know public DID of a new owner. As soon as a request submited your asset from My assets tab will be moved to Previously owned assets.
Edit
At any time, you can set a personal name and icon for each of your items. For security reasons, assets names are blurred in the general list.
Generate QR-Code
Generate a QR-code for a chosen asset.
Issue Claim to Asset
Inform about Verified Claim of a chosen asset.
Symbol
Name
Description
View Details
View the basic details of your organization, including the logo, namespace, organization name, website, description, and other data.
Create Sub-Organization
Create a new sub-organization owned by the organization. This allows you to define applications and roles for specific subsidiaries or business units within your organizational umbrella. For example, you might create “subsidiary1.exampleco.iam.ewc” and “subsidiary2.exampleco.iam.ewc” so that you can define applications and roles specific to those subsidiaries (as described in the following sections of this document).
View Applications
View the applications owned by this organization (i.e., go to application management tab).
View Roles
View the roles associated with this organization or with any application owned by this organization (i.e., go to role governance tab).
Note that that are two kinds of roles:
Roles associated with an organization - these roles are independent of any particular application. For example, you might create the role “global dApp admin” to manage all of your organization’s applications.
Roles associated with an application - these roles are specific to a particular application. For example, you might create the role “installer” or “renewable energy buyer” in an application that you own. These roles are not necessarily part of your organization.
Create Application
Create a new application owned by the organization.
Create Role
Create a new role associated with either this organization or a specific application owned by this organization.
Edit
Change the details of your organization. Please note that it is not possible to change the root namespace of an organization. For example, after you have defined “exampleco.iam.ewc
" as your namespace, you could define subdomains (e.g., "roles.exampleco.iam.ewc
" or "applications.exampleco.iam.ewc
"), or you could define a new root namespace (e.g., "exampleorg.iam.ewc
"), but you are not able to change the root namespace "exampleco.iam.ewc
" into something different.
The “others (JSON)” field allows you to specify formatting-related details (e.g., color scheme) that should be applied, so that when you integrate the system into your decentralized applications the branding is consistent. For example, you could add into this field the text:
1{"bgcolor":"CDD3FF","txtcolor":"FF0000"}
The above text will set the background color for the system in your application to be the light blue color with hex code CDD3FF
and the text color to be red with hex code FF0000
. You can experiment with different formatting options.
Transfer Ownership
Transfer ownership of your organization and its root namespace to another address.
Delete
Delete your organization.
Run a full instance of the blockchain on your machine
You have the option of running a full node of the Energy Web Chain main network or Volta test network locally. Running a local node does requires a degree of technical capability. It helps to understand the benefits of doing so, and the alternatives to running a full local node.
There are a number of benefits to running your own node, which are described below.
A 'client' is software that implements a blockchain's protocols and allows you to connect directly with the blockchain - that is to read data from the blockchain or initiate transactions on the blockchain, such as transferring tokens. Anyone can create client software, as long as it implements that blockchain's official protocols. Ethereum's protocols are specified in their yellow paper, and there are a number of Ethereum clients to choose from.
A node is any machine that is actively running client software and is connected to the blockchain. Blockchain is often called a “peer-to-peer” network, because its network is made up of many peers running nodes simultaneously that are connected to each other.
Depending on if you are running a full node, a light node, or an archive node (see the differences between these nodes here), your client will sync with the current state of blockchain and then continue to execute every transaction that is added to the blockchain. Essentially it is having a live copy or version of the blockchain running locally on your machine.
Depending on the blockchain you are you connecting to, this can take up large amounts of space and take a long time to retrieve and sync the history of the chain on your machine. For example, synching with the Energy Web chain will require much less resources than syncing with the Ethereum mainnet, as it is a much larger and longer-running blockchain.
To run a node, you need to install the client software. The Energy Web mainnet and Volta testnet both use the OpenEthereum client (formally known as Parity), because it supports the Authority Roundtable (AuRa), which is a consensus algorithm specifically for Proof-of-Authority (PoA) blockchains. You can read more about the PoA consensus algorithm and why we implemented it for the Energy Web Chain here.
Only approved validators can create or 'seal' new blocks on the Energy Web Chain. If you run a full local node, you will be able to validate transactions, but not create new blocks.
The more nodes there are, the more secure the system is as a whole. Blockchains are decentralized technology, so by design the system performs better if there are multiple instances of it rather than just one. The more nodes there are, the less points of failure or opportunities for malicious action.
Your transactions are more direct and more secure. Software that provides intermediary connections to the blockchain like Infura or MetaMask are, like any other web-based software, susceptible to downtime or error. By connecting to the blockchain yourself, you are removing your dependency on external providers for secure and direct connection. You also do not expose your public keys to the browser.
You can self-verify transactions. You have part or all of the blockchain running on your node, so you can query the chain for transactions directly (and as often as you want) rather than relying on a user interface like a block explorer. Your queries can be more specific and efficient, giving you only the information that you need, for example, ‘how many transactions did addresses X, Y and Z send during this time period on each day for the last 30 days?’
You are not subject to rate limits. Infura (and therefore MetaMask, as it implements Infura to connect to the blockchain) does have rate limits for JSON RPC requests. If your development requires a lot of requests to the blockchain, running a local node may be more efficient.
Running a local node is not necessary to use applications that run on the blockchain or transfer tokens.
To use applications deployed on the Energy Web Chain, or to transfer tokens, you can connect to the blockchain through MetaMask using a remote RPC. You can see guidance for doing that on the Volta Test Network and the Energy Web Main Network here.
Multi-core CPU
4GB RAM
SSD drive and free space
EWC RPC node - 150 GB
Volta RPC node - 200 GB
A decent DSL connection is required
Download and save the chain config to your local machine.
Note that there are different chainspec files for the Volta Testnet and the Energy Web production chain:
The chainspec file for Volta Test Network is here.
The chainspec file for Energy Web Main Network is here.
Volta Testnet chainspec:
Energy Web Chain (production) chainspec:
Download OpenEthereum client v3.3.5
Run the following command in your terminal. Provide the path to the chain config that you want to use. The following command references the Volta chain config.
Your local node should start:
Connect your MetaMask to the Volta Test Network or Energy Web Chain via remote RPC. You can read how to do this here.
Get the URL of your MetaMask account. You can do this by clicking the settings dropdown and selecting "Expand View."
When the view is expanded, copy the URL in the browser
Run the following command in your terminal
This section describes minimal setup to run an RPC node locally or on the server using Docker container run with docker-compose. This is solely for development purposes, it's not a production grade recommendation.
Verify that prerequisites are installed:
2. Create working directory
3. Create docker-compose.yaml file
4. Download database snapshot - this takes some time and requires resources due to the size of the .tar file, but it will speed up synchronization process.
*Note that this step is optional. If you do not download the database snapshot, move to Step 6.
Volta (depending on your internet connection ~1 hour download time for us):
Energy Web Chain (production) (30 minutes download time for us):
5. Unpack database snapshot. This snapshot only works with OpenEthereum client.
*Note that this step is optional. If you did not complete Step 5, skip this step and move to Step 6.
Volta:
Energy Web Chain (production):
6. Set permissions:
8. Start container:
9. Examine logs:
The log output should be similar to the following (sometimes the logging output does not appear immediately, wait some time):
10. After some, you will sync with the network. Until a full sync, you will see be in a "syncing" state:
The output will show current synchronization status:
It will take some time to fully sync with the current state of the blockchain. When the synchronization is finished status will be:
Governance frameworks in the IAM stack
Governance provides the rules and procedures to establish behavior, expectations and trust within an environment. While governance is a critical component of any multi-party network, it is especially critical in decentralized environments, where there is no central authority to define and orchestrate governance mechanisms over every component of the ecosystem.
As an example, consider an application built on top of the Energy Web Chain. Each application must ensure that:
Components are in compliance with existing digital frameworks that their application depends on (e.g. cryptocurrency wallets, peer-to-peer protocols or smart contracts)
The application has a governance framework that is robust enough to garner stakeholder trust and compliant participation within the application itself (i.e. defining and enforcing who is allowed to do what within the application)
Governance in a network is established through a governance framework (also referred to as a trust framework). The framework provides concrete policies, rules and expectations for the stakeholders within the network.
Energy Web’s IAM governance relies on two systems: role-based hierarchies and verifiable credentials. Used together, these components provide a governance framework for users to interact with the digital infrastructure, and with other users in a secure and self-sovereign manner.
Role credentials are associated with a user’s Decentralized Identifier (DID), which is anchored on the Energy Web Chain in the DID registry. This means that a user’s roles and credentials are not siloed within any one application; because a user can use their DID to register with any application built on top of the Energy Web Chain, their roles and credentials are portable.
In the Energy Web IAM ecoystem, role-based hierarchies are defined by organizations, applications, and designated roles within them. The tech stack leverages Energy Web’s Ethereum Name Service to define and namespace relational hierarchies within a system. We decided to deploy our own copy of ENS on the Energy Web Chain as it provides a standard set of widely-used, well-tested smart contracts. Read more about the ENS smart contracts deployed on the Energy Web Chain here.
The namespace hierarchy is built on four levels:
Organization: a top-level organizing body
Sub-organization(s)
Application: a distinct service or functionality provided by an organization or sub-organization
Role: a distinct functionality within an application or within an organization
When roles are created within an organization or an application, the creator can define conditions or criteria that restrict who is qualified to take on the role. The role creator can also determine which users (by DID or role) are authorized to issue or revoke a role.
Below is a resolved role definition for a role of "install lead". Note that it contains an enrollment precondition that the subject already has the role (credential) of 'project installer'. The role definition also specifies an expiration date, and asserts that only users that have the role of 'install manager' can issue or revoke this role.
Verifiable Credentials enable users and their assets to take on roles within a system (that is, within an organization, a sub-organization or an application within a hierarchy, as discussed above).
See more extensive documentation on credentials in the IAM stack here.
Switchboard provides the user interface for creating and defining these hierarchies. See the Switchboard guide on Governance and role creation here.
The supporting IAM libraries provide the functionality for persisting and resolving namespaced domains Namespace domains that are registered and managed in the Energy Web Ethereum Namespace smart contracts. Read more about the role of Ethereum Name Space in Energy Web Digital Infrastructure here.
These libraries also support governance by providing credential verification mechanisms. This is discussed further in the Credential documentation.
The DDHub Client Gateway is an integration gateway SDK that is intended to run on-premises or on the cloud environment of participants. It provides an interface for participant systems to interact with other systems in the shared interacting with a data exchange solution - namely, the DDHub Message Broker.
The Client Gateway is available in Github at https://github.com/energywebfoundation/ddhub-client-gateway or in the Azure Marketplace.
The gateway application is authenticated, authorized, and encrypted (messages) using self-sovereign identities (DIDs) and verifiable credentials rather than a centrally trusted and managed approaches seen in legacy solutions.
The client container is an integral part of the DDHub in achieving its decentralized characteristics as it assumes the power of the identity that it currently holds/represents.
DDHub Client GW UI: the main interface for admins to manage their DDHub Client GWs
DDHub Client GW API: exposes RESTful and Web Socket APIs for integration
DDHub Client GW Scheduler: contains scheduler jobs for caching data including but not limited to channels, topics, and decryption keys
DDHUB Client Gateway Storage: a postgres DB used to store configuration data.
Key Vault - store private keys and other secrets
DDhub Message Broker: The component that routes messages between Client gateways (using API to control NATS messaging).
SSI Toolkit: Libraries and components that implement identity and access management functionalities.
DDHub Message Broker is a component that primarily provides message routing, persisting, and delivery for a seamless data exchange between participants within an energy market or supply chain.
The message broker promotes sovereignty of participants by:
The broker does not have authority or logic which assumes the power of the participants
No one except the participant themselves can govern data exchange channels and verify messages
Encryption/decryption, signature validation, authorization, etc must be done under the participants domain (Client Gateway)
Below are the Message Broker components which need to be hosted to deploy a Decentralized Data Hub:
Message Broker App
NATS Jetstream and Jetstream Store to store small data messages (small messages up to 2 MB) and channel configurations
Azure Blob (or other large file) Store for large data messages and delimited files converted into blobs, as well as file metadata
RDBMS for message topic and schema management
In this section, we'll walk through how to connect to the Energy Web blockchain, and the Volta testnet using the MetaMask browser extension.
is a browser extension and a mobile app that handles blockchain account management and helps users securely interact with a . It’s supported in Chrome, Brave, and Safari browsers, as well as it is available for Android and iOS devices. By default, you can connect to the Ethereum Mainnet or any of the Ethereum test network.
If you don’t have MetaMask installed install the extension first. Learn about here.
Prerequisite: Metamask plugin is installed in the browser; this section explains how to add the Energy Web blockchain to it.
To configure Metamask to connect to the Energy Web blockchain or to Volta, the fastest way to do that is using the or
Depending on what network you connected to, and if you have Energy Web tokens or Volta Tokens in your account, you should see your balance.
Our mission is to develop and deploy an open and decentralized digital operating system for the energy sector in support of a low-carbon, customer-centric energy future. Therefore, the Energy Web Foundation of its software projects under the . Some libraries intended to be distributed with hardware devices are released under the .
A program is free software if the program's users have the four essential freedoms:
* The freedom to run the program as you wish, for any purpose (freedom 0).
* The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this.
* The freedom to redistribute copies so you can help others (freedom 2).
* The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.
A library that provides high-level functions related to the identity and access management (IAM) for all users, assets, organizations and applications that are anchored on the Energy Web Chain. This includes:
Management of namespaces
/ management
Creation and governance of organizations, applications and their associated roles. Once created, these are persisted on the
Claim requests, verification and issuance for role permissioning. Once created, claims are persisted on the
functionality
You need to meet OpenEthereum hardware requirements and have enough disk space to store database snapshots (which will grow in time). OpenEthereum - EthHub
1. Download the chainspec file. GitHub - energywebfoundation/ewf-chainspec: EWF official chainspec repository
Full specification for OpenEthereum configuration options can be found here: OpenEthereum Documentation - Configuring OpenEthereum
See OpenEthereum documentation for Docker: OpenEthereum Documentation - Docker
11. Check the database synchronization status in the command line using OpenEthereum's 'eth-syncing' module: OpenEthereum Documentation - The `eth` Module
A class-based library that provides an abstraction layer to manage and interact with and on the .
The DID Library enables users to adopt and/or implement different , which promotes interoperability with other methods of decentralized identifiers. The DID library currently implements the for creating and updating identities on the blockchain.
The DID library interacts with the Energy Web Chain using the .
(includes documentation)
:
A backend class-based library that allows other JavaScript/TypeScript applications to easily add authentication and authorization based on roles to their applications. This allows any application to use Switchboard's decentralized approach to identity and access management.
You can refer to the application to see an example of Passport-DID-Auth integration into an application
A multi-package library for CRUD operations specific to Energy Web Verifiable Credentials. The repository is a module-based library built with .
Network Name
EnergyWeb RPC
New RPC URL
http://consortia-rpc.energyweb.org
Chain ID
246
Currency Symbol
EWT
Block Explorer URL
https://explorer.energyweb.org
Code to verify role based verifiable credential.
Smart contract and client code specific to EnergyWeb IAM roles.
exposes code to support role/claim lifecycle.
Switchboard
Energy Web X is an open-source, public, substrate-based blockchain purpose-built to support Worker Node Networks.
To learn more about the role of Energy Web X within EW-DOS, read the EWX Lightpaper.
In EW Data Exchange, the DDHub Message Broker is analogous to a computer - it is foundational infrastructure upon which participants gain the ability to establish their own “profiles”, exchange messages, and run their own applications. The DDHub Message Broker routes and translates messages between participants. Messages are structured and organised in distinct channels
corresponding to specific use cases or business processes, and formatted in topics which define data formats and schemas.
In order to access certain channels and gain permissions to send and/or receive specific message types, participants must acquire roles that reflect their role within the market (or use case), using credentials attached to their self-determined identity. Credentials are granted by a platform governing body and determine the ability to send messages to other participants using channels (what messages are sent and received) and topics (data schemas that define the payload of a message).
Channels are defined at the client gateway, and are what messages are sent and received on. Participants define a channel as:
Type
: Publish/Subscribe
Topics
: Any that the DID has visibility of
Restrictions
: Who will receive a message on a publish channel, or who I will receive a message from on a sub channel. Channels can be restricted by DID or role
An example of a channel definition object is provided below. In this example, the channel will receive RealTimePricing
or DayAheadPricing
from any DID with the role: user.roles.internal.apps.operator.iam.ewc and does not specify that payload encryption is required.
Topics are data schemas that define the payload of a message within a channel. They are grouped under owners that are used as an authorization unit for visibility. Two examples of Topics for publishing and acknowledging a distribution network line constraint are provided below:
\
Foundational blockchain technology
The Energy Web blockchain is derived from Ethereum blockchain technology. Ethereum provides a strong foundation for the Energy Web Chain because it is open-source, widely used, and many well-developed tools for development on Ethereum exist today.
Ethereum-based technology is used as EW-DOS's trust layer because anyone can use Ethereum to build and deploy decentralized applications that run on blockchain technology. This aligns with the purpose of EW-DOS, which is to build decentralized, open-sourced applications that accelerate decarbonization of the energy grid.
Prior to Ethereum, most blockchains were protocols created to exist as a public, decentralized ledger for financial transactions (think Bitcoin).
Ethereum developed the Ethereum Virtual Machine (EVM) to allow users to store and execute programs on the Ethereum blockchain. This lets programmers write programs that contain logic and state management, both which are critical to decentralized applications (dapps). These programs are called smart contracts. Once it is deployed on the blockchain, a smart contract has an address on the blockchain and anyone can use to interact with the contract or call its public functions. You can read more about how to interact with smart contracts here.
This means that blockchain technology can not only be used to buy and trade cryptocurrency, but also to create robust applications for decentralized finance, asset trading, gaming and, in our case, a decentralized energy market.
Read an overview of Ethereum and the Ethereum Virtual Machine on the Ethereum documentation's "What is Ethereum" section here.
The Energy Web Chain is derived from Ethereum, but it is a separate blockchain using a different consensus protocol and unique governance mechanisms. However, most of the fundamentals of the Ethereum network are the same for the Energy Web Chain. These fundamentals are helpful in understanding the role that blockchain technology plays in EW-DOS. This is especially true if you want to develop and deploy smart contracts on the Energy Web Chain.
If you are unfamiliar with Blockchain technology, or the Ethereum Virtual Network, there are some additional resources below to get you started.
Transactions (this is an overview of transactions in Ethereum, but we explain more about transactions on the Energy Web Chain here)
NodeJS server application using NestJS framework. The server caches specific smart contract data such as ENS namespaces and DID documents in order to improve read-query performance for applications and packages that rely on on-chain data.
The SSI Hub also facilitates the credentials exchange between credential requesters and issuers, which enables other applications such as Switchboard or Decentralized Service Bus to use credentials for role permissioning.
SSI Hub persists the following information that is created, read and updated by the IAM library:
Organization namespaces
Application namespaces
Role namespaces
User credentials
EV-Dashboard
Field
Value
Network Name
EWC
New RPC URL
https://rpc.energyweb.org
Chain ID
246
Currency Symbol
EWT
Block Explorer URL
http://explorer.energyweb.org
Field
Value
Network Name
Volta
New RPC URL
https://volta-rpc.energyweb.org
Chain ID
73799
Currency Symbol
VT
Block Explorer URL
http://volta-explorer.energyweb.org
Many cryptocurrency wallets (including MetaMask and Trezor) are Hierarchical Deterministic Wallets (HD Wallets).
Using a protocol called BIP44, HD Wallets allow you to derive multiple accounts that support different types of coins from one master private key. For each HD Wallet, there is one 12-24 word mnemonic seed phrase. The algorithm associated with BIP44 forms a tree using the seed phrase. Account information (public addresses and private keys) for different tokens or currencies exist at different branches of the tree. This ensures that you get a different address information for each token. You can recreate this tree in a new wallet by importing your mnemonic seed phrase.
A path called a 'Derivation Path' provides a logical hierarchy for the wallet to use to search the tree for a user's address information at a specific branch (for a specific coin type).
The path typically starts with "m'" for "master"
The second figure is the purpose. This is a constant, always set to '44' for BIP-44 derivation paths. It indicates that this branch of the tree is compliant with BIP-44 specifications.
The third figure denotes the coin type for a specific blockchain. Ethereum, for example, is always "'60". Energy Web Chain is "'246". (You can see all of the registered coin types for BIP-44 here.)
The fourth figure is the account. Accounts are numbered from index 0 upward. A user can have many accounts associated with one currency. You can liken this to having multiple accounts at a single bank.
The fifth figure is the change. It can be a value of 0 or 1. 0 denotes that the address is visible to others outside of the wallet and can receive payments. 1 indicates that the address is not visible to others outside of the wallet and cannot receive payments.
Certain wallets only accept derivation paths for specific tokens or currencies. MetaMask for example, only supports the BIP-44 derivation path with coin type 60, which is Ether - m’/44’/60’/0’/0.
You can find documentation for the BIP-44 here.
If you are using a hardware wallet and are not using it through a connection with MetaMask, you may need to change the derivation path to Energy Web Chain's derivation path to see your EWT in your account.
Energy Web Chain's derivation path is m/44'/246'/0'/0
The Decentralized Data Hub (DDHub) is one of the primary technologies underpinning EW Data Exchange solutions. The DDHub Environment is composed of multiple DDHub Messaging Client Nodes interacting with each other through the DDHub Message Broker.
Each node (or group of nodes) in the Message Broker cluster is identified with a unique DID and must be issued with a DDHub Messaging Client role
Each node contains an IAM Client that ensures legitimacy of users interacting within the messaging cluster by checking their identities, and issued role or set of roles\
The IAM Client and DIDs provide a layer of protection against unauthorized access to DDHub functionalities
Data exchanged within the cluster is secured in transit with mTLS
The GreenProof project by the Energy Web Foundation aims to provide a robust and flexible platform for issuing, managing, and verifying digital proofs representing clean energy certificates. To achieve this, the project employs the Diamond pattern, an innovative smart contract architecture based on the EIP-2535 standard. This document presents an overview of the Diamond pattern, its benefits for the GreenProof project, and its implementation within the core module.
A modular and upgradable smart contract architecture
The Diamond pattern allows one main contract (called the diamond) to have an unlimited number of functions by separating the contract's functions into several smaller contracts called "facets." The diamond acts as a proxy contract that routes function calls to the appropriate facets (i.e., the actual subcontracts implementing the desired logic). This architecture enables a higher degree of modularity and upgradability for smart contracts by allowing users to trigger any on-chain function of any component using a single, stable smart contract address.
By implementing the EIP-2535 standard, the GreenProof core module provides an upgradable proxied system, wherein organized groups of smart contracts (facets and libraries) encapsulate different sets of functionalities into modules that can be plugged into the main GreenProof Diamond. This architecture unlocks the ability to efficiently and granularly compose the smart contract system based on the use case, allowing for seamless integration and updating of various components, enhancing the overall flexibility and adaptability of the system.
Benefits of the Diamond Pattern for GreenProof This smart contract architecture aims to achieve the following strategic objectives :
Scalability: The modular nature of the Diamond pattern allows GreenProof to easily scale as more components and features are added or updated.
Flexibility: Facets can be added, replaced, or removed granularly, enabling GreenProof to adapt to changing requirements in the green energy certification landscape.
Maintainability: The Diamond pattern promotes a clean separation of concerns, making it easier to maintain, troubleshoot, and update the GreenProof smart contracts system.
To implement the Diamond pattern, the GreenProof smart contracts modules are composed of the following components:
Voting component : VotingFacet.sol implements the voting logic, allowing the worker nodes to achieve consensus on data to be certified.
Issuer component : IssuerFacet.sol encapsulates the issuance logic, allowing the verification and creation of green certificates. Each certificate is represented by an ERC1155 token bound to the proof of green, resulting from the workers' decentralized consensus.
Certificate Manager component: ProofManagerFacet.sol handles certificate management features, such as claiming, revocation, inspection, and verification.
Below is the detailed Github repository structure:
Additionally, the GreenProof core module uses the solidState library, which offers utility contracts implementing the EIP-2535 standard specification. The following contract libraries are particularly useful:
The DiamondCutFacet.sol
contract is a facet handling all the upgrading logic. (A cut, in the diamond’s industrie, is an action resulting in new facets creation, removal. This facet will be used to add, replace or remove granularly logic to the greenProof Diamond)
A dedicated facet is provided with the OwnershipFacet
contract, which handles the implementation of the IEP-173 standard for the Diamond ownership.
A DiamondLoupeFacet.sol
contract provides all standard loupe functions for showing what facets and functions the diamond has.
We want to estimate, for each action taking place on smart contract, the cost estimation. Smart contract transaction costs can be measured on two different metrics:
a predictable, static computation gas consumption, which measures the computational effort required on the Ethereum Virtual Machine to execute the transaction logic
a dynamic cost associated to the base fee + priority transaction fees, provided to the validator nodes. This dynamic metric is related to the offer/supply balance on the network; the more traffic occurs, the highest are the required fees to have the transaction processed in priority.
The current document provides the average gas consumption for greenProof smart contracts. It uses the Gas Reporter plugin on the hardhat development environment. This plugin is useful in estimating how much our contracts will cost to deploy to production, and how much each transaction will cost once deployed. It can be enabled during unit testing.
A separate set of unit tests has been implemented to target each function and report the gas consumption. Below are the result of this estimation.
Contracts deployed once (those contracts will be deployed only once by EnergyWeb and will act as on-chain libraries/modules for each new green proof instance)
E.g. for SAF and 24/7 app, we would deploy the facets for each of them once. We deploy all facets once, and any new projects which require those logic/feature will just have to connect to those deployed smart-contracts. For that purpose we need to keep track of the addresses of those facets in our backend system I guess, since we will have to reuse them.
Contract to deploy
Avg unit of gas consumption txfees = (amount of gas) * gasPrice)
AVG cost (in USD)
Cost percentage
VotingFacet
2080202
0.16
6.9 %
IssuerFacet
3259338
0.25
10.9 %
ProofManagerFacet
1537946
0.12
5.1 %
GreenproofInit
173707
0.01
0.6 %
Note about cost percentage: (For each transaction, the user provides into the gasLimit parameter the maximum amount of gas allowed to execute this transaction. So here the % is out of this gasLimit parameter.)
Contracts deployed each time we want to set a new greenProof instance
This greeproof contract will be deployed only once for each project (i.e Quintrace). This is the main contract which will never be upgraded, and which purpose is, among others, to forward / redirect each transaction to the right sub-smartcontract (i.e facet) implementing the required logic. This greenproof contract has an internal registry mapping each function to the address of the contract which should be reached to execute this function.
So anytime we want to make an upgrade, we will send a transaction to that greenproof contract in order to change the address of the logic-contract inside the mapping / registry
At the end of the day, the greenproof contract won’t be redeployed.
(Note that we may need to deploy a new logic-contract in order to get the new address to store into the greenproof main contract. But the main one is not redeployed)
Contract to deploy
Avg unit of gas consumption
AVG cost (in USD)
Cost percentage
Greenproof (main proxy)
3993308
0.31
13.3 %
The below methods will be called to perform actions on certificates.
Methods
Avg unit of gas consumption
AVG cost (in USD)
requestProofIssuance
518491
0.04
discloseData
107834
0.01
safeTransferFrom
182209
0.01
claimProof
68582
0.01
claimProofFor
81530
0.01
revokeProof
95339
0.01
Voting component
The below methods will be called to perform vote related actions.
Methods
Gas consumption
AVG cost (in USD)
addWorker
105305
0.01
removeWorker
65767
0.01
Vote
404279
0.03
On the smart contract level we are seeking for patterns which:
minimize readings and writings operation from and to the EVM storage, especially in loops
when possible, tightly pack data in structures
when possible convert external function calls into internal functions since calling external functions raises costs.
On the compiler level, the optimizer option can be enabled on the configuration file (hardhat.config or truffle.config). This option requires to set a runs
parameter.
From the solidity documentation:
The number of runs specifies roughly how often each opcode of the deployed code will be executed across the life-time of the contract. This means it is a trade-off parameter between code size (deploy cost) and code execution cost (cost after deployment).
Since we are using a highly modularized smart contract system (Diamond Proxy Pattern), our contracts bytecode is very reduced, which allows a high runs setting on the optimizer. (More infos on how the EIP 2535 pattern helps in code optimization).
A cryptocurrency wallet is a digital wallet to manage your cryptocurrency. Just like you need an email address to manage your online communication, you need a cryptocurrency wallet to manage your crypto.
A cryptocurrency wallet has two keys, . Your public key is also called a receive address and you send it to people to receive cryptocurrency. Just like you send your email address to people to receive an email message. A private key gives you full rights and full access to your wallet. It is extremely important that only you have access to your private key and that you don’t share this with anyone. This is the key to your wallet, similar to a password to your email account.
Components that implement blockchain and consensus protocol
The Energy Web Chain is comprised of different components that provide the functionalities determined by the blockchain’s protocol.
Broadly speaking, protocols are defined rules and standards. Internet protocols, like HTTP protocol for example, define standard procedures for the transfer of data over the internet.
A blockchain network is no different. In a decentralized and self-executing system like a public blockchain, protocols are of significant importance in establishing how the system works, and then ensuring that the system continues to self-execute as designed.
Protocols exist to determine specific aspects of blockchain behavior, such as:
How transactions are validated
Who gets to validate transactions and when
How validators are compensated
How peer nodes interact with each other
The system components below ensure that the Energy Web blockchain adheres to Ethereum's protocols, and the protocols established by OpenEthereum's . (OpenEthereum is the Ethereum client that is used by the Energy Web Chain. You can read more about the purpose of Ethereum clients )
System Contracts are that implement the protocols. Read more about Energy Web's system contracts
The validator node architecture monitors validator behavior to ensure consistent and secure blockchain operation. Read more about the validator node architecture
Energy Web has deployed This contract is identical to OpenEthereum's original contract, with the exception that it was made Ownable by Energy Web Foundation. Only Energy Web can reserve a name or drain funds from this contract.
There are two reasons for making this contract Ownable:
OpenEthereum's name registry might be needed for other OpenEthereum related system contracts later: e.g. , or .
We will have the official system set up on the chain, so this contract is only needed for internal purposes and will not be used publicly.
The name registry is a placeholder for now. The contract can be found in our repo:
Contract
Address
JSON ABI
SimpleRegistry
0x1204700000000000000000000000000000000006
Function
Description
entries(bytes32)
Returns an entry based on the sha3 hash of the name registered.
reverse(address)
Reverse resolution of an address.
fee()
Returns the fee for reserving a name (not really relevant to public).
getData(bytes32,string)
Returns a string data value from an entry, given its key.
getAddress(bytes32,string)
Returns an address data value from an entry, given its key.
getUint(bytes32,string)
Returns an unsigned integer data value from an entry, given its key.
getOwner(bytes32)
Returns the owner of an entry.
hasReverse(bytes32)
Returns true if entry has a reverse address registered.
getReverse(bytes32)
Returns reverse address of an entry.
canReverse(address)
Returns true if address can have a reverse.
reverse(address)
Returns the reverse value of an address.
reserved(bytes32)
Returns true if the name (its sha3 hash) is already reserved.
In a centralized system, such as a bank or a broker, a designated authority or central operating system would be in charge of adding transactions or information to the system, making sure that each transaction is trustworthy, up to date with the whole system, and does not duplicate previous transactions.
In contrast, public blockchains are decentralized, peer-to-peer systems that have no central authority or oversight like this. Designated actors are responsible for processing transactions, creating new blocks and maintaining the integrity and history of previous blocks.
The system for determining these actors and how they are selected is called a consensus mechanism. These mechanisms determine the process of who can confirm transactions and create new blocks on the blockchain and the protocol for how they do so. Because there is no central oversight, consensus needs to be designed in a way that prevents or disincentivizes malicious or uninformed actors from corrupting the integrity of the chain.
There are many consensus algorithms. You may have heard of some widely used ones like Proof-of-Work or Proof-of-Stake. Each mechanism has its own way of determining who is eligible to process transactions and create new blocks, and how how actors are selected to do so.
The Energy Web Chain uses the Proof-of-Authority (PoA) consensus mechanism.
All consensus mechanisms have disadvantages and advantages and are chosen based on the purpose and use case of the blockchain it will be serving. You can read more about why Energy Web employs the Proof-of-Authority mechanisms below.
The Proof-of-Authority (PoA) consensus mechanism has a defined set of actors that validate transactions and propagate new blocks to the chain. Rather than competing or staking for a chance to add blocks, they take turns creating new blocks in a round-robin style. These actors are called validators.
Energy Web validators participate by running full nodes of the blockchain using OpenEthereum client software. Smart contracts called Validator-Set contracts have the functionality to add or remove validators. Anyone can run a full node of the blockchain, but only addresses that are included in the Validator-Set contracts can validate transactions and seal blocks. You can read about the Energy Web Chain's Validator Set Contracts here.
The Energy Web Chain uses a specific type of PoA called Authority Roundtable (AuRa). The AuRa Proof-of-Authority consensus mechanism can be used by blockchains that run the OpenEthereum client.
You can read more about the validator process below.
For more in-depth information on Proof-of-Authority, read the Authority Roundtable Proof-of-Authority white paper
In other consensus mechanisms, such as Proof-of-Work or Proof-of-Stake, miners can remain anonymous. So long as they meet the proof-of-work or staking requirements, they can process transactions on the blockchain and in many cases do so anonymously.
Validators are not anonymous. They have applied to become a validator and have undergone a a KYC (“Know Your Customer”) process as part of their application. Our validators are well-known members of the energy community, meet the eligibility requirements and the hardware/software installation specifications to become a validator, and they have a vested interest in the Energy Web Chain’s performance. You can see a full list of Energy Web Chain validators here.
Validators create blocks: The fundamental role of the Proof-of-Authority validator is to validate transactions, compile valid transactions into blocks and propagate new blocks to the network.
Validators provide network security: By storing the current and historical state of the Energy Web Chain, each validator contributes to the overall integrity and security of the network. Since at least 51% of validators are required to sign each block before it is finalized on the chain, validators provide checks and balances against any erroneous or malicious attempts to publish falsified transactions or alter historical data. Physical decentralization of validator nodes provides redundancy in the event that one or more validators is unavailable due to technical reasons or otherwise compromised.
Validators participate in the the Energy Web Chain's governance: Validators will be asked to offer opinions and contribute to technical and non-technical decisions relating to modifications of the Energy Web client, protocol and validator set.
Energy Web uses Proof-of-Authority consensus for three primary reasons that benefit the Energy Web’s digital infrastructure, the energy sector that will use the technology, and the environment as a whole.
To enable transaction capacity on the order of hundreds to thousands of transactions per second: we estimate that the Energy Web Chain has the ability to achieve 30x greater throughput capacity than the Ethereum Mainnet;
To minimize resource (i.e. electricity and computation) consumption, and subsequently, transaction costs: Eliminating competitive Proof-of-Work results in 54,000x less energy consumption and 350x lower network costs (i.e. costs incurred by organizations hosting validator nodes) which translates into lower and more stable transaction costs;
To improve compliance with relevant regulations and business requirements in the energy sector: substituting fully anonymous miners for vetted validators enhances the ability of decentralized applications to comply with various regulations, including data-protection regulations like GDPR, and increases the likelihood of widespread user and enterprise adoption.
To improve compliance with relevant regulations and business requirements in the energy sector: substituting fully anonymous miners for vetted validators enhances the ability of decentralized applications to comply with various regulations, including data-protection regulations like GDPR, and increases the likelihood of widespread user and enterprise adoption.
At a high level, the PoA mechanism works as follows:
All validator nodes maintain a complete list of the validators, identified by public keys. This list changes as validators are added or removed. In addition to storing the current and historical state of the network, all validators maintain essential information about the network (such as synchronized timing information and current data processing limits).
For a defined time window, one validator is assigned as the primary validator via the PoA algorithm. During this time, they are responsible for collecting the broadcasted transactions and proposing the new block. Only one validator is designated as primary at a time–based on a calculation derived from the timestamp on synchronized clocks among the validator nodes in the network and the number of validators–in order to prevent validators from arbitrarily creating blocks at irregular intervals.
If a validator fails to create a block when it is selected (e.g., because of hardware problems on the side of the validator) or its block fails to be validated by the pool of nodes (e.g., because of network connectivity problems), the next validator proceeds to create a block with whatever transactions haven’t been processed.
The remaining validator nodes verify that the transactions in each block are legitimate for that time window, sign the block with their private keys, and propagate the signed block to the network.
Once a simple majority of validators have authored a block on top of a given signed block, finality is achieved for that given block, and the block is confirmed by the network and added to the chain.
System contracts are the Energy Web Chain's smart contracts that implement OpenEthereum's protocols for Aura Proof-of-Authority consensus mechanism.
Energy Web's smart contracts are open-sourced, and you can see them on github here.
Validator Set Contracts - manage validator permissioning and behavior
Reward Contract - manages validator block rewards
Holding Contract - manages the initial disbursement of pre-mined energy web tokens
System contracts are the Energy Web Chain’s smart contracts that implement OpenEthereum’s permissioning protocols. These protocols determine what actions can be taken on the network.
In order to adhere to the expected protocol, the Energy Web Chain’s system contracts must implement the interfaces that are expected by the AuRa consensus engine, so that it can conform to the client’s protocols.
Let’s take OpenEthereum's Validator-Set contract as an example.
The OpenEthereum documentation specifies that “A simple validator contract has to have the following interface”
Now let’s look at Energy Web’s ValidatorSetRelay smart contract.
You can see that this smart contract implements all of the functions of the Validator-Set protocol interface that was specified above.
Validator Set Contracts - manage validator behavior
Reward Contract - manages validator block rewards
Holding Contract - manages the initial disbursement of pre-mined energy web tokens to a group of initial supporting affiliates
The Holding Contract holds tokens for initial investors. These tokens are "pre-mined", and do not enter the pool through block validation. Tokens are held for affiliates until a specific point of time that is specified in the contract, at which point they can be released to the specified address. The constructor of the holding contract and its initial balance is part of the chainspec file. This allows the investors' tokens to be locked at the first block.
The mapping between the account address and the token amount is hard coded into the contract and cannot be changed after deployment. After a block that has a later timestamp than the holding timestamp of an address is created, the tokens for that address can be transferred to the address by calling the realeaseFunds method. This method can be called by anyone, not only by the address that holds that balance.
If you're an investor and want to see your balance, you can use the Balance Viewer interface: http://balance.energyweb.org/.
You will need MetaMask pointed to a local or a remote node
Enter your address in the lookup field to see your holding balance
If the release period has ended, press the "Withdraw" button to release the funds to the address it belongs to. Make sure you trigger the withdraw function with an account that has some ethers to cover transaction costs
The mapping between addresses and tokens/release timestamp is kept in the storage of this contract. This mapping data structure was filled at the deploy time of the contract and cannot be changed.
Contract
Address
JSON ABI
Holding
0x1204700000000000000000000000000000000004
Function Name
Description
releaseFunds(address)
Releases funds for a holding address if it is present in the contract and the holding period is over
holders(address)
Returns the holding data for an address, the available amount and the holding-period-end blocktimestamp
TARGET_AMOUNT()
Returns the total amount initially held by the contract
Validator Set contracts provide information on current validators and private functionality to add and remove validators.
For upgradeability purposes, the contracts are divided into 2 parts. See below Fig. 1.
This contract implements the required reporting ValidatorSet interface expected by the engine and it is the contract defined in the chainspec seen by the engine. It relays most of the function calls to the RelayedSet contract, which holds the actual logic. The logic contract can be replaced (upgraded), so it is possible to change the behavior of validator management without conducting a hard fork.
This contract implements the logic and manages the validator list. The owner of the validator set interacts with this contract for managing the validators. This contract maintains two validator sets:
The current validator set (the validators who are actively sealing)
The migration validator set, which is the new set we migrate to in case of a change (validator addition or removal).
Validators and potential validators have four states in these contracts:
Active validator: Validator is in the active validator set, sealing new blocks
Not a validator: The address nothing has to do with validation.
Pending To Be Added Validator: Validator is already added by the owner and their acceptance is pending, but not active yet until it is finalized. This implies that the validator cannot report, be reported, or produce blocks yet.
Pending To Be Removed Validator: Validator is pending to be removed (removed by the owner), but it is not finalized, and so is still active as a validator. This implies that as long as the removal is not finalized, the validator is actively producing blocks, can report and can be reported on.
The RelayedSet contract logs malicious or benign reports by emitting corresponding log events that can be seen by anyone. Reporting can only be on and about active sealing validators.
The events contain the reporter- and reported address, and the block number which the validator was reported on.
Name
Address
JSON ABI
ValidatorSetRelayed
0x1204700000000000000000000000000000000001
Function
Description
finalized()
Returns true if there are ongoing changes to the active set, false otherwise. If true, implies that current validators list equals migration validators list.
addressStatus(address)
Returns the state of an address, two integers: an integer representing the validator state, and an index value. The index is the position of the validator address in the currentValidators array. It is only relevant if the address is an active validator, should be ignored otherwise.
The validator state mappings are:
NonValidator: 0
Finalized: 1
PendingToBeAdded: 2
PendingToBeRemoved: 3
getValidators()
Returns currently active block producing validators
getMigrationValidators()
Returns the migration validator set. If there are no changes, it returns the same list as getValidators().
getUnion()
Returns the union of current and migration sets. Useful for tracking the statuses of all affected validators in case of an ongoing change
getValidatorsNum()
Returns the number of currently active validators
isPendingToBeAdded(address)
Returns true if address is pending to be added to the active list.
isPendingToBeRemoved(address)
Returns true if address is pending to be removed from the active list.
isPending(address)
Returns true if address is pending to be added or removed.
isActiveValidator(address)
Returns true if address is an active validator, meaning it partakes in producing new blocks. Note that a validator who is pending to be removed is still active.
isFinalizedValidator(address)
Returns true if address is a finalized validator, meaning it is active and NOT pending to be removed either.
Function Name
Description
getSystemAddress()
Returns the system address
getValidators()
Same as RelayedSet getValidators()
relayedSet()
Returns the address of the Relayed contract
Components for running a validator node and monitoring validator behavior
The system architecture of a validator node on the Energy Web Chain is made up of two components:
Together these two components allow validators to run a local node of the chain, validate transactions, seal blocks, and monitor validator behavior and metrics.
A client is software that allows you to run a local node on your machine and interact directly with the blockchain. Every validator must run a full node in order to participate in validation.
Remember that the Energy Web Chain is derived from the Ethereum blockchain. Because of this we use an Ethereum client to connect with the chain called . Anyone can create a client, as long as it implements the protocols laid out in , and there are a number of Ethereum clients to choose from.
Energy Web uses the OpenEthereum client because it supports the , which is a consensus algorithm specifically for Proof-ofAuthority blockchains. OpenEthereum allows validators to connect to the chain, collect transactions and seal blocks according the AuRa consensus algorithm.
To read more about OpenEthereum, you can
To read more about Ethereum clients, see the
The monitoring system collects comprehensive, real-time data and metrics on validator performance and provides a user interface for viewing the data. It is important to gather as much data about the validator nodes as possible in order to ensure a secure and performant blockchain. To do so, we rely on well established industry solutions to transfer these metrics off the validator node to protect the sensitive nature of the data.
The use of the telemetry monitoring system is opt-in. Validators can disable it if they have their own monitoring system in place that allows for real time tracking of all relevant metrics.
There are four components involved in the data collection process:
The OpenEthereum client collects data on the validator node. Collected data includes:
CPU usage
Memory usage
Disk usage
Number of connected peers
List of visible P2P peers
Current block
Network latency to 3 different and major locations (e.g. cloudflare, google, amazon)
Network throughput
Network error rate
Number of SSH keys
Service status for SSH, docker and the parity container
SHA256 hashes of key system components/binaries
Current chain specification file (or hash)
Telegraf collects relevant metrics from the host machine and the custom-built OpenEthereum metrics collector. The metrics collector allows Telegraf to receive the metrics from the OpenEthereum client
The collected metrics are stored in an InfluxDB database and can be visualized using Grafana
The block explorer interface provides the most important on-chain information about blocks, transactions, accounts and . Below is an overview of what information you can view on the Block Explorer.
Note that there is a separate site for the Volta Testnet Block Explorer.
Volta Testnet Block Explorer:
Main Network Block Explorer:
Block Height
Num transactions
Hash
Parent Hash
Difficulty
Total Difficulty
Gas Used
Gas Limit
Block Rewards
Miner (validator)
Transactions
Transaction address
Status
Block Number
Nonce
Transaction fee
Transaction Speed
Raw input
Gas
Internal Transactions
Transaction address
Nonce
Gas limit
Internal Transactions
Account details for all external and smart contract account addresses with balances and associated transactions
Address
Token balance
Num. transactions
Last balance update
Gas used
All transactions
Coin balance history
client - monitors validator node behavior
: open-source server agent that collects data from the OpenEthereum client
- open source database that stores the data collected from Telegraf
- data visualization tool that queries the InfluxDB for data and provides graphical interface for data visualization
All components are run in separate docker containers managed by docker compose. For additional information on docker visit: and .
- block details for all sealed blocks
- transaction details for all validated transactions
- transaction details for all pending transactions
GraphQL: GraphQL interface which you can use to query specific information that are on chain: . To find out more about the possible queries visit:
This page describes the steps to install a validator node on the Volta test network.
Choose a hosting provider (on-premise or qualified cloud provider) and favored operating system.
Install operating system and prepare host according to the OS Installation Guide (see previous lesson)
Find the Client installation script matching the installed OS on the energyweb github: https://github.com/energywebfoundation/ewc-validator-node-install-scripts/tree/master/volta-affiliate and copy it from the volta-affiliate/openethereum or volta-affiliate/nethermind directory to the host
Make sure the latest system updates are installed by running apt-get update
(debian/ubuntu) or
(centos)
Make the script executable with
Run the script (please do not use the
parameter which can be used to take default for node-name and generate a random key)
First review any open issues on Github to see if there is a known issue.
If the issue is not already known, email netops@energyweb.org to troubleshoot.
If the installation was successful, it should generate a .txt file (named install-summary.txt) that lists the node address, IP address, , influxDB username/password. You will need to provide these details via a form in the next step to successfully add your validator node to the validator system contract.
If you encounter issues with the installation or the install-summary.txt file is not generated:
First review any open issues on Github to see if there is a known issue.
If the issue is not already known, submit a question in the #validators or #technical_questions channels in the EWF Member Slack space to troubleshoot.
Submit the Volta node installation details here.
After submitting the installation details, you will receive another email with instructions for proceeding to the main EW Chain.
This page provides specifications for host environments for Volta and EWC validator nodes.
Validator nodes for Volta and the Energy Web Chain must run on a dedicated server or Virtual Machine only for the purpose of running the client; do not use hosts that already perform other tasks.
You can choose to run your validator node either On-Premise on your own hardware or on a virtual machine / cloud computing instance of your choosing. If you have any questions please contact the EWF NetOps team: netops@energyweb.org
The following specifications are strongly recommended, but validators are free to configure their host machine at their discretion in accordance with relevant internal policies or requirements. Please note that hosting a node on a machine with insufficient CPU, storage, RAM, and/or networking capacity may result in node failure (e.g. unable to connect to peers, unable to synchronize, unable to seal blocks) and require extra labor to reconfigure the host machine.
A on-premise node should have these specs or higher. For security reasons these resources must be reserved for the validator node and not shared with other workloads.
Modern Multi-core x64 CPU (at least 4 threads, preferably Xeon-class)
8GB RAM (preferably ECC)
Local SSD storage, 300 GB free capacity for blockchain, redundant in RAID-1
1 GBit NIC
The following specifications are strongly recommended based on the most common cloud environments used by existing EW Chain validators. You may select any cloud provider of your choosing
Amazon AWS
The following EC2 instance sizes are appropriate to run validators. These resources should be reserved for the validator node and not shared with other workloads.
m5.xlarge
m5.2xlarge
m5a.xlarge
m5a.2xlarge
c5.xlarge
c5.2xlarge
The default EBS storage assigned (normally 8GB) is not large enough to run the node. Make sure to run the node with following EBS storage settings:
General Purpose SSD (gp2)
at least 300GB size
Microsoft Azure
The following Azure VirtualMachine sizes are suitable to run a validator. These resources should be reserved for the validator node and not shared with other workloads.
D4s_v3
DS3_v2
B4ms
Use Premium SSD as attached storage with a size of at least 300GB.
Google Cloud
The following Google Cloud Virtual Machine sizes are suitable to run a validator node. These resources should be reserved for the validator node and not shared with other workloads.
n2-standard-4 and above: https://cloud.google.com/compute/docs/general-purpose-machines#n2_machines
Digital Ocean
The following Digital Ocean Virtual Machine sizes are suitable to run a validator. These resources should be reserved for the validator node and not shared with other workloads.
General Purpose Droplet: 16 GB memory, 4vCPU
CPU-Optimized Droplet: 8 GB memory, 4vCPU
Use Block Storage as attached SSD storage with a size of at least 300 GB.
The following requirements should be met to ensure proper operation:
Wired connection with 100 MBit/s symmetric link to the internet
Low latency connection to next internet hop (<5ms)
No data volume limitations
Even though we recommend a 100MBit/s connection, that connection will likely not be saturated by the node. You can expect 10-30MBit/s when the chain is under load. Traffic will mainly flow on port 30303 (udp/tcp).
The following Linux-based Operating Systems are supported for running a validator node:
Ubuntu Server 18.04 LTS or later
Debian 9.8 or later
CentOS 7 or later
RedHat Enterprise Linux 7.4 or later
Validators can elect other operating systems at their discretion, but may need to customize the installation scripts. Contact netops@energyweb.org for questions and support.
The following section provide a comprehensive guide for installation of one the supported operating systems. All further deployment procedures are based on the installation results.
On-Premise
Procedure based on version 18.04.2.
Download the ISO from https://www.ubuntu.com/download/server.
Boot the ISO
Select English as language
Choose a convenient keyboard layout
Choose Install Ubuntu
Let the network auto-configure -or- configure manually if needed. The system needs an internet connection.
Select no proxy and keep the mirror address.
Select Use an entire disk and confirm
Choose user name and host name in next screen. Choose a strong password.
Select Install OpenSSH Server but don’t import keys
Don’t select any snaps and continue
Finish installation and let it boot to the prompt
Login as the created user and run a full system update using 'sudo apt update && sudo apt dist- upgrade -y'
Amazon AWS
Ubuntu AMI's are listed at https://cloud-images.ubuntu.com/locator/ec2/. Search for "ebs 18.04 amd64" to get the right version.
Microsoft Azure
The URN for the image is Canonical:UbuntuServer:18.04-LTS:latest
On-Premise
Download the NetInst ISO from https://www.debian.org/distrib/netinst
Boot the ISO
Select Install from the boot screen
Select English as language
Select Location based on actual location of the host
Chose a convenient keyboard layout
Let the network auto-configure -or- configure manually if needed. The system needs an internet connection.
Name your host. Change it from debian to something else
Choose a strong root password
Create the user account and choose a strong password
Select the proper timezone
For the partitions use Guided - use entire disk
Select All files in one partition
Finish partitioning and write changes to disk
Select No when ask to scan more disks
Choose a mirror close to the host
Opt-out of the package survey
on the Software Selection select only SSH Server and standard system utilities
Install the grub bootloader to MBR and use the primary disk for that
Finish installation and let it boot to the prompt
Login as root and run a full system update using 'apt update && apt dist-upgrade -y'
Reboot
Amazon AWS
The AMI Id's can be found at https://wiki.debian.org/Cloud/AmazonEC2Image/Stretch
Microsoft Azure
The URN for the image is credativ:Debian:9:latest
On-Premise
Download the minimal ISO from https://www.centos.org/download/
Boot the ISO
Confirm the automatic boot option Test this media & install CentOS 7
Choose English as language
On the installation summary choose Installation destination and confirm automatic partinioning
Back on the installation summary screen click on Network & Hostname
Change the hostname
Enable the network interface and make sure it is configured properly
Click Done to get back to the summary and click Begin Installation
During installation set a root password
Finish installation and let it boot to the prompt
Login as root and run a system update with 'yum update'
Amazon AWS
The AMI Id's can be found at https://wiki.centos.org/Cloud/AWS#head-78d1e3a4e6ba5c5a3847750d88266916ffe69648
Microsoft Azure
The URN for the image is OpenLogic:CentOS:7.5:latest
Running a validator node requires raised awareness of host and node security as authorities are a main attack surface to disturb operation of the blockchain. The following security rules are strongly recommended:
No services are permitted to run on the same host that are not part of the validator node package
All incoming connections on all ports except SSH (22/tcp) and the P2P (30303/tcp+udp) port have to be firewalled on the host with DROP rules. To guarantee proper network etiquette, incoming ICMP has to be accepted.
SSH access is only allowed for non-root users
SSH access is only allowed through RSA keys
OpenEthereum or Nethermind client RPC endpoints (HTTP, WebSocket) have to be disabled
System updates have to applied regularly and in a timely manner
Regular (monthly) run of rootkit detectors
If you are using AWS please also check out the additional AWS Security guide.
Nethermind Client
Full specification for Nethermind configuration options can be found here:
Run the following command in your terminal -
Your local node should start:
This section describes minimal setup to run an RPC node locally or on the server using Docker container run with docker-compose. This is solely for development purposes, it's not a production grade recommendation.
See Nethermind documentation for Docker: https://docs.nethermind.io/get-started/installing-nethermind#docker-container
Verify that prerequisites are installed:
Create working directory
Create docker-compose.yaml file
Start container:
Examine logs:
The log output should be similar to the following
Blockchain networks to support test and production environments
Energy Web supports two distinct blockchain networks:
The Volta Test Network (Testnet)
The Energy Web Production Network (Mainnet)
These networks are independent of each other. They each have their own chain specifications that the OpenEthereum client uses to configure the blockchain. You can view them on github here.
You cannot transfer tokens between these two blockchains. They each use their own unique utility token that pays for transaction fees on the blockchain (read more about this here).
The Energy Web Chain's main network utility token is the Energy Web Token, which has real fiat value. The Volta Test Network's token is the Volta Token, and it has no real value. They are not interchangeable - if you have Volta tokens, this does not mean you have Energy Web Tokens, and vice versa.
Volta is the pre-production test network (testnet) of the Energy Web Chain. It’s the blockchain equivalent of a test server or test environment in traditional software development. Most blockchains have at least one test network. Ethereum, for example, has several test networks for pre-deployment testing.
Volta is used as a staging network to:
Test smart contracts before they are deployed on the production chain. If you write your own smart contract, you will want to deploy it and test it on Volta first to make sure it works as expected. Because tokens on the testnet (Volta tokens) have no real value, you can test thoroughly and incur no cost.
Test protocol updates before they are deployed on the production chain. Each time there is an upgrade to Ethereum's protocol, we test it on the Volta Network first.
The utility token for the Volta Test Network is the Volta token. Volta tokens have no real value, but you will need them to "pay" for transaction costs associated with interacting with smart contracts on the Volta network. Read more about the Volta Token and how to get some here.
Connect to Volta Test Network using MetaMask - you will need to connect to the Volta network in order to access applications and smart contracts deployed on Volta
Run a local node - you have the option to run your own local node of the Volta network. You can read about the purpose and benefits of running a local node here.
The Energy Web main network (mainnet) is the production network of the Energy Web Chain. The gas fees to pay for transactions require Energy Web Tokens (EWT), which have real value. You can read more about EWT and how to acquire it here.
You can read more about transaction costs on the Energy Web Chain here.
Connect to Energy Web Main Network using MetaMask - you will need to connect to the Energy Web Chain in order to access applications and smart contracts deployed on the Energy Web main network
Run a local node - you have the option to run your own local node of the Energy Web Chain. You can read about the purpose and benefits of running a local node here.
Using smart contracts on the Ethereum Virtual Machine
EW-DOS utility layer packages and SDKs interact with smart contracts that are deployed on the Energy Web Chain. To do this, they use API Client Libraries to connect to the blockchain and create instances of smart contracts to access their public functions.
If you're not familiar with what a smart contract is, you can read Ethereum's introduction to smart contracts here.
Below we provide an overview of API Client libraries and a some code examples. Note that exact implementation varies in each package or SDK, but the fundamental concepts remain the same.
You can interact with smart contracts (i.e. call their public read and write functions) on the the Energy Web Chain and the Volta Test Network using any Ethereum API client library. Client libraries allow you to connect to and interact with the blockchain network. You can read about all the functionalities of Ethereum API client libraries in the Ethereum documentation here.
The most popular JavaScript libraries for interacting with Ethereum networks are ethers.js and web3.js. EW-DOS uses ethers.js, so below we will provide ethers.js examples, however concepts will be similar among different client libraries.
When interacting with a contract, you use a library to first create a Provider, which is a connection the blockchain. You then use the provider to create an instance of the smart contract that you want to interact with. Once this instance is created, you can call the public methods that are exposed in the smart contract.
A provider is a connection to the blockchain. It gives you an interface to interact with the network. To create a JSONRpcProvider, you will need the JSON RPC Url. To create an IPCProvider, you will need the path local IPC filename (this is only available in node.js).
You can see the full ethers.js documentation on Providers here.
See source code here
To create a new instance of a contract that is already deployed on the blockchain, you need three pieces of information:
The contract's ABI- the ABI (Application Binary Interface). The ABI is a JSON object that provides the interface to your smart contract. It defines the contract's constructor, events and the behavior of its public functions. The contract's ABI is generated with the smart contract is compiled.
The contract's address - every smart contract has an address when it is deployed to the blockchain. You can deploy the same contract on multiple blockchains, but each contract will have a different address.
The provider
You can see the ethers.js documentation **** for creating a new instance of a deployed Contract here.
See source code here
The Contract method returns a new instance of that contract at the address passed in. Now that we have an instance of this contract, we can interact with its public methods:
See source code here
Smart Contracts
Link to Source Code
IAM Smart Contracts
For a tutorial on how to deploy a smart contract on the Volta Test Network or Energy Web Main Network, go here.
The Ethereum Name Service is available on Energy Web Chain and Volta Testnet
The Energy Web blockchain uses the Ethereum Name Service (ENS) for name-spacing assets that are anchored on our blockchain. ENS is a critical part of providing user-friendly dApps. You can interact with the ENS contracts that are deployed on the Energy Web Chain in several ways.
Below we explain:
The Ethereum Name Service (ENS) is a distributed, open, and extensible naming system based on the Ethereum blockchain.
Machine-readable blockchain identifiers such as Ethereum addresses, content hashes and metadata are difficult to interact with in a user interface. ENS was developed to provide human-readable, user-friendly mapping for these identifiers, and to give users the ability to reserve domain names for our applications. To date, it is the most widely used blockchain naming standard.
ENS solves a similar problem that Domain Name Systems (DNS) provide. DNS lets us navigate to a website using human language and an intuitive format (www.energyweb.org), rather than using an IP address that is impractical to remember and has no association with the content that it directs you to (104.26.13.227). Similar to DNS, ENS supports a structure of dot notation for hierarchy and nesting.
Using ENS, you can create identifiers for the following blockchain content types:
Address
Reverse address (e.g. an address resolves to alice.eth)
Content hash (e.g.: IPFS/Swarm hashes)
ABI definitions
DNS records
Public keys
Smart contract interfaces (see EIP 165)
Text (email, physical address, geo location, metadata)
You can see a full list here in the ENS documentation, as well as the specifications for resolving each type.
As a simple example, if you want to send funds to your friend Alice, you can specify the recipient as “alice.eth” instead of “0x0052569B2d787bB89d711e4aFB56F9C1E420a2a6”.
If you want to refer to a content hash of a report listed at your custom domain, you can refer to it has “myReport.myDomain”, instead of by the hash identifier.
The two main components of ENS, explained below, are responsible for storing the human-readable address in smart contract registry, and resolving it to its original content.
ENS has two primary components: the Registry and the Resolvers.
A smart contract that holds all of the domains/subdomains, the owner of the domain, and the domain resolver (the method used to map it back to its original address.) You can see the ENS Registry smart contract here.
Methods that translate the human-readable names to their original address. A resolver has multiple methods, each of which are responsible for resolving different types identifiers (for example, one method is responsible for resolving contract ABI definitions , one method is responsible for resolving content hashes.)
You can see the ENS smart contracts for all of the resolver types here
You can read more about the Registry and Resolvers in the original documentation here
What’s important to take away is that the two primary components for ENS are smart contracts that hold a mapping for all domains/subdomains, and provide resolver methods for translating different address types to a human readable form. These contracts are extendible, so you can add your own resolvers for different address types.
Energy Web has deployed the ENS smart contracts on the Energy Web mainnet and Volta testnet. You have several options for interacting with ENS, depending on your use case.
Contract
Source
Volta address
EWC address
Registry
0xd7CeF70Ba7efc2035256d828d5287e2D285CD1ac
0x0A6d64413c07E10E890220BBE1c49170080C6Ca0
ETH Registrar Controller
0xb842CCA1682DC2Ee6A9da6A59bA4B5C736b229cD
0x9C99a28D3d702E6096361Ff31E724b772B5D709e
ETH Base Registrar
0x5630EBDbf41624fF77DcBfC4518c867D93E42E9f
0x3BDA3EE55a5b43493BA05468d0AE5A5fF916252f
Public Resolver
0x0a97e07c4Df22e2e31872F20C5BE191D5EFc4680
0xA517983Bd4Af4DF0Ed9b52DA4BC405d0A95eE7E2
Reverse Registrar
0xff7Befa016689dC5D89165867a65CF26B73e6514
0xcB9BCAa8010F51D6484570B99B127e8a26B6B468
Reverse Resolver
0x775e2a91501cdadeA65BF8eBb94a82529Fc2C34B
0x0C12c9087342DafE42b28A93998CEd711DC9a614
You can use this interface to search for available names in the Energy Web domain and register them to your address. Note that you will need to have sufficient funds in your wallet to do so as there is a fee for name registration.
Our management app is forked from the Ethereum Name Service Manager app.
There are a number of libraries that support ENS. These libraries have methods to configure your registry, and manage and resolve names. The IAM client library and IAM Cache server both connect to ENS using the ethers library. You can see the Ethers API support for ENS here.
For a full list of libraries that support ENS, see the ENS documentation here.
Incorporate external data sources into your smart contracts
By themselves, smart contracts cannot access data outside of the blockchain or send its data to services outside of the blockchain. To do this, smart contracts use middleware called an oracles, which are third-party services that fetch and send data to and from smart contracts. Oracles are similar to traditional web-based API services.
Smart contracts can contain logic that triggers certain changes or actions based on external data from an Oracle. Without oracles, blockchains and their applications that cater to specific industries that rely on real-time changes such as finance, commodity trading, or IoT, would not have access to the data necessary to react to real-time external factors.
It's important to keep in mind that oracles are agnostic of the data they transmit - they are only responsible for fetching, verifying and relaying the data to and from the blockchain.
Inbound oracles send data to the blockchain. This is the most common type of oracle. Like traditional API services, the inbound data that the oracle provides can be anything that your smart contract needs for internal logic that it cannot access from the blockchain or the smart contract itself.
For example, you want to send 10 EWT to a friend's address when the price of a specific stock goes above $10 per share. An oracle will provide you with the data about stock price, and the blockchain logic will trigger the send when the oracle delivers data indicating that the price of a stock goes above $10.
Outbound oracles send data about events that happen on the blockchain to third party applications. For example, an account could receive a payment and trigger an outbound oracle to a mechanism that activates a pv solar panel.
Oracles can gather data from software and hardware. A software oracle interacts with and fetches data available from any web source that exposes its data. Some common examples are weather APIs, real-time stock information and exchange rates.
Hardware oracles interact with 'physical' data sources like sensors from IoT devices, QR codes or bar codes. Some examples could be reading the temperature from a smart thermostat or fetching data from a flood sensor..
Centralized oracles are developed, maintained and controlled by a single entity. One oracle is responsible for fetching data from one or many data sources, and then transmitting that data to the smart contract on the blockchain. You could liken this to using a centralized database for your smart contract's external data sources.
Decentralized oracles aggregate data from multiple sources using multiple oracle nodes, so that there is no single point of failure for data retrieval, and no single point of failure for the oracle itself. Decentralized oracles are more aligned with the wider community of public blockchain.
Regardless of the data source, or if it is centralized or decentralized, all oracles provide three main functionalities:
Listen to the blockchain network for incoming requests for off-chain data
Fetch data from the requested off-chain source
Transfer the data to the blockchain via a signed transaction
Insert the data into a smart contract’s local storage. Once the data is in the smart contract's storage, it can be used to trigger logic within that smart contract, or it can be available for other smart contract's to use
Depending on the nature of the data itself and how the smart contract uses the data, oracles can be designed to communicate with smart contracts using three main patterns:
Publish-subscribe: An oracle broadcasts data, and certain smart contracts are polling or "listening to" that oracle for changes in data. An example: "Poll the temperature of region X every 10 minutes. If the temperature is above 70 degrees celsius, turn the smart thermostat to 'on'."
Immediate-read: Oracles hold data in their storage and provide this data on request. Users or devices query the oracle for this data at the same time that it is needed. An example: "Is device X in a list of authorized devices to provide solar power to region Y."
Request-response: External accounts (via decentralized applications) interact with a smart contract and necessitate data from the oracle. The smart contract sends the data parameters to the oracle and performs the third-party data query. When the data is fetched, it sends the result back to the smart contract for the decentralized application to use. Because the decentralized application cannot always wait for the data, this occurs asynchronously. An example: A user selects from a dropdown on a decentralized application a date range to determine the average temperature of each day during the range. The start and end date are sent to the data oracle to fetch the temperatures for the days in the given date range. The data is sent back to the smart contract to perform necessary logic based on the data.
Setting up a Chainlink node and using it from a smart contract on the Volta test network
Design principles of Chainlink oracles
Scenarios where it makes sense to use Chainlink
Below are steps to deploy a smart contract on the Volta Test Network (the test network for the Energy Web Chain) using Remix. Remix is a web application used to compile, deploy and test smart contracts on Ethereum networks.
In order to deploy a smart contract to the Energy Web Chain Main Network, rather than the Volta Test Network, the steps are identical, except that you will connect your MetaMask to the Energy Web Chain rather than to Volta. We recommend that you always deploy and test your smart contracts to Volta first to make sure they behave as expected.
Once your smart contract is deployed, you can use the contract's ABI and address on the blockchain to interact with its public methods. For more information on how to interact with smart contracts, go here.
You can see steps for doing this are here. If you do not have a MetaMask installed, you can do so here.
You will need Volta tokens to to pay for the transaction fee for deploying the smart contract to the blockchain. For directions on how to get Volta Tokens, go here. To learn more about what transaction fees are, you can go here.
*Note that if you are deploying to the Energy Web Main Network, you will need to have EWT.
In the "Environment" dropdown, selected "Injected Web3". Notice that when you select this, "Custom (73799) network shows up. 73799 is the Volta Test Network - this confirms that we are connected to the Volta network via MetaMask.
You will need to confirm the connection to MetaMask.
Go to the file explorer panel (select the first icon on the left panel). Add a new .sol file in the 'Contracts' folder. Below it is called VoltaContract.sol.
In the .sol file, add the following code:
If there are no errors, click "Compile VoltaContract.sol" (make sure that the 'Language' selected is 'Solidity').
If you want to interact with your contract in the future using an API client, you will need the contract's ABI. The ABI is in the bottom right hand corner of the Solidity Compiler page after it is compiled.
Click 'Deploy' to deploy the contract to Volta Test Network.
Confirm the transaction in MetaMask. Make sure that you have some gwei as a gas price by doing the following:
Select EDIT
Select "Edit suggested gas fee"
Make sure you have a Gas price of 6e-8 GWEI (this should be autofilled)
Confirm the transaction in MetaMask
Once your contract is deployed, you can see it in the "Deployed Contracts" section of the same page ("Deploy and Run Transactions")
Click on "get" to test our contract's functionality. Remember from the code that is should just return a string "Volta".
Copy the address of the contract by clicking the copy icon.
Go to the Volta Block Explorer (volta-explorer.energyweb.org). If you are deploying to the main network, the block explorer is explorer.energyweb.org.
Paste the contract address in the search bar at the top right:
You can see the smart contract address details, the block it was created in, and the byte code. The block explorer contract details from the example above is here.
Now that you have your smart contract's address on the blockchain and its ABI, you can use an Ethereum API client to interact with your contract in your decentralized applications. For a tutorial on how to do this, go here.
The Energy Web Chain's native token
The is the native utility token of the Energy Web Decentralized Operating System (EW-DOS). Tokens are used in EW-DOS to pay for on the , and for staking to secure the as well as . You will need EWT in your digital wallet (we recommend using ) if you want to make transactions or use applications or smart contracts that are deployed on the Energy Web Chain main network.
Like other public blockchains, the Energy Web Chain uses EWT as a utility token to access services and orchestrate stakeholders within its blockchain system. In the context of the Energy Web Chain, EWT compensate validators for processing transactions, and are used to pay for transactions - for example, registering a new asset or organization in .
Utility tokens like EWT are different from other digital assets in the blockchain sphere such as coins, non-fungible tokens, and stablecoins. To learn more about the distinctions between these assets, see this article, .
Energy Web X will leverage and complement the existing Energy Web Chain by introducing new technical capabilities that streamline the deployment and operation of .
To maximize the security of every Energy Web solution using worker nodes, EWT will be required to interact with worker nodes and Energy Web X. Most notably, Energy Web Tokens will be required to:
Reward worker node networks: worker nodes are software packages that need to be run by individuals and/or businesses. In order to attract entities to run worker nodes, enterprises will need to include rewards, paid in EWT, that compensate worker node operators for their work.
Operate worker nodes: in order to become a trusted party to run worker nodes, individuals and/or businesses will be required to stake EWT. Staking requirements and reward schedules are mass customizable—enterprises launching worker node networks can configure different thresholds and award schedules at their discretion.
Validate Energy Web X: Energy Web X validators will need to stake a significant number of Energy Web Tokens in order to become validators on Energy Web X.
For clarity, instead of launching a new token with the Energy Web X blockchain, Energy Web X will be powered by the existing or EWT. Users have the ability to “lift” Energy Web Tokens from the existing Energy Web Chain onto Energy Web X. Lifted Energy Web Tokens can then be used for the functions described above. With this mechanism in place, EWT holders will be able to “lower” Energy Web Tokens back to the main Energy Web Chain at their discretion. Over time, token holders will be able to lower EWT to other layer one blockchains (for example, main net Ethereum) making Energy Web solutions interoperable with any blockchain ecosystem.
A transaction is any action that updates the state of the blockchain. There are costs associated with each transaction that cover the computational cost of processing that transaction. These costs are variable and dependent on several factors, which are discussed .
This page covers the basic functionality of transactions, how their associated costs are calculated, and where to see transaction data from the Energy Web Chain and Volta Testnet. If you want to read more about the fundamentals of transactions, see the Ethereum documentation on , , and ,
A transaction is any ‘write’ operation that changes or updates the state of the blockchain. Transactions are always initiated by an , and they must be signed by the account owner that initiated the transaction in order to be completed. Examples of write transactions include:
Transferring tokens between accounts
Deploying new smart contracts or accounts
Calling or Interacting with existing smart contracts
Once confirmed by the initiator, transactions can be in two states: pending and validated.
In a consensus blockchain, take turn validating transactions and sealing blocks. Before a transaction is validated, it is in a "pending" state in the memory pool ("mempool"). The following image shows a transaction in a "pending" state. You can view all pending transactions on the Energy Web Block Explorer
Notice that the transaction fee of a pending transaction is not determined yet and the "Block Number" is pending.
After a transaction is validated by a validator, it is added to a block. The block is designated by a block number, shown in the image below. Each block in a blockchain is made up of strictly ordered, consecutive, validated transactions.
Notice that the transaction fee of a validated transaction is no longer 0, it has a value in EWT.
Every transaction that updates the chain has a transaction cost (transactions that are "read only" - meaning they do not update the state of the blockchain - do not have a cost.) It’s important to keep in mind that all transactions are not created equal: some are more computationally intensive than others, some are more urgent, some require greater degrees of privacy.
For example, an interaction with a smart contract that has complex functionality and many internal variables to store will be more computationally intensive than a simple transfer of tokens from one account to another.
As we’ll soon see, these differences from one transaction to the next can have an impact on ultimate transaction cost.
To derive a concrete fee requires a gas price as well. Every user that initiates a transaction chooses a gas price they are willing to pay for that particular transaction, at that particular time. It is essentially a bid the user makes to have their transaction validated and added to the chain. Users that want to have their transaction expedited, for example, might bid a higher gas price to ensure that it’s included as soon as possible in the next available block.
You can specify a gas price in a transaction through MetaMask:
Finally, token value—usually expressed in a fiat currency equivalent—translates virtual transaction cost into ‘real’ transaction cost. And when token value varies widely, perhaps due to token market volatility, resulting transaction costs can vary too.
Using the three variables above, you can calculate the total transaction cost:
TxCost(unit:fiat$) = GasCost(unit:gas) x gasprice(unit:token/gas) x tokenvalue($/token)
Here’s how a fee would be calculated for a hypothetical transaction on the Energy Web Chain:
50,000 gas x 1 gwei per gas = 50,000 gwei = 0.00005 EWT
If the market price of EWT was $1 at the time of the transaction, this would equate to $0.00005 fee. If the price of EWT was $10, this would equate to $0.0005.
Gas cost, as we've mentioned, represents the computational effort that validators undertake when validating transactions and sealing blocks. The gas price is denominated in EWT, which is paid to the validators for their work.
Each validator may set their own minimum gas price that they are willing to accept in order to include a transaction in their blocks. Currently on the EWC, the default is 0.1 gwei, but the overall range is between 0.01 gwei and 1 gwei. When initiating a transaction on the EW Chain, you should make sure that your gas price is at least 0.01 gwei, and if you want to ensure that your transaction is executed within the next 1-3 blocks (roughly 15 seconds), you should choose a higher gas price.
Because each transaction uses different amounts of gas, the number of transactions that fit on a block will vary.
Each block on the Energy Web Chain has a size limit of 8 million units of gas. Hypothetically, a single extremely computationally intensive transaction could consume 8M gas, but a simple transfer of EWT between two accounts (the most basic transaction type there is) consumes 21,000 gas. This is why a simple metric of “transactions per second” is misleading; not all transactions are created equal in terms of complexity (i.e. gas cost.) If many of the transactions that are waiting in the memory pool have low computational cost, you can fit more transactions in the block. If they are larger, the block will hold less transactions.
Take a look at the details of a block added to the Energy Web Chain:
From this we can see that:
This block includes 43 transactions
The gas limit for the block is 8,000,000 (this limit remains constant for every block)
Only 1,553,623 units of gas were used to create the block (less than 20% of its limit)
If there were more transactions waiting in the memory pool to be added to the block, this block could have processed ~6,446,377 units worth of gas.
The same three variables above that define transaction cost also present opportunities to manage those costs and keep them low.
1. Lean smart contracts can help keep gas costs down: App developers and other smart contract writers are incentivized to write lean, efficient code—writing smart contracts and initiating transactions that are as computationally efficient as possible.
2. Gas price bids should remain low on networks with high transaction capacity: Of the three variables that contribute to transaction costs, gas prices are arguably the most powerful lever, since the bidded prices are solely at the discretion of the user submitting a transaction to the network. For reasons we’ll explore below, in the absence of sustained block “congestion”, gas prices can remain low and stable.
3. “Just in time” gas price calculations mitigate some risks of token value volatility: For a variety of reasons, some token markets are more volatile than others. But just because a token’s value relative to a fiat currency changes, it doesn’t mean that transaction fees similarly change without warning. Users calibrate gas price bids at the time of the transaction, and thus will bid a denomination of tokens relative to the token’s value at the time. While it is possible that a past transaction fee could end up being significantly more or less expensive relative to current (or future) token value, transaction fees at the time they are incurred should remain relatively stable as a function of fiat currency.
So why would anyone bid a high price for any transaction? Shouldn’t transaction fees remain very low, as rational users consistently attempt to minimize their costs? In reality, transaction fees vary precisely because of competition among users to get transactions confirmed.
At any given moment there may be hundreds or thousands of transactions waiting to be confirmed and formally added to the blockchain. These pending transactions sit in a memory pool, or "mempool", where they are ultimately selected by validators (miners in the case of proof-of-work blockchains) to be included in a block. But each block has a finite gas limit, meaning not all transactions can be confirmed at once. As a result, validators will typically give preference to the most-lucrative (or expensive, depending on perspective) transactions in the mempool. Transactions with lower fees may end up having to wait for their transaction to get confirmed.
Ultimately, fees are about transaction prioritization. The higher the gas price you pay, the faster your transaction will be confirmed. If you don’t care about the amount of time it takes to confirm your transaction, you can offer a very low (or no) gas price. However, with this strategy you run the risk that your transaction never gets confirmed, and just sits in the mempool queue indefinitely.
At the most basic level, transaction fees on the EWC are determined as a function of supply (e.g., computational capacity of the network, as defined by block gas limit and block speed / time) and demand (i.e., number of pending transactions). Volatility comes into the equation because supply, namely block time and block gas limit, is essentially fixed, whereas demand fluctuates as a function of the number of users and and the volume and complexity of transactions in the memory pool at any given time. Occasionally, transaction fee trends diverge from transaction volume, but generally the two are correlated.
Looking at historical data since the launch of the EWC in June 2019, it’s fair to say that transaction fees are usually extremely low - with average block utilization (in terms of gas consumption) around 15-20% the minimum gas price of 0.1 gwei is almost always sufficient to ensure a transaction is validated within 2 blocks. Based on the historical market price of EWT, transaction fees expressed in terms of fiat currency are typically in the range of $0.0001 (or less).
Ethereum documentation on
This page covers three topics:
Current challenges in integrating distributed energy resources (DER) into power grids
The potential benefits of integrating DERs into power grids
Examples of how EW-DOS is being applied to solve DER integration and related lifecycle management challenges
The current energy transition involves a shift from a power system defined by a relatively small number of large conventional power plants to one that also includes increasing numbers of . DERs are small-scale assets (devices) that either supply or consume electricity (in some cases, either one at different times) and include rooftop solar panels, home batteries, and electric vehicles. On top of this is an expanding market of “smart” appliances, smart meters, and digital energy management systems that track and regulate energy usage in a customer-centric manner.
As of now, there is no shared technical infrastructure or communication system between the electricity grid and this growing number of customer-centric energy resources. Their current technical infrastructure and capabilities are widely incongruent; most electricity grid operators are not fully digital and innovation at a large scale is a challenge. Grid management, energy asset qualification and pricing were not designed to account for a distributed energy market where production, capacity and location can be so variable.
Compare this with modern, digital DER companies, where digitization and flexibility are key components to the way they operate. Their energy assets (batteries, EVs, solar panels, etc.) are connected to software management platforms that digitize their performance and efficiency.
But, even if grid operators did have the technical infrastructure to connect to DER assets, it would require an enormous amount of configuration to connect with each individual resource and coordinate their assets. As a result, many distributed assets remain invisible to the grid, or they are chronically underutilized in the grid’s planning and operation functions. This means that they cannot contribute to grid flexibility services to their fullest potential. ( are any services that meet requirements for more or less load on the electricity grid.)
DERs offering flexibility have the potential to provide a number of grid services, including frequency regulation, voltage support (volt/VAR), spinning or non-spinning reserves, capacity/resource adequacy, or any other form of load balancing. Whether DERs actually can participate in relevant markets or programs has been limited by the inability of grid operators to “see” and trust what the assets are, where they are, and that they actually perform when called upon. Solving this set of challenges can then allow grid operators, utilities, and regulators to incorporate DERs into whatever markets or programs they design.
More practically, a solution that supports DER integration provides several benefits for grid operators:
Situational awareness of DER capacity and expected performance so that grid operators can better understand real-time and forecasted grid conditions. By estimating how much DERs will affect the net load on the system, grid operators can model how much conventional supply is needed..
Secure communication with DERs to directly coordinate their activity. This could be selective charging or discharging of assets like batteries or electric vehicles to reduce or increase their load on the grid.
Simplified prosumer and device onboarding and compensation for participation in markets or programs.
Solving this set of challenges is exactly the motivation behind EW-DOS: It provides decentralized identity and access management (IAM) and messaging protocols so that grid operators can identify and coordinate provided by consumers and .
Below are three broad applications of EW-DOS in scaling access to grid flexibility and applied industry use cases.
Communication standards among grid operators, aggregators, or other stakeholders and DERs
EW-DOS will provide the infrastructure for:
Identity and access management for all assets and market participants in the program
A decentralized messaging service
The marketplace will enable three key functions:
Exchange DER data between all actors in an efficient and scalable manner
Dispatch DER fleets to the wholesale market without violating distribution network limits
Facilitate open, scalable and competitive trade of DER Services in a way that keeps the local grid balanced
Grid operators employ a variety of strategies to ensure that the grid operates reliably in times of extreme stress. One of these tools is demand flexibility: rather than treating electricity demand as fixed at any given time and adjusting supply to meet it, grid operators increasingly try to adjust demand as well.
Demand flexibility takes various forms, ranging from utility demand response programs, to calls for the public to voluntarily conserve in times of especially high demand.
Without a system of shared identity for customers and assets, it is difficult for grid operators to know what customers and what assets will be participating in grid flexibility programs and to what scale. This makes it difficult to forecast how effective demand-flexibility will be in balancing the grid supply.
Consumers
California's power grid uses demand flexibility programs to maintain grid balance in periods of extreme weather and demand surge. Energy Web partnered with CAISO to enhance their existing 'Flex Alert' program with decentralized, self-sovereign identity.
CAISO encourages demand flexibility by administering the Flex Alert program, which involves voluntary calls for Californians to conserve energy in peak-demand hours, thereby reducing demand on the grid. Flex Alerts are communicated through several channels, including mass emails to Flex Alert subscribers and social media posts. Consumer conservation in response to a Flex Alert is completely voluntary; CAISO has no ability to enforce requests or manipulate respondents' utility services.
The initial Flex Alert system of communication was one-way: CAISO would send a Flex Alert, but recipients only read that alert and decided to adjust their behavior or not. CAISO had no insight into who would attempt to conserve or where participating consumers resided, which limited CAISO’s ability to forecast the level of impact a Flex Alert would have on the grid and adjust accordingly.
In conjunction to redesigning their outreach methods to be more bi-directional, CAISO employed Energy Web's method of Self-Sovereign Identification with Decentralized Identifiers (DIDs). Flex Alert participants now can subscribe to receive SMS messages or emails for Flex Alerts. They can choose to respond to the Flex Alert by indicating that they intend to conserve power during the critical period, and have the choice of providing their zip code, giving CAISO more visibility into where flexibility is coming from. Once they enroll in the system, participants are given a unique identifier that, in alignment with self-sovereign digital identities, is not linked to their personal data. CAISO can now encourage utility companies in zip codes with low Flex Alert participation to encourage customers to engage with the program.
Distributed grid assets such as residential batteries and PV inverters do not unique identifiers that comply with an open, shared protocol. This makes it challenging to have insight into these assets' life-cycle and performance. There is no existing and openly accessible way to collect and digitize rich, insightful data about renewable assets over their lifetime. Without this data, it's difficult to forecast their potential contributions to the grid.
Government regulatory bodies
This page covers three topics:
A description of energy attribute certificates (EACs)
Current challenges in EAC marketplaces
Examples of how EW-DOS is being applied to solve challenges in EAC marketplaces
When energy from a renewable energy source (e.g.,wind, hydro, solar) enters the electricity grid, it can no longer be distinguished by energy consumers from electricity that originated from fossil fuel combustion. Energy Attribute Certificates (EACs) are a way to account for the “greenness” of electricity from renewable sources. An EAC is a document that certifies that a specific unit of energy (typically a megawatt-hour) originated from a particular (typically solar or wind) source. “Tagging” clean energy in this way facilitates its tracking in accounting systems for carbon, renewable portfolio standards, corporate sustainability, and more. EACs also allow the low-carbon attributes of units of energy to be traded between parties in a relatively standardized manner.
EACs have different names in different markets, including guarantees of origin (GOs), renewable energy certificates (RECs), and solar renewable energy certificates (S-RECs). These are conceptually similar.
Currently, the energy industry relies heavily on EACs to prove that a given unit of electricity came from renewable sources. Energy market participants--including grid operators, electricity suppliers, individuals, organizations, and corporations--purchase EACs in various ways to 'decarbonize' their electricity consumption or to meet sustainability goals.
Today, EAC markets operate in centralized silos. Markets operate under specific regulatory constraints that vary across geographies and EAC types. Technological sophistication also varies from market to market. This makes for a fragmented global market for EACs, presenting several specific challenges to scaling EAC transactions and thus, global access to clean energy:
Lack of coordination across multiple stakeholders and systems: The bespoke, regional nature of EAC markets today creates challenges for buyers looking for efficient, low-cost access to clean energy attributes. EAC markets operate in a regional, heterogeneous manner, with certificates often stored in proprietary databases. These databases lack open, shared digital infrastructure to communicate and interoperate with one another. In addition to hindering buyer access to EACs, this lack of coordination limits EAC lifecycle transparency, creating mistrust between participants that is typically mitigated by EAC brokers and other intermediaries.
Limited market access: Current EAC markets have high administrative costs and often depend on brokers and intermediaries to create trust between parties. This creates a lack of transparency in market offerings and pricing and creates complexity for corporations, governments, and other buyers working to meet carbon/ renewables procurement targets. In practice, it also restricts participation to companies that can afford to participate, such as energy companies with regulation-mandated targets for renewable energy (RE) procurement or carbon reduction, and large corporations that can afford robust sustainability programs.
Outdated user experience and limited automation: EAC markets today rely heavily on manual processes for verifying generation data, completing transactions, and conducting settlement. Manual processes within market operations limits the EAC products that generators can bring to market. For example, small-scale RE installations are often unable to participate. Market participants also face outdated user interfaces and multi-step processes that make it difficult to acquire EACs at the scale needed by corporations and other buyers with aggressive sustainability targets.
EW-DOS provides a suite of modules (EW Origin) that addresses these specific challenges in renewable energy markets. The EW Origin modules provide technology to make existing and emerging EAC markets interoperable, scalable, automated, transparent and efficient for market operators and both buyers and sellers of renewable energy.
Below are three applications of Origin and applied industry use cases.
Lack of transparency and streamlined coordination between stakeholders in the EAC issuance process
Centralized and siloed storage of issued certificates
Green energy generators
EAC issuers/regulation bodies
Marketplace Operators
In today's EAC schemes, issuing a certificate is a time-consuming, manual process involving multiple data streams and person-to-person interactions. Energy Web Origin's Issuer module addresses this pain point by enabling an open and automated issuance process that is compatible with any certification standard.
Certificate issuance is automated through the Issuer module's APIs, which handle data fetching and sending generating devices and with certification bodies. The request and issuance process depends on several factors such as regulation standards, the size of the generating device, and how generation data can be accessed, however the general issuance flow is as follows:
Generators register their devices with the issuing body using Origin's Device Registration Module
The Issuer module acquires data on the device’s energy generation. This can happen in several ways:
The generator manually inputs generation data;
The Issuer module API integrates directly with the generating device or its data system to receive generation data; or,
If the grid operator has data on the generating device and exposes it via a public API, the Issuer Module can ingest this data.
The Issuer module sends generation data as evidence to the certificate registration body to request certification
Once minted, the generator claims the certificate.
There are several key benefits to having certificates on the blockchain:
The data on the blockchain is permanent, immutable and incorruptible
The ERC-1155 standard supports fungible and non-fungible components. The device’s kilowatt hours generated are stored as fungible tokens that represent certified green energy. Each hour or combination of hours can be split and sold to different customers. The device information, total energy volume and timeframe of generation are stored as an NFT asset, which cannot be split.
The owner of the certificate has full control over the certificate. Transference cannot happen without their cryptographic consent
Certificates are interoperable with any decentralized application that uses the certificate standard. Users can trade certificates using any digital wallet that supports the ERC-1155 and its smart contracts. This means that certificates are no longer siloed within centralized and proprietary databases.
The Issuer module also supports private issuance to accommodate scenarios in which the device owner does not want the generation data publicly available on a blockchain. In this case, the device information (the NFT component) is stored on-chain, while the generation data (the kilowatt hours produced) are stored privately off-chain in the operator’s database.
Currently, most EAC sales are facilitated by third-parties who purchase EAC certificates directly from generators and then sell them onwards to EAC buyers. This structure and a lack of a shared marketplace prevents price and market-need transparency: EAC buyers are limited in their ability to source and compare certificates with specific attributes that meet their procurement needs (such as device model, device location, hours of generation, etc.). Current markets also do not accommodate small-scale participants, both sellers and buyers, or high frequency and high granularity trading activities due to the limited technical capabilities.
Green energy generators
EAC buyers
Marketplace Operators
The Origin Exchange module was developed to support transparent and competitive platforms that let buyers interface directly with sellers to purchase EACs. The module sets up a real-time, open order book via a matching engine algorithm: sellers post their expected prices for volumes of generated energy, and buyers can then accept those prices or bid differently in an open interface. All orders are collected and ordered by price in an order book, and a match is made if the seller and buyer agree on a price. As a result, current market demand is seen by all.
This format is advantageous for large-scale and small-scale buyers and sellers alike:
Price transparency allows smaller generators to compete in the marketplace because they are better able to see demand and price trends, and then make attractive bids
Buyers can state their specific requirements proactively to stimulate bids by generators. For example, if a buyer wants to buy EACs from solar production exclusively--or even exclusively locally-produced solar EACs-- she can post that demand rather than waiting for a generator to post qualifying supply.
The Exchange module's matching engine can not only match orders by price, but also by specific, granular EAC criteria such as vintage and location, not unlike how additional filters can be used when searching for a flight, hotel, or rental car online.
Logic for the order book and the bid/ask algorithm, which needs to be as fast as possible, is abstracted away from the blockchain for optimal performance.
The Bulletin Board was designed to facilitate trading of voluntary RECs in GATs, but historically it has been underutilized. This pilot assessed how improving the technical functionality and user experience of the Bulletin Board could remove market barriers and grow the local REC market.
Current EAC markets need integrated, end-to-end solutions for device registration and EAC issuing, tracking, trading, claiming, and reporting. This means that there is no existing system that generators and EAC buyers can use to access the state of an EAC at any phase of its lifecycle, making it difficult to gather and generate data on a marketplace to support efficient EAC transactions.
Green energy generators
EAC issuers/regulation bodies
EAC Consumers
Marketplace Operators
Integrate the Origin Registration module, Origin Exchange module and the Origin Issuer module into a comprehensive EAC issuing and trading platform that supports full transparency and streamlined transactions for renewable energy generators/sellers, buyers and marketplace operators.
The default way to facilitate and synchronize an end-to-end marketplace is to integrate the Origin Device Registry, Origin Exchange module and the Origin Issuer module. By doing so, the state of an EAC throughout its entire lifecycle can be visible to all participants, leveraging the full traceability and interoperability features of the Origin SDK.
Devices are registered in a given marketplace using the Origin Device Registry module
Devices submit data via the Issuer Module for EAC issuance
The issuing body approves the request
If the Origin Issuer and Origin Exchange module are integrated, issued EAC tokens are deposited to the Origin Exchange to be traded. The deposit is recorded on-chain and the exchange operator is now in the custody of the EACs.
After the EAC has been traded, the buyer withdraws the EAC from the exchange to claim it for environmental impact reporting purposes. This is equally recorded on-chain and the EAC is removed from the custody of the exchange operator to the ownership of the buyer. This way, the ownership change from the seller to the buyer is clearly tracked on-chain.
Depending on the requirements of the operator of the Origin Exchange, all trades that happen within the exchange can be private or be be recorded on-chain.
Green Certificate Company (one of the 2 local issuers in Thailand)
EGAT (one of the 2 local issuers in Thailand)
PTT’s platform offers buyers and sellers of EACs a fully integrated solution that provides all the functionalities needed to track, trade, claim, and report EACs in a regulatory-compliant way.
In PTT’s platform, both buyers and sellers can register as users. Device owners can also register their generation devices with the I-REC Standard through the PTT platform. This is verified by the I-REC registry to ensure that only certified actors can participate in the marketplace. Identities and device information are stored in the Origin User and Device Registry respectively and are tracked on the Energy Web Chain without exposing any sensitive data. Device owners are also free to provide any additional data deemed valuable for buyers but not required by the I-REC standard. This can include granular generation data or social impact indicators.
Device owners that are registered and verified by the I-REC Standard can request certificates by submitting generation evidence through PTT’s platform. The integration between Origin and the I-REC registry allows certificates to be issued upon the approval by the I-REC Standard. The issuance of certificates is recorded on the Energy Web Chain without disclosing any volume information.
Device owners or brokers can then trade certificates by posting supply (“asks”) to the marketplace based on which certificates have been issued. Correspondingly, buyers can post demand (“bids”) based on their energy consumption and various purchasing criteria such as region, device type, desired RE portfolio proportions, etc. The platform automatically matches supply and demand based on specified criteria.
When a trade is confirmed, the change in certificate ownership is recorded on the Energy Web Chain without disclosing sensitive data. PTT’s platform auto-generates agreements for the buyer and seller to sign. Payments can be immediately executed via online payment system (payment gateway).
After a trade is executed, the new owner of the certificate can claim it and use it for sustainability reporting. Alternatively, the owner can also decide to push it back on the market and trade the certificate with interested parties.
The integration of PTT’s platform with the I-REC registry makes it fully compliant with the I-REC Standard.
Origin Energy API
As sustainability targets for corporations and other buyer types increase in ambition, demand is growing for more sophisticated tools to support EAC purchases based on highly granular time intervals. For example, rather than purchasing a large volume of EACs to offset a month or a year’s worth of energy consumption, a buyer might wish to acquire certificates to match energy consumed on an hourly or even half-hourly basis. Similarly, some buyers wish to purchase EACs on a locational basis, acquiring renewables generated in the same region where consumption occurred, or from specific types of renewables only (e.g. only solar and not wind).
Meeting these needs requires a digital solution that can support a high number of transactions and granular timeframes. Since it is a niche and nascent market, few tools and solutions exist today that are capable of meeting these requirements.
Green energy generators
EAC Issuers/regulation bodies
EAC buyers
Platform operators
Digital onboarding of participants: Organizations, devices and users can be digitally onboarded with the help of decentralized digital identifiers (DIDs), which ensure participants are who they claim they are. More information about DIDs here:
Digital certificate issuance: Based on generation data, digital EACs are created on the Energy Web Chain. These on-chain EACs ensure that every unit of energy is documented with an exact timestamp, and can only be attributed to one owner. On-chain EACs show an accurate view of the energy’s lifecycle: where it is coming from (e.g., ID of the generation facility, exact location, etc), who receives it and claims the environmental impact
Matching consumption and generation: Once consumption and generation are captured for the same time interval, there is a simple matching algorithm facilitates a match.Each consumption facility has pre-defined generation device(s) that are “favorites”, which means their generation is prioritized for that consumer. These favorites can be chosen based on different characteristics. For example, a consumer might prefer smaller-scale assets in the nearest proximity
Reporting: Data about granular generation, consumption, matches, surpluses and deficits can be displayed in user-friendly and verifiable reports
This page introduces the concept of Self-Sovereign identity (SSI), the components of Decentralized Identifiers (DIDs) and verifiable credentials (VCs), and how they provide the mechanisms for identity access and management in EW-DOS.
To learn more about Energy Web's implementation of SSI technologies, visit the page.
Self-sovereign identity (SSI) is a term used to describe the digital movement that recognizes an individual should own and control their identity without the intervening administrative authorities. SSI allows people to interact in the digital world with the same freedom and capacity for trust as they do in the offline world.
-
‘Self-Sovereign Identity’ is a growing paradigm that promotes an individual’s control over their identity and their data. This is in contrast to the current paradigm where most of our official identifiers (driver’s license, birth certificate, usernames, etc.) are given to us and maintained by a central authority, and where our data can be shared without our knowledge or consent.
The SSI movement catalyzes the shift away from stratified, centralized authorities as the distributors and overseers of identity, and toward a system where individuals can maintain their own identity and where verification and data-sharing can occur via secure, digital consent.
and are two of the most important components of SSI.
A DID is an identifier that can be generated and controlled by individuals or organizations without an external authority. It can be used to identify any subject, such as a non-tangible asset, a customer, or an organization.
A Verifiable Credential is a secure and machine-verifiable digital credential which respects a standard data model.
Together they allow users and organizations to have control over their identities. Instead of an external authority maintaining control over an identifier and its associated identity data, any individual or asset can create an identity, and then establish credentials over time through interactions with peers or authorities on a trusted, decentralized network.
Both DIDs and VCs are specifications of the W3C. The W3C is an organization which provides core technical specifications to establish guidelines and best practices for an open, inclusive and trustworthy web. Energy Web’s approach to DIDs and VCs is sufficiently abstract and flexible that it can be used with the Energy Web Chain, another blockchain, or no chain at all.
A DID is an identifier that is user-generated and not coupled to any centralized authority. It can be used to identify any subject, such as a non-tangible asset, a customer, or an organization.
Unlike traditional forms of identification, DIDs are not generated by a central authority, such as a government-issued driver’s license, or a bank-issued account number, and they are not stored in a centralized database. A user can create a DID for themselves or an asset using cryptographic or other means.
Public-Private Key Pairs
Medium Series on private keys and their relevance in the Ethereum Network:
Above we discussed the role of identity. Once an identity is established, it exists in a DID registry, but nothing is known about the subject through a digital identity alone. That is where Verifiable Credentials come into play.
A credential is something that we can prove about a subject or individual. Common examples of credentials include a driver's license, that proves that one has passed a test and can drive a particular class of vehicle, or a passport, that proves one is approved to travel internationally until a specified date in the future. These traditional credentials are authorized and issued by a central authority, such as a government bureau or a bank. They are distinct and not interchangeable. For example, you cannot use your passport to show that you can drive a car, and you cannot show your driver's license to prove that you can travel.
Verifiable Credentials are a Web3 standard for digital credentials in a decentralized ecosystem, meaning a system with no central issuer or authority.
Like traditional credentials, VCs are statements or claims made about an identity, which is referred to as the credential subject. If a battery was the credential subject, it could have a verifiable claim that it originated in a particular manufacturing plant, or that it has a specific discharge rate at the time of manufacturing.
There are three primary actors in the facilitation of Verifiable Credentials.
The main difference between traditional, non-digital credentials and verifiable credentials are the way they are verified.
Traditional credentials require manual verification, such as a signature or a stamp. Verifiable Credentials are verified completely through cryptographic means using a digital proof mechanism, such as a digital signature or a JSON Web Token, through a digital trust mechanism, such as a blockchain.
Once an authority verifies a claim, a VC can then be used as an official record to assure others of the truth of the statements. These credentials are linked back to the credential subject’s digital identity. In the case of EW-DOS, credentials are linked back to the user's DID document. A DID Document can amass a rich set of Verifiable Credentials that provide a full picture of its origin, attributes and capabilities.
One goal of our technology is to give every participant in the energy system an identifier to allow for broad participation in decentralized applications built on the Energy Web Chain. Participants include individuals, organizations, applications and energy assets.
EW-DOS can be considered a self-sovereign ecosystem because there is no central administration or server to manage identity or verify attributes. As long as a user has a public-private key-pair, they can create a DID, which is then stored in the DID registry on the Energy Web Chain.
Once identity is established, VCs are the primary mechanism for acquiring attributes and sharing these attributes with other participants through cryptographic consent. VCs then determine if an asset can participate in a particular role or application based on set criteria.
To understand how and why an asset can take on a DID and acquire and use VCs using EW-DOS, let’s use the lifecycle of a battery as an example.
When the battery is manufactured, the manufacturer assigns a DID to the battery, and issues claims on the battery’s physical makeup (date of manufacture, the model, the serial number, the battery capacity.)
The battery is sold. The installer of the battery adds new claims on the battery’s purchaser and its new location.
As the battery performs, the new owner adds claims on the battery’s charge and discharge rate.
The battery reaches the end of its lifecycle. The final owner of the battery adds the date that it is retired, and its final charge and discharge rate.
Because we now have verified information on the battery, the battery can use its DID to participate in various energy markets and provide services to the grid based on its confirmed attributes. This all happens without central oversight of the battery, and the battery is not restricted to participating in only one market. It can participate in any market or application that is using the Energy Web Chain.
The Identity and Access Management stack
You can see a serviceEndpoint present in a DID document's service array below:
EW-DOS Components that implement functionality for DIDs and VCs in EW-DOS.
Additional Resources on DIDs and VCs in EW-DOS
Smart Contracts
System Contracts
Energy Web
Contracts
provides decentralized oracle networks. covers:
Aggregating data from multiple Oracles, and how to use the public Price Pair Oracle infrastructure on Volta
You can buy EWT on any of the exchanges listed . You can also bridge EWTB ERC20 tokens acquired on Ethereum mainnet back to EW Chain by .
****
The following image is a transaction in a "validated" state. You can view all validated transactions on the Energy Web Block Explorer
A transaction’s computational complexity is measured in, a unit that assigns a numeric value to each operational code, or instruction, that will be executed to complete the transaction. The gas cost of a transaction is determined by the amount and sophistication of code that needs to be executed as well as the amount and type of data that will be stored on the blockchain as a result. The more complex the transaction, the higher the gas cost.
Gas price is on the EW Chain is denominated in EWT (usually in minuscule units like , which represent one billionth of an EWT). The price is expressed in tokens (gwei) per unit of gas.
To ensure that block time remains consistent and to prevent any given block from being overloaded with transactions, the EW Chain has a predefined limit to the amount of that can be consumed in each block. Each block on the Energy Web Chain has a size limit of 8 million units of gas.
You can see all block and transaction details for the Energy Web production chain at .
You can see all block and transaction details for the Volta Testnet at .
In the current grid architecture, service operators at various levels of energy transmission, distribution, and aggregation have no open method for collectively identifying and orchestrating . This means that grid operators have little insight into how much, when, and where energy is produced by DERs, how this affects load on the grid, or the potential for DERs to sell their energy back to the grid and/or adjust their consumption patterns.
or their equivalent
or their equivalent
Design open systems that allow grid service operators to identify and coordinate via a system that is accessible to all relevant market participants. To do this, there needs to be a standard, shared method for:
Identifying DER assets via a shared, decentralized protocol
Recording and verifying DER asset capabilities through
- manages the two sets of markets at the transmission level in Australia, the National Electricity Market (NEM) and the Wholesale Electricity market (WEM)
Distributed Network Service Provider (DNSP) - comparable to the role of , manages the operation of the electric grid at the distribution level for a given territory
Energy Web is partnering with AEMO, Microsoft and PXiSE to design a decentralized messaging messaging platform (the "Energy Demand and Generation Exchange" platform) for aggregators and DNSPs to facilitate participation in local and wholesale markets. Aggregators and DNSPs will use the platform to exchange data about DER capacity to maintain grid balance.
Assign , to customers and their assets anchored on the Energy Web Chain. DIDs are crucial to having shared visibility into grid participants and their potential to offer flexibility. A self-sovereign approach ensures that personally-identifiable information is managed in accordance with legal requirements (e.g., GDPR) and consumer expectations.
Give assets a vendor-agnostic, digital identity at the time of manufacturing that is anchored to the and accessible to all energy market participants. Use this identity to amass verified data about the asset that can allow it to participate in markets and give greater insight into its activity and its performance lifecycle.
- Environmental non-profit focused on managing electronic waste, including lithium-ion batteries
- in Belgium
- responsible for assigning digital identity and asset credentials to batteries at time of manufacturing
Energy Web partnered with BeBat and Fluvius to develop a decentralized application (EasyBat) for battery life-cycle management. This was in response to the to promote efficient and high-performing batteries that have the least environmental impact. Using EW-DOS technology, the application assigns each battery that enters the Belgian market a digital "passport" based on .
This digital passport enables the accumulation of performance data on the battery throughout its lifecycle and facilitates responsible disposal of the battery when it's retired. Reference to the battery's claim information is stored in the battery's , then stored on and viewable through the EasyBat's user interface. (You can read more about the role of IPFS in storing assets' Verifiable Credentials .)
You can read more details on this project on the .
The Issuer module queries the registration databases for certificate approvals. If approval is found, it triggers a process for minting an EAC on the Energy Web Chain in the form of an (which is an extension of the)
You can read more about the certificate's data structure .
The Exchange module tracks all inputs and outputs of the exchange on the EAC itself, which is minted as an ERC-1188 certificate on the Energy Web Chain. (You can read more about Origin's implementation of EACs as ERC-1888 tokens .) This provides easy-to-observe traceability that improves transparency and confidence among renewable energy buyers, sellers, regulators, and other stakeholders.
- large scale regional transmission operator for the Mid-Atlantic, Great Lakes and Northeast region of the US. Coordinates movement of wholesale electricity for distribution
- subsidiary of PJM; administers the (US-based REC trading and tracing platform)
This pilot project was a collaboration with . PJM-EIS administers the , a platform used to track and trade ) in the United States. (REC is a specific standard of Energy Attribute Certificate in the United States.) The Bulletin Board is an interface on GATS where REC buyers and sellers can post their bids and asks for specific REC volumes. Actually selling or buying those RECs remains the responsibility of the counter-parties in bilateral agreements.
Energy Web Origin provided the back-end infrastructure for the marketplace functionality and the to digitize the RECs in GATS and anchor the proof of any REC transactions that occurred on the pilot Bulletin Board system. We designed a 'marketplace' exchange interface so that buyers and sellers could post their specific bids and asks. Settlements occured in the existing GATS interface, but blockchain-based proofs of each transaction were created on the Energy Web Chain.
The 24/7 toolkit was developed to build applications that serve as 24/7 marketplaces. Built with SDK modules, the toolkit provides functionalities for:
Data collection: The toolkit offers an API for collecting consumption and generation data in real-time. Data granularity (e.g., MMh vs kWh vs Wh) and time intervals (e.g., 15 vs 30 minutes) can be configurable. The API documentation is available , and the GitHub repository is .
""
****
A DID for a given system resides in a decentralized . DID Registries, like VCs and DIDs themselves, are developed according to W3C standards. Most DID registries live on a decentralized ledger, or a blockchain. In the case of EW-DOS, the DID registry is on the .
A DID is derived from a public-private key pair that is generated programmatically through a cryptographic algorithm. The algorithm produces a private key and a corresponding public key. Crypto wallets such as will generate these keys for you on creation of an account. The public key can be exposed and shared with others, but the private key should not be shared with anyone. The algorithm used to generate the key-pair makes it virtually impossible for any outsider to guess your private key.
Your public key serves as your address on the blockchain, and your private key serves as your private identifier, similar to a password, and is used to sign on the blockchain. The signature is proof that you initiated that transaction.
DIDs are made up of a , a and a unique method identifier. There are many DID methods that are supported by different blockchain networks. You can see a full list DID methods define operations to create, resolve, update and deactivate DIDs and their associated DID Documents, which are discussed below. DID Methods are often associated with a verifiable data registry, which are registries with store DIDs and their data. If the registry is implemented on a blockchain, smart contracts usually serve as the data registry. An example of this is the .
Energy Web Chain uses the . The string that identifies this DID method is "ethr", and the method identifier is always the user’s public key (also known as an address.)
Every DID resolves to a corresponding , which contains metadata about the subject's authentication mechanisms and attributes, like its public key.
Below is a sample JSON document that was created by the EW-DOS D. For a list of required and possible DID Document properties,
MetaMask on key terms:
: makes a claim about a credential subject and correspondingly creates and issues credentials asserting the claim.
: receives, holds and shares credentials
: receives and verifies proofs (proofs can be the entire credential or a piece of info from the credential)
In the context of EW-DOS, a digital cryptocurrency wallet such as , which holds a user’s public and private keys, is used to facilitate a digital signature. This eliminates the need for any interaction between the issuer and the verifier. The blockchain provides the platform and mechanisms of trust.
To see a more exhaustive list of possible interactions and use cases for issuers, holders and verifiers, see w3’s list of .
To see the relationship of DIDs and VCs in the EW-DOS use cases, we recommend that you explore the
EW-DOS’s Identity and Access Management (IAM) technology stack is composed of a decentralized application called and several underlying packages listed below that manage the creation, reading, updating and removal of DIDs and VCs on the Energy Web Chain.
The IAM stack provides means for authentication (proving you are who you are via DID) and authorization (proving you have the attributes to participate in a certain role via Verifiable Credentials.) The combination of a user's DID and VCs provide authentication to access multiple systems using role-based permissioning. You can view the components of the IAM stack .
DIDs are anchored on the Energy Web Chain in the DID Library smart contract. The DID library currently implements the for creating and updating identities on the blockchain, but will support other DID methods and standards in the future.
****, a decentralized, peer-to-peer file system that uses content hashing for file location. The credential's corresponding has a service node that holds an array of service endpoints. Each serviceEndpoint points to the location of a Verifiable Credential stored on IPFS. Once retrieved, the VC is decoded and its contents can be read.
IAM Library
Client library to manage DIDs, Verifiable Credentials and application enrollment
Decentralized Service Bus
Decentralized messaging service for communication between aggregators, DNSPs and AEMO
IAM Cache Server
Stores information relevant to channels and application permissions and roles for fast read-query performance
Switchboard
User interface to administer DNSP and aggregator enrollments and permissions
Store DIDs and DID Documents for system participants and provide on-chain verification
IAM Library
Create and manage DIDs and verifiable credentials for battery assets
ID Registry
Interact with smart contracts on the Energy Web Chain
EW-DOS Component
Function
Basic basic logic and interfaces for exchange functionality
Implements exchange-core. Provides order book-based exchange functionality for certificates
Basic logic and interfaces for backend (managing users, certificate, requests and devices)
Implements backend-core. Provides runnable backed API using NestJS framework
Backend utility functions
Component
Role
Switchboard
A decentralized application for defining a role credential governance framework and issuing role credentials. These functions are performed by interfacing with user's Web3 wallet.
IAM Library
Provides high-level functions for all identity and access management
DID Library
Provides an abstraction layer to manage and interact with DIDs and Verifiable Claims on Energy Web Chain
SSI Hub
Facilitates the credentials exchange between credential requesters and issuers. It also caches smart contract data such DID documents in order to improve read-query performance.
Decentralized DID registry
Off-chain, decentralized, peer-to-peer storage for Verifiable Credentials
Hardware wallets are a physical device. They provide an added layer of protection as the wallet’s private key is not stored in your browser or even on your machine - it is stored on the hardware device itself. Trezor is a widely-used hardware wallet, and it supports most major cryptocurrencies, including all ERC20 tokens and Energy Web Token. We provide direction on how to connect your Trezor Hardware Wallet to MetaMask here (link), and to a local node of the blockchain here(link)
Cryptocurrency wallets are used to:
'Store' and exchange cryptocurrency - tokens or cryptocurrencies are actually stored as records on the blockchain itself, but they are associated with a user's private key, which is stored in a cryptocurrency wallet.
Authorize transactions on a blockchain
There are many different wallets available, many of which are built to be compatible with a specific blockchain like Ethereum or Bitcoin. You can choose to use a hardware wallet (discussed below), use only software or web-based wallets, or use a combination of both.
Cryptocurrency wallets are used in decentralized, peer-to-peer environments that have no central oversight or source of authority. Because of this, trust mechanisms are built into wallet functionality. Methods and implementations vary, but most cryptocurrency wallets use cryptographically seeded public-private key-pairs that serve as a way for users to identify themselves and safely validate and authorize transactions on the blockchain. The public key serves as their address in a network, and their private key (which should never be shared) serves as as a method for authorizing transactions. It serves as your digital signature. In EW-DOS, the user's public key is used as the identifier in their DID that is anchored on the blockchain. You can read more about this here.
You should never lose track of or share your private key(s) with anyone. Anyone with access to the private key can access the funds of that key's account.
Regardless of your choice of hardware wallet, we highly recommend that you use MetaMask when developing with or using EW-DOS. MetaMask is a browser-based cryptocurrency wallet. It is both an Ethereum-compatible wallet and a gateway for using decentralized applications built on Ethereum-based blockchains like the Energy Web Chain. We discuss MetaMask's functionalities below.
A multi-signature wallet is a smart contract that allows multiple parties to agree on transactions before execution. It is analogous to a joint bank account.
One pain point of "traditional" crypto wallets is that anyone who has access to the wallet's private key has total authority over the wallet’s funds: they can move funds or perform transactions with no limitations or accountability.
If an account is managed by multiple people, each person knows the private key and can therefore make transactions at their discretion without group consensus. Risk remains even if an account is managed only by one person. In this case, if the private key is stolen, someone else now has total control over the wallet and the funds in it.
A multi-signature addresses these pain points. You can set multiple owners for a wallet and the number of minimum confirmations needed to perform transactions. It gives robust security for private users and businesses. Some benefits include:
No single-point-of-failure: If your wallet has 3 owners and 2 confirmations are needed to execute a transaction (2-of-3 scheme), and one of the private keys gets stolen or lost, the funds can still be accessed, or the compromised owner's address can be removed or changed. A wallet with 2-of-3 scheme can tolerate 1 failure, a wallet with 3-of-5 scheme can tolerate 2, etc.
Accountability: No more insider theft. The transaction history, details, and the approvers of a transaction can be viewed.
Daily withdrawal limit: an amount can be determined that can be withdrawn daily without confirmations
Ease of use: less operational burden than a hardware wallet
There are a number of multi-signature wallets for the Ethereum network. One of the most widely used is the Gnosis Safe Multisig. You can view the smart contracts for Gnosis Safe here.
To interact with EWT using your Ledger device, you have to use the EnergyWebChain app on your Ledger device, not the Ethereum app. If you do not have this app installed, you can use Ledger Live to install it.
After accessing your Ledger device with MyCrypto, you will notice that a list of different addresses will show up instead of the addresses that you would see if you were connected to the Ethereum network. You are free to use these for your Energy Web Tokens.
If you have accidentally sent EWT to your Ethereum addresses previously, you can still access these by clicking the drop-down field next to "Addresses" and selecting the "Ledger (ETH)" option.
You will see your Ethereum addresses displayed alongside their EWT funds.
Access your Trezor device like usual. You will notice that a list of different addresses will show up, instead of the addresses that you would see if you were connected to the Ethereum network. You are free to use these for your Energy Web Tokens.
If you have accidentally sent EWT to your Ethereum addresses previously, you can still access these by clicking the drop-down field next to "Addresses" and selecting the "TREZOR (ETH)" option.
You will see your Ethereum addresses displayed alongside their EWT funds.
Energy Web has developed the EWT Bridged (EWTB) token, which is an ERC-20 token on the Ethereum blockchain. You can mint EWTB tokens through its interface which you can find at bridge.energyweb.org. This method allows you to transfer EWT from the Energy Web Chain to the Ethereum blockchain.
If your Ethereum address contains EWTB tokens, you might not see them in your interface right away. In this case, you have to manually add this token as a custom token.
The contract address of EWTB is 0x178c820f862b14f316509ec36b13123da19a6054
, you can also find this address on Etherscan.
She can manage her data and consents using a unique, secure digital signature
She must explicitly consent to this
She can revoke her consent at any time
The recipient does not store the data
She can prove or reveal attributes without revealing the entire underlying data
Alice keeps her digital identity in perpetuity; there is no need to re-register / duplicate digital identities across different systems
MetaMask is a browser extension and a mobile app that handles blockchain account management and helps users securely interact with web dApps. It’s supported in Chrome, Brave, and Safari browsers, as well as it is available for Android and iOS devices. By default, you can connect to the Ethereum Mainnet or any of the Ethereum test network.
You can find the latest version of MetaMask at their official website.
For help using MetaMask, visit the Metamask User Support Site.
To interact from your browser with Energy Web or the testnet Volta, you need to add settings to Metamask and point it to the right network.
MetaMask is compatible with any blockchain that uses an Ethereum-compatible JSON API. This is why we can connect to the Energy Web mainnet and the Volta testnet with MetaMask via a custom Remote Procedure Call (RPC). We provide directions on how to do this here. By default, MetaMask connects to the blockchain using web3.js and Infura nodes. This allows you to connect with the blockchain without having to run a node yourself.
MetaMask was designed as both an Ethereum-compatible wallet and a method for decentralized application (dApp) verification.
Store and transfer Ethereum compatible (ERC20) tokens
Connect to other Ethereum-based blockchains using a remote procedure call (RPC)
Store and transfer utility tokens for other Ethereum-based blockchains, like the Energy Web Chain. (You must be connected to that blockchain network to do this.)
Authenticate into Dapps and sign transactions. The key-pair for each account generated by MetaMask serves as your cryptographic signature
Connect to a hardware wallet and initiate transactions using an account on the hardware wallet
It's important to understand that MetaMask provides user sovereignty in Ethereum-based decentralized applications. Instead of having a separate username and password for each decentralized application that you interact with, you can authenticate into all of them using your account(s) in MetaMask. MetaMask accounts are initialized by you and are under your authority.