bit2017 has quit [Ping timeout: 272 seconds]
stellar-slack has quit [Remote host closed the connection]
stellar-slack has joined #stellar-dev
bit2017 has joined #stellar-dev
bit2017 has quit [Ping timeout: 272 seconds]
bit2017 has joined #stellar-dev
nivah has joined #stellar-dev
bit2017 has quit [Ping timeout: 252 seconds]
de_henne_ has joined #stellar-dev
de_henne has quit [Ping timeout: 248 seconds]
bittrex-richie has quit [Ping timeout: 272 seconds]
bittrex-richie has joined #stellar-dev
bittrex-richie is now known as Guest34221
TheSeven has quit [Ping timeout: 252 seconds]
TheSeven has joined #stellar-dev
acetakwas has joined #stellar-dev
acetakwas has quit [Ping timeout: 260 seconds]
de_henne_ has quit [*.net *.split]
de_henne has joined #stellar-dev
olinkl_ has joined #stellar-dev
olinkl has quit [Read error: Connection reset by peer]
olinkl_ is now known as olinkl
<stellar-slack> <armed10> When writing to the history the permissions of the ledger is 600. Is this with a specific reason ? or can we change this is in the config file or with an extra script ?
acetakwas has joined #stellar-dev
acetakwas has quit [Ping timeout: 240 seconds]
nivah has quit [Ping timeout: 264 seconds]
<stellar-slack> <sacarlson> how do I change the result_xdr into a usable english result in js-sdk for example server.submitTransaction(transaction).then(function(result) { ; result.result_xdr becomes AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAA= ; I know there is a simple way to convert this, I just have no examples in any of my code
<stellar-slack> <armed10> http://stellar.github.io/xdr-viewer/ ?
acetakwas has joined #stellar-dev
<stellar-slack> <bartek> @sacarlson: if you want to decode it via code try this: ``` var buffer = new Buffer("AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAA=", "base64"); var transactionResult = StellarBase.xdr.TransactionResult.fromXDR(buffer); console.log(transactionResult.feeCharged().toString()); ``` it's really low level so it's much easier to use horizon response.
<stellar-slack> <bartek> you can also check xdr-viewer code to find out how to read switches etc.
acetakwas has quit [Max SendQ exceeded]
<stellar-slack> <sacarlson> ok I'll give that a try bartek. but it seems when I force a transaction with not enuf funds I don't get a return anyway instead I'm getting this error
<stellar-slack> <bartek> you can catch it to check what's the error: ``` server.submitTransaction(transaction) .then(function() {...}) .catch(function(e) { console.log(e); }); ```
<stellar-slack> <sacarlson> ok I'll try that
<stellar-slack> <sacarlson> ya that's better now at least I get the result_xdr back AAAAAAAAAGT/////AAAAAQAAAAAAAAAB/////gAAAAA= that I guess I need to decode with your above code to try
<stellar-slack> <bartek> or xdr-viewer. but you can find all info about errors in other parts of horizon response.
<stellar-slack> <sacarlson> well this is the responce of my wallet so I want it decoded for the user to see what the problem is
<stellar-slack> <sacarlson> and the code above isn't working with this line var buffer = new Buffer(e.extras.result_xdr, "base64"); throwing error
bit2017 has joined #stellar-dev
<stellar-slack> <bartek> your code is missing `catch` function
<stellar-slack> <sacarlson> no the catch is there the string above is in that with AAAAAAAAAGT/////AAAAAQAAAAAAAAAB/////gAAAAA=
<stellar-slack> <sacarlson> or I need another catch?
acetakwas has joined #stellar-dev
<stellar-slack> <bartek> this works just fine for me: ``` > var buffer = new Buffer("AAAAAAAAAGT/////AAAAAQAAAAAAAAAB/////gAAAAA=", "base64"); undefined > console.log(buffer); <Buffer 00 00 00 00 00 00 00 64 ff ff ff ff 00 00 00 01 00 00 00 00 00 00 00 01 ff ff ff fe 00 00 00 00> undefined ```
<stellar-slack> <sacarlson> oh ok
<stellar-slack> <sacarlson> so an error that is lack of funding is undefined?
<stellar-slack> <sacarlson> I'll try with the string to verify
<stellar-slack> <bartek> no, you still need to decode it.
<stellar-slack> <sacarlson> right
acetakwas has quit [Max SendQ exceeded]
acetakwas has joined #stellar-dev
acetakwas has quit [Max SendQ exceeded]
<stellar-slack> <armed10> I have a question about accessing a remote history. This history is accessible through ftp for nodes that need to catch up. However, the nodes need access to the ledger as well. The node creates this ledger with very few permissions making it inaccessible via FTP. What would be a good way to keep history private and accessible by select nodes?
<stellar-slack> <sacarlson> that same line is throwing errors even with a string var buffer = new Buffer("AAAAAAAAAGT/////AAAAAQAAAAAAAAAB/////gAAAAA=", "base64");
<stellar-slack> <sacarlson> I know the error as I'm forcing the under funding to check error catching
<stellar-slack> <sacarlson> so maybe some other lib I have is conflicting or the sdk min is in error for the new Buffer function
<stellar-slack> <bartek> @armed10: I'm not sure about this but can't you add a command to change the permission of the file after semicolon, like: ``` put="cp {0} /tmp/stellar-core/history/vs/{1}; chmod 777 /tmp/stellar-core/history/vs/{1}" ``` you need to try it yourself
<stellar-slack> <bartek> @sacarlson: line number in debugger doesn't always match with the line in a file (especially for minified code). I'm pretty sure that line shouldn't throw any errors. `stellar-sdk` does not overwrite global `Buffer` class.
<stellar-slack> <sacarlson> well all I know is if I comment out that line there is no error
<stellar-slack> <sacarlson> I'll try the none min version as I have had problems with min making errors with the none min stellar sdk still working
<stellar-slack> <armed10> 2016-02-15T13:45:10.253 GBNSP [Process WARN ] process 6768 exited 1: cp stellar-tmp/snapshot-55ded1750713abb9/ledger-0000033f.xdr.gz /home/chain/stellar/history/ledger/00/00/03/ledger-0000033f.xdr.gz; sudo chmod 777 /home/chain/history/ledger/00/00/03/ledger-0000033f.xdr.gz I get this error when i add the chmod
<stellar-slack> <bartek> does it work in a console?
<stellar-slack> <bartek> you have: /home/chain/stellar/history/ledger/00/00/03/ledger-0000033f.xdr.gz in cp command and /home/chain/history/ledger/00/00/03/ledger-0000033f.xdr.gz in chmod command
<stellar-slack> <bartek> so you probably forgot to add prefix in chmod command
<stellar-slack> <armed10> well that's emberassing
<stellar-slack> <armed10> 2016-02-15T13:53:53.359 GBNSP [Process WARN ] process 7196 exited 1: sudo cp stellar-tmp/snapshot-13b54002591e5db9/results-0000033f.xdr.gz /home/chain/stellar/history/results/00/00/03/results-0000033f.xdr.gz; sudo chmod 777 /home/chain/stellar/history/results/00/00/03/results-0000033f.xdr.gz 2016-02-15T13:53:53.359 GBNSP [Work WARN ] Reached retry limit 5 for put-remote-file results/00/00/03/results-0000033
<stellar-slack> '/home/chain/stellar/history/transactions/00/00/03/transactions-0000033f.xdr.gz' is not a directory
<stellar-slack> <bartek> hmm, there should be `&&` instead of `;` in this command. sorry. now, when first command fails, the second is still executed.
<stellar-slack> <armed10> You're correct, even so: the same error persists
<stellar-slack> <armed10> It seems to be a problem with the copy target, but the copy target is no issue without the chmod command
<stellar-slack> <bartek> `cp: target '/home/chain/stellar/history/transactions/00/00/03/transactions-0000033f.xdr.gz' is not a directory` there is no such directory. so you probably need to write a script that will create all intermediate directories, then copy the file and finally change permissions.
<stellar-slack> <armed10> That's strange because the script works without fail if we don't set the permissions. I'll try your suggestion
<stellar-slack> <sacarlson> I'm still getting this error even if I use the none minified version of stellar-sdk.js
<stellar-slack> <bartek> @armed10: yeah, that's strange. you need to try it.
<stellar-slack> <bartek> how does your code look like now?
<stellar-slack> <sacarlson> even with catch
<stellar-slack> <sacarlson> I can give you all my code I guess
<stellar-slack> <bartek> that's everything?
<stellar-slack> <sacarlson> no that's just the line that fails
<stellar-slack> <sacarlson> http://zipperhead.ddns.net/my_wallet/
<stellar-slack> <sacarlson> or you want me to push it to my github?
<stellar-slack> <bartek> http://zipperhead.ddns.net/my_wallet/ doesn't load anything
<stellar-slack> <sacarlson> oh then my dns isn't updated I'll push it to http://sacarlson.github.io|sacarlson.github.io
<stellar-slack> <sacarlson> give me a moment
<stellar-slack> <sacarlson> ok I pushed the present bugy code to http://sacarlson.github.io/my_wallet/
<stellar-slack> <sacarlson> so the code should be readable from https://github.com/sacarlson/sacarlson.github.io
<stellar-slack> <armed10> @eno: that was probably it, thanks @bartek We solved it by moving the commands to a seperate bash file
<stellar-slack> <sacarlson> the error happens at line 673 in this file https://github.com/sacarlson/sacarlson.github.io/blob/master/my_wallet/js/transaction_toolsv0.4.0.js
<stellar-slack> <sacarlson> I'm sure it's something stupid. I'll figure it out tomaro
de_henne_ has joined #stellar-dev
de_henne has quit [Ping timeout: 248 seconds]
Guest34221 is now known as bittrex-richie
[0__0] has joined #stellar-dev
<stellar-slack> <eva> n00b question (from me): if you have to have a source account to create a new account on the network, how was the first one created?
<stellar-slack> <jed> it is the root account. It just exists
<stellar-slack> <eva> Okay, I can accept that :)