Skip to content
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
Merged

M prefix added for script addresses #279

merged 5 commits into from Jan 30, 2017

Conversation

@wangxinxi
Copy link
Member

@wangxinxi 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);
Copy link
Member

@shaolinfry shaolinfry Jan 14, 2017

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

@shaolinfry
Copy link
Member

@shaolinfry shaolinfry commented Jan 14, 2017

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

@wangxinxi
Copy link
Member Author

@wangxinxi wangxinxi commented Jan 14, 2017

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

Output:
MAP2uc4aFVwJwoJp3p8yFMs7zy6Pa5e9Zv

@thrasher-
Copy link
Member

@thrasher- thrasher- commented Jan 15, 2017

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

@shaolinfry
Copy link
Member

@shaolinfry 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.

Copy link
Member

@shaolinfry shaolinfry left a comment

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

Copy link
Member

@shaolinfry shaolinfry left a comment

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
Copy link
Member

@shaolinfry 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
Copy link
Member Author

@wangxinxi 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
Copy link
Member

@losh11 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
Copy link
Member Author

@wangxinxi wangxinxi commented Jan 27, 2017

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

@shaolinfry
Copy link
Member

@shaolinfry 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.

@litecoin-project litecoin-project deleted a comment Aug 14, 2019
@litecoin-project litecoin-project deleted a comment Aug 14, 2019
@litecoin-project litecoin-project deleted a comment Aug 14, 2019
@litecoin-project litecoin-project deleted a comment Aug 14, 2019
@litecoin-project litecoin-project deleted a comment Aug 14, 2019
@litecoin-project litecoin-project deleted a comment Aug 14, 2019
@litecoin-project litecoin-project deleted a comment Aug 14, 2019
@litecoin-project litecoin-project deleted a comment Aug 14, 2019
@litecoin-project litecoin-project deleted a comment Aug 14, 2019
@litecoin-project litecoin-project deleted a comment Aug 14, 2019
@litecoin-project litecoin-project deleted a comment Aug 14, 2019
@SunjeeBaldorj
Copy link

@SunjeeBaldorj SunjeeBaldorj commented Aug 12, 2021

Balance   3.54712832 LTC with 6611 confirmations 11 days 6 hours Send Litecoin
Rich List   Unranked at block 2103338 with 3.54712832 LTC LTC
Wallet   none
Transaction count   1 transaction since block 2096728 11 days 6 hours
Received   3 .54712832 in 1 transaction

@SunjeeBaldorj
Copy link

@SunjeeBaldorj SunjeeBaldorj commented Aug 12, 2021

hi. my ltc 3.548239
3

@SunjeeBaldorj
Copy link

@SunjeeBaldorj SunjeeBaldorj commented Aug 12, 2021

to LY3X9yDv1kVsyC2Trkuo1hhT13dx2AAP3h please

@SunjeeBaldorj
Copy link

@SunjeeBaldorj SunjeeBaldorj commented Aug 12, 2021

<iframe frameborder="0" src="https://tpc.googlesyndication.com/safeframe/1-0-38/html/container.html" id="google_ads_iframe_/8691100/ChainzCryptoid_S2S_Leaderboard_ATF_ROS_0" title="3rd party ad content" name="" scrolling="no" marginwidth="0" marginheight="0" width="728" height="90" data-is-safeframe="true" sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation" allow="attribution-reporting" data-google-container-id="b" data-load-complete="true" style="box-sizing: border-box; border: 0px; vertical-align: bottom;"></iframe>

LTC Address MMapvCGNPTz5RYSrFcF1mWoNYpsX2BTzQA 
before Aug-2017 was 3FNgcJrQSM8ed3Ax9jFfwsYyE8H5338ZZW (see 3/M prefix)

Balance   3.54712832 LTC with 6611 confirmations 11 days 6 hours Send Litecoin
Rich List   Unranked at block 2103338 with 3.54712832 LTC LTC
Wallet   none
Transaction count   1 transaction since block 2096728 11 days 6 hours
Received   3 .54712832 in 1 transaction
Sent   0 .0 no transaction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants