gjhiggins
Legendary
Offline
Activity: 2254
Merit: 1278
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 28, 2017, 12:38:11 AM |
|
On the subject of Python, in my wanderings, I came across this bit of Python for converting a compressed pubkey into an uncompressed one: """ Slimcoin key values produced by src/test/key_tests.cpp:
* secret (hex): f092e90100000000c693e90100000000c693e901000000000000000000000000 * : uncompressed * secret (base58): 7S78qD9aBwpiCNCZsx9BmMKtsLY58p2zWKftnSPJkyV1SQULjGz * pubkey (hex): 0480d647bf15e05abcad608725c56fd7722a76335ad248fcf4032f7ae7d3ae09be4b13b00a4853bbf4cd00a1b1812cd401da8386405613a4927110e1db4cf21f19 * address (base58): SkM4auwYLe4R59zkXFnVJ3tCzCkZGms9cu * : compressed * secret (base58): VPp5ZncqVJyaqAa47tP8WkiPwBE9FUbnpRQfZZ3TP6Jcvtmy6WWR * pubkey (hex): 0380d647bf15e05abcad608725c56fd7722a76335ad248fcf4032f7ae7d3ae09be * address (base58): Siy45aBFsMzqtDEik4taLgDucHm5Tf1BdR """
def get_uncompressed_pubkey_from_compressed_pubkey(): """ Uncompressed pubkey from compressed pubkey """ def pow_mod(x, y, z): "Calculate (x ** y) % z efficiently." number = 1 while y: if y & 1: number = number * x % z y >>= 1 x = x * x % z return number compressed_key = "0380d647bf15e05abcad608725c56fd7722a76335ad248fcf4032f7ae7d3ae09be" p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f y_parity = int(compressed_key[:2]) - 2 x = int(compressed_key[2:], 16) a = (pow_mod(x, 3, p) + 7) % p y = pow_mod(a, (p + 1) // 4, p) if y % 2 != y_parity: y = -y % p uncompressed_key = '04{:x}{:x}'.format(x, y) print(uncompressed_key) # 0480d647bf15e05abcad608725c56fd7722a76335ad248fcf4032f7ae7d3ae09be4b13b00a4853bbf4cd00a1b1812cd401da8386405613a4927110e1db4cf21f19
The Slimcoin key values were generated by src/test/key_tests.cpp - it basically generates a new Slimcoin key (the hex secret key) and serializes the priv/pubkey in various familiar output formats. To use it, simply change to the src/test and run BOOST_TEST_LOG_LEVEL=message ./test_slimcoin, then copy the output. Cheers Graham
|
|
|
|
d5000
Legendary
Offline
Activity: 4032
Merit: 7225
Decentralization Maximalist
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 28, 2017, 04:58:29 AM Last edit: March 28, 2017, 05:12:24 AM by d5000 |
|
Thanks gjhiggins again for your updates! I'm currently experiencing difficulties to compile "master" (updated the git repo at around 0:00 UTC 28/03) and "prerelease" on one of my nodes (in fact it's the most important node as it's the only one that's connected 24/7 and does PoB minting). The error is very probably related to Boost. An excerpt from the failed compilation try in "master" (whole error message is very long): uint256.h:473:13: note: no known conversion for argument 1 from ‘CTxDestination {aka boost::variant<CNoDestination, CKeyID, CScriptID, CStealthAddress>}’ to ‘const base_uint160& {aka const base_uint<160u>&}’ uint256.h:456:13: note: bool operator!=(const uint160&, uint64) inline bool operator!=(const uint160& a, uint64 b) { return (base_uint160)a != b; } ^ uint256.h:456:13: note: no known conversion for argument 1 from ‘CTxDestination {aka boost::variant<CNoDestination, CKeyID, CScriptID, CStealthAddress>}’ to ‘const uint160&’ In file included from protocol.h:17:0, from net.h:21, from checkpoints.h:9, from main.cpp:8: uint256.h:278:24: note: bool operator!=(const base_uint<160u>&, uint64) friend inline bool operator!=(const base_uint& a, uint64 b) ^ uint256.h:278:24: note: no known conversion for argument 1 from ‘CTxDestination {aka boost::variant<CNoDestination, CKeyID, CScriptID, CStealthAddress>}’ to ‘const base_uint<160u>&’ uint256.h:273:24: note: bool operator!=(const base_uint<160u>&, const base_uint<160u>&) friend inline bool operator!=(const base_uint& a, const base_uint& b) ^ uint256.h:273:24: note: no known conversion for argument 1 from ‘CTxDestination {aka boost::variant<CNoDestination, CKeyID, CScriptID, CStealthAddress>}’ to ‘const base_uint<160u>&’ make: *** [obj/main.o] Error 1
On this machine (Ubuntu 14.04), Boost 1.54 or 1.55 are available (I tried it with both). On another machine with Boost 1.60 "master" at least compiles fine. Is there a minimum Boost version for Slimcoin? As there is no backport available, it seems I would have to install the required boost version manually or via a PPA. Haven't found Boost-1.60 as a PPA.
|
|
|
|
gjhiggins
Legendary
Offline
Activity: 2254
Merit: 1278
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 28, 2017, 08:17:42 AM |
|
uint256.h:473:13: note: no known conversion for argument 1 from ‘CTxDestination {aka boost::variant<CNoDestination, CKeyID, CScriptID, CStealthAddress>}’ to ‘const base_uint160& {aka const base_uint<160u>&}’
On this machine (Ubuntu 14.04), Boost 1.54 or 1.55 are available (I tried it with both). On another machine with Boost 1.60 "master" at least compiles fine. Is there a minimum Boost version for Slimcoin? As there is no backport available, it seems I would have to install the required boost version manually or via a PPA. Haven't found Boost-1.60 as a PPA. Thanks for testing out the master branch and the issue report, that is most helpful. I will check out the issue. Locally, I have boost 1.58 (under Ubuntu 16.04) and so has the remote server which is 15.10. I do have a 14.04 VM and will investigate the issue. Cheers Graham
|
|
|
|
gjhiggins
Legendary
Offline
Activity: 2254
Merit: 1278
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 28, 2017, 09:12:07 AM |
|
uint256.h:473:13: note: no known conversion for argument 1 from ‘CTxDestination {aka boost::variant<CNoDestination, CKeyID, CScriptID, CStealthAddress>}’ to ‘const base_uint160& {aka const base_uint<160u>&}’
I wonder ... Line #319 in src/base58.h showed up as a discrepancy between the PPCoin code ( https://github.com/peercoin/peercoin/blob/master/src/base58.h#L250) in which it is absent and the Slimcoin code ( https://github.com/slimcoin-project/Slimcoin/blob/master/src/base58.h#L319) in which it is present. Absence/presence made no difference to the success of the compilation or (apparently) to the execution of the binary. Given that it's a != operator which is the focus “ note: bool operator!=(const uint160&, uint64)” and a skim of the DDG search results for similar compiler error messages reveals mentions of duplicate definitions, p'raps it's related to the issue in point. I've pushed a new commit in which that apparently superfluous line of code is commented out, does that fix the issue? Cheers Graham
|
|
|
|
d5000
Legendary
Offline
Activity: 4032
Merit: 7225
Decentralization Maximalist
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 28, 2017, 11:57:31 AM |
|
Thanks for the fast answer! Unfortunately, I think the error is the same. I copy & paste the whole message in a pastebin as it's too long for a forum post: https://pastebin.com/LHD9YxV4Will see if I can get an 1.58+ Boost package in some Ubuntu 14.04 PPA.
|
|
|
|
psycodad
Legendary
Offline
Activity: 1634
Merit: 1743
精神分析的爸
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 28, 2017, 12:11:38 PM |
|
Thanks for the fast answer! Unfortunately, I think the error is the same. I copy & paste the whole message in a pastebin as it's too long for a forum post: https://pastebin.com/LHD9YxV4Will see if I can get an 1.58+ Boost package in some Ubuntu 14.04 PPA. I can reproduce these errors exactly on both Debian 7 (Wheezy) and Debian 8 (Jessie) when doing: git clone https://github.com/slimcoin-project/Slimcoin/ cd Slimcoin git checkout master make -f makefile.unix USE_UPNP=- USE_IPV6=1
HTH
|
|
|
|
d5000
Legendary
Offline
Activity: 4032
Merit: 7225
Decentralization Maximalist
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 28, 2017, 12:44:38 PM Last edit: March 28, 2017, 01:17:12 PM by d5000 |
|
I've now found a Boost-1.58 PPA and tried it out. main.cpp now compiles successfully and other source code files as well, so I think the original error is solved.
But I get another error now:
Edit: Very probably solved (related to old object files)
Edit2: Solved! Compiled master successfully now with Boost-1.58.
|
|
|
|
gjhiggins
Legendary
Offline
Activity: 2254
Merit: 1278
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 28, 2017, 01:10:44 PM |
|
Thanks for the input, I can see a few approaches to investigating the issue. I retro-populated the checkpoint list with checkpoints (the old list ended at block height 121300), resolving the remaining checkpoint test failures. Running test_slimcoin now returns: Running 62 test cases...
*** No errors detected
(There is one problematic commented-out basic tx i/o test which results in a low-level error but I suspect that the problem lies with the test code itself rather than what's being tested.) Next up: configuration of deployment scripting and continuous integration - which will provide a more tractable platform for investigating OS/library-based issues. Cheers Graham
|
|
|
|
gavrilo77
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 28, 2017, 05:54:26 PM |
|
I have got now this error with boost 1.58 obj/walletdb.o: In function `copy_file': /usr/local/include/boost/filesystem/operations.hpp:497: undefined reference to `boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::detail::copy_option, boost::system::error_code*)' collect2: error: ld returned 1 exit status make: *** [slimcoind] Error 1
|
|
|
|
gjhiggins
Legendary
Offline
Activity: 2254
Merit: 1278
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 28, 2017, 06:49:20 PM |
|
I have got now this error with boost 1.58 obj/walletdb.o: In function `copy_file': /usr/local/include/boost/filesystem/operations.hpp:497: undefined reference to `boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::detail::copy_option, boost::system::error_code*)' collect2: error: ld returned 1 exit status make: *** [slimcoind] Error 1
I can't explain it failing under 1.58 but I've pushed a commit lifted from PIVX in which presstab created a fix for earlier versions of boost: “Don't use file_copy with boost < 1.58”: https://github.com/slimcoin-project/Slimcoin/commit/4218e2071853c2dbd82d15dafd7b71344aed7a8bCheers Graham
|
|
|
|
gavrilo77
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 28, 2017, 08:00:45 PM |
|
I have got now this error with boost 1.58 obj/walletdb.o: In function `copy_file': /usr/local/include/boost/filesystem/operations.hpp:497: undefined reference to `boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::detail::copy_option, boost::system::error_code*)' collect2: error: ld returned 1 exit status make: *** [slimcoind] Error 1
I can't explain it failing under 1.58 but I've pushed a commit lifted from PIVX in which presstab created a fix for earlier versions of boost: “Don't use file_copy with boost < 1.58”: https://github.com/slimcoin-project/Slimcoin/commit/4218e2071853c2dbd82d15dafd7b71344aed7a8bCheers Graham That was under Ubuntu 14.04 I did compiling under Ubuntu 16.10 on Vbox and VPS. I did not have error but when i started ./slimcoind i have got Segmentation fault (core dumped)
|
|
|
|
d5000
Legendary
Offline
Activity: 4032
Merit: 7225
Decentralization Maximalist
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 28, 2017, 08:48:49 PM |
|
As I already wrote, I was now able to compile with Boost 1.58. Unfortunately, the slimcoind daemon crashes ("Segmentation Fault") now after receiving the first block (in debug.log I see as last message the CBlock line). Maybe it's the same problem like gavrilo77's.
Tried it also with the version before you deleted the line referring to the != operator. Same problem.
|
|
|
|
gavrilo77
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 28, 2017, 09:20:58 PM |
|
As I already wrote, I was now able to compile with Boost 1.58. Unfortunately, the slimcoind daemon crashes ("Segmentation Fault") now after receiving the first block (in debug.log I see as last message the CBlock line). Maybe it's the same problem like gavrilo77's.
Tried it also with the version before you deleted the line referring to the != operator. Same problem.
My boost version is 1.61.0.2 on Ubuntu 16.10
|
|
|
|
gjhiggins
Legendary
Offline
Activity: 2254
Merit: 1278
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 29, 2017, 01:41:37 PM |
|
As I already wrote, I was now able to compile with Boost 1.58. Unfortunately, the slimcoind daemon crashes ("Segmentation Fault") now after receiving the first block (in debug.log I see as last message the CBlock line). Maybe it's the same problem like gavrilo77's.
Tried it also with the version before you deleted the line referring to the != operator. Same problem.
I can reproduce the error on my OS X Sierra VM. I will check it on 16.10 later (after I've upgraded my laptop), expecting to see the same error there. Likely to be a version-related C++1z issue. I believe Debian is still in the process of transitioning to full C++1z support so compilation failures there are to be expected ( https://unix.stackexchange.com/questions/284817/how-to-install-gcc-5-on-debian-jessie-8-1). Travis CI isn't a suitable continuous integration service for Slimcoin master as it stands, it only offers Ubuntu 12.04 or 14.04, both of which are, not to put too fine a point on it, obsolete. https://travis-ci.org/gjhiggins/slimcoin-dev#L148 g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc.
vs gjh@ashpool:~$ g++ --version g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
It's worth noting that Slimcoin 0.5 (as it will be, now that I've figured out the build script uses the version number from the git tag) will be a soft fork in that the blockchain structure is unchanged and clients running previous Slimcoin versions (0.3 & 0.4) will continue to function as before. It's probably possible to avoid the C++[0|1]z issues (specifically the CTxDestination template issue) by paring down the changes to just 1) enabling OP_RETURN tx as standard and 2) disabling the non-functioning sync checkpoint feature. The rest of the changes that I have made are basically in pursuit of UI improvements and so in principle could be confined to a separate “UI-plus” branch. This would allow Slimcoin to continue to run on heritage OS distros whilst still allowing users of contemporary OS distros to leverage the advertised increased robustness and speed of state-of-the-art compiler technology. Cheers Graham
|
|
|
|
gjhiggins
Legendary
Offline
Activity: 2254
Merit: 1278
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 30, 2017, 04:40:26 AM Last edit: March 30, 2017, 12:11:19 PM by gjhiggins |
|
I can reproduce the error on my OS X Sierra VM. I will check it on 16.10 later (after I've upgraded my laptop), expecting to see the same error there. Likely to be a version-related C++1z issue.
Wrong. Fortunately wrong: looks like it's just a trivial fix of a transcription error. https://github.com/slimcoin-project/Slimcoin/commit/a73bb282dc7d61a9eaa44902f850cc064d371dd5Compiles and synchs up to date (from the downloaded datadir tar.gz) on Ubuntu 16.10 and OS X Sierra. ( Edit: and Ubuntu 15.04) There's still some qmake config work yet to be done on getting the Qt moc files automatically generated. Until then, if “ #include optionsdialog.moc” and its ilk proves a compilation-stopper, you will need to run ” moc xxx.h > xxx.moc” for each of optionsdialog, overviewpage, rpcconsole and torrentpage. Edit: after a make clean, on the initial run, compilation won't proceed until you create them. on the next run they're reported as duplicates and compilation won't proceed until you delete them, sigh.Cheers Graham
|
|
|
|
gavrilo77
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 30, 2017, 08:15:32 PM Last edit: March 30, 2017, 08:58:14 PM by gavrilo77 |
|
I have compiled master. I installed new VM on VBox, Ubuntu 16.10 $ sudo apt-get install git build-essential libssl-dev libdb5.3++-dev libminiupnpc-dev libboost-all-dev qt5-qmake libqt5gui5 qt5-default qtdeclarative5-dev qttools5-dev-tools libqt5dbus5 git clone https://github.com/slimcoin-project/Slimcoin/ cd Slimcoin git checkout master cd src make -f makefile.unix USE_UPNP=- For GUI $ cd Slimcoin && qmake -qt=qt5 slimcoin-qt.pro && make I am syncing from the beginning to test Edit: Compiled from zip as well. I noticed, with checkout master command, version is 0.4.1, from zip version is 0.5.0.0
|
|
|
|
resor
Newbie
Offline
Activity: 14
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 31, 2017, 01:25:50 AM Last edit: March 31, 2017, 07:12:00 AM by resor |
|
how i can create a wallet and link it to the command version program?. Where i can download the blocks remaining?
When I run slimcoind it doesnt show me nothing , where i can see something?
|
|
|
|
gavrilo77
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 31, 2017, 09:33:16 AM Last edit: March 31, 2017, 12:09:58 PM by gavrilo77 |
|
how i can create a wallet and link it to the command version program?. Where i can download the blocks remaining?
When I run slimcoind it doesnt show me nothing , where i can see something?
You could find on the page before blockchain, posted by Graham https://minkiz.co/noodlings/slm/slm-datadir-blockfiles.zipCreate a qt you can see on my post above and start with cd Slimcoin, than sudo ./slimcoin-qt ![](https://ip.bitcointalk.org/?u=http%3A%2F%2Fi64.tinypic.com%2Fe1cg9t.jpg&t=665&c=-Cyqi7HuZogSRw) Edit: I could not compile on 14.04 Ubuntu g++ (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 Ubuntu 16.10 g++ (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005 building no problem
|
|
|
|
resor
Newbie
Offline
Activity: 14
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 31, 2017, 02:56:56 PM |
|
I try to compile qt and failed... In the CLI version , how i can see my wallet?
|
|
|
|
psycodad
Legendary
Offline
Activity: 1634
Merit: 1743
精神分析的爸
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 31, 2017, 03:15:41 PM |
|
I try to compile qt and failed... In the CLI version , how i can see my wallet?
Check 'slimcoind help' for a list of supported rpc commands you can send to a running daemon. For a start check 'slimcoind getinfo'. HTH
|
|
|
|
|