Code Monkey home page Code Monkey logo

substrate-ipfs's Introduction

Substrate ยท GitHub license GitLab Status PRs Welcome Stack Exchange

Substrate is a next-generation framework for blockchain innovation ๐Ÿš€.

Getting Started

Head to docs.substrate.io and follow the installation instructions. Then try out one of the tutorials.

Community & Support

Join the highly active and supportive community on the Substrate Stack Exchange to ask questions about use and problems you run into using this software. Please do report bugs and issues here for anything you suspect requires action in the source.

Contributions & Code of Conduct

Please follow the contributions guidelines as outlined in docs/CONTRIBUTING.adoc. In all communications and contributions, this project follows the Contributor Covenant Code of Conduct.

Security

The security policy and procedures can be found in docs/SECURITY.md.

IPFS

This version of Substrate contains a working IPFS node and IPFS integration. Just install and start this implementation like any other substrate blockchain.

# E.g. run the blockchain in development mode
cargo run --bin substrate -- --dev --ws-external --rpc-cors all --enable-offchain-indexing=true

Once started, you should see the connecting peer id in the console:

net: starting with peer id 12D3KooWRhtRwRq6Jo9cTTNjgC5MNRVyb33jXwkX8r3hpENqAmP8
IPFS: Node started with PeerId 12D3KooWRhtRwRq6Jo9cTTNjgC5MNRVyb33jXwkX8r3hpENqAmP8 and address ["/ip4/127.0.0.1/tcp/49595/p2p/12D3KooWRhtRwRq6Jo9cTTNjgC5MNRVyb33jXwkX8r3hpENqAmP8"]

If you are interested, feel free to get in contact: tdsoftware.de

For more details you should check out this this documentation or for implementation details, check the following project folders:

/client/offchain
/frame/tds-ipfs-core
/frame/tds-ipfs
/primitives/runtime/src/offchain

License

The reason for the split-licensing is to ensure that for the vast majority of teams using Substrate to create feature-chains, then all changes can be made entirely in Apache2-licensed code, allowing teams full freedom over what and how they release and giving licensing clarity to commercial teams.

In the interests of the community, we require any deeper improvements made to Substrate's core logic (e.g. Substrate's internal consensus, crypto or database code) to be contributed back so everyone can benefit.

substrate-ipfs's People

Contributors

dobschal avatar langi667 avatar markusdent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

substrate-ipfs's Issues

Add offchain worker in TDS-IPFS using `AccountId20`

Hi,

As mentioned in the title, I've a substrate node with unified accounts where I'd like to add the tds-ipfs pallet. But the issue I'm facing is this pallet is using sr25519 Addresses while my runtime is configured with Evm Accounts AccountId20.

I've tried this:

use fp_account::{EthereumSigner, EthereumSignature};
impl frame_system::offchain::AppCrypto<EthereumSigner, EthereumSignature> for TestAuthId {
        type RuntimeAppPublic = Public;
        type GenericPublic = sp_core::ecdsa::Public;
        type GenericSignature = sp_core::ecdsa::Signature;
    }

// Implemented for mock runtime in tests
impl frame_system::offchain::AppCrypto<<EcdsaSignature as Verify>::Signer, EcdsaSignature>
    for TestAuthId
    {
        type RuntimeAppPublic = Public;
        type GenericPublic = ecdsa::Public;
        type GenericSignature = ecdsa::Signature;
    }

But I'm getting these errors:

error[E0277]: the trait bound `sp_core::ecdsa::Public: From<EthereumSigner>` is not satisfied
     --> <pallet>/src/lib.rs:29:30
      |
  29  |         type GenericPublic = sp_core::ecdsa::Public;
      |                              ^^^^^^^^^^^^^^^^^^^^^^ the trait `From<EthereumSigner>` is not implemented for `sp_core::ecdsa::Public`
      |
      = help: the following other types implement trait `From<T>`:
                <sp_core::ecdsa::Public as From<crypto::Public>>
                <sp_core::ecdsa::Public as From<sp_runtime::sp_application_crypto::ecdsa::AppPublic>>
      = note: required for `EthereumSigner` to implement `Into<sp_core::ecdsa::Public>`
      = note: required for `sp_core::ecdsa::Public` to implement `TryFrom<EthereumSigner>`
  note: required by a bound in `frame_system::offchain::AppCrypto::GenericPublic`
     --> <user>/.cargo/git/checkouts/substrate-485ba5260f31c511/c0155a6/frame/system/src/offchain.rs:397:5
      |
  395 |     type GenericPublic: From<Self::RuntimeAppPublic>
      |          ------------- required by a bound in this associated type
  396 |         + Into<Self::RuntimeAppPublic>
  397 |         + TryFrom<Public>
      |           ^^^^^^^^^^^^^^^ required by this bound in `AppCrypto::GenericPublic`

  error[E0277]: the trait bound `EthereumSignature: From<sp_core::ecdsa::Signature>` is not satisfied
     --> <pallet>/src/lib.rs:30:33
      |
  30  |         type GenericSignature = sp_core::ecdsa::Signature;
      |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<sp_core::ecdsa::Signature>` is not implemented for `EthereumSignature`
      |
      = note: required for `sp_core::ecdsa::Signature` to implement `Into<EthereumSignature>`
  note: required by a bound in `frame_system::offchain::AppCrypto::GenericSignature`
     --> <user>/.cargo/git/checkouts/substrate-485ba5260f31c511/c0155a6/frame/system/src/offchain.rs:404:5
      |
  401 |     type GenericSignature: From<<Self::RuntimeAppPublic as RuntimeAppPublic>::Signature>
      |          ---------------- required by a bound in this associated type
  ...
  404 |         + Into<Signature>;
      |           ^^^^^^^^^^^^^^^ required by this bound in `AppCrypto::GenericSignature`

  error[E0277]: the trait bound `sp_core::ecdsa::Signature: From<EthereumSignature>` is not satisfied
     --> <pallet>/src/lib.rs:30:33
      |
  30  |         type GenericSignature = sp_core::ecdsa::Signature;
      |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<EthereumSignature>` is not implemented for `sp_core::ecdsa::Signature`
      |
      = help: the following other types implement trait `From<T>`:
                <sp_core::ecdsa::Signature as From<crypto::Signature>>
                <sp_core::ecdsa::Signature as From<sp_runtime::sp_application_crypto::ecdsa::AppSignature>>
      = note: required for `EthereumSignature` to implement `Into<sp_core::ecdsa::Signature>`
      = note: required for `sp_core::ecdsa::Signature` to implement `TryFrom<EthereumSignature>`
  note: required by a bound in `frame_system::offchain::AppCrypto::GenericSignature`
     --> <user>/.cargo/git/checkouts/substrate-485ba5260f31c511/c0155a6/frame/system/src/offchain.rs:403:5
      |
  401 |     type GenericSignature: From<<Self::RuntimeAppPublic as RuntimeAppPublic>::Signature>
      |          ---------------- required by a bound in this associated type
  402 |         + Into<<Self::RuntimeAppPublic as RuntimeAppPublic>::Signature>
  403 |         + TryFrom<Signature>
      |           ^^^^^^^^^^^^^^^^^^ required by this bound in `AppCrypto::GenericSignature`

  For more information about this error, try `rustc --explain E0277`.

Any suggestions on this?

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.