Commit graph

20385 commits

Author SHA1 Message Date
Gregory Sanders
bd11097cec Add fedpeg_program field in dynafed header 2019-09-05 10:51:09 -04:00
Gregory Sanders
4ad2b8018d CreatePAKListFromExtensionSpace just uses FromBytes for correctness 2019-09-05 10:51:09 -04:00
Gregory Sanders
6a5eaa189a Remove short-circuit dynafed vote fail for readability 2019-09-05 10:51:09 -04:00
Gregory Sanders
dddc040aa0 s/m_dyna_params/m_dynafed_params/ 2019-09-05 10:51:09 -04:00
Gregory Sanders
6ed63c1fb3 Light explanation of dynamic federations fields 2019-09-05 10:51:09 -04:00
Gregory Sanders
15996384d4 s/ConsensusParamEntry/DynaFedParamEntry/ 2019-09-05 10:51:09 -04:00
Gregory Sanders
642260a126 s/m_sbs_wit_limit/m_signblock_witness_limit/ 2019-09-05 10:51:09 -04:00
Gregory Sanders
b66804678c s/HF_MASK/DYNAFED_HF_MASK/ 2019-09-05 10:51:09 -04:00
Gregory Sanders
0fd39edf54 s/d_params/dynafed_params/ 2019-09-05 10:51:09 -04:00
Gregory Sanders
1779956e69 signrawtransaction* should use up to date fedpegscript for peg-in signing 2019-09-05 10:51:09 -04:00
Gregory Sanders
47db75e39f Dynafed RPC support, tests, and deployment for custom chains 2019-09-05 10:51:09 -04:00
Gregory Sanders
aac354b5ba OP_TRUE outputs should be allowed to be segwit-ified by decodescript 2019-09-03 10:55:29 -04:00
Gregory Sanders
055514b688 Have removeForBlock boot transactions when required 2019-09-03 10:55:29 -04:00
Gregory Sanders
525b24cf5c Expose fedpeg fetching to consensus and mempool internals 2019-09-03 10:55:29 -04:00
Gregory Sanders
4ac437b87c GetTransactionSigOpCost shouldn't need fedpegscript to evaluate 2019-09-03 10:55:29 -04:00
Gregory Sanders
5097c3880c Add and update startup args for dynafed 2019-09-03 10:55:28 -04:00
Gregory Sanders
24535d6a9f Add unused dynamic genesis block style in chainparams 2019-09-03 10:55:09 -04:00
Gregory Sanders
d10c42a26e Create epoch length chainparam 2019-09-03 10:55:09 -04:00
Gregory Sanders
b996a425e1 Set default of multi_data_permitted to enforce_pak 2019-09-03 10:55:06 -04:00
Gregory Sanders
f6f6308c93 Correct comment about liquidv1 fedpeg matching template 2019-09-03 10:55:06 -04:00
Gregory Sanders
4c00eb4084 Miner should stop trying to account for old PAK system 2019-09-03 10:55:06 -04:00
Gregory Sanders
0e10287f7a Add miner ability to make dynafed blocks 2019-09-03 10:55:06 -04:00
Gregory Sanders
5d281e7e68 ContextualCheckBlockHeader: dynafed doesn't call CheckChallenge 2019-09-03 10:55:06 -04:00
Gregory Sanders
9fe43cdf86 Introduce contextual block checks for dynafed 2019-09-03 10:55:06 -04:00
Gregory Sanders
3605505c94 Enable pak enforcement at mempool/block level when appropriate 2019-09-03 10:55:06 -04:00
Gregory Sanders
802a055191 ScriptHasValidPAKProof takes fedpeg as arg 2019-09-03 10:55:06 -04:00
Gregory Sanders
89174e9617 Remove old mempool-booting logic 2019-09-03 10:55:06 -04:00
Gregory Sanders
edb865cc2f Remove standardness checks for PAK 2019-09-03 10:55:06 -04:00
Gregory Sanders
804cd9f75f Update PAK internals, helper functions 2019-09-03 10:55:06 -04:00
Gregory Sanders
16b87ba951 Disable PAK loading from configuration on init, disable pak test 2019-09-03 10:55:06 -04:00
Gregory Sanders
918896d6ff Add inactive versionbits dynafed deployment 2019-09-03 10:55:06 -04:00
Gregory Sanders
0a8565bbf8 ReadBlockFromDisk: do genesis block check before block proof check 2019-09-03 10:55:06 -04:00
Gregory Sanders
6f0d9244f6 Bump last old block version for versonbits due to elements 2019-09-03 10:55:06 -04:00
Gregory Sanders
563cd93d43 Add python implementation of dynafed block serialization 2019-09-03 10:55:06 -04:00
Gregory Sanders
8d3091bbcb Deserialize merkle proofs without witness, which matters for dynafed 2019-09-03 10:55:06 -04:00
Gregory Sanders
830f917235 Add fedpegscript-fetching helper 2019-09-03 10:55:06 -04:00
Gregory Sanders
b56fe14956 calculate_contract: remove most template checks and assert in preperation for dynafed 2019-09-03 10:55:06 -04:00
Gregory Sanders
fd63cee1ab Add note on peg-in sigops 2019-09-03 10:55:06 -04:00
Gregory Sanders
f17d7de526 Add dynafed helper functions 2019-09-03 10:55:06 -04:00
Gregory Sanders
4aa5f991f4 Refactor block_proof to support dynafed 2019-09-03 10:50:16 -04:00
Gregory Sanders
4e52f2c83c Add dynamic federation blockheader fields to chaindb serialization 2019-09-03 10:50:16 -04:00
Gregory Sanders
a74accf7d1 Add dynamic federations blockheader serialization with HF bit 2019-09-03 10:50:16 -04:00
Gregory Sanders
2845e7811e Define dynamic federations primitives 2019-09-03 10:50:16 -04:00
Gregory Sanders
66c5045d5a
Merge #693: Qt fixes post 18
0fef2be3c Fix QT transaction blinding details being committed to wallet (Gregory Sanders)
172ad7198 Fix QT startup for custom chains (Gregory Sanders)

