Author

Topic: HoboNickels - HBN - High Fast Stake - Version 2.0! More Secure, Less Intensive - page 177. (Read 478852 times)

sr. member
Activity: 336
Merit: 250
Since rpcnet.cpp now includes main.h, this may also fix your compilation problem.

That didn't help compiling net.cpp and rpcnet.cpp, but now it does..

Code:
diff --git a/src/net.cpp b/src/net.cpp
index 4179b42..f7b28ec 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2157,13 +2157,13 @@ void CNode::RecordBytesSent(uint64 bytes)
     nTotalBytesSent += bytes;
 }
 
-uint64 CNode::GetTotalBytesRecv()
+uint64_t CNode::GetTotalBytesRecv()
 {
     LOCK(cs_totalBytesRecv);
     return nTotalBytesRecv;
 }
 
-uint64 CNode::GetTotalBytesSent()
+uint64_t CNode::GetTotalBytesSent()
 {
     LOCK(cs_totalBytesSent);
     return nTotalBytesSent;
diff --git a/src/net.h b/src/net.h
index f2770eb..06e395f 100644
--- a/src/net.h
+++ b/src/net.h
@@ -764,8 +764,8 @@ public:
     static void RecordBytesRecv(uint64 bytes);
     static void RecordBytesSent(uint64 bytes);
 
-    static uint64 GetTotalBytesRecv();
-    static uint64 GetTotalBytesSent();
+    static uint64_t GetTotalBytesRecv();
+    static uint64_t GetTotalBytesSent();
 };
 
 
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 14ec275..448e247 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -312,6 +312,6 @@ Value getnettotals(CWallet *pWallet, const Array& params, bool fHelp)
     Object obj;
     obj.push_back(Pair("totalbytesrecv", CNode::GetTotalBytesRecv()));
     obj.push_back(Pair("totalbytessent", CNode::GetTotalBytesSent()));
-    obj.push_back(Pair("timemillis", GetTimeMillis()));
+    obj.push_back(Pair("timemillis", static_cast(GetTimeMillis())));
     return obj;
 }

Also, what's the obsession in using boost in GetTimeMillis+GetTimeMicros?
Here's what it does:
Code:
21:15:29.740407 brk(0)                  = 0x1cb6000 <0.000010>
21:15:29.740447 brk(0x1cd7000)          = 0x1cd7000 <0.000011>
21:15:29.740487 brk(0)                  = 0x1cd7000 <0.000010>
21:15:29.740535 open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3 <0.000016>
21:15:29.740589 fstat(3, {st_dev=makedev(252, 0), st_ino=12885149141, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=1883, st_atime=2014/03/21-01:01:58, st_mtime=2013/03/13-17:52:21, st_ctime=2014/03/20-18:11:40}) = 0 <0.000010>
21:15:29.740670 fstat(3, {st_dev=makedev(252, 0), st_ino=12885149141, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=1883, st_atime=2014/03/21-01:01:58, st_mtime=2013/03/13-17:52:21, st_ctime=2014/03/20-18:11:40}) = 0 <0.000010>
21:15:29.740747 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd16fbe1000 <0.000012>
21:15:29.740792 read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0\0\0\0"..., 4096) = 1883 <0.000016>
21:15:29.740847 lseek(3, -1201, SEEK_CUR) = 682 <0.000011>
21:15:29.740887 read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\6\0\0\0\0"..., 4096) = 1201 <0.000011>
21:15:29.740936 close(3)                = 0 <0.000013>
21:15:29.740979 munmap(0x7fd16fbe1000, 4096) = 0 <0.000022>

whereas gettimeofday does not even show up in strace Wink

