Coder Social home page Coder Social logo

perun-network / perun-polkadot-pallet Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 1.0 329 KB

Perun channels on Polkadot.

Home Page: https://perun.network/

License: Apache License 2.0

Dockerfile 0.17% Rust 99.83%
perun channels blockchain polkadot substrate

perun-polkadot-pallet's Issues

Think about disputing unfunded channels

It is currently possible to dispute channels that were never funded. This could be used to inflate the on-chain state.
Im not sure if it is really a problem but it seems weird since the on-chian state should be minimal.

Store hash of state instead of full state

Currently, we store the full state on-chain. However, as an optimization we could only store the hash of the state and provide the state always in the calldata. Then we simply check whether the hash of the provided state matches the hash in the state registry. Thereby we save on-chain storage.

Add MaxNumParts

The number of participants, and therefore the number of off-chain signatures is currently not limited.
The implementer should also check for other cases of arbitrary long inputs.

To get some deterministic bench-marking results, all inputs should have defined maximum lengths.

Recover funds after failed funding

Currently, the Pallet does not allow to recover funds from an unfunded channel. A dispute conclusion will just fail in this case.

ensure!(sum_deposit >= sum_outcome, Error::<T>::InsufficientDeposits);

We need to revise the Pallet so that we payout the initial deposits in case of an underfunded channel.

Transactional conclusion

Currently, the conclude functionality has two writes:

  1. Set the outcome.
  2. Conclude the registered state.

Problem: There is a risk that the first transaction goes through, while the second fails. In this case we might end up in an inconsistent state.

We need to investigate further whether the current solution is problematic and if so, how to resolve the situation. Maybe using the transaction decorator might be a solution, as pointed out here.

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.