Coder Social home page Coder Social logo

bec's Introduction

BEC - BitEtherCoin

BEC (BitEtherCoin) is an Ethereum Classic coin, issued per each block as a reward to the miner.

It follows Bitcoin’s coin Supply Model, with:

  • 21M BEC coins total

  • 0.00000001 BEC = 1 BECsatoshi

  • Halving each new era

  • 7th era (99.2% coins) ends at about 2034 (for BTC it’s 2036)

  • 13th era (99.99% coins) ends at 2048 (for BTC it’s 2060)

Specific details:

  • mining starts at block 2,726,892

  • Era size is 5250000 Ethereum blocks

  • starts with 2 BEC reward per ETC block (instead of 50, because Ethereum block time is much smaller)

To claim block reward there should be a special transaction in the block, which calls contract method claim(). This transaction could be sent from any address, but only an actual miner for current block will receive reward tokens.

Address

Mainnet (ETC): 0x085fb4f24031eaedbc2b611aa528f22343eb52db

You can install this address as a standard Ethereum token into your Mist or other wallet (see ABI below).

Mining BEC Coins

To claim block reward there should be a special transaction in the block, which calls contract method claim(). This transaction could be sent from any address, but only an actual miner for current block will receive reward tokens.

For example you can send such transaction before each block by execution following command:

curl --request POST \
  --url http://localhost:8545/ \
  --header 'content-type: application/json' \
  --data '{"jsonrpc":"2.0", "method":"eth_sendTransaction", "params":[{"from":"0xANY_UNLOCKED_ADDRESS", "to":"0x085fb4f24031eaedbc2b611aa528f22343eb52db", "gas": "0x30d40", "value": "0x0", "data": "0x4e71d92d"}], "id":1}'

The problem with this approach that it will cost you some gas to execute this transaction even if you’re a miner of the block. Another way is to patch Parity/Geth to include such transactions automatically, See Example

ABI

[
  {
    "constant": false,
    "inputs": [],
    "name": "getEra",
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      },
      {
        "name": "",
        "type": "uint256"
      },
      {
        "name": "",
        "type": "uint256"
      },
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "payable": false,
    "type": "function"
  },
  {
    "constant": true,
    "inputs": [],
    "name": "name",
    "outputs": [
      {
        "name": "",
        "type": "string"
      }
    ],
    "payable": false,
    "type": "function"
  },
  {
    "constant": false,
    "inputs": [
      {
        "name": "_spender",
        "type": "address"
      },
      {
        "name": "_value",
        "type": "uint256"
      }
    ],
    "name": "approve",
    "outputs": [
      {
        "name": "success",
        "type": "bool"
      }
    ],
    "payable": false,
    "type": "function"
  },
  {
    "constant": true,
    "inputs": [],
    "name": "totalSupply",
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "payable": false,
    "type": "function"
  },
  {
    "constant": false,
    "inputs": [
      {
        "name": "_from",
        "type": "address"
      },
      {
        "name": "_to",
        "type": "address"
      },
      {
        "name": "_value",
        "type": "uint256"
      }
    ],
    "name": "transferFrom",
    "outputs": [
      {
        "name": "success",
        "type": "bool"
      }
    ],
    "payable": false,
    "type": "function"
  },
  {
    "constant": false,
    "inputs": [
      {
        "name": "_eraBlock",
        "type": "uint256"
      },
      {
        "name": "_blockMined",
        "type": "uint256"
      },
      {
        "name": "_blockNumber",
        "type": "uint256"
      },
      {
        "name": "_rewardPrev",
        "type": "uint256"
      },
      {
        "name": "_reward",
        "type": "uint256"
      }
    ],
    "name": "getUnclaimed",
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "payable": false,
    "type": "function"
  },
  {
    "constant": true,
    "inputs": [],
    "name": "decimals",
    "outputs": [
      {
        "name": "",
        "type": "uint8"
      }
    ],
    "payable": false,
    "type": "function"
  },
  {
    "constant": false,
    "inputs": [
      {
        "name": "_block",
        "type": "uint256"
      }
    ],
    "name": "getEraForBlock",
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      },
      {
        "name": "",
        "type": "uint256"
      },
      {
        "name": "",
        "type": "uint256"
      },
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "payable": false,
    "type": "function"
  },
  {
    "constant": false,
    "inputs": [],
    "name": "claim",
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "payable": false,
    "type": "function"
  },
  {
    "constant": true,
    "inputs": [
      {
        "name": "_owner",
        "type": "address"
      }
    ],
    "name": "balanceOf",
    "outputs": [
      {
        "name": "balance",
        "type": "uint256"
      }
    ],
    "payable": false,
    "type": "function"
  },
  {
    "constant": true,
    "inputs": [],
    "name": "symbol",
    "outputs": [
      {
        "name": "",
        "type": "string"
      }
    ],
    "payable": false,
    "type": "function"
  },
  {
    "constant": false,
    "inputs": [
      {
        "name": "_to",
        "type": "address"
      },
      {
        "name": "_value",
        "type": "uint256"
      }
    ],
    "name": "transfer",
    "outputs": [
      {
        "name": "success",
        "type": "bool"
      }
    ],
    "payable": false,
    "type": "function"
  },
  {
    "constant": true,
    "inputs": [
      {
        "name": "_owner",
        "type": "address"
      },
      {
        "name": "_spender",
        "type": "address"
      }
    ],
    "name": "allowance",
    "outputs": [
      {
        "name": "remaining",
        "type": "uint256"
      }
    ],
    "payable": false,
    "type": "function"
  },
  {
    "inputs": [],
    "type": "constructor"
  },
  {
    "payable": false,
    "type": "fallback"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "name": "_from",
        "type": "address"
      },
      {
        "indexed": true,
        "name": "_to",
        "type": "address"
      },
      {
        "indexed": false,
        "name": "_value",
        "type": "uint256"
      }
    ],
    "name": "Transfer",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "name": "_owner",
        "type": "address"
      },
      {
        "indexed": true,
        "name": "_spender",
        "type": "address"
      },
      {
        "indexed": false,
        "name": "_value",
        "type": "uint256"
      }
    ],
    "name": "Approval",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "name": "_miner",
        "type": "address"
      },
      {
        "indexed": false,
        "name": "_value",
        "type": "uint256"
      },
      {
        "indexed": false,
        "name": "_current",
        "type": "bool"
      }
    ],
    "name": "Reward",
    "type": "event"
  }
]

bec's People

Contributors

gagarin55 avatar splix avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bec's Issues

Error when account has 0 nonce

01:26:50 UTC BitEther Coin transaction is not ready for nonce 0
'' panicked at 'arithmetic operation overflow', util/bigint/src/uint.rs:1153
backtrace:
0x565534ab80ba - std::sys::imp::backtrace::tracing::imp::write::h917062bce4ff48c3
/buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/obj/../src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
0x565534ac17af - std::panicking::default_hook::{{closure}}::h0bacac31b5ed1870
/buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:247
0x565534abf4d6 - std::panicking::default_hook::h5897799da33ece67
/buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:263
0x565534abfb87 - std::panicking::rust_panic_with_hook::h109e116a3a861224
/buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:451

Issue resolves if tx is send and begins with nonce 1

Setting Parity

Hello!
I have a pool but it does not have wallet.
Wallet stored on a remote server.
If I add --bec-address --- parity crash on unlock

How, then, to set up Parity?

Best Regards Igor

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.