Giter Site home page Giter Site logo

lorenzb / libsubmarine Goto Github PK

View Code? Open in Web Editor NEW
222.0 222.0 31.0 141 KB

Implementation of a novel practical scheme for submarine commitments

Home Page: https://libsubmarine.org

License: Other

Python 79.07% Solidity 20.93%
ethereum python smartcontracts solidity

libsubmarine's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libsubmarine's Issues

Web UI to use libsubmarine

We need a web UI for usage and explanation/enforcement of the steps for Libsubmarine.

It can be hosted on the same repository using Jekyll for page rendering and Metamask for Ethereum functionality.

Publish new version with only 90k gas overhead on GitHub

In my talk at EthCC I gave people a sneak peak of the new version that reduces the gas overhead to ~90k.

We should publish this version asap.

Current blockers:

  • CREATE2 isn't supported by pyethereum tester. Time to bite the bullet and upgrade to eth-tester.
  • Upgrade to solidity 0.5

LibSubmarineSimple Documentation and Update ReadMe

  • We need to make sure all functions have adequate and correct docspec comments
  • We need to update the README.md for the repo to reflect the new changes
  • We need to provide adequate documentation on the format of proofblob and _rlpUnlockTxUnsigned

Watchdog program to catch cheaters

Ideal functionality:

$ watchdog --rpc http://localhost:8545
Detected cheater in tx 0xcdcd...cdcd. Sending fraud proof to submarine contract in tx 0xabab...ababab
[...]

EXTCODEHASH to prove commit block

Just heard of Submarine Sends today, and read the documentation and smart contracts, so forgive me if my question or suggestion is naive.

Instead of using proofs or challenges as a mechanism to retrieve or trust the commit block, why not have the contract itself store the block number of the latest/last commit by the user. This can either be done via the constructor when it was deployed, or via a payable commit function.

Now, we want to be able to trust that the value of the public commitBlock was written to appropriately, so we just use EXTCODEHASH to check that the contract code actually does exactly that. We know what the contract code should always look like, given some fixed compiler version, so the deployed code's hash should be enough.

Am I missing something?

Support Proof of Correctness (legitimate, forward proof)

Does the challenge function as we have it right now allow a user to prove that you are correct (Proof of Correctness) (i.e. no need to wait for the challenge period to end, just let me prove I'm correct myself, and then maybe flip a bit somewhere in the session)

If not we should add that

Explain how to deal with reordering attacks

What to do when an attacker maliciously inserts TXunlock in front of TXreveal ?

Statemachine with {locked, unlocked} x {unknown, revealed}.

I am not clear that we support this right now, we may need to tweak the "Session" object in the main contract

Session Indexing

As we have it, sessionId is the hash of the unlock transaction. This is only used in the challenge to reconstruct the submarine address unless #13 in implemented.

What is the benefit of doing this? Could we use the submarine address itself as a sessionId?

Update Compiler Version to 0.5.0

Update the compiler version for the Auction Example to 0.5.0 so we can use abi.decode. Currently not possible until the OpenZeppelin folks update their code to use the newer compiler version. On-hold, but should be an easy change

openzeppelin-solidity/contracts/access/roles/MinterRole.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Linux.g++ - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.24;
^----------------------^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.