Pull request description:

  resolves https://github.com/ElementsProject/elements/issues/692

Tree-SHA512: bc18ada2350df95ebcd96fbc64be4085ca4f85e272ed89a3052d91bb02d48f6fc3c9cd0451db9741b14f4c416574d7f9db44cdc7a1502026a48729820ffb6aee
2019-09-03 10:08:53 -04:00
Steven Roose
a6878b8080
Merge #696: sendtomainchain with pak and subtract fee from output fix
adedc7f9c fix HelpExamplRPC port for liquidv1 vs bitcoin mainnet (Gregory Sanders)
d35bf0821 Fix sendtomainchain with pak when subtracting fee from output (Gregory Sanders)

Pull request description:

  resolves https://github.com/ElementsProject/elements/issues/695

  and also fixes RPC port in help

  needs backport to 0.17/0.18

Tree-SHA512: fb5414264a3fc70320b2e25261435a60383c4bf7c2c7f2d6381a862a1c89b2a97f824da412d21cf2e827d02e40e54dde214de471aad9a54c7f3c06ec98d6d840
2019-09-02 11:31:53 +01:00
Gregory Sanders
adedc7f9c1 fix HelpExamplRPC port for liquidv1 vs bitcoin mainnet 2019-08-30 11:36:01 -04:00
Gregory Sanders
d35bf08210 Fix sendtomainchain with pak when subtracting fee from output 2019-08-30 11:35:43 -04:00
Gregory Sanders
0fef2be3cc Fix QT transaction blinding details being committed to wallet 2019-08-22 15:25:42 -04:00
Gregory Sanders
172ad71988 Fix QT startup for custom chains 2019-08-22 15:25:00 -04:00
Gregory Sanders
285712834e
Merge #688: fix config err
eef221938 fix config err (Chengcheng Zhang)

Pull request description:

  I was confused to instructions in [Elements code tutorial](https://elementsproject.org/elements-code-tutorial/working-environment):

  > `cp ~/elements/contrib/assets_tutorial/elements2.conf ~/elementsdir2/elements.conf`

  But, in `~/elements/contrib/assets_tutorial/elements2.conf`, the network type is not specified at the beginning.

  I got an error after `e2-cli`:

  ```
  $ e2-cli getwalletinfo
  error: Could not connect to the server 127.0.0.1:7041

  Make sure the daemon server is running and that you are connecting to the correct RPC port.
  ```

  because elements default network is liquid, the port is 7041, so if you don't point the correct chain, you wouldn't get correct info.

  So I think the correct elements2.conf as below:

  ```
  chain=elementsregtest

  rpcuser=user2
  rpcpassword=password2
  elementsregtest.rpcport=18885
  elementsregtest.port=18887
  elementsregtest.connect=localhost:18886

  daemon=1
  listen=1
  txindex=1

  #fedpegscript=51<pubkey>51ae
  #signblockscript=51<pubkey2>51ae

  mainchainrpcport=18888
  mainchainrpcuser=user3
  mainchainrpcpassword=password3
  validatepegin=1

  initialfreecoins=2100000000000000
  ```

  I got correct result:

  ```
  $ e2-cli -getinfo
  {
    "version": 189900,
    "protocolversion": 70015,
    "walletversion": 169900,
    "balance": {
      "bitcoin": 21000000.00000000
    },
    "blocks": 0,
    "timeoffset": 0,
    "connections": 0,
    "proxy": "",
    "difficulty": null,
    "testnet": false,
    "keypoololdest": 1565173696,
    "keypoolsize": 1000,
    "paytxfee": 0.00000000,
    "relayfee": 0.00001000,
    "warnings": ""
  }
  ```

Tree-SHA512: c49303328fe5dde6682a1a8cde88350f35af081bb54d0d1dd5072a4c92cb043ed0b84303956a692bc4bc58f5741eae5664f8ffbe9ca795ca7f632c98d43586dd
2019-08-12 09:31:03 -04:00