Code:
diff --git a/src/util.h b/src/util.h
index 98f9c7a..4c30446 100644
--- a/src/util.h
+++ b/src/util.h
@@ -353,14 +353,16 @@ inline int64 GetPerformanceCounter()
 
 inline int64 GetTimeMillis()
 {
-    return (boost::posix_time::ptime(boost::posix_time::microsec_clock::universal_time()) -
-            boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_milliseconds();
+    timeval t;
+    gettimeofday(&t, NULL);
+    return ((int64) t.tv_sec * 1000) + (t.tv_usec / 1000);
 }
 
 inline int64 GetTimeMicros()
 {
-    return (boost::posix_time::ptime(boost::posix_time::microsec_clock::universal_time()) -
-            boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_microseconds();
+    timeval t;
+    gettimeofday(&t, NULL);
+    return ((int64) t.tv_sec * 1000000) + t.tv_usec;
 }
 
 inline std::string DateTimeStrFormat(const char* pszFormat, int64 nTime)
full member
Activity: 145
Merit: 100
git-148333a2f9 does not compile with gcc-4.9.1

I use Ubuntu 14.04 and gcc version 4.9.1 (Ubuntu 4.9.1-1ubuntu2~14.04.3)

I've had no problems with rpcnet.cpp, but failed to compile main.cpp.

I had to add boost:: before int64_t in main.h:

Code:
bool IsFinalTx(const CTransaction &tx, int nBlockHeight = 0, boost::int64_t nBlockTime = 0);

and in main.cpp:

Code:
bool IsFinalTx(const CTransaction &tx, int nBlockHeight, boost::int64_t nBlockTime)

Since rpcnet.cpp now includes main.h, this may also fix your compilation problem.
sr. member
Activity: 336
Merit: 250
git-148333a2f9 does not compile with gcc-4.9.1

Code:
src/rpcnet.cpp: In function ‘json_spirit::Value getnettotals(CWallet*, const Array&, bool)’:
src/rpcnet.cpp:313:68: error: conversion from ‘uint64 {aka long long unsigned int}’ to ‘const Value_type {aka const json_spirit::Value_impl > >}’ is ambiguous
     obj.push_back(Pair("totalbytesrecv", CNode::GetTotalBytesRecv()));
                                                                    ^
src/rpcnet.cpp:313:67: note: candidates are:
     obj.push_back(Pair("totalbytesrecv", CNode::GetTotalBytesRecv()));
                                                                   ^
In file included from src/json/json_spirit_reader_template.h:9:0,
                 from src/bitcoinrpc.h:15,
                 from src/rpcnet.cpp:7:
src/json/json_spirit_value.h:283:5: note: json_spirit::Value_impl::Value_impl(double) [with Config = json_spirit::Config_vector >]
     Value_impl< Config >::Value_impl( double value )
     ^
src/json/json_spirit_value.h:275:5: note: json_spirit::Value_impl::Value_impl(uint64_t) [with Config = json_spirit::Config_vector >; uint64_t = long unsigned int]
     Value_impl< Config >::Value_impl( boost::uint64_t value )
     ^
src/json/json_spirit_value.h:267:5: note: json_spirit::Value_impl::Value_impl(int64_t) [with Config = json_spirit::Config_vector >; int64_t = long int]
     Value_impl< Config >::Value_impl( boost::int64_t value )
     ^
src/json/json_spirit_value.h:259:5: note: json_spirit::Value_impl::Value_impl(int) [with Config = json_spirit::Config_vector >]
     Value_impl< Config >::Value_impl( int value )
     ^
src/json/json_spirit_value.h:251:5: note: json_spirit::Value_impl::Value_impl(bool) [with Config = json_spirit::Config_vector >]
     Value_impl< Config >::Value_impl( bool value )
     ^
src/json/json_spirit_value.h:219:5: note: json_spirit::Value_impl::Value_impl(json_spirit::Value_impl::Const_str_ptr) [with Config = json_spirit::Config_vector >; json_spirit::Value_impl::Const_str_ptr = const char*]
     Value_impl< Config >::Value_impl( const Const_str_ptr value )
     ^
legendary
Activity: 2534
Merit: 1129

High PoS is a niche mindset (which I support). I have found that the vast majority of posters/communities in other coins are completely impervious to the good arguments for high PoS (ie, they cannot understand it)

Therefore I do think it a good move to create a high PoS community.

The fact of the matter is that most alts out there are merely a vehicle to more BTC and hence more fiat, at least to these "investor" types. Hell, look at how Ethereum has been deflating the BTC ecosystem with it's IPO fund cashouts.

Since there is nothing keeping people in most alts since they are driven by pure speculation, they create negative feedback loops. For example, you notice the price of your alt falling, perhaps dramatically (since a consortium is leaving the coin). Even if you have faith in the coin, you may cash out to "buy back later," exacerbating the price decline. Even worse is, when price/volume doesn't return to the coin and people just continue to dump or leave coins at sell orders, clogging the order books with sell orders, traders are unlikely to return.

High PoS, almost by design, recognizes these aspects and creates an ethical pump and dump cycle. Minters are attracted to the high PoS; they stake and "trickle" a portion of earnings onto exchanges. Buyers are attracted to high PoS as well, but the sell side is so thin they have to either eat into it for big blocks, trade OTC, or provide liquidity on the buy side. Coins are kept off exchanges to mint coins, and any movement to an exchange requires (1) more work than just clicking sell and (2) a decision made in relation to the stake age - "Hmmmm, I have another 6 hours on this block, maybe I'll just wait." It's also clear it attracts a different mindset, since high PoS coins with a good community are surprisingly resilient.

Good points.

High PoS coins have a better chance of surviving the mass extinction of altcoins (which process we are in now) because the communities are more resilient, and less driven by speculation (as you said)
hero member
Activity: 763
Merit: 534

High PoS is a niche mindset (which I support). I have found that the vast majority of posters/communities in other coins are completely impervious to the good arguments for high PoS (ie, they cannot understand it)

Therefore I do think it a good move to create a high PoS community.

The fact of the matter is that most alts out there are merely a vehicle to more BTC and hence more fiat, at least to these "investor" types. Hell, look at how Ethereum has been deflating the BTC ecosystem with it's IPO fund cashouts.

Since there is nothing keeping people in most alts since they are driven by pure speculation, they create negative feedback loops. For example, you notice the price of your alt falling, perhaps dramatically (since a consortium is leaving the coin). Even if you have faith in the coin, you may cash out to "buy back later," exacerbating the price decline. Even worse is, when price/volume doesn't return to the coin and people just continue to dump or leave coins at sell orders, clogging the order books with sell orders, traders are unlikely to return.

High PoS, almost by design, recognizes these aspects and creates an ethical pump and dump cycle. Minters are attracted to the high PoS; they stake and "trickle" a portion of earnings onto exchanges. Buyers are attracted to high PoS as well, but the sell side is so thin they have to either eat into it for big blocks, trade OTC, or provide liquidity on the buy side. Coins are kept off exchanges to mint coins, and any movement to an exchange requires (1) more work than just clicking sell and (2) a decision made in relation to the stake age - "Hmmmm, I have another 6 hours on this block, maybe I'll just wait." It's also clear it attracts a different mindset, since high PoS coins with a good community are surprisingly resilient.
legendary
Activity: 2534
Merit: 1129
Question for everyone.

I am going to be making a choice about IRC. There are 2 options that I see.

#1 Remove it completely from the code. It is already disabled and will only use IRC if the users forces it with -irc=1.
#2 Or we can also keep it in there and I can add to it, so it will connect to a IRC channel and allow users to chat with each other. The wallet will not use it to look for peers though.

Do we remove and forget about IRC, or keep it and expand it's usage?

My personal opinion is to lose it. As I don't think the wallet needs the extra bloat(code wise) and it could open up an additional security concerns. 

However it is probably mostly safe and could be a fun addition to have.

So I'll let you all decide.  Let me know.

Thanks!



I'm for having as basic a wallet as possible. No reason to have text chat, VoIP, video chat, and all this crazy stuff wallets are trying to do nowadays. Since a lot of these high PoS coins have pretty quiet communities, I'd recommend they all band together into a single high PoS channel, say #crazysteak or #posinvestors or something.

Good feedback. I am pretty much feeling the same way.

Is there anyone that wants it?  Speak now or forever hold your peace!

What about other features? Like market data, or watch only addresses, or other things. Are these something we want to try to get integrated?

High PoS is a niche mindset (which I support). I have found that the vast majority of posters/communities in other coins are completely impervious to the good arguments for high PoS (ie, they cannot understand it)

Therefore I do think it a good move to create a high PoS community.
legendary
Activity: 1064
Merit: 1000
I tried the "claim an address" feature on cryptocoinexplorer.com, but it looks like it's not showing up for some reason. I think Windows wanted to do an update right after this and the wallet shut off. I've tried resending a few times. Anything I can do? Thanks Smiley

Not sure what you mean by send, but you don't need to send any coins, just use the sign page and then use that signed message on the website to verify.

Ah, sry. I meant I tried to use that verify thing a few times and it won't work. It worked on CAP. I don't know if since my first "signature" wasn't showing up on the list that subsequent ones on the same address won't work.

I just did one as a test, no issues with the verify, it worked. But it didn't update on the top 1000, so perhaps that just takes some time for it to show up there.

Alright cool. I did and verify check and it worked too. Don't know why CAP and HYP were so fast and HBN so slow. Thanks.


As mentioned in the instructions, the information will show up in the next database cycle.

After one verifies the address, it is immediately tagged in the address database.

However, the top 1000 balances refresh after the next block refresh, so it can take a few minutes to show up.
hero member
Activity: 763
Merit: 534
I tried the "claim an address" feature on cryptocoinexplorer.com, but it looks like it's not showing up for some reason. I think Windows wanted to do an update right after this and the wallet shut off. I've tried resending a few times. Anything I can do? Thanks Smiley

Not sure what you mean by send, but you don't need to send any coins, just use the sign page and then use that signed message on the website to verify.

Ah, sry. I meant I tried to use that verify thing a few times and it won't work. It worked on CAP. I don't know if since my first "signature" wasn't showing up on the list that subsequent ones on the same address won't work.

I just did one as a test, no issues with the verify, it worked. But it didn't update on the top 1000, so perhaps that just takes some time for it to show up there.

Alright cool. I did and verify check and it worked too. Don't know why CAP and HYP were so fast and HBN so slow. Thanks.
legendary
Activity: 1540
Merit: 1060
May the force bit with you.
I tried the "claim an address" feature on cryptocoinexplorer.com, but it looks like it's not showing up for some reason. I think Windows wanted to do an update right after this and the wallet shut off. I've tried resending a few times. Anything I can do? Thanks Smiley

Not sure what you mean by send, but you don't need to send any coins, just use the sign page and then use that signed message on the website to verify.

Ah, sry. I meant I tried to use that verify thing a few times and it won't work. It worked on CAP. I don't know if since my first "signature" wasn't showing up on the list that subsequent ones on the same address won't work.

I just did one as a test, no issues with the verify, it worked. But it didn't update on the top 1000, so perhaps that just takes some time for it to show up there.
hero member
Activity: 763
Merit: 534
I tried the "claim an address" feature on cryptocoinexplorer.com, but it looks like it's not showing up for some reason. I think Windows wanted to do an update right after this and the wallet shut off. I've tried resending a few times. Anything I can do? Thanks Smiley

Not sure what you mean by send, but you don't need to send any coins, just use the sign page and then use that signed message on the website to verify.

Ah, sry. I meant I tried to use that verify thing a few times and it won't work. It worked on CAP. I don't know if since my first "signature" wasn't showing up on the list that subsequent ones on the same address won't work.
legendary
Activity: 1540
Merit: 1060
May the force bit with you.
I tried the "claim an address" feature on cryptocoinexplorer.com, but it looks like it's not showing up for some reason. I think Windows wanted to do an update right after this and the wallet shut off. I've tried resending a few times. Anything I can do? Thanks Smiley

Not sure what you mean by send, but you don't need to send any coins, just use the sign page and then use that signed message on the website to verify.
hero member
Activity: 763
Merit: 534
I tried the "claim an address" feature on cryptocoinexplorer.com, but it looks like it's not showing up for some reason. I think Windows wanted to do an update right after this and the wallet shut off. I've tried resending a few times. Anything I can do? Thanks Smiley
legendary
Activity: 1540
Merit: 1060
May the force bit with you.

  Help
 
   Need some good working  addnode

   All i have is
 
   addnode=5.249.152.30
   addnode=69.85.86.195
   addnode=74.196.48.62
 
    not working



http://hbn.cryptocoinexplorer.com/peerinfo
full member
Activity: 141
Merit: 100
I think we could do better. 2 Votes....
legendary
Activity: 1540
Merit: 1060
May the force bit with you.
All aboard

Crazy, but that's how it goes
Millions of people living as foes
Maybe it's not too late
To learn how to love
And forget how to hate

Mental wounds not healing
life's a bitter shame
I'm going off the rails on a crazy train

I've listened to preachers
I've listened to fools
I've watched all the drop outs
Who make their own rules
One person conditioned to rule and control
The media sells it and you live the role

Mental wounds still screaming
Driving me insane
I'm going off the rails on a crazy train

I know that things are going wrong for me
You gotta listen to my words
Yeah

Heirs of a cold war
That's what we've become
Inheriting troubles I'm mentally numb
Crazy, I just can not bare
I'm living with something that just isn't fair

Mental wounds not healing
Who and what's to blame
I'm going off the rails on a crazy train

- Ozzy Osbourne

Great song... I need to remember to put this into my play list during my workout.
hero member
Activity: 770
Merit: 500
All aboard

Crazy, but that's how it goes
Millions of people living as foes
Maybe it's not too late
To learn how to love
And forget how to hate

Mental wounds not healing
life's a bitter shame
I'm going off the rails on a crazy train

I've listened to preachers
I've listened to fools
I've watched all the drop outs
Who make their own rules
One person conditioned to rule and control
The media sells it and you live the role

Mental wounds still screaming
Driving me insane
I'm going off the rails on a crazy train

I know that things are going wrong for me
You gotta listen to my words
Yeah

Heirs of a cold war
That's what we've become
Inheriting troubles I'm mentally numb
Crazy, I just can not bare
I'm living with something that just isn't fair

Mental wounds not healing
Who and what's to blame
I'm going off the rails on a crazy train

- Ozzy Osbourne
member
Activity: 84
Merit: 10
I think, everyone is getting on the right train. Don't get left behind.  Grin
hero member
Activity: 763
Merit: 534
CrazyLoaf's CrazySteak(TM) High Pos Investment Journal

Got a little bored at how quiet the high PoS investment arena can be at times, so I started a journal.

The core position is the "Tranz-Tab-Tek Trifecta" Tongue

Check it out and join in if you want:

https://bitcointalksearch.org/topic/crazyloafs-crazysteaktm-high-pos-investment-journal-783697
legendary
Activity: 1023
Merit: 1001
Tokenize Fantasy Sports
Tranz, was able to successfully add the latest S4C changes to HyperStake! Thanks for all your good work.  Should we update the daemon makefiles as well?

Glad to hear it, your start to the gui helped quite a bit, so thank you too.

I don't believe these changes require updates to other make files, as the dialog pages would only effect the qt client. Although to be honest I haven't tried a daemon compile in a while. So if you find out differently just let me know..

I have added the caps auto saving feature to next release of Fluttercoin, and gitian compiles work, as do makefile compiles to, so no changes should be needed on your end.

hero member
Activity: 658
Merit: 503
Monero Core Team
Question for everyone.

I am going to be making a choice about IRC. There are 2 options that I see.

#1 Remove it completely from the code. It is already disabled and will only use IRC if the users forces it with -irc=1.
#2 Or we can also keep it in there and I can add to it, so it will connect to a IRC channel and allow users to chat with each other. The wallet will not use it to look for peers though.

Do we remove and forget about IRC, or keep it and expand it's usage?

Zawinski's law of software envelopment
The main reason is to incentive people to stake on a daily basis rather then only a few times with large blocks. Mostly it would be to prevent someone from simply holding thousands of coins offline, and then bring them back online after a long time and get a very large reward, for doing almost no network protection.
A very elegant explanation, much better than the ones I came up with. I just  updated the HyperStake Wikia page about max subsidy accordingly.

Finally, regarding 1.5 beta 2: out of the version number mentionning 1.4.8 (I assume it is related to a technical constraint with github), very nice. First, it finally compiled (you remember I could not compile previous versions. Unfortunately, I had to redownload the whole blockchain. Not a big deal, but worth mentionning.

Oh! I also notice you finally fixed the ugly positionning of the "New", "Add" and "Upload" button on the bottom left by increasing the width of the buttons. Much better now Smiley
Jump to: