Author

Topic: BTCD is no more - page 253. (Read 1328503 times)

sr. member
Activity: 336
Merit: 250
September 08, 2014, 01:31:20 AM
hmmm... Huh
legendary
Activity: 1176
Merit: 1134
September 07, 2014, 11:30:03 PM
we are going into the 4th day of a flag pattern, with the price range narrowing and oscillating around .0125
this is full 25% above the previous base and I think still a few days to go sideways. With the massive 60% spike in a day, the oscillations are much bigger than normal. it is the same thing we have seen 4 or 5 times already. stable base, big spike, drops back a bit, goes sideways, stable base, ...

Now with a weekday coming and the IPO about to be discovered by many weekday only traders, anything can happen, so if you not just HODL and watching the show, be very careful. Due to the volatility from the spike it could take another week for the stable base to form.

Now all the attention and press will be on SuperNET, but the few will be accumulating the BTCD at the support line, there are three sharp bounces off of .0115 to .012, if this support doesnt hold, then it could actually go down to .011
Any such thing would be a nice buying opportuning, but wait for it to stop dropping. Due to the design of the IPO there is zero incentive to sell BTCD to get TOKEN, so this means no selling pressure from people that want IPO.

Thanks to some whales dropping 4K BTCD a shot it is holding the prices down by clearing the buyside of the orderbook, this is what is causing the slight incline down in the flag pattern. Without these 16K of sales the last few days I think it would have been oscillating at .0135 or so.

Anyway, with SuperNET already having enough funds to be much more than a snot kitten, this ensures some good long term prospects for BTCD in the core. I know it is easy to get impatient, but we need to be calm and realize that 4 days ago it was at 0.01

I am having good contacts with coin devs and the VRC community is all charged up, so the vision of SuperNET is quickly becoming real. I will assume everybody here is following the SuperNET thread, so I wont be repeating myself here on SuperNET topics.

Remember, HODL!

James
hero member
Activity: 690
Merit: 501
September 07, 2014, 10:26:54 PM
Beyond Bitcoin summarizes jl777 recent musings today, kind of like an audiobook.

Starts at 39:40

http://letstalkbitcoin.com/blog/post/beyond-bitcoin-13-one-to-rule-them-all

Great reading; exciting stuff.
legendary
Activity: 1176
Merit: 1134
September 07, 2014, 09:38:48 PM
Beyond Bitcoin summarizes jl777 recent musings today, kind of like an audiobook.

Starts at 39:40

http://letstalkbitcoin.com/blog/post/beyond-bitcoin-13-one-to-rule-them-all
newbie
Activity: 37
Merit: 0
September 07, 2014, 08:06:30 PM
Knocking off for the evening, but in case anyone else is potentially interested, my mgwBTCD bids (235 of them, from 170-176 NXT each; about 3 BTC) are still in place on the NXT Asset Exchange.  With the additional slide in BTCD/BTC, they represent up to a 7% premium over the prevailing price (about 0.0136 BTC each, based on current NXT and BTCD prices).  Perhaps someone with both a Bittrex account a MGW-enabled NXT wallet wants to grab the arbitrage opportunity.
member
Activity: 99
Merit: 10
September 07, 2014, 07:35:45 PM
Please accept my apology.
accepted
I have no illwill against honest mistakes

I hope that you will become a productive member of this community

James



Thank you. This showed how nice james is and he has a lot of positive vibes. Actually the real problem here is people dont know how to respect others just like in the real world. I think  James is just enjoying what he loves to do and maybe this is his calling. Maybe they do not notice that they are so arrogant to tell someone what to do. If we talk about investments obviously most of those who invested here already earned. Its not the problem of the community if you invested late or you are too greedy Smiley I also see that james concern is not just about the investment but how to change this crypto world to something that everyone will benefit. Maybe we should create a new thread that seperate investors and innovator. just kidding Smiley

Quote
Selling one asset on a daily low in an otherwise uptrend and panic buying another at the peak of a 70% rise, you must be new here.

Yeah im just new and actually i invested even in 70% rise because it happened already on bbr. What matters is the recommendation of james. Even it already rise too high people will still invest because of the reputation of james so i still believe that vrc will rise again. by the way I also apologize to you. The funny thing here is my investment is so small that will not even reach worth of 1 btc lol Maybe i already had btcd worth of 1 btc if i trusted btcd before when its too low. But what matters here is im learning from you guys. I wont be shy to tell that i dont even have 50 btcd thats why im trying to invest on other because i thought thats the only way i can get a lot of btcd if the price of others go high and transfer my investment to btcd. Sorry for my bad english.

hero member
Activity: 512
Merit: 500
★YoBit.Net★ 1400+ Coins Exchange
September 07, 2014, 07:34:06 PM
hi James, any news on the new GUI?
hero member
Activity: 493
Merit: 500
September 07, 2014, 06:40:13 PM

So there is the guts of the entire SuperNET!
As you can see it is not so much actual code. There are many special cases and nonstandard handling I skipped, but for those who are wondering how "real" teleport is, this has been pretty much working for over a month.
The SuperNET support is creating a need for some brain surgery and if I am not ready to code it, I cannot force it.
it is hard to explain.
maybe if you are an artist you can understand
force an artist to paint when he is no ready, then it wont be any good.
the reason is that I need to have all the things done in my head before I start writing
Now, maybe you are in a hurry to have teleport because?
cant wait for .02?

please let me make the Teleport + SuperNET to my standards. All the discussions with the SuperNET, questions, sometimes even trolls is sharpening in my mind the exact things that are needed.

James

P.S. for those who understand some coding, you know how hard it is to have small amounts of code do a lot of things, let along doing amazing things and you will not the long distance calling is not there yet. So, this I must do for SuperNET, then we get SuperTeleport! Not just teleporting BTCD to any other BTCD node, but BTCD to ANY node in the SuperNET. Isnt that worth a week or even two delay?

dancing with intuition...

thanks for this teleport update
legendary
Activity: 3570
Merit: 1126
September 07, 2014, 06:27:32 PM
My take on current BTCD  price action is that dev needs to spend less time answering posts and slamming trolls and more time delivering the goods.

This is not Fud. This is "tough love" from someone who has been in BTCD from the start.  And sees an enormous timesuck happening lately in the wrong direction. This thread - and the coin - was best when the dev was posting code, not victories over trolls.

I think the post you are looking for is here:

https://bitcointalksearch.org/topic/m.8717360

If you were in from the beginning you should appreciate more, the fact that James so eloquently protects the investments and interests of all involved.  I'd rather see a delay in product over an out of control FUD campaign.

Please spare me the "if" and the "should". The post your linking to simply states a rational to be always responding to every attack. My point is that that sort of blind responding becomes a giant timesuck that kills the golden goose.

won't argue with that, which is why he suggested it'd probably be more useful for someone else to catalogue all his FUD busting and respond accordingly. I can't quite control/compose myself such as he can and I'm sure there aren't many people that can so this is where we're at ATM.
legendary
Activity: 1176
Merit: 1134
September 07, 2014, 06:25:56 PM
James, which dir on your Github site is this code located?

github.com/jl777/libjl777
a bit out of date as current code is work in progress and not stable
legendary
Activity: 1176
Merit: 1134
September 07, 2014, 06:25:01 PM
here is the sendmsg function, which is really the critical one:

Code:

char *sendmessage(int32_t L,char *verifiedNXTaddr,char *NXTACCTSECRET,char *msg,int32_t msglen,char *destNXTaddr,char *origargstr)
{
    uint64_t txid;
    char buf[4096];
    unsigned char encodedD[4096],encodedL[4096],encodedP[4096],finalbuf[4096],*outbuf;
    int32_t len,createdflag;
    struct NXT_acct *np = 0,*destnp;
    //printf("sendmessage.(%s) -> NXT.(%s) (%s) (%s)\n",NXTaddr,destNXTaddr,msg,origargstr);
    if ( Server_NXTaddr == 0 )
    {
        if ( Global_pNXT->privacyServer_NXTaddr[0] == 0 )
        {
            sprintf(buf,"{\"error\":\"%s cant sendmessage.(%s) to null privacyServer\"}",verifiedNXTaddr,msg);
            return(clonestr(buf));
        }
        np = get_NXTacct(&createdflag,Global_mp,Global_pNXT->privacyServer_NXTaddr);
        printf("set np <- NXT.%s\n",Global_pNXT->privacyServer_NXTaddr);
    }
    else
    {
        np = get_NXTacct(&createdflag,Global_mp,verifiedNXTaddr);
        if ( strcmp(Server_NXTaddr,destNXTaddr) == 0 )
        {
            queue_message(np,msg,origargstr);
            sprintf(buf,"{\"result\":\"msg.(%s) from NXT.%s queued\"}",msg,verifiedNXTaddr);
            return(clonestr(buf));
        }
    }
    destnp = get_NXTacct(&createdflag,Global_mp,destNXTaddr);
    memset(finalbuf,0,sizeof(finalbuf));
    memset(encodedD,0,sizeof(encodedD)); // encoded to dest
    memset(encodedL,0,sizeof(encodedL)); // encoded to max L onion layers
    memset(encodedP,0,sizeof(encodedP)); // encoded to privacyserver
    if ( origargstr != 0 )
        len = onionize(verifiedNXTaddr,NXTACCTSECRET,encodedD,destNXTaddr,(unsigned char *)origargstr,(int32_t)strlen(origargstr)+1);
    else
    {
        len = onionize(verifiedNXTaddr,NXTACCTSECRET,encodedD,destNXTaddr,(unsigned char *)msg,msglen);
        msg = origargstr = "";
    }
    printf("sendmessage (%s) len.%d to %s\n",origargstr,msglen,destNXTaddr);
    if ( len > sizeof(finalbuf)-256 )
    {
        printf("sendmessage, payload too big %d\n",len);
        sprintf(buf,"{\"error\":\"%s cant sendmessage.(%s) to %s too long.%d\"}",verifiedNXTaddr,msg,destNXTaddr,len);
    }
    else if ( len > 0 )
    {
        outbuf = encodedD;
        printf("np.%p NXT.%s np->udp %p | destnp.%p destnp_udp.%p\n",np,np!=0?np->H.NXTaddr:"no np",np!=0?np->udp:0,destnp,destnp!=0?destnp->udp:0);
        if ( np != 0 && np->udp != 0 )
        {
            if ( L > 0 )
            {
                len = add_random_onionlayers(L,verifiedNXTaddr,NXTACCTSECRET,encodedL,outbuf,len);
                outbuf = encodedL;
            }
            len = onionize(verifiedNXTaddr,NXTACCTSECRET,encodedP,Global_pNXT->privacyServer_NXTaddr,outbuf,len);
            outbuf = encodedP;
            sprintf(buf,"{\"status\":\"%s sends via %s encrypted sendmessage to %s pending\"}",verifiedNXTaddr,Global_pNXT->privacyServer_NXTaddr,destNXTaddr);
        }
        else if ( Server_NXTaddr != 0 && destnp->udp != 0 )
        {
            printf("can do direct!\n");
            np = destnp;
            sprintf(buf,"{\"status\":\"%s sends direct encrypted sendmessage to %s pending\"}",verifiedNXTaddr,destNXTaddr);
        } else np = 0;  // have to use p2p network
        if ( len > 0 && len < sizeof(finalbuf) )
        {
            len = crcize(finalbuf,outbuf,len);
            if ( len > sizeof(finalbuf) )
            {
                printf("sendmessage: len.%d > sizeof(finalbuf) %ld\n",len,sizeof(finalbuf));
                exit(-1);
            }
            if ( np != 0 && len < 1400 )
            {
                int32_t portable_udpwrite(const struct sockaddr *addr,uv_udp_t *handle,void *buf,long len,int32_t allocflag);
                printf("udpsend finalbuf.%d\n",len);
                portable_udpwrite(&np->Uaddr,(uv_udp_t *)np->udp,finalbuf,len,ALLOCWR_ALLOCFREE);
            }
            else if ( Server_NXTaddr != 0 ) // test to verify this is hub
            {
                printf("len.%d Server_NXTaddr.(%s) broadcast %d via p2p\n",len,Server_NXTaddr,len);
                txid = call_libjl777_broadcast((char *)finalbuf,600);
                if ( txid == 0 )
                {
                    sprintf(buf,"{\"error\":\"%s cant send via p2p sendmessage.(%s) [%s] to %s pending\"}",verifiedNXTaddr,origargstr,msg,destNXTaddr);
                }
                else
                {
                    sprintf(buf,"{\"status\":\"%s sends via p2p encrypted sendmessage to %s pending\"}",verifiedNXTaddr,destNXTaddr);
                }
            }
            else sprintf(buf,"{\"error\":\"%s cant sendmessage.(%s) to %s unexpected case\"}",verifiedNXTaddr,msg,destNXTaddr);
        } else sprintf(buf,"{\"error\":\"%s cant sendmessage.(%s) to %s error encoding layer, len.%d\"}",verifiedNXTaddr,msg,destNXTaddr,len);
    } else sprintf(buf,"{\"error\":\"%s cant sendmessage.(%s) to %s probably no pubkey\"}",verifiedNXTaddr,msg,destNXTaddr);
    return(clonestr(buf));
}

the onion commands:
Code:

int32_t onionize(char *verifiedNXTaddr,char *NXTACCTSECRET,unsigned char *encoded,char *destNXTaddr,unsigned char *payload,int32_t len)
{
    static unsigned char zerokey[crypto_box_PUBLICKEYBYTES];
    unsigned char onetime_pubkey[crypto_box_PUBLICKEYBYTES],onetime_privkey[crypto_box_SECRETKEYBYTES];
    uint64_t nxt64bits;
    int32_t createdflag;
    uint16_t *payload_lenp,slen;
    struct NXT_acct *np;
    nxt64bits = calc_nxt64bits(destNXTaddr);
    np = get_NXTacct(&createdflag,Global_mp,destNXTaddr);
    if ( memcmp(np->pubkey,zerokey,sizeof(zerokey)) == 0 )
    {
        if ( Global_pNXT->privacyServer_NXTaddr[0] != 0 )
        {
            char cmdstr[4096];
            sprintf(cmdstr,"{\"requestType\":\"getpubkey\",\"NXT\":\"%s\",\"addr\":\"%s\",\"time\":%ld}",verifiedNXTaddr,destNXTaddr,time(NULL));
            send_tokenized_cmd(Global_mp->Lfactor,verifiedNXTaddr,NXTACCTSECRET,cmdstr,Global_pNXT->privacyServer_NXTaddr);
            //int n = construct_tokenized_req(_tokbuf,cmdstr,NXTACCTSECRET);
            //sendmessage(verifiedNXTaddr,NXTACCTSECRET,_tokbuf,(int32_t)n+1,Global_pNXT->privacyServer_NXTaddr,_tokbuf);
        }
        return(0);
    }
    crypto_box_keypair(onetime_pubkey,onetime_privkey);
    memcpy(encoded,&nxt64bits,sizeof(nxt64bits));
    encoded += sizeof(nxt64bits);
    memcpy(encoded,onetime_pubkey,sizeof(onetime_pubkey));
    encoded += sizeof(onetime_pubkey);
    payload_lenp = (uint16_t *)encoded;
    encoded += sizeof(*payload_lenp);
    //printf("ONIONIZE: np.%p NXT.%s %s pubkey.%llx encode len.%d -> ",np,np->H.NXTaddr,destNXTaddr,*(long long *)np->pubkey,len);
    len = _encode_str(encoded,(char *)payload,len,np->pubkey,onetime_privkey);
    slen = len;
    memcpy(payload_lenp,&slen,sizeof(*payload_lenp));
    printf("new len.%d + %ld = %ld\n",len,sizeof(*payload_lenp) + sizeof(onetime_pubkey) + sizeof(nxt64bits),sizeof(*payload_lenp) + sizeof(onetime_pubkey) + sizeof(nxt64bits)+len);
    return(len + sizeof(*payload_lenp) + sizeof(onetime_pubkey) + sizeof(nxt64bits));
}

int32_t add_random_onionlayers(int32_t numlayers,char *verifiedNXTaddr,char *NXTACCTSECRET,uint8_t *final,uint8_t *src,int32_t len)
{
    char destNXTaddr[64];
    uint8_t bufs[2][4096],*dest;
    struct peerinfo *peer;
    struct NXT_acct *np;
    if ( numlayers > 1 )
        numlayers = ((rand() >> 8) % numlayers);
    if ( numlayers > 0 )
    {
        memset(bufs,0,sizeof(bufs));
        dest = bufs[numlayers & 1];
        memcpy(dest,src,len);
        while ( numlayers > 0 )
        {
            src = bufs[numlayers & 1];
            dest = bufs[(numlayers & 1) ^ 1];
            peer = get_random_pserver();
            if ( peer == 0 )
            {
                printf("FATAL: cant get random peer!\n");
                return(-1);
            }
            np = search_addresses(peer->pubBTCD);
            if ( np == 0 && peer->pubnxtbits != 0 )
            {
                expand_nxt64bits(destNXTaddr,peer->pubnxtbits);
                np = search_addresses(destNXTaddr);
            }
            if ( np == 0 )
                np = search_addresses(peer->pubBTC);
            if ( np == 0 )
            {
                printf("FATAL: %s %s %s is unknown account\n",peer->pubBTCD,destNXTaddr,peer->pubBTC);
                return(-1);
            }
            if ( memcmp(np->pubkey,peer->pubkey,sizeof(np->pubkey)) != 0 )
            {
                printf("Warning: (%s %s %s) pubkey updated %llx -> %llx\n",peer->pubBTCD,destNXTaddr,peer->pubBTC,*(long long *)np->pubkey,*(long long *)peer->pubkey);
                memcpy(np->pubkey,peer->pubkey,sizeof(np->pubkey));
            }
            printf("add layer %d: NXT.%s\n",numlayers,np->H.NXTaddr);
            len = onionize(verifiedNXTaddr,NXTACCTSECRET,dest,np->H.NXTaddr,src,len);
            if ( len > 4096 )
            {
                printf("FATAL: onion layers too big.%d\n",len);
                return(-1);
            }
            numlayers--;
        }
        src = dest;
    }
    memcpy(final,src,len);
    return(len);
}

int32_t deonionize(unsigned char *pubkey,unsigned char *decoded,unsigned char *encoded,int32_t len,uint64_t mynxtbits)
{
    //void *origencoded = encoded;
    int32_t err;
    uint16_t payload_len;
    if ( mynxtbits == 0 || memcmp(&mynxtbits,encoded,sizeof(mynxtbits)) == 0 )
    {
        encoded += sizeof(mynxtbits);
        memcpy(pubkey,encoded,crypto_box_PUBLICKEYBYTES);
        encoded += crypto_box_PUBLICKEYBYTES;
        memcpy(&payload_len,encoded,sizeof(payload_len));
        //printf("deonionize >>>>> pubkey.%llx vs mypubkey.%llx (%ld) -> %d %2x\n",*(long long *)pubkey,*(long long *)Global_mp->session_pubkey,(long)encoded - (long)origencoded,payload_len,payload_len);
        encoded += sizeof(payload_len);
        if ( (payload_len + sizeof(payload_len) + sizeof(Global_mp->session_pubkey) + sizeof(mynxtbits)) == len )
        {
            len = payload_len;
            err = _decode_cipher((char *)decoded,encoded,&len,pubkey,Global_mp->session_privkey);
            if ( err == 0 )
            {
               // printf("payload_len.%d err.%d new len.%d\n",payload_len,err,len);
                return(len);
            }
        } else printf("mismatched len expected %ld got %d\n",(payload_len + sizeof(payload_len) + sizeof(Global_mp->session_pubkey) + sizeof(mynxtbits)),len);
    }
    else
    {
        uint64_t destbits;
        memcpy(&destbits,encoded,sizeof(destbits));
        printf("deonionize onion for NXT.%llu not this address.(%llu)\n",(long long)destbits,(long long)mynxtbits);
    }
    return(0);
}
So there is the guts of the entire SuperNET!
As you can see it is not so much actual code. There are many special cases and nonstandard handling I skipped, but for those who are wondering how "real" teleport is, this has been pretty much working for over a month.
The SuperNET support is creating a need for some brain surgery and if I am not ready to code it, I cannot force it.
it is hard to explain.
maybe if you are an artist you can understand
force an artist to paint when he is no ready, then it wont be any good.
the reason is that I need to have all the things done in my head before I start writing
Now, maybe you are in a hurry to have teleport because?
cant wait for .02?

please let me make the Teleport + SuperNET to my standards. All the discussions with the SuperNET, questions, sometimes even trolls is sharpening in my mind the exact things that are needed.

James

P.S. for those who understand some coding, you know how hard it is to have small amounts of code do a lot of things, let along doing amazing things and you will not the long distance calling is not there yet. So, this I must do for SuperNET, then we get SuperTeleport! Not just teleporting BTCD to any other BTCD node, but BTCD to ANY node in the SuperNET. Isnt that worth a week or even two delay?
full member
Activity: 154
Merit: 100
September 07, 2014, 06:23:10 PM
My take on current BTCD  price action is that dev needs to spend less time answering posts and slamming trolls and more time delivering the goods.

This is not Fud. This is "tough love" from someone who has been in BTCD from the start.  And sees an enormous timesuck happening lately in the wrong direction. This thread - and the coin - was best when the dev was posting code, not victories over trolls.

I think the post you are looking for is here:

https://bitcointalksearch.org/topic/m.8717360

If you were in from the beginning you should appreciate more, the fact that James so eloquently protects the investments and interests of all involved.  I'd rather see a delay in product over an out of control FUD campaign.

Please spare me the "if" and the "should". The post your linking to simply states a rational to be always responding to every attack. My point is that that sort of blind responding becomes a giant timesuck that kills the golden goose.
full member
Activity: 149
Merit: 100
September 07, 2014, 06:18:09 PM
James, which dir on your Github site is this code located?




legendary
Activity: 1176
Merit: 1134
September 07, 2014, 06:16:15 PM
The last set of code adds the teleport sequence to a queue. We of course need to process this queue, like so:

Code:

int32_t process_transporterQ(void **ptrp,void *arg) // added when outbound transporter sequence is started
{
    struct transporter_log *log = (*ptrp);
    struct NXT_acct *destnp,*np;
    unsigned char *buffer;
    int32_t i,sharei,err=0,verified = 0;
    struct telepod *pod;
    if ( log->cp->initdone < 2 )
        return(0);
    np = search_addresses(log->cp->pubaddr);
    destnp = search_addresses(log->otherpubaddr);
    printf("log send %f complete %f\n",log->recvmilli,log->completemilli);
    if ( log->recvmilli != 0. && log->completemilli == 0. )
    {
        for (i=0; inumpods; i++)
        {
            //printf("check %d'th pod\n",i);
            if ( (pod= log->pods[i]) != 0 )
            {
                printf("pod sentmilli %f complete %f clonetxid.(%c) cloneout.%d\n",pod->sentmilli,pod->completemilli,pod->clonetxid[0],pod->cloneout);
                if ( pod->clonetxid[0] != 0 && pod->cloneout >= 0 )
                    verified++;
                else if ( pod->sentmilli == 0. )
                {
                    void calc_shares(unsigned char *shares,unsigned char *secret,int32_t size,int32_t width,int32_t M,int32_t N,unsigned char *sharenrs);
                    void gfshare_extract(unsigned char *secretbuf,uint8_t *sharenrs,int32_t N,uint8_t *buffer,int32_t len,int32_t size);
                    if ( log->N > 1 )
                    {
                        buffer = calloc(log->N+1,pod->len_plus1);
                        calc_shares(buffer,_get_privkeyptr(pod,calc_multisig_N(pod)),pod->len_plus1 - 1,pod->len_plus1,log->M,log->N,log->sharenrs);
                        gfshare_extract(buffer+log->N*pod->len_plus1,log->sharenrs,log->N,buffer,pod->len_plus1-1,pod->len_plus1);
                        for (sharei=err=0; shareiN; sharei++)
                        {
                            if ( teleport_telepod(log->cp->pubaddr,np->H.NXTaddr,log->cp->NXTACCTSECRET,destnp->H.NXTaddr,pod,log->totalcrc,sharei,i,log->M,log->N,buffer+sharei*pod->len_plus1) < 0 )
                            {
                                err++;
                                break;
                            }
                        }
                        printf("back from calc_shares pod.%p (%s) %u %u %u\n",pod,_get_privkeyptr(pod,calc_multisig_N(pod)),_crc32(0,buffer,pod->len_plus1-1),_crc32(0,buffer+pod->len_plus1,pod->len_plus1-1),_crc32(0,buffer+2*pod->len_plus1,pod->len_plus1-1));
                        {
                            char hexstr[4096];
                            init_hexbytes(hexstr,buffer+log->N*pod->len_plus1,pod->len_plus1);
                            printf("DECODED.(%s)\n",hexstr);
                        }
                        free(buffer);
                    }
                    else
                    {
                        sharei = log->N;
                        if ( teleport_telepod(log->cp->pubaddr,np->H.NXTaddr,log->cp->NXTACCTSECRET,destnp->H.NXTaddr,pod,log->totalcrc,sharei,i,1,1,_get_privkeyptr(pod,calc_multisig_N(pod))) < 0 )
                            err++;
                    }
                    printf("sharei.%d N.%d err.%d\n",sharei,log->N,err);
                    if ( sharei == log->N )
                    {
                        pod->sentmilli = milliseconds();
                        change_podstate(log->cp,pod,PODSTATE_SENT);
                    }
                    break;
                }
            } else printf("unexpected null pod at %d of %d\n",i,log->numpods);
        }
        //printf("verified.%d of %d, started %f\n",verified,log->numpods,log->startmilli);
        if ( verified == log->numpods )
        {
            log->completemilli = milliseconds();
            log->logstate |= TRANSPORTER_COMPLETED;
            save_transporter_log(log);
            return(1);
        }
        else if ( (milliseconds() - log->startmilli) > TELEPORT_MAX_CLONETIME )
        {
            log->completemilli = milliseconds();
            printf("exceed maximum cloning time!\n");
            return(-1);
        }
    }
    else
    {
        for (i=0; inumpods; i++)
        {
            //printf("check %d'th pod\n",i);
            if ( (pod= log->pods[i]) != 0 )
            {
                if ( pod->completemilli == 0. && pod->confirmheight != 0 )
                {
                    pod->completemilli = milliseconds();
                    disp_telepod("confirm",pod);
                }
            }
        }
        if ( log->recvmilli == 0. && (milliseconds() - log->startmilli) > TELEPORT_TRANSPORTER_TIMEOUT )
            return(-1);
        else if ( log->recvmilli != 0. && (milliseconds() - log->recvmilli) > TELEPORT_TELEPODS_TIMEOUT )
            return(-1);
    }
    return(0);
}

you can see it doing the M of N fragmenting and calling teleport_telepod

Code:

int32_t teleport_telepod(char *mypubaddr,char *NXTaddr,char *NXTACCTSECRET,char *destNXTaddr,struct telepod *pod,uint32_t totalcrc,uint32_t sharei,int32_t ind,int32_t M,int32_t N,uint8_t *buffer)
{
    cJSON *json;
    char numstr[32],hexstr[4096];
    json = cJSON_CreateObject();
    cJSON_AddItemToObject(json,"requestType",cJSON_CreateString("telepod"));
    cJSON_AddItemToObject(json,"crc",cJSON_CreateNumber(pod->crc));
    cJSON_AddItemToObject(json,"i",cJSON_CreateNumber(ind));
    cJSON_AddItemToObject(json,"h",cJSON_CreateNumber(pod->height));
    cJSON_AddItemToObject(json,"c",cJSON_CreateString(pod->coinstr));
    sprintf(numstr,"%.8f",(double)pod->satoshis/SATOSHIDEN);
    cJSON_AddItemToObject(json,"v",cJSON_CreateString(numstr));
    cJSON_AddItemToObject(json,"a",cJSON_CreateString(pod->coinaddr));
    cJSON_AddItemToObject(json,"t",cJSON_CreateString(pod->txid));
    cJSON_AddItemToObject(json,"o",cJSON_CreateNumber(pod->vout));
    cJSON_AddItemToObject(json,"p",cJSON_CreateString(pod->script));
    if ( sharei == 0xff || sharei >= N )
        sharei = N;
    init_hexbytes(hexstr,buffer,pod->len_plus1);
    cJSON_AddItemToObject(json,"k",cJSON_CreateString(hexstr));
    cJSON_AddItemToObject(json,"L",cJSON_CreateNumber(totalcrc));
    cJSON_AddItemToObject(json,"s",cJSON_CreateNumber(sharei));
    cJSON_AddItemToObject(json,"M",cJSON_CreateNumber(M));
    cJSON_AddItemToObject(json,"N",cJSON_CreateNumber(N));
    cJSON_AddItemToObject(json,"D",cJSON_CreateString(mypubaddr));
    return(sendandfree_jsoncmd(Global_mp->Lfactor,NXTaddr,NXTACCTSECRET,json,destNXTaddr));
}
turns out the actual teleporting is just making a JSON string! Now this is the "application" level stuff so it tends to be much simpler.

clearly the magical sendandfree_jsoncmd() must contain some magic!

James
legendary
Activity: 1176
Merit: 1134
September 07, 2014, 06:12:29 PM
Here is how Teleport works with SuperNET

Each coin would implement the JSON handling specific to their coin, so when they receive the API command, they can process it.

The SuperNET is the transport
The services are applications

Easier to understand is telephone system. yes this is very good analogy.

There are local phone calls and long distance calls. The local calls are comms between people using the same coin. Long distance are comms between different coins. The area code is the coin.

Doesnt matter who you are calling, you can use the same phone connected to the same socket.
here is where it is not so exact, but thing of a service as a specific type of phone.
some phones have video, others have cameras, not exactly right, but hopefully you get the idea.

all the data is on the internect
all the different services are sending packets directly between two computers
each computer can properly decrypt all the packets sent to it and route the JSON request to the right service

Currently it requires changing the source code to add a new API call and of course the code to actually perform the API function.

I hope this is understandable, it is no easy to explain in english what should be a matter of showing some code fragments

current commands
Code:
    static char **commands[] = { getpubkey, maketelepods, transporterstatus, telepod, transporter, tradebot, respondtx, processutx, publishaddrs, checkmsg, placebid, placeask, makeoffer, sendmsg, orderbook, getorderbooks, sellp, buyp, send, teleport, select  };

example of one of the above
Code:
    static char *teleport[] = { (char *)teleport_func, "teleport", "V", "NXT", "secret", "amount", "dest", "coin", "minage", "M", "N", 0 };

the "glue" function that actually calls the teleport function
Code:
char *teleport_func(char *sender,int32_t valid,cJSON **objs,int32_t numobjs,char *origargstr)
{
    double amount;
    int32_t M,N;
    struct coin_info *cp;
    char NXTACCTSECRET[512],destaddr[512],minage[512],coinstr[512],*retstr = 0;
    if ( Historical_done == 0 )
        return(clonestr("historical processing is not done yet"));
    copy_cJSON(NXTACCTSECRET,objs[1]);
    amount = get_API_float(objs[2]);
    copy_cJSON(destaddr,objs[3]);
    copy_cJSON(coinstr,objs[4]);
    copy_cJSON(minage,objs[5]);
    M = get_API_int(objs[6],1);
    N = get_API_int(objs[7],1);
    if ( M > N || N >= 0xff || M <= 0 )
        M = N = 1;
    printf("amount.(%.8f) minage.(%s) %d | M.%d N.%d\n",amount,minage,atoi(minage),M,N);
    cp = get_coin_info(coinstr);
    if ( cp != 0 && sender[0] != 0 && amount > 0 && valid != 0 && destaddr[0] != 0 )
        retstr = teleport(sender,NXTACCTSECRET,(uint64_t)(SATOSHIDEN * amount),destaddr,cp,atoi(minage),M,N);
    else retstr = clonestr("{\"error\":\"invalid teleport request\"}");
    return(retstr);
}

the teleport function, which triggers other API functions sometimes locally sometimes remotely, uses some genetic algo for telepod selection, etc.
Code:
char *teleport(char *NXTaddr,char *NXTACCTSECRET,uint64_t satoshis,char *otherpubaddr,struct coin_info *cp,int32_t minage,int32_t M,int32_t N)
{
    static unsigned char zerokey[crypto_box_PUBLICKEYBYTES];
    char buf[4096];
    uint8_t sharenrs[255];
    struct telepod **pods = 0;
    struct NXT_acct *np,*destnp;
    struct transporter_log *log;
    int32_t n,err = -1;
    uint32_t height;
    if ( M <= 0 )
        M = cp->M;
    if ( N <= 0 )
        N = cp->N;
    if ( M <= 0 )
        M = 1;
    if ( N <= 0 )
        N = 1;
    memset(sharenrs,0,sizeof(sharenrs));
    if ( N > 1 )
        init_sharenrs(sharenrs,0,N,N);
   
    sprintf(buf,"%s -> teleport %.8f %s -> %s minage.%d | M.%d N.%d dest.(%s)\n",NXTaddr,dstr(satoshis),cp->name,otherpubaddr,minage,M,N,otherpubaddr);
    if ( minage == 0 )
        minage = cp->minconfirms;
    destnp = search_addresses(otherpubaddr);
    height = (uint32_t)get_blockheight(cp);
    if ( (pods= evolve_transporter(&n,0,cp,minage,satoshis,height)) == 0 )
        sprintf(buf,"{\"error\":\"teleport: not enough  for %.8f %s to %s\"}",dstr(satoshis),cp->name,otherpubaddr);
    else
    {
        free(pods), pods = 0;
        np = find_NXTacct(NXTaddr,NXTACCTSECRET);
        if ( memcmp(destnp->pubkey,zerokey,sizeof(zerokey)) == 0 )
        {
            query_pubkey(destnp->H.NXTaddr,NXTACCTSECRET);
            sprintf(buf,"{\"error\":\"no pubkey for %s, request sent\"}",otherpubaddr);
        }
        if ( memcmp(destnp->pubkey,zerokey,sizeof(zerokey)) != 0 )
        {
            printf("start evolving at %f\n",milliseconds());
            pods = evolve_transporter(&n,cp->maxevolveiters,cp,minage,satoshis,height);
            printf("finished evolving at %f\n",milliseconds());
            if ( pods == 0 )
                sprintf(buf,"{\"error\":\"unexpected transporter evolve failure for %.8f %s to %s\"}",dstr(satoshis),cp->name,otherpubaddr);
            else
            {
                log = send_transporter_log(NXTaddr,cp->NXTACCTSECRET,destnp,cp,minage,satoshis,pods,n,M,N,sharenrs,otherpubaddr);
                if ( log == 0 )
                {
                    sprintf(buf,"{\"error\":\"unexpected error sending transporter log %.8f %s to %s\"}",dstr(satoshis),cp->name,otherpubaddr);
                    free(pods);
                    pods = 0;
                }
                else
                {
                    err = 0;
                    sprintf(buf,"{\"result\":\"teleport AFTER CREATE BUNDLE to %s err.%d\"}",destnp->H.NXTaddr,err);
                    printf("teleport AFTER CREATE BUNDLE to %s err.%d\n",destnp->H.NXTaddr,err);
                    process_pingpong_queue(&Transporter_sendQ,log);
                }
            }
        }
    }
    return(clonestr(buf));
}
legendary
Activity: 3570
Merit: 1126
September 07, 2014, 06:09:31 PM
My take on current BTCD  price action is that dev needs to spend less time answering posts and slamming trolls and more time delivering the goods.

This is not Fud. This is "tough love" from someone who has been in BTCD from the start.  And sees an enormous timesuck happening lately in the wrong direction. This thread - and the coin - was best when the dev was posting code, not victories over trolls.

I think the post you are looking for is here:

https://bitcointalksearch.org/topic/m.8717360

If you were in from the beginning you should appreciate more, the fact that James so eloquently protects the investments and interests of all involved.  I'd rather see a delay in product over an out of control FUD campaign.
hero member
Activity: 490
Merit: 504
September 07, 2014, 06:01:11 PM
Dropbox here
Is there another place to download the Windows wallet other than the mega link?  The link isn't working and I want to move the coins I bought off the exchange.

Thanks

I am uploading it for you with dropbox.

I have uploaded the windows wallet here.
it is the original as I have downloaded it from the OP on July 14

https://www.dropbox.com/s/aujtjeoydzplzqr/BitcoinDark-win32-qt.rar?dl=0
full member
Activity: 149
Merit: 100
September 07, 2014, 05:57:41 PM
why does the mega link require such a high end browser?  what the F

Could you take that up with Mega ?
Nobody hear can help you with their business decisions.

If you search the thread there is a client hosted on DropBox as well.



legendary
Activity: 1876
Merit: 1000
September 07, 2014, 05:54:02 PM
My take on current BTCD  price action is that dev needs to spend less time answering posts and slamming trolls and more time delivering the goods.

This is not Fud. This is "tough love" from someone who has been in BTCD from the start.  And sees an enormous timesuck happening lately in the wrong direction. This thread - and the coin - was best when the dev was posting code, not victories over trolls.

It would also be better if I could actually download the wallet...  why does the mega link require such a high end browser?  what the F
full member
Activity: 154
Merit: 100
September 07, 2014, 05:52:09 PM
My take on current BTCD  price action is that dev needs to spend less time answering posts and slamming trolls and more time delivering the goods.

This is not Fud. This is "tough love" from someone who has been in BTCD from the start.  And sees an enormous timesuck happening lately in the wrong direction. This thread - and the coin - was best when the dev was posting code, not victories over trolls.
Jump to: