Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - barwizi

Pages: 1 2 [3]
31
General Discussion / YellowNotes
« on: November 21, 2013, 07:20:44 am »
Just thought of this after the BTC address debacle. I am thinking of a DAC that acts as a phone book of sorts..... how about having a compiled list of addresses with names? (For those willing only of course). You get listed by paying a fee, this directory will be online and anyone wishing to send you funds can do so, by searching for you by name or any other details you have provided. By paying extra membership fee you get a small window of advertising worth 6000 seconds , you can divy this up into maybe 60 second loops that will be shown to visitors a thousand times. You can have contact groups managed by yourself or the DAC, allowing suggestions gives the DAC permission to record your searches and refine based on your preferences. Kind of like Google, but very specialized for crypto using companies and individuals. 

Companies will pay slightly more to have their Adverts put up, you can find services or goods by searching and a list of providers is presented including all their data such as location, Trust levels what service they provide. If you go into a company profile you can view the list of provided addresses for all accepted cryptos and a more complete set of details.

If it becomes popular it may even incorporate adverts from non crypto world entities that will pay for it, these funds are then used to pay dividens  to HOLDERS who would have kept a their currency deposited in company account for a certain period of time. These dividens grow in size as your funds accumulate and as they stake longer in the company wallets.

Perhaps it can go as far as having different plans for different levels of investors, the big money guys that can afford to sit on a lot of coin can deposit and forget about them while they earn larger % interest and dividends, while smaller guys can opt to do quicker yet less profitable moves.

The dividends will be in BTC or PTS depending on what can be implemented safely. I would prefer BTC as it is easier to convert between worlds. The money coming in from revenue is used to buy BTC, this BTC is then carved up according to % holdings and distributed once a month/quarter.

The first's instead of getting large amounts of coin can choose to pay for areas of the webpages they want there by securing premium space for later use or sale at a higher price. Also, i would introduce a system similar to Amazon instances, one where you can pay for unused advert space at a lower rate until someone out bids you for the space, once their funds are finished, if yours is next in line, you get the space back.

Furthermore the DAC can expand it's horizons. When there is enough in a development fund, users and investors can be asked to vote between options of either paying out as dividends or expanding, say if there is office space we can begin VPS hosting or providing any other internet based service.

32
Other Languages / Southern Africa
« on: November 21, 2013, 06:27:50 am »
Hey all, if you are in southern africa, give a shout out!! even in your native like Afrikaans, Zulu, Ndebele, Siswati, Suthu, and whatever else there is.

33
General Discussion / Where are we going?
« on: November 20, 2013, 11:54:54 pm »
Today there was much discussion about the next step, bytemaster made a few proposals that were met with mixed responses. As users, miners and investors you should all speak up and let your vies, concerns and questions be heard.

Now, on to Business. I see that protoshares have started to settle in, Powershares are on the drawing board, but i'd like to ring attention to my previous idea. Powershares is an experiment so it can't really be a step forward. My previuos idea was met with resistance yet i failed to get a real reason why. People mentioned the whole DAC stuff, but  i think they are confusing currency and business. Either way, i re-propose (Now with a name) Metashares.

Concept

With the success of bytemasters' algo that onlly suffered due to unexpected interest, i intend to normalize money supply by imposing more dynamic restrictions. By observing a period of 2 hours of mining, if blocks were flying by at twice the target time, then block reward is lowered by half. If the blocks were moving slower, say at a third of the target time, then block reward is tripled. This period can be reduced to 1 hour or even the steep 30 minute window in order to ward off users of instances.

Coupled with this would be a high starting difficulty that should reduce the extreme differences seen in  most coins between early adopters and the guys who come in after a few days. With relatively faster block times we'll see a reasonable increase in tx time but we'll try remain in range of what is considered adaquately secure.

was asked what this currency is for. I maintain that it should be a speculative one in the beginning, perhaps later it may be used for a project by Invictus or anyone else that wants a chain that is already in motion. Value is something we as users bestow on an item, I cannot come out of the box and declare a price for Metashares. To one, they will try to jump in and mine then dump. To another, they will spend 0.1 BTC buying some on the chance that they may become worth 10 BTC in the future or perhaps even more.

i think to use a crypto as a medium of exchange, it has to be an established one with users ready and a secure network. even if it is just a few hundred nodes, it is a starting point. Many DACs will fail due to issues of raising capital. Myself i have spent an excess of money attaing a banking license and the necesarry articles, but for the forseeable future there will be little or no movement at all. 

I have no huge expectations. 

34
Meta / membership ranking
« on: November 17, 2013, 12:02:16 pm »
at this rate we'll all be hero members, keep in ind that when a noob comes here and sees a "hero" they trust and get scammed. also, scammer tags would be awesome.

35
BitShares PTS / Difficulty Algorithms
« on: November 17, 2013, 06:43:01 am »
First and foremost i'd like to start by suggesting that the difficulty part of the code be seperated into it's own file....eg difficulty.cpp.

This would be the first step in creating an easy to adjust difficulty system as you can just write one, test it and then "plug" it in by replacing the current version. See NRB (MY COPY PASTE COIN) for how that works.

this is the one we use there

it can be edited to meet the requirements of any and all coins that use the bitcoin codebase.

Code: [Select]
#include <vector>
#include "diff.h"

const struct SRetargetParams* CMainNetDiff::sRules = new SRetargetParams(3600, 120);
const struct SRetargetParams* COldNetDiff::sRules = new SRetargetParams(7200, 120);

const CBigNum CDiffProvider::bnProofOfWorkLimit(~uint256(0) >> 20);

CDiff* CDiffProvider::pnewDiff = NULL;
CDiff* CDiffProvider::pdynDiff = NULL;
CDiff* CDiffProvider::poldDiff = NULL;
CDiff* CDiffProvider::ptestDiff = NULL;

double CDiff::GetDifficulty(const CBlockIndex* blockindex = NULL)
{
// Floating point number that is a multiple of the minimum difficulty,
// minimum difficulty = 1.0.
if (blockindex == NULL)
{
if (pindexBest == NULL)
return 1.0;
else
blockindex = pindexBest;
}

return GetDifficultyFromTargetBits(blockindex->nBits);
}

struct TargetSpan
{
double difficulty;
double hashes;
int time;
};

static int CalculateHashrate(CBlockIndex* first, CBlockIndex* last)
{
double timeDiff = last->GetBlockTime() - first->GetBlockTime();
double timePerBlock = timeDiff / (last->nHeight - first->nHeight);

return (int) (CDiff::GetDifficultyFromTargetBits(last->nBits) * pow(2.0, 32) / timePerBlock);
}

json_spirit::Value CDiff::GetNetworkHashPS(int lookup)
{
if (pindexBest == NULL)
        return 0;

// If lookup is -1, then use blocks since last difficulty change.
if (lookup <= 0)
{
int nInterval = this->GetRules()->nInterval;
lookup = pindexBest->nHeight % nInterval + 1;
}

// If lookup is larger than chain, then set it to chain length.
if (lookup > pindexBest->nHeight)
lookup = pindexBest->nHeight;

CBlockIndex* pindexPrev = pindexBest;
CBlockIndex* plastRetarget = pindexBest;
std::vector<TargetSpan> spans;

for (int i = 0; i < lookup; i++)
{
pindexPrev = pindexPrev->pprev;

if (pindexPrev->nBits != plastRetarget->nBits || i + 1 == lookup)
{
TargetSpan span;
span.difficulty = CDiff::GetDifficultyFromTargetBits(plastRetarget->nBits);
span.time = plastRetarget->GetBlockTime() - pindexPrev->GetBlockTime();
span.hashes = span.difficulty * pow(2.0, 32) * (plastRetarget->nHeight - pindexPrev->nHeight);

spans.push_back(span);
plastRetarget = pindexPrev;
}
}

double hashes = 0;
int totalTime = 0;
for (std::vector<TargetSpan>::iterator it = spans.begin(); it != spans.end(); ++it)
{
hashes += (*it).hashes;
totalTime += (*it).time;
}

return (boost::int64_t)(hashes / totalTime);
}

bool COldNetDiff::ShouldApplyRetarget(const CBlockIndex* pindexLast, const CBlock* pblock)
{
bool bShouldRetarget = false;

// We have reached retarget height
bShouldRetarget |= (pindexLast->nHeight + 1) % sRules->nInterval == 0;

return bShouldRetarget;
}

int64 COldNetDiff::GetActualTimespan(const CBlockIndex* pindexFirst, const CBlockIndex* pindexLast)
{
int64 nActualTimespan = 0;
int64 nActualTimespanMax = 0;
int64 nActualTimespanMin = 0;

if (pindexLast->nHeight > COINFIX1_BLOCK)
{
// obtain average actual timespan
nActualTimespan = (pindexLast->GetBlockTime() - pindexFirst->GetBlockTime()) / nRetargetHistoryFact;
}
else
{
nActualTimespan = pindexLast->GetBlockTime() - pindexFirst->GetBlockTime();
}

nActualTimespanMin = sRules->nTargetTimespan / 4;
nActualTimespanMax = sRules->nTargetTimespan * 4;

printf("  nActualTimespan = %"PRI64d"  before bounds\n", nActualTimespan);

if (nActualTimespan > nActualTimespanMax) nActualTimespan = nActualTimespanMax;
if (nActualTimespan < nActualTimespanMin) nActualTimespan = nActualTimespanMin;

return nActualTimespan;
}

const CBlockIndex* COldNetDiff::GetFirstBlock(const CBlockIndex* pindexLast)
{
const CBlockIndex* pindexFirst = pindexLast;
for (int i = 0; pindexFirst && i < GetBlocksToGoBack(pindexLast); i++)
{
pindexFirst = pindexFirst->pprev;
}

assert(pindexFirst);

return pindexFirst;
}

int COldNetDiff::GetBlocksToGoBack(const CBlockIndex* pindexLast)
{
// Fixes an issue where a 51% attack can change difficulty at will.
// Go back the full period unless it's the first retarget after genesis. Code courtesy of Art Forz
int nBlocksToGoBack = sRules->nInterval - 1;

if ((pindexLast->nHeight + 1) != sRules->nInterval)
{
nBlocksToGoBack = sRules->nInterval;
}

if (pindexLast->nHeight > COINFIX1_BLOCK)
{
nBlocksToGoBack = nRetargetHistoryFact * sRules->nInterval;
}

return nBlocksToGoBack;
}

//
// minimum amount of work that could possibly be required nTime after
// minimum work required was nBase
//
unsigned int COldNetDiff::ComputeMinWork(unsigned int nBase, int64 nTime)
{
CBigNum bnResult;
bnResult.SetCompact(nBase);

while (nTime > 0 && bnResult < bnProofOfWorkLimit)
{
bnResult *= 4;
nTime -= sRules->nTargetTimespan * 4;
}

if (bnResult > bnProofOfWorkLimit)
bnResult = bnProofOfWorkLimit;

printf("COldDiff -- ComputeMinWork requested\n");
printf("nTargetTimespan = %"PRI64d"\n", sRules->nTargetTimespan);
printf("bnResult:  %08x  %s\n", bnResult.GetCompact(), bnResult.getuint256().ToString().c_str());

return bnResult.GetCompact();
}

unsigned int COldNetDiff::GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlock* pblock)
{
// Genesis block
if (pindexLast == NULL)
return nProofOfWorkLimit;

bool bretarget = ShouldApplyRetarget(pindexLast, pblock);

// Check if we should retarget diff.
if (!bretarget)
{
return pindexLast->nBits;
}

// Limit adjustment step
int64 nActualTimespan = GetActualTimespan(GetFirstBlock(pindexLast), pindexLast);

// Retarget
CBigNum bnNew;
bnNew.SetCompact(pindexLast->nBits);
bnNew *= nActualTimespan;
bnNew /= sRules->nTargetTimespan;

if (bnNew > bnProofOfWorkLimit)
bnNew = bnProofOfWorkLimit;

// Debug print
printf("COldDiff -- GetNextWorkRequired RETARGET\n");
printf("nTargetTimespan = %"PRI64d"    nActualTimespan = %"PRI64d"\n", sRules->nTargetTimespan, nActualTimespan);
printf("Before: %08x  %s\n", pindexLast->nBits, CBigNum().SetCompact(pindexLast->nBits).getuint256().ToString().c_str());
printf("After:  %08x  %s\n", bnNew.GetCompact(), bnNew.getuint256().ToString().c_str());

return bnNew.GetCompact();
}

const SRetargetParams* COldNetDiff::GetRules()
{
return sRules;
}

bool CMainNetDiff::ShouldApplyRetarget(const CBlockIndex* pindexLast, const CBlock* pblock)
{
bool bShouldRetarget = false;

// We have exceeded max. time for current difficulty, change (hard limit)
bShouldRetarget |= (pindexLast->nTime + nMaxTimeInterval) < pblock->nTime;
// We have reached retarget height
bShouldRetarget |= (pindexLast->nHeight + 1) % sRules->nInterval == 0;

return bShouldRetarget;
}

int64 CMainNetDiff::GetActualTimespan(const CBlockIndex* pindexFirst, const CBlockIndex* pindexLast)
{
int64 nActualTimespan = 0;
int64 nActualTimespanMax = 0;
int64 nActualTimespanMin = 0;

nActualTimespan = pindexLast->GetBlockTime() - pindexFirst->GetBlockTime();

// FeatherCoin's cap system.
// For diff. increase
nActualTimespanMin = (nActualTimespan * 55) / 99;
// For diff. decrease
nActualTimespanMax = (nActualTimespan * 99) / 55;

printf("  nActualTimespan = %"PRI64d"  before bounds\n", nActualTimespan);

if (nActualTimespan > nActualTimespanMax) nActualTimespan = nActualTimespanMax;
if (nActualTimespan < nActualTimespanMin) nActualTimespan = nActualTimespanMin;

return nActualTimespan;
}

const CBlockIndex* CMainNetDiff::GetFirstBlock(const CBlockIndex* pindexLast)
{
const CBlockIndex* pindexFirst = pindexLast;
for (int i = 0; pindexFirst && i < GetBlocksToGoBack(pindexLast); i++)
{
pindexFirst = pindexFirst->pprev;
}

assert(pindexFirst);

return pindexFirst;
}

int CMainNetDiff::GetBlocksToGoBack(const CBlockIndex* pindexLast)
{
// Fixes an issue where a 51% attack can change difficulty at will.
// Go back the full period unless it's the first retarget after genesis. Code courtesy of Art Forz
int nBlocksToGoBack = sRules->nInterval - 1;

if ((pindexLast->nHeight + 1) != sRules->nInterval)
{
nBlocksToGoBack = sRules->nInterval;
}

return nBlocksToGoBack;
}

//
// minimum amount of work that could possibly be required nTime after
// minimum work required was nBase
//
unsigned int CMainNetDiff::ComputeMinWork(unsigned int nBase, int64 nTime)
{
CBigNum bnResult;
bnResult.SetCompact(nBase);

while (nTime > 0 && bnResult < bnProofOfWorkLimit)
{
bnResult *= 4;
nTime -= sRules->nTargetTimespan * 4;
}

if (bnResult > bnProofOfWorkLimit)
bnResult = bnProofOfWorkLimit;

printf("CMainNetDiff -- ComputeMinWork requested\n");
printf("nTargetTimespan = %"PRI64d"\n", sRules->nTargetTimespan);
printf("bnResult:  %08x  %s\n", bnResult.GetCompact(), bnResult.getuint256().ToString().c_str());

return bnResult.GetCompact();
}

unsigned int CMainNetDiff::GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlock* pblock)
{
// Genesis block
if (pindexLast == NULL)
return nProofOfWorkLimit;

// Check if we should retarget diff.
if (!ShouldApplyRetarget(pindexLast, pblock))
{
return pindexLast->nBits;
}

// Limit adjustment step
int64 nActualTimespan = GetActualTimespan(GetFirstBlock(pindexLast), pindexLast);

// Retarget
CBigNum bnNew;
bnNew.SetCompact(pindexLast->nBits);
bnNew *= nActualTimespan;
bnNew /= sRules->nTargetTimespan;

if (bnNew > bnProofOfWorkLimit)
bnNew = bnProofOfWorkLimit;

/// debug print
printf("CMainNetDiff -- GetNextWorkRequired RETARGET\n");
printf("nTargetTimespan = %"PRI64d"    nActualTimespan = %"PRI64d"\n", sRules->nTargetTimespan, nActualTimespan);
printf("Before: %08x  %s\n", pindexLast->nBits, CBigNum().SetCompact(pindexLast->nBits).getuint256().ToString().c_str());
printf("After:  %08x  %s\n", bnNew.GetCompact(), bnNew.getuint256().ToString().c_str());

return bnNew.GetCompact();
}

const SRetargetParams* CMainNetDiff::GetRules()
{
return sRules;
}

// DYNAMIC DIFF

int64 CDynamicDiff::GetActualTimespan(const CBlockIndex* pindexFirst, const CBlockIndex* pindexLast)
{
int64 nActualTimespan = 0;
int64 nActualTimespanMax = 0;
int64 nActualTimespanMin = 0;

if (false && GetAdjustedTime() - pindexLast->GetBlockTime() > CMainNetDiff::sRules->nTargetTimespan * 10)
{
nActualTimespan = GetAdjustedTime() - pindexFirst->GetBlockTime();
}
else
{
nActualTimespan = pindexLast->GetBlockTime() - pindexFirst->GetBlockTime();
}

// FeatherCoin's cap system.
// For diff. increase
nActualTimespanMin = (nActualTimespan * 55) / 99;
// For diff. decrease
nActualTimespanMax = (nActualTimespan * 99) / 55;

printf("  nActualTimespan = %"PRI64d"  before bounds\n", nActualTimespan);

if (nActualTimespan > nActualTimespanMax) nActualTimespan = nActualTimespanMax;
if (nActualTimespan < nActualTimespanMin) nActualTimespan = nActualTimespanMin;

return nActualTimespan;
}

bool CDynamicDiff::ShouldApplyRetarget(const CBlockIndex* pindexLast, const CBlock* pblock)
{
const CBlockIndex* pindexFirst = pindexLast;

if (false && GetAdjustedTime() - pindexLast->GetBlockTime() > CMainNetDiff::sRules->nTargetTimespan * 5)
return true;

int64 nLookup = CMainNetDiff::sRules->nInterval * 4;
int i = 0;
    for (i = 0; i < nLookup && pindexFirst->pprev != NULL; i++)
{
pindexFirst = pindexFirst->pprev;
}

    double meanTime = (pindexLast->nTime - pindexFirst->nTime) / i;
    double targetTime = CMainNetDiff::sRules->nTargetSpacing;
    double squaredDiffs = 0;

    pindexFirst = pindexLast;
    for (i = 0; i < nLookup && pindexFirst->pprev != NULL; i++)
    {
        squaredDiffs += pow((meanTime - (pindexFirst->nTime - pindexFirst->pprev->nTime)), 2);
        pindexFirst = pindexFirst->pprev;
    }

    double maxDeviation = 2 * sqrt(squaredDiffs / i);

    return (meanTime > targetTime + maxDeviation || meanTime < targetTime - maxDeviation);
}

//
// minimum amount of work that could possibly be required nTime after
// minimum work required was nBase
//
unsigned int CTestNetDiff::ComputeMinWork(unsigned int nBase, int64 nTime)
{
// Testnet has min-difficulty blocks
// after nTargetSpacing*2 time between blocks:
if (nTime > pparentRules->GetRules()->nTargetSpacing * 2)
return bnProofOfWorkLimit.GetCompact();

return pparentRules->ComputeMinWork(nBase, nTime);
}

unsigned int CTestNetDiff::GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlock* pblock)
{
if (!pparentRules->ShouldApplyRetarget(pindexLast, pblock))
{
return GetTestNetNextTarget(pindexLast, pblock);
}

return pparentRules->GetNextWorkRequired(pindexLast, pblock);
}

unsigned int CTestNetDiff::GetTestNetNextTarget(const CBlockIndex* pindexLast, const CBlock* pblock)
{
const SRetargetParams* rules = pparentRules->GetRules();
// If the new block's timestamp is more than 2* 10 minutes
// then allow mining of a min-difficulty block.
if (pblock->nTime > pindexLast->nTime + rules->nTargetSpacing * 2)
{
return nProofOfWorkLimit;
}
else
{
// Return the last non-special-min-difficulty-rules-block
const CBlockIndex* pindex = pindexLast;
while (pindex->pprev && pindex->nHeight % rules->nInterval != 0 && pindex->nBits == nProofOfWorkLimit)
{
pindex = pindex->pprev;
}
return pindex->nBits;
}
}

const SRetargetParams* CTestNetDiff::GetRules()
{
return pparentRules->GetRules();
}

bool CTestNetDiff::ShouldApplyRetarget(const CBlockIndex* pindexLast, const CBlock* pblock)
{
return pparentRules->ShouldApplyRetarget(pindexLast, pblock);
}

it was written by a guy on BTT and has proven to be adaquately responsive to changes in hash power, it became necessary to use this after the advent of multi-pools that would throw insane hash power in a small period of time and raise the difficulty , then leave and await coinchoose/coinwarz again.

36
BitShares PTS / Performance, Operating system and Memory Questions
« on: November 16, 2013, 07:52:03 am »
Are people getting more on 64bit OS with the same processor than 32bit OS?

Is anyone using windows XP to mine ?

Is anyone using a machine with only 2 GB memory ?

if you are please let me know your cpm/hpm and system stability

37
General Discussion / First Non Invictus Fork
« on: November 13, 2013, 07:02:33 pm »
I'd like to propose a DAC forked from Protoshares.

It's main differences will be lessons learnt from Proto and benefitting greatly from the developments made so far.

1) Higher starting Difficulty
2) More reactive difficulty adjustment code
3) Set rewards per Block
4) (Not sure yet) Proof of Stake
5) Target block times adjusted by demand

5 minute Block time
Cap of 100 million PoW
Difficulty adjustment every 100 blocks
100 coins per block initial, 50 then 25 until chain is exhausted.
POS (conditional) 0,03% per day ~ 100% per annum.
Starting difficulty will be current Protoshare difficulty @ that time.

I will be consulting with bytemaster if he is agreeable, if all goes well we can have all basic infrastructure in place before launch. IT WILL BE LAUNCHED HERE, not on Bitcointalk.org.

As for uses, i'm open to ideas, myself truth be told, i'd like it to be a speculative commodity.

Pages: 1 2 [3]