HomeEIPs
EIPsERC-801
ERC-801

Canary Standard

StagnantStandards Track: ERC
Created: 2017-12-16
ligi <ligi@ligi.de>
Original linkEdit
1 min read

The ERC-801: Canary Standard is a proposed standard interface for canary contracts on the Ethereum blockchain. A canary contract is a type of smart contract that is designed to provide a warning if certain conditions are met, such as if a government agency issues a warrant or subpoena for user data. The canary contract is fed regularly with a specific message or transaction, and if the message or transaction stops being received, it is assumed that the conditions have been met and the canary is considered "dead".

The ERC-801 standard provides a basic set of functions for implementing canary contracts, including the ability to check if the canary is alive, keep the canary alive, and manage feeders. The standard also includes a set of events, such as the "RIP" event that triggers when the contract is called for the first time after the canary has died.

The motivation behind the ERC-801 standard is to provide a standardized interface for canary contracts on the Ethereum blockchain, making it easier for other applications to interface with canaries, such as for visualizing the state, automated alarms, or contracts that use the state. The standard also allows for different types of canaries to be implemented, such as those with single or multiple feeders, or those designed for IoT applications.

While the ERC-801 standard is still in draft form and has not yet been implemented, it represents an important step towards standardizing the use of canary contracts on the Ethereum blockchain. By providing a common interface for canaries, the standard could help to increase the adoption of this important tool for protecting user privacy and security.

Video
Anyone may contribute to propose contents.
Go propose
Original

Simple Summary

A standard interface for canary contracts.

Abstract

The following standard allows the implementation of canaries within contracts. This standard provides basic functionality to check if a canary is alive, keeping the canary alive and optionally manage feeders.

Motivation

The canary can e.g. be used as a warrant canary. A standard interface allows other applications to easily interface with canaries on Ethereum - e.g. for visualizing the state, automated alarms, applications to feed the canary or contracts (e.g. insurance) that use the state.

Specification

Methods

isAlive()

Returns if the canary was fed properly to signal e.g. that no warrant was received.

function isAlive() constant returns (bool alive)

getBlockOfDeath()

Returns the block the canary died. Throws if the canary is alive.

function getBlockOfDeath() constant returns (uint256 block)

getType()

Returns the type of the canary:

  • 1 = Simple (just the pure interface as defined in this ERC)
  • 2 = Single feeder (as defined in ERC-TBD)
  • 3 = Single feeder with bad food (as defined in ERC-TBD)
  • 4 = Multiple feeders (as defined in ERC-TBD)
  • 5 = Multiple mandatory feeders (as defined in ERC-TBD)
  • 6 = IOT (as defined in ERC-TBD)

1 might also be used for a special purpose contract that does not need a special type but still wants to expose the functions and provide events as defined in this ERC.

function getType() constant returns (uint8 type)

Events

RIP

MUST trigger when the contract is called the first time after the canary died.

event RIP()

Implementation

TODO

Copyright and related rights waived via CC0.

Further reading
Anyone may contribute to propose contents.
Go propose
Adopted by projects
Anyone may contribute to propose contents.
Go propose

Not miss a beat of EIPs' update?

Subscribe EIPs Fun to receive the latest updates of EIPs Good for Buidlers to follow up.

View all
Serve EIP builders, scale Ethereum.
Resources
GitHub
Supported by