New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M prefix added for script addresses #279

Merged
merged 5 commits into from Jan 30, 2017

Conversation

Projects
None yet
4 participants
@wangxinxi
Member

wangxinxi commented Jan 14, 2017

Test cases for M prefix addresses are still needed.

@shaolinfry shaolinfry added this to the 0.13.3 milestone Jan 14, 2017

@@ -126,6 +126,7 @@ class CMainParams : public CChainParams {
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,48);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
base58Prefixes[SCRIPT_ADDRESS2] = std::vector<unsigned char>(1,50);

This comment has been minimized.

@shaolinfry

shaolinfry Jan 14, 2017

Member

Please add a SCRIPT_ADDRESS2 for testnet also so we can test it out on testnet.

@shaolinfry

shaolinfry Jan 14, 2017

Member

Please add a SCRIPT_ADDRESS2 for testnet also so we can test it out on testnet.

@shaolinfry

This comment has been minimized.

Show comment
Hide comment
@shaolinfry

shaolinfry Jan 14, 2017

Member

Does this the addmultisigaddress RPC command work with the new prefix?

Member

shaolinfry commented Jan 14, 2017

Does this the addmultisigaddress RPC command work with the new prefix?

@wangxinxi

This comment has been minimized.

Show comment
Hide comment
@wangxinxi

wangxinxi Jan 14, 2017

Member

./litecoin-cli addmultisigaddress 2 '["LgebDAqipqUm41KQQHwSGHA56XeyzGiEVf", "LRxuPLUGjYivrjibydfKACLjFKzUiEnXgL"]'

Output:
MAP2uc4aFVwJwoJp3p8yFMs7zy6Pa5e9Zv

Member

wangxinxi commented Jan 14, 2017

./litecoin-cli addmultisigaddress 2 '["LgebDAqipqUm41KQQHwSGHA56XeyzGiEVf", "LRxuPLUGjYivrjibydfKACLjFKzUiEnXgL"]'

Output:
MAP2uc4aFVwJwoJp3p8yFMs7zy6Pa5e9Zv

@thrasher-

This comment has been minimized.

Show comment
Hide comment
@thrasher-

thrasher- Jan 15, 2017

Member

Looks good 👍 Just need an RPC test to test functionality and then its good to merge.

Member

thrasher- commented Jan 15, 2017

Looks good 👍 Just need an RPC test to test functionality and then its good to merge.

@shaolinfry

This comment has been minimized.

Show comment
Hide comment
@shaolinfry

shaolinfry Jan 15, 2017

Member

Checked the ability to receive and spend from old and new addresses plus existing RPC calls.

Needs some python RPC tests though.

Member

shaolinfry commented Jan 15, 2017

Checked the ability to receive and spend from old and new addresses plus existing RPC calls.

Needs some python RPC tests though.

@shaolinfry

Need to change the file mode to +x for this file

@shaolinfry

Just realized this file needs to be added to the automated tests in https://github.com/litecoin-project/litecoin/blob/master/qa/pull-tester/rpc-tests.py#L103

@shaolinfry

This comment has been minimized.

Show comment
Hide comment
@shaolinfry

shaolinfry Jan 26, 2017

Member

two tests are failing,possibly because of default address prefix change

p2p-segwit.py:
start_node: litecoind started, waiting for RPC to come up
start_node: RPC succesfully started
start_node: litecoind started, waiting for RPC to come up
start_node: RPC succesfully started
start_node: litecoind started, waiting for RPC to come up
start_node: RPC succesfully started
MiniNode: Connecting to Litecoin Node IP # 127.0.0.1:13880
MiniNode: Connecting to Litecoin Node IP # 127.0.0.1:13880
MiniNode: Connecting to Litecoin Node IP # 127.0.0.1:13881
Starting tests before segwit lock in:
	Verifying NODE_WITNESS service bit
	Testing non-witness transaction
	Testing behavior of unnecessary witnesses
	Testing block relay
	Testing getblocktemplate setting of segwit versionbit (before lockin)
Testing behavior post lockin, pre-activation
	Testing behavior of unnecessary witnesses
	Testing relay of witness transactions
	Testing block relay
	Testing P2SH witness transactions
	Testing standardness of v0 outputs (before activation)
Testing behavior after segwit activation
	Testing P2SH witness transactions
Assertion failed: False != True
Stopping nodes
Not cleaning up dir /tmp/testl7r8qy0g/360
Failed
stderr:
   File "/home/travis/build/litecoin-project/litecoin/qa/rpc-tests/test_framework/test_framework.py", line 143, in main
    self.run_test()
  File "/home/travis/build/litecoin-project/litecoin/build/../qa/rpc-tests/p2p-segwit.py", line 1999, in run_test
    self.test_p2sh_witness(segwit_activated=True)
  File "/home/travis/build/litecoin-project/litecoin/build/../qa/rpc-tests/p2p-segwit.py", line 1506, in test_p2sh_witness
    self.test_node.test_witness_block(block, accepted=True, with_witness=segwit_activated)
  File "/home/travis/build/litecoin-project/litecoin/build/../qa/rpc-tests/p2p-segwit.py", line 159, in test_witness_block
    assert_equal(self.connection.rpc.getbestblockhash() == block.hash, accepted)
  File "/home/travis/build/litecoin-project/litecoin/qa/rpc-tests/test_framework/util.py", line 504, in assert_equal
    raise AssertionError("%s != %s"%(str(thing1),str(thing2)))
Pass: False, Duration: 36 s
...........
nulldummy.py:
Initializing test directory /tmp/testhg6_j9l5/355
start_node: litecoind started, waiting for RPC to come up
start_node: RPC succesfully started
Test 1: NULLDUMMY compliant base transactions should be accepted to mempool and mined before activation [430]
Test 2: Non-NULLDUMMY base multisig transaction should not be accepted to mempool before activation
Test 3: Non-NULLDUMMY base transactions should be accepted in a block before activation [431]
Test 4: Non-NULLDUMMY base multisig transaction is invalid after activation
Test 5: Non-NULLDUMMY P2WSH multisig transaction invalid after activation
Test 6: NULLDUMMY compliant base/witness transactions should be accepted to mempool and in block after activation [432]
Assertion failed: 0212ff1baa2262c4dce8e3c9f395e5285e7c8b961f3f8883e443843dbba664b5 != a55b5f80365728c993b61b7386714b619730b2602290d2e18678972b10bb9ed1
Stopping nodes
Not cleaning up dir /tmp/testhg6_j9l5/355
Failed
stderr:
   File "/home/travis/build/litecoin-project/litecoin/qa/rpc-tests/test_framework/test_framework.py", line 143, in main
    self.run_test()
  File "/home/travis/build/litecoin-project/litecoin/build/../qa/rpc-tests/nulldummy.py", line 102, in run_test
    self.block_submit(self.nodes[0], test6txs, True, True)
  File "/home/travis/build/litecoin-project/litecoin/build/../qa/rpc-tests/nulldummy.py", line 139, in block_submit
    assert_equal(node.getbestblockhash(), block.hash)
  File "/home/travis/build/litecoin-project/litecoin/qa/rpc-tests/test_framework/util.py", line 504, in assert_equal
    raise AssertionError("%s != %s"%(str(thing1),str(thing2)))
Pass: False, Duration: 6 s
Member

shaolinfry commented Jan 26, 2017

two tests are failing,possibly because of default address prefix change

p2p-segwit.py:
start_node: litecoind started, waiting for RPC to come up
start_node: RPC succesfully started
start_node: litecoind started, waiting for RPC to come up
start_node: RPC succesfully started
start_node: litecoind started, waiting for RPC to come up
start_node: RPC succesfully started
MiniNode: Connecting to Litecoin Node IP # 127.0.0.1:13880
MiniNode: Connecting to Litecoin Node IP # 127.0.0.1:13880
MiniNode: Connecting to Litecoin Node IP # 127.0.0.1:13881
Starting tests before segwit lock in:
	Verifying NODE_WITNESS service bit
	Testing non-witness transaction
	Testing behavior of unnecessary witnesses
	Testing block relay
	Testing getblocktemplate setting of segwit versionbit (before lockin)
Testing behavior post lockin, pre-activation
	Testing behavior of unnecessary witnesses
	Testing relay of witness transactions
	Testing block relay
	Testing P2SH witness transactions
	Testing standardness of v0 outputs (before activation)
Testing behavior after segwit activation
	Testing P2SH witness transactions
Assertion failed: False != True
Stopping nodes
Not cleaning up dir /tmp/testl7r8qy0g/360
Failed
stderr:
   File "/home/travis/build/litecoin-project/litecoin/qa/rpc-tests/test_framework/test_framework.py", line 143, in main
    self.run_test()
  File "/home/travis/build/litecoin-project/litecoin/build/../qa/rpc-tests/p2p-segwit.py", line 1999, in run_test
    self.test_p2sh_witness(segwit_activated=True)
  File "/home/travis/build/litecoin-project/litecoin/build/../qa/rpc-tests/p2p-segwit.py", line 1506, in test_p2sh_witness
    self.test_node.test_witness_block(block, accepted=True, with_witness=segwit_activated)
  File "/home/travis/build/litecoin-project/litecoin/build/../qa/rpc-tests/p2p-segwit.py", line 159, in test_witness_block
    assert_equal(self.connection.rpc.getbestblockhash() == block.hash, accepted)
  File "/home/travis/build/litecoin-project/litecoin/qa/rpc-tests/test_framework/util.py", line 504, in assert_equal
    raise AssertionError("%s != %s"%(str(thing1),str(thing2)))
Pass: False, Duration: 36 s
...........
nulldummy.py:
Initializing test directory /tmp/testhg6_j9l5/355
start_node: litecoind started, waiting for RPC to come up
start_node: RPC succesfully started
Test 1: NULLDUMMY compliant base transactions should be accepted to mempool and mined before activation [430]
Test 2: Non-NULLDUMMY base multisig transaction should not be accepted to mempool before activation
Test 3: Non-NULLDUMMY base transactions should be accepted in a block before activation [431]
Test 4: Non-NULLDUMMY base multisig transaction is invalid after activation
Test 5: Non-NULLDUMMY P2WSH multisig transaction invalid after activation
Test 6: NULLDUMMY compliant base/witness transactions should be accepted to mempool and in block after activation [432]
Assertion failed: 0212ff1baa2262c4dce8e3c9f395e5285e7c8b961f3f8883e443843dbba664b5 != a55b5f80365728c993b61b7386714b619730b2602290d2e18678972b10bb9ed1
Stopping nodes
Not cleaning up dir /tmp/testhg6_j9l5/355
Failed
stderr:
   File "/home/travis/build/litecoin-project/litecoin/qa/rpc-tests/test_framework/test_framework.py", line 143, in main
    self.run_test()
  File "/home/travis/build/litecoin-project/litecoin/build/../qa/rpc-tests/nulldummy.py", line 102, in run_test
    self.block_submit(self.nodes[0], test6txs, True, True)
  File "/home/travis/build/litecoin-project/litecoin/build/../qa/rpc-tests/nulldummy.py", line 139, in block_submit
    assert_equal(node.getbestblockhash(), block.hash)
  File "/home/travis/build/litecoin-project/litecoin/qa/rpc-tests/test_framework/util.py", line 504, in assert_equal
    raise AssertionError("%s != %s"%(str(thing1),str(thing2)))
Pass: False, Duration: 6 s
@wangxinxi

This comment has been minimized.

Show comment
Hide comment
@wangxinxi

wangxinxi Jan 27, 2017

Member

Errors in p2p-segwit.py are due to the use of wrong version bits. The function self.build_next_block() produces blocks with version = 4, which are rejected by litecoind.

Errors in nulldummy.py are also due to wrong version bits used.

We should fix them in another pull request.

Member

wangxinxi commented Jan 27, 2017

Errors in p2p-segwit.py are due to the use of wrong version bits. The function self.build_next_block() produces blocks with version = 4, which are rejected by litecoind.

Errors in nulldummy.py are also due to wrong version bits used.

We should fix them in another pull request.

@losh11

This comment has been minimized.

Show comment
Hide comment
@losh11

losh11 Jan 27, 2017

Member

Why another PR? No need, we could always change the PR title and outline all commits and describe what each commit fixes.

Member

losh11 commented Jan 27, 2017

Why another PR? No need, we could always change the PR title and outline all commits and describe what each commit fixes.

@wangxinxi

This comment has been minimized.

Show comment
Hide comment
@wangxinxi

wangxinxi Jan 27, 2017

Member

The two PRs are not related. Isn't it better to separate them?

Member

wangxinxi commented Jan 27, 2017

The two PRs are not related. Isn't it better to separate them?

@shaolinfry

This comment has been minimized.

Show comment
Hide comment
@shaolinfry

shaolinfry Jan 27, 2017

Member

If the test breaks are not related to this PR, then this can be merged. I have confirmed those tests do fail on master.

Member

shaolinfry commented Jan 27, 2017

If the test breaks are not related to this PR, then this can be merged. I have confirmed those tests do fail on master.

@thrasher- thrasher- self-requested a review Jan 29, 2017

@shaolinfry shaolinfry merged commit ea12a20 into litecoin-project:master Jan 30, 2017

1 check failed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment