DFIP 2111-B: VOC: Ethereum Virtual Machine (EVM) Support

Overview

DeFiCh/metachain is a codename research & development for DFIP 2111-B: VOC: Ethereum Virtual Machine (EVM) Support . Proposed as a DFIP on Nov 2021; DFIP 2111-B provided DeFiChain with more flexibility to think beyond what is possible today. It introduced a new dimension to the DeFiChain ecosystem, allowing us to stretch the definition of Native DeFi.

  • Smart contract capability through a turing-complete environment for faster paced innovation
  • Embrace the multi-chain future enabling easier cross compatibility and extensibility.

Security issues

If you discover a security vulnerability in DeFiCh/metachain , please see submit it privately.

License & Disclaimer

By using DeFiCh/metachain (this repo), you (the user) agree to be bound by the terms of this license.

Comments
  • chore(ts-tests): add e2e contracts

    chore(ts-tests): add e2e contracts

    What this PR does / why we need it:

    Develop and test on a simple smart contract functionality on substrate-based blockchain.

    Which issue(s) does this PR fixes?:

    Fixes #

    Additional comments?:

    kind/chore 
    opened by canonbrother 17
  • Reserve `1130` for `chainlist.org`, `ss58`, and `slip-0044`

    Reserve `1130` for `chainlist.org`, `ss58`, and `slip-0044`

    What would you like to be added:

    Add mainnet and testnet address prefixes

    Where to add -> https://github.com/paritytech/ss58-registry

    Why is this needed:

    The address prefix that identifies an address as belonging to a specific network.

    triage/accepted kind/feature priority/important-soon packages/network area/packages 
    opened by canonbrother 11
  • Github workflows to utilize building on docker engine

    Github workflows to utilize building on docker engine

    What would you like to be added:

    Builds should use docker qemu + buildx. Building on docker engine will allow us to utilize qemu.

    Why is this needed:

    To make the builds as OS agnostic as possible.

    Reference Conversation

    triage/accepted kind/feature area/workflow priority/urgent-now area/packages 
    opened by DieHard073055 10
  • feat(meta): MetaChainContainer `start()` to be more fluent like

    feat(meta): MetaChainContainer `start()` to be more fluent like

    What this PR does / why we need it:

    Add ability to pass in a configModifier so the consumer will be able to override the default config used to start the container.

    Which issue(s) does this PR fixes?:

    Fixes #107

    Additional comments?:

    kind/feature area/packages packages/testcontainers 
    opened by DieHard073055 8
  • chore(evm): Add meta skeleton with manual seal

    chore(evm): Add meta skeleton with manual seal

    What this PR does / why we need it:

    Adds initial code required for meta node with manual seal.

    Which issue(s) does this PR fixes?:

    Fixes #

    Additional comments?:

    area/workflow kind/chore area/docs 
    opened by surangap 8
  • Github workflow CI to cater builds for different OS versions

    Github workflow CI to cater builds for different OS versions

    What would you like to be added:

    As per title

    Why is this needed:

    In order to make sure our binaries are able to run on all the environments that we expect. Our builds should target all those environments.

    Reference Conversation

    triage/accepted kind/feature area/workflow priority/important-soon 
    opened by DieHard073055 7
  • chore(chains): support multi runtime

    chore(chains): support multi runtime

    What this PR does / why we need it:

    /kind chore

    Which issue(s) does this PR fixes?:

    Fixes #

    Additional comments?:

    kind/chore packages/network meta/node area/packages area/meta packages/testcontainers 
    opened by canonbrother 5
  • refactor(testcontainers): move testcontainers into its own package

    refactor(testcontainers): move testcontainers into its own package

    What this PR does / why we need it:

    Refactor and move ts-tests into mono-repo style packages to allow separation of context and downstream usability. This is the continuation of #42

    @defimetachain/testcontainers

    Provides easy to use and test lightweight, throwaway instances of MetaChain provisioned automatically in a Docker container.

    MetaChainContainer and StartedMetaChainContainer follows the convention defined in testcontainers/testcontainers-node

    let container: StartedMetaChainContainer;
    let rpc: ethers.providers.JsonRpcProvider;
    
    beforeEach(async () => {
      container = await new MetaChainContainer().start();
    });
    
    afterEach(async () => {
      await container.stop();
    });
    
    it('should createBlock', async function () {
      await container.createBlock();
      expect(await rpc.getBlockNumber()).toStrictEqual(1);
    });
    

    Which issue(s) does this PR fixes?:

    Fixes #78

    Additional comments?:

    The current implementation in ts-tests isn't yet migrated to use the new standard and convention defined here. That should be done as part of https://github.com/DeFiCh/metachain/issues/79.

    kind/refactor packages/network area/packages packages/testcontainers 
    opened by fuxingloh 5
  • end-to-end testing pipeline/tooling for metachain

    end-to-end testing pipeline/tooling for metachain

    What would you like to be added:

    At JellyfishSDK/jellyfish, there was a strong use of Containers + Javascript-based API for end-to-end (e2e) testing of services. Similarly, we need something like that here. Not to confuse integration or unit with e2e, e2e tests the resulting artifacts, and the entire artifact/binary lifecycle from start to finish. Hence it might not make sense to do it in Rust?

    Unit Tests

    The purpose of unit tests is to test each unit of code in isolation from the rest of the code to quickly pinpoint where code is and isn’t working as expected. You’ll put unit tests in the src directory in each file with the code that they’re testing. The convention is to create a module named tests in each file to contain the test functions and to annotate the module with cfg(test).

    Integration Tests

    In Rust, integration tests are entirely external to your library. They use your library in the same way any other code would, which means they can only call functions that are part of your library’s public API. Their purpose is to test whether many parts of your library work together correctly. Units of code that work correctly on their own could have problems when integrated, so test coverage of the integrated code is important as well. To create integration tests, you first need a tests directory.

    https://doc.rust-lang.org/book/ch11-03-test-organization.html

    Why is this needed:

    Quality.

    /triage accepted /area workflow

    triage/accepted kind/feature area/workflow 
    opened by fuxingloh 5
  • add artifact workflows with publishing

    add artifact workflows with publishing

    What would you like to be added:

    • Publish Docker Image (PR/Main/Release)
      • matrix: (linux,windows,mac)
    • Publish Binary (PR/Main/Release)

    /area workflow /triage accepted

    triage/accepted kind/feature area/workflow 
    opened by fuxingloh 5
  • feat(testsuite-web3-rpc): move files from ts-test to testsuite-web3-rpc

    feat(testsuite-web3-rpc): move files from ts-test to testsuite-web3-rpc

    What this PR does / why we need it:

    Details in the issue https://github.com/DeFiCh/metachain/issues/79

    Which issue(s) does this PR fixes?:

    Fixes #79

    Additional comments?:

    kind/feature area/packages 
    opened by DieHard073055 4
  • bump(deps): update @birthdayresearch/sticky to v0.3.2

    bump(deps): update @birthdayresearch/sticky to v0.3.2

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @​birthdayresearch/eslint-config | 0.3.1 -> 0.3.2 | age | adoption | passing | confidence | | @​birthdayresearch/sticky-prettier | 0.3.1 -> 0.3.2 | age | adoption | passing | confidence | | @​birthdayresearch/sticky-turbo-jest | 0.3.1 -> 0.3.2 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    kind/dependencies packages/network area/packages packages/testcontainers 
    opened by renovate[bot] 3
  • chore(deps): bump secp256k1 from 0.24.1 to 0.24.2

    chore(deps): bump secp256k1 from 0.24.1 to 0.24.2

    Bumps secp256k1 from 0.24.1 to 0.24.2.

    Changelog

    Sourced from secp256k1's changelog.

    0.24.2 - 2022-12-05

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    kind/chore dependencies 
    opened by dependabot[bot] 1
  • bump(deps): update dependency hardhat to ^2.12.5

    bump(deps): update dependency hardhat to ^2.12.5

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | hardhat (source) | ^2.12.2 -> ^2.12.5 | age | adoption | passing | confidence |


    Release Notes

    nomiclabs/hardhat

    v2.12.5: Hardhat v2.12.5

    Compare Source

    • The full return data of unrecognized custom errors is now shown in error messages
    • Fixed a bug that was causing the flatten task to produce non-deterministic results
    • Fixed a bug when gasPrice was set to "auto", which is the default configuration when connecting to a JSON-RPC network. This bug was preventing the results from eth_feeHistory from being used when they should.
    • Added an experimental environment variable flag to disable the local installation check (thanks @​arijoon!)

    v2.12.4: Hardhat v2.12.4

    Compare Source

    This release fixes a small issue that was affecting our VSCode extension in some edge cases.

    It also includes a non-intrusive message promoting this year's Solidity Developer Survey.

    v2.12.3: Hardhat v2.12.3

    Compare Source

    • Added a new hardhat_metadata RPC method
    • Trim leading and trailing spaces in mnemonics (thanks @​winor30!)
    • Pending blocks now include the bloom field (thanks @​InoMurko!)
    • A better error is shown if a Solidity file makes an import through its own package name (thanks @​KaanKC!)
    • Added a getBuildInfoSync function to the hre.artifacts object (thanks @​emretepedev!)
    • Fixed an edge case where Hardhat would hang if debug_traceTransaction was used with an OOG transaction sent to a precompile

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    kind/dependencies area/packages 
    opened by renovate[bot] 3
  • Disable p2p block sync

    Disable p2p block sync

    What would you like to be added:

    To disable p2p block sync. Note: do not sync whatever announced block

    Why is this needed:

    By design, safety wise, we don't allow p2p call in between substrate node. The block generation will be all controlled by DNC. For more details ---> https://metachain.netlify.app/meta-chain-protocol/consensus#block-connecting

    needs/triage kind/feature area/meta 
    opened by canonbrother 3
  • Metachain fails to build on Windows

    Metachain fails to build on Windows

    What happened:

    During testing of the metachain build targeting multiple oses [ubuntu, mac, windows] the windows build failed. The windows build failed with the following error message.

    failed to run custom build command for `tikv-jemalloc-sys v0.4.3+5.2.1-patched.2`
    

    This is because the library tikv-jemalloc-sys v0.4.3+5.2.1-patched.2 does not support windows at the time.

    needs/triage area/workflow kind/bug area/meta 
    opened by DieHard073055 2
Owner
DeFiChain
Decentralized finance enabled on Bitcoin.
DeFiChain
Parser and test runner for testing compatable common Ethereum full node tests against Polygon Zero's EVM.

EVM Test Parses and runs compatible common Ethereum tests from ethereum/tests against Polygon Zero's EVM. Note: This repo is currently very early in d

Mir Protocol 3 Nov 4, 2022
Substreams development kit for Ethereum chains, contains Firehose Block model and helpers as well as utilities for Ethereum ABI encoding/decoding.

Substreams Ethereum Substreams development kit for Ethereum chains, contains Rust Firehose Block model and helpers as well as utilities for Ethereum A

StreamingFast 15 Oct 25, 2022
Ethereum (and Ethereum like) indexer using P2P message to fetch blocks and transactions

Ethereum P2P indexer This project is an indexer for Ethereum and Ethereum forks. It takes advantage of the ETH (Ethereum Wire Protocol) to fetch block

null 5 Nov 10, 2023
Rust based Virtual Machine on Avalanche that implements Bulletproof ZK Proofs.

BulletproofVM Rust based Virtual Machine on Avalanche that implements Bulletproof ZK Proofs. Zero-Knowledge Virtual Machine This is a virtual machine

null 14 Jan 4, 2023
Bellman zkSNARK library for community with Ethereum's BN256 support

bellman "Community edition" Originally developed for ZCash, with extensions from us to make it a little more pleasant. Uses our "community edition" pa

Matter Labs 113 Dec 29, 2022
EVM compatible chain with NPoS/PoC consensus

Reef Chain Reef chain is written in Rust. A basic familiarity with Rust tooling is required. To learn more about Reef chain, please refer to Documenta

Reef Finance 148 Dec 31, 2022
A temporary repo for ETH connector to be used by EVM

ETH connector for Rainbow bridge Definitions bridgedETH - NEP-141 fungible-token representation of ETH inside Near. nETH - native ETH inside Near EVM.

Project Aurora 36 Jul 26, 2022
Fiddi is a command line tool that does the boring and complex process of checking and processing/watching transactions on EVM compatible Blockchain.

Fiddi is a command line tool that does the boring and complex process of checking and processing/watching transactions on EVM compatible Blockchain.

Ahmad Abdullahi Adamu 7 Jan 9, 2023
Selendra is a multichains interoperable nominated Proof-of-Stake network for developing and running Substrate-based and EVM compatible blockchain applications.

Selendra An interoperable nominated Proof-of-Stake network for developing and running Substrate-based and EVM compatible blockchain applications. Read

Selendra 16 Nov 29, 2022
Minimalistic EVM-compatible chain indexer.

EVM Indexer Minimalistic EVM-compatible blockchain indexer written in rust. This repository contains a program to index helpful information from any E

Kike B 14 Dec 24, 2022
Binding generator for EVM and ink!

Sumi is a binding generator specifically designed for Astar Network ecosystem with XVM in mind. It takes EVM metadata and converts it to an ink! modul

Dmitry 4 Dec 15, 2022
Minimalistic EVM-compatible chain indexer.

EVM Indexer Minimalistic EVM-compatible blockchain indexer written in rust. This repository contains a program to index helpful information from any E

LlamaFolio 11 Dec 15, 2022
Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844blobs.

stress4844 Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844 blobs. ca

Paradigm 50 Jan 4, 2023
Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer

Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844blobs.

Paradigm 50 Jan 4, 2023
An EVM low-level language that gives full control over the control flow of the smart contract.

Meplang - An EVM low-level language Meplang is a low-level programming language that produces EVM bytecode. It is designed for developers who need ful

MEP 19 Jan 31, 2023
A framework for developing EVM-compatible chains

rt-evm A compact development framework for creating EVM-compatible runtimes/chains. Usage Check the example for details. Projects referenced trie, MPT

Rust Util Collections 4 Mar 15, 2023
🛠️ Uses zkevm-circuits and anvil mainnetfork to prove that a tx solves an EVM challenge

zk-proof-of-evm-execution This is a PoC developed at hackathon that enables a user to prove that they know some calldata that can solve a challenge on

soham 9 Mar 29, 2023
An extensible and practical demonstration of constructing evm-based sandwich attacks built with ethers-rs and Huff language.

subway-rs • Construct evm-based sandwich attacks using Rust and Huff. Getting Started subway-rs is a port of libevm's original subway, implemented wit

refcell.eth 230 Apr 25, 2023
A Minimalistic Rust library to extract all potential function selectors from EVM bytecode without source code.

EVM Hound A Minimalistic Rust library to extract all potential function selectors from EVM bytecode without source code. Installation $ cargo add evm_

null 34 Dec 3, 2023