Skip to content

Legendre computation used in Phase 1 of eth2.0 as a Solidity smart contract

Notifications You must be signed in to change notification settings

dankrad/Legendre-bounty

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Legendre bounty smart contract

Explores the Legendre computation used in eth2.0 phase 1 proof-of-custody game as a smart contract.

The contract provides an interface to redeem a bounty that was set for Legendre key recovery (redeem_bounty method). In order to redeem a bounty, it first has to be locked by providing a sha256 hash of the key (this is to prevent front running once someone has found a valid solution).

Requirements

This project uses pipenv, https://docs.pipenv.org/en/latest/.

Install

pipenv shell
pipenv install

Compile

vyper contract/legendre_bounty.vy

Run tests

make test_install
make test

Run with gas cost estimates

To enable debug printing, run pytest with extra flags:

pipenv run pytest -s -v -k test_legendre_bit_multi

About

Legendre computation used in Phase 1 of eth2.0 as a Solidity smart contract

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.7%
  • Makefile 1.3%