Bitcoin Forum
May 11, 2024, 05:52:44 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 [129] 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 ... 2557 »
  Print  
Author Topic: NXT :: descendant of Bitcoin - Updated Information  (Read 2761531 times)
Jean-Luc
Sr. Member
****
Offline Offline

Activity: 392
Merit: 250



View Profile WWW
December 07, 2013, 06:34:53 PM
 #2561

fluke.airdns.org ran out of file descriptors again. I bet we have a connection leak somewhere in the code, connections not being closed. There are godzillion of connections in CLOSE_WAIT state. I don't see a way to force those to timeout earlier by tweaking net.ipv4.tcp* settings, all I was able to quickly read on the topic suggests it is our application responsibility to take care of closing those. Anyone with more networking experience please feel free to suggest a fix.


lead Nxt developer, gpg key id: 0x811D6940E1E4240C
Nxt blockchain platform | Ardor blockchain platform | Ignis ICO
1715406764
Hero Member
*
Offline Offline

Posts: 1715406764

View Profile Personal Message (Offline)

Ignore
1715406764
Reply with quote  #2

1715406764
Report to moderator
Activity + Trust + Earned Merit == The Most Recognized Users on Bitcointalk
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715406764
Hero Member
*
Offline Offline

Posts: 1715406764

View Profile Personal Message (Offline)

Ignore
1715406764
Reply with quote  #2

1715406764
Report to moderator
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
December 07, 2013, 06:38:33 PM
 #2562

fluke.airdns.org ran out of file descriptors again. I bet we have a connection leak somewhere in the code, connections not being closed. There are godzillion of connections in CLOSE_WAIT state. I don't see a way to force those to timeout earlier by tweaking net.ipv4.tcp* settings, all I was able to quickly read on the topic suggests it is our application responsibility to take care of closing those. Anyone with more networking experience please feel free to suggest a fix.

Do u have a log of requests? Such a problem will arise if someone emulates web client responses. I see 2 ways to fix the issue - add timeout for pending interface requests & enable allowedUserHosts.
ig0tik3d
Legendary
*
Offline Offline

Activity: 1246
Merit: 1000



View Profile
December 07, 2013, 06:41:05 PM
 #2563


exist 0.3.16 version??
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
December 07, 2013, 06:45:17 PM
 #2564


exist 0.3.16 version??

Yes, I test new versions on my node.
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
December 07, 2013, 06:48:36 PM
 #2565

- What's a safe number of confirmations for a transaction to be trusted. I would assume that there being one block per minute, and keeping with bitcoin's 1 hour rule that would be 60 for fair trust level, but for rapid transaction processing (such as in a gambling site) what would be the minimum number of transactions?

10 Nxt confirmations ~ 1 BTC confirmation. If u send winnings and reference betting transactions (via "referencedTransaction" in "sendMoney" request) then both or none of the transactions will be confirmed (these r so-called chained transactions).


chained transactions only prevent part of the problem. The real issue comes from showing bet results too early, allowing the losing bets to be double spent and only the winning ones going through untouched. The effort in BTC terms to orphan an already propagated block are high enough to accept a single confirmation on low value transactions. I'm just trying to get a feel on what would the equivalent be in NXT terms.

Look at Instant transactions with guaranteed confirmation


Quote

- How are fees calculated? There's a 1NXT minimum fee per tx, if I read things correctly, but are there transaction size issues to be worried about? Block size?

Blocks r limited to 32 KiB. Reference soft takes into account size of transactions when sort them, ordinary payments r always 128 B long.


So what does that mean for fees? Is the rule atm a flat  1 NXT per tx?

1 NXT is minimum fee. This is transaction sorting algo - https://bitcointalk.org/index.php?topic=352286.msg3776655#msg3776655 (the last piece of code).

Quote

- I don't see in the API a way to get the equivalent to the memory pool, a list of transactions waiting inclusion. Can I get that somehow?

This is not implemented, post ur request in API thread.


- Can I work with raw transactions? I would particularly need to be able to sign transactions "offline".

U can use "sendMoney" to get a transaction id. Then use "getTransactionBytes" to get raw bytes. Then go online and use "broadcastTransaction" (disabled atm).
In a pseudo-script language this would look like
Code:
broadcastTransaction(getTransactionBytes(sendMoney(transactionData)));
NB: U can broadcast any transactions making other peers to recall them.

What I was aiming for is as much independence from the client as possible, effectively implementing the code elsewhere. Thus creating the transaction using sendMoney would be great *if* I can get an unsigned raw tx, sign it in my code without using the ref client and then ask the client to propagate it. In other words, I need to ask the client for an unsigned transaction and I need to be told how signing is implemented so I can reproduce in my own code. Is any of this already available?

No. Post this request in API thread, please.

Quote

- Can I create accounts offline? I assume that we're talking about a simple double sha256 of the passphrase so what I'd need to do is create random passphrases and derive the account number from those? Will the network accept sending to any account address or is there any kind of "registration" message that needs to be propagated first?

Any 64 bit unsinged number can be used as a valid account id. If u need API for converting a passphrase into the account id then post this in API thread.

I really need a description of the process, not an API. This is yet another thing I must have done without depending on the ref client. Is there any explanation of the algorithm used?

Look at https://bitcointalk.org/index.php?topic=345619.msg3759147#msg3759147
Jean-Luc
Sr. Member
****
Offline Offline

Activity: 392
Merit: 250



View Profile WWW
December 07, 2013, 06:57:57 PM
 #2566

Do u have a log of requests? Such a problem will arise if someone emulates web client responses. I see 2 ways to fix the issue - add timeout for pending interface requests & enable allowedUserHosts.
I set allowedUserHosts to 127.0.0.1, but I can still access http://fluke.airdns.org:7874/ , and of course I am not connecting from localhost. http://fluke.airdns.org:7874/nxt?requestType=getMyInfo returns my correct IP. Is that how it is supposed to work?
Code:
[2013-12-07 18:42:42.330] "allowedUserHosts" set to "127.0.0.1"
[2013-12-07 18:42:42.330] "allowedBotHosts" set to "*"

After a reboot, netstat doesn't show any CLOSE_WAIT connections, but about 2000 in TIME_WAIT at the moment.
I don't have a log of the http requests, are those being logged somewhere? I only have whatever is printed to nohup.out, I run it from nohup. Next time it accumulates CLOSE_WAIT junk, I can capture the list of IPs from netstat.

lead Nxt developer, gpg key id: 0x811D6940E1E4240C
Nxt blockchain platform | Ardor blockchain platform | Ignis ICO
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
December 07, 2013, 07:02:10 PM
 #2567

Do u have a log of requests? Such a problem will arise if someone emulates web client responses. I see 2 ways to fix the issue - add timeout for pending interface requests & enable allowedUserHosts.
I set allowedUserHosts to 127.0.0.1, but I can still access http://fluke.airdns.org:7874/ , and of course I am not connecting from localhost. http://fluke.airdns.org:7874/nxt?requestType=getMyInfo returns my correct IP. Is that how it is supposed to work?
Code:
[2013-12-07 18:42:42.330] "allowedUserHosts" set to "127.0.0.1"
[2013-12-07 18:42:42.330] "allowedBotHosts" set to "*"

After a reboot, netstat doesn't show any CLOSE_WAIT connections, but about 2000 in TIME_WAIT at the moment.
I don't have a log of the http requests, are those being logged somewhere? I only have whatever is printed to nohup.out, I run it from nohup. Next time it accumulates CLOSE_WAIT junk, I can capture the list of IPs from netstat.


allowedUserHosts is not enabled yet. I'll add logging feature in 0.3.16. TIME_WAIT is normal behavior, what is the timeout btw?
manrus
Legendary
*
Offline Offline

Activity: 1334
Merit: 1004


TTM


View Profile
December 07, 2013, 07:03:20 PM
 #2568

Have a problem with version 0.3.15

secretPhrase=MY_SECRET

In my password uses ":,()*+' ", length 64 Grin

Client out that {"errorCode":3,"errorDescription":"\"host\" not specified"}
Jean-Luc
Sr. Member
****
Offline Offline

Activity: 392
Merit: 250



View Profile WWW
December 07, 2013, 07:06:26 PM
 #2569

allowedUserHosts is not enabled yet. I'll add logging feature in 0.3.16. TIME_WAIT is normal behavior, what is the timeout btw?
Code:
$ cat /proc/sys/net/ipv4/tcp_fin_timeout 
5
I reduced it to 5, was 60 before the last crash.

lead Nxt developer, gpg key id: 0x811D6940E1E4240C
Nxt blockchain platform | Ardor blockchain platform | Ignis ICO
klee
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000



View Profile
December 07, 2013, 07:09:51 PM
 #2570

After my encouragement: http://howtobuycryptocoins.info/nxt.html
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
December 07, 2013, 07:14:22 PM
 #2571


U guys continue to confuse ppl using "nextcoin" brand. This is "Nxt", no "e", no "coin".
klee
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000



View Profile
December 07, 2013, 07:16:36 PM
 #2572


U guys continue to confuse ppl using "nextcoin" brand. This is "Nxt", no "e", no "coin".
Hmmm you are right! I will tell him to correct it!
So no 'Next' anywhere? Just 'NXT'?
Jls.
Newbie
*
Offline Offline

Activity: 34
Merit: 0



View Profile
December 07, 2013, 07:17:41 PM
 #2573

Have a problem with version 0.3.15

secretPhrase=MY_SECRET

In my password uses ":,()*+' ", length 64 Grin

Client out that {"errorCode":3,"errorDescription":"\"host\" not specified"}

+1 !
nexern
Hero Member
*****
Offline Offline

Activity: 597
Merit: 500



View Profile
December 07, 2013, 07:19:30 PM
 #2574

allowedUserHosts is not enabled yet. I'll add logging feature in 0.3.16. TIME_WAIT is normal behavior, what is the timeout btw?
Code:
$ cat /proc/sys/net/ipv4/tcp_fin_timeout 
5
I reduced it to 5, was 60 before the last crash.


currently running this

Quote
echo 7 > /proc/sys/net/ipv4/tcp_fin_timeout
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse
echo 30 > /proc/sys/net/ipv4/tcp_keepalive_intvl
echo 5 > /proc/sys/net/ipv4/tcp_keepalive_probes

with +400 peers. seems ok.
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
December 07, 2013, 07:21:31 PM
 #2575


U guys continue to confuse ppl using "nextcoin" brand. This is "Nxt", no "e", no "coin".
Hmmm you are right! I will tell him to correct it!
So no 'Next' anywhere? Just 'NXT'?

I believe the brand is "Nxt" and the currency code is "NXT".
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
December 07, 2013, 07:22:41 PM
 #2576

Have a problem with version 0.3.15

secretPhrase=MY_SECRET

In my password uses ":,()*+' ", length 64 Grin

Client out that {"errorCode":3,"errorDescription":"\"host\" not specified"}

+1 !

I'll check it, moment...

Looks like "host" is not specified.
manrus
Legendary
*
Offline Offline

Activity: 1334
Merit: 1004


TTM


View Profile
December 07, 2013, 07:26:00 PM
 #2577


I'll check it, moment...

Looks like "host" is not specified.

Problem in pass. I'll check it by change my ugly secret to "123" and all works.
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
December 07, 2013, 07:31:07 PM
 #2578


I'll check it, moment...

Looks like "host" is not specified.

Problem in pass. I'll check it by change my ugly secret to "123" and all works.

Guys, does anyone see what maybe the problem in

Code:
						case "markHost":
{

String secretPhrase = req.getParameter("secretPhrase");
String host = req.getParameter("host");
String weightValue = req.getParameter("weight");
String dateValue = req.getParameter("date");
if (secretPhrase == null) {

response.put("errorCode", 3);
response.put("errorDescription", "\"secretPhrase\" not specified");

} else if (host == null) {

response.put("errorCode", 3);
response.put("errorDescription", "\"host\" not specified");

} else if (weightValue == null) {

response.put("errorCode", 3);
response.put("errorDescription", "\"weight\" not specified");

} else if (dateValue == null) {

response.put("errorCode", 3);
response.put("errorDescription", "\"date\" not specified");

} else {

if (host.length() > 100) {

response.put("errorCode", 4);
response.put("errorDescription", "Incorrect \"host\" (the length exceeds 100 chars limit)");

} else {

try {

int weight = Integer.parseInt(weightValue);
if (weight <= 0 || weight > 1000000000) {

throw new Exception();

}

try {

int date = Integer.parseInt(dateValue.substring(0, 4)) * 10000 + Integer.parseInt(dateValue.substring(5, 7)) * 100 + Integer.parseInt(dateValue.substring(8, 10));

byte[] publicKey = Crypto.getPublicKey(secretPhrase);
byte[] hostBytes = host.getBytes("UTF-8");

ByteBuffer buffer = ByteBuffer.allocate(32 + 2 + hostBytes.length + 4 + 4 + 1);
buffer.order(ByteOrder.LITTLE_ENDIAN);
buffer.put(publicKey);
buffer.putShort((short)hostBytes.length);
buffer.put(hostBytes);
buffer.putInt(weight);
buffer.putInt(date);

byte[] data = buffer.array();
byte[] signature;
do {

data[data.length - 1] = (byte)ThreadLocalRandom.current().nextInt();
signature = Crypto.sign(data, secretPhrase);

} while (!Crypto.verify(signature, data, publicKey));

response.put("hallmark", convert(data) + convert(signature));

} catch (Exception e) {

response.put("errorCode", 4);
response.put("errorDescription", "Incorrect \"date\"");

}

} catch (Exception e) {

response.put("errorCode", 4);
response.put("errorDescription", "Incorrect \"weight\"");

}

}

}

}
break;
LightningFury
Hero Member
*****
Offline Offline

Activity: 687
Merit: 509



View Profile
December 07, 2013, 07:31:55 PM
 #2579

Have a problem with version 0.3.15

secretPhrase=MY_SECRET

In my password uses ":,()*+' ", length 64 Grin

Client out that {"errorCode":3,"errorDescription":"\"host\" not specified"}

+1  Grin

▄▄█████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄████████████████████
███▄
▄█████████████████████████▄
██████████████▄████████████
███████████████████████████
███████████████████████████
█████████████████████████▀
▀███████████████████████▀
▀█████████████████████▀
▀█████████████████▀
▀▀█████████▀▀
.dune network...
           ██
         ██▀▀██
         ██▄▄██
       ██▀▀██▀▀██
       ██▄▄██▄▄█████▀▀███
       ██▀▀██▀▀█████▄▄███
       ██▄▄██▄▄█████▀▀███
  ███████████▀▀█████▄▄███
  ██▌▐██▌▐███▄▄█████▀▀███
  ██▌▐██▌▐██████████▄▄███
  ██▌▐██▌▐██████████▀▀███
  ██▌▐██▌▐██████████▄▄███
█████████████
██████████████
►  Metal
     ►  Wallets
          ►  dApps
►  Blog
     ►  Resources
          ►  Community
.

██████████

██████
██████████████████████████████
.
.
██████████

████████████████████
██████████
LightningFury
Hero Member
*****
Offline Offline

Activity: 687
Merit: 509



View Profile
December 07, 2013, 07:34:41 PM
 #2580


I'll check it, moment...

Looks like "host" is not specified.

Problem in pass. I'll check it by change my ugly secret to "123" and all works.

Guys, does anyone see what maybe the problem in

Code:
						case "markHost":
{

String secretPhrase = req.getParameter("secretPhrase");
String host = req.getParameter("host");
String weightValue = req.getParameter("weight");
String dateValue = req.getParameter("date");
if (secretPhrase == null) {

response.put("errorCode", 3);
response.put("errorDescription", "\"secretPhrase\" not specified");

} else if (host == null) {

response.put("errorCode", 3);
response.put("errorDescription", "\"host\" not specified");

} else if (weightValue == null) {

response.put("errorCode", 3);
response.put("errorDescription", "\"weight\" not specified");

} else if (dateValue == null) {

response.put("errorCode", 3);
response.put("errorDescription", "\"date\" not specified");

} else {

if (host.length() > 100) {

response.put("errorCode", 4);
response.put("errorDescription", "Incorrect \"host\" (the length exceeds 100 chars limit)");

} else {

try {

int weight = Integer.parseInt(weightValue);
if (weight <= 0 || weight > 1000000000) {

throw new Exception();

}

try {

int date = Integer.parseInt(dateValue.substring(0, 4)) * 10000 + Integer.parseInt(dateValue.substring(5, 7)) * 100 + Integer.parseInt(dateValue.substring(8, 10));

byte[] publicKey = Crypto.getPublicKey(secretPhrase);
byte[] hostBytes = host.getBytes("UTF-8");

ByteBuffer buffer = ByteBuffer.allocate(32 + 2 + hostBytes.length + 4 + 4 + 1);
buffer.order(ByteOrder.LITTLE_ENDIAN);
buffer.put(publicKey);
buffer.putShort((short)hostBytes.length);
buffer.put(hostBytes);
buffer.putInt(weight);
buffer.putInt(date);

byte[] data = buffer.array();
byte[] signature;
do {

data[data.length - 1] = (byte)ThreadLocalRandom.current().nextInt();
signature = Crypto.sign(data, secretPhrase);

} while (!Crypto.verify(signature, data, publicKey));

response.put("hallmark", convert(data) + convert(signature));

} catch (Exception e) {

response.put("errorCode", 4);
response.put("errorDescription", "Incorrect \"date\"");

}

} catch (Exception e) {

response.put("errorCode", 4);
response.put("errorDescription", "Incorrect \"weight\"");

}

}

}

}
break;

A "#" in the secret in the url before the host?

▄▄█████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄████████████████████
███▄
▄█████████████████████████▄
██████████████▄████████████
███████████████████████████
███████████████████████████
█████████████████████████▀
▀███████████████████████▀
▀█████████████████████▀
▀█████████████████▀
▀▀█████████▀▀
.dune network...
           ██
         ██▀▀██
         ██▄▄██
       ██▀▀██▀▀██
       ██▄▄██▄▄█████▀▀███
       ██▀▀██▀▀█████▄▄███
       ██▄▄██▄▄█████▀▀███
  ███████████▀▀█████▄▄███
  ██▌▐██▌▐███▄▄█████▀▀███
  ██▌▐██▌▐██████████▄▄███
  ██▌▐██▌▐██████████▀▀███
  ██▌▐██▌▐██████████▄▄███
█████████████
██████████████
►  Metal
     ►  Wallets
          ►  dApps
►  Blog
     ►  Resources
          ►  Community
.

██████████

██████
██████████████████████████████
.
.
██████████

████████████████████
██████████
Pages: « 1 ... 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 [129] 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 ... 2557 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!