rejon has joined #stellar-dev
<stellar-slack> <sacarlson> @scott your back?
tectonic has joined #stellar-dev
de_henne has quit [Ping timeout: 264 seconds]
de_henne has joined #stellar-dev
sv-logger has quit [Remote host closed the connection]
sv-logger has joined #stellar-dev
rejon has quit [Ping timeout: 260 seconds]
<stellar-slack> <meetreks> @scott:
<stellar-slack> <meetreks> @eva: mentioned that you are the best person for smart contracts
<stellar-slack> <meetreks> can you share any doco within stellar?
<stellar-slack> <meetreks> @fredolafritte: re: book orders
<stellar-slack> <meetreks> there are 2 ways to do it
<stellar-slack> <meetreks> 1. Asset Pair to book offers
<stellar-slack> <meetreks> Here, run a scan on the gateway server state
<stellar-slack> <meetreks> it will return the currencies it supports
<stellar-slack> <meetreks> match the asset pair with the return
<stellar-slack> <meetreks> if it is OK, then run book offers for that gateway
<stellar-slack> <meetreks> 2. using static_path_find
<stellar-slack> <meetreks> In this method, just provide the from and to as per the asset pair combo
<stellar-slack> <meetreks> and see what stellar as a network returns
TheSeven has quit [Disconnected by services]
[7] has joined #stellar-dev
de_henne has quit [Remote host closed the connection]
de_henne has joined #stellar-dev
tectonic has quit []
bit2017 has quit [Ping timeout: 265 seconds]
cagedwisdom has joined #stellar-dev
graydon has quit [Quit: Leaving.]
<stellar-slack> <sacarlson> I've decided to take a wak at looking at js-stellar-base, I have npm installed and nodejs working on my mint linux. what is needed at the command line to start the sinon-chai test in js-stellar-base?
<stellar-slack> <fredolafritte> gulp test
<stellar-slack> <fredolafritte> for unit test
<stellar-slack> <sacarlson> $gulp test
<stellar-slack> <sacarlson> I assume I cd to some point
<stellar-slack> <fredolafritte> mocha test/setup/node.js test/functional/functional_test.js
<stellar-slack> <fredolafritte> For the end to end testing
<stellar-slack> <sacarlson> ok from what directory?
<stellar-slack> <fredolafritte> indeed
<stellar-slack> <sacarlson> I guess from above test
<stellar-slack> <sacarlson> ok first error is mocha no command found so that's something that needs to be installed
<stellar-slack> <sacarlson> looks like mocha is installed with npm install -g mocha ; but at what point do install this or will it install itself?
<stellar-slack> <sacarlson> I also tried this nodejs test/setup/node.js but get an error: import {default as xdr} from "./generated/stellar-xdr_generated"; should I expect that these tests don't work?
<stellar-slack> <fredolafritte> do you use my fork or the vanilla js-stellar-base ?
<stellar-slack> <fredolafritte> the tests are written in es6 and the easiest way to run them is by using mocha
<stellar-slack> <sacarlson> so where is it you install mocha? or just install it global?
<stellar-slack> <fredolafritte> npm install -g mocha
<stellar-slack> <sacarlson> yes but that installs to a local point as I understand it so I assume it needs to be at some point in the tree of the root
<stellar-slack> <fredolafritte> js-stellar-base$ ./node_modules/.bin/mocha test/setup/node.js test/unit/operation_test.js
<stellar-slack> <sacarlson> remind you I"m a total nob on nodejs
<stellar-slack> <fredolafritte> remind you I'm a total nob on ruby
<stellar-slack> <sacarlson> yes but this is your stuf now ha ha
<stellar-slack> <sacarlson> so cd under js-stellar-base then npm install -g mocha and we should be good to go?
<stellar-slack> <fredolafritte> yes
<stellar-slack> <sacarlson> oh I get this error on attempt npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules' so it's attempting to install globaly
<stellar-slack> <sacarlson> so I guess sudo npm install -g mocha
<stellar-slack> <sacarlson> all other npm I've done has been local
<stellar-slack> <sacarlson> after the sudo install I get /usr/bin/env: node: No such file or directory
<stellar-slack> <sacarlson> seems on linux mint they renamed it so to fix this you need: sudo ln -s /usr/bin/nodejs /usr/bin/node
<stellar-slack> <fredolafritte> # mocha test/setup/node.js test/unit/operation_test.js
<stellar-slack> <sacarlson> @fredolafritte: should I give your github branch a wak?
<stellar-slack> <fredolafritte> the file test/setup/node.js only contains global variables
<stellar-slack> <fredolafritte> setting the trust doesn't work on the vanilla lib, still waiting for my changes to be merged ....
<stellar-slack> <sacarlson> well what I was at least hoping that did work was the decodeing of the errors that doesn't seem to work on ruby
<stellar-slack> <fredolafritte> decoding the error is only on my fork for now
<stellar-slack> <fredolafritte> hope it will be merged soon
<stellar-slack> <sacarlson> no problem I'm fully willing to give yours a try
<stellar-slack> <fredolafritte> for sure *mocha test/setup/node.js* is the wrong command to start the test
<stellar-slack> <fredolafritte> try: *mocha test/setup/node.js test/unit/operation_test.js*
<stellar-slack> <sacarlson> same error seen
<stellar-slack> <fredolafritte> *sudo npm install* ?
<stellar-slack> <sacarlson> sudo npm install of mocha? yes
<stellar-slack> <fredolafritte> and *sudo npm install* ?
<stellar-slack> <sacarlson> you want me to try that $sudo npm install; on the command line?
<stellar-slack> <fredolafritte> yes
<stellar-slack> <sacarlson> it's downloading tons of stuf
<stellar-slack> <sacarlson> after that install now it passed the first mocha test/setup/node.js
<stellar-slack> <sacarlson> after this setup that now works on @fredolafritte branch, I still get the same error on the stellar vanilla version. so I'll continue my experiments on yours. thanks @fredolafritte
<stellar-slack> <sacarlson> @fredolafritte: what do I point the require("stellar-base") when I use your github version?
<stellar-slack> <fredolafritte> Try the command gulp build to build the library
<stellar-slack> <sacarlson> never mind I figured it out as you have to run the setup node.js in the same sesion then run the next
<stellar-slack> <sacarlson> oh no that's not even required just mocha ./create_key_test.js works
<stellar-slack> <sacarlson> with nodejs ./create_key_test.js it has the import problem
<stellar-slack> <sacarlson> @fredolafritte: also wondering as I see your default let baseUrl = 'http://localhost:8000' how does that work? as I shutdown my stellar-core and I note it still runs the test ok
<stellar-slack> <fredolafritte> I had to installed and configure stellar-core, horizon (ruby) and go-horizon locally, the url https://horizon-testnet.stellar.org was broken last week end
<stellar-slack> <sacarlson> IC but I didn't think my stellar-core was listening on port 8000 but maybe it was
<stellar-slack> <fredolafritte> go-horizon is listening on 8000, not stellar-core
<stellar-slack> <sacarlson> now it's running but your tests are failing sounding like it fails to reach my core
<stellar-slack> <fredolafritte> change the url back to *https://horizon-testnet.stellar.org*
<stellar-slack> <sacarlson> oh ok, so it should fail on my side as I don't have horizon running on my side on localhost
<stellar-slack> <sacarlson> ok I'll try that
<stellar-slack> <sacarlson> now I get 4 passing (35s) 1 pending 13 failing
<stellar-slack> <fredolafritte> these tests are not fully working at the first pass
<stellar-slack> <sacarlson> I don't understand how I could have posibly got 14 passing on my first run without a running localhorizon
cagedwisdom has left #stellar-dev ["Leaving"]
<stellar-slack> <sacarlson> same results on another run
<stellar-slack> <fredolafritte> which url is set ?
<stellar-slack> <sacarlson> I now have it set to https://horizon-testnet.stellar.org
<stellar-slack> <sacarlson> want the full results ?
<stellar-slack> <fredolafritte> it doesn't suprise me if it doesn't work on https://horizon-testnet.stellar.org, my pull requests to fix go-horizon hasn't been merged yet
<stellar-slack> <sacarlson> ok well at least I learned something thanks
<stellar-slack> <fredolafritte> from the error log, *https://horizon-testnet.stellar.org* is severely broken, worst case for getting https://horizon-testnet.stellar.org/accounts/GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ is to get a 404
<stellar-slack> <fredolafritte> not a 500
<stellar-slack> <fredolafritte> wild guess is that they are still using base58 and not base32
<stellar-slack> <sacarlson> that's ok I don't need horizon yet. hopefully I'll get the trustlines working on ruby with my localhosted -core
<stellar-slack> <sacarlson> and as it doesn't look to require much resources maybe I'll just finalize that everyone has a running core
<stellar-slack> <sacarlson> maybe 10,000 poker players all running stellar-core will just strengthen the network ha ha
<stellar-slack> <meetreks> @sacarlson: what advantagesdoes one get by running the core?
<stellar-slack> <meetreks> you can still access all the end points cant you?
<stellar-slack> <sacarlson> well at this point you get stability as they reset the stellar-core almost every 4 - 10 days
<stellar-slack> <meetreks> :)
<stellar-slack> <meetreks> I am asking more long term
<stellar-slack> <meetreks> you must be able to hit the main net anyways
<stellar-slack> <sacarlson> sure as far as I know there is nothing you can't do with horizon that you can do with a local stellar-core
<stellar-slack> <sacarlson> if it worked
<stellar-slack> <sacarlson> when I look at my system with top to look at resources taken with stellar-core running I don't even see it on the list it's so low
<stellar-slack> <sacarlson> I see the files are already about 300megs for db, maybe they get biger over time
<stellar-slack> <meetreks> I had the same issue with Ripple
<stellar-slack> <meetreks> the DB was increasing at alarming levels
<stellar-slack> <meetreks> so gave it up
<stellar-slack> <sacarlson> the advantage of stellar-core is redundency as one node of many nodes can fail but the network would still work. all it takes is horizon going down and your system would be down
<stellar-slack> <sacarlson> oh ok good to know about the DB size expectations
<stellar-slack> <meetreks> Need to ask scott if we can trunc the size in any ways
<stellar-slack> <sacarlson> I just looked again and it's the log that's now 500megs the db is only 25meg
<stellar-slack> <meetreks> :)
<stellar-slack> <sacarlson> not sure I really have to have the log or not
<stellar-slack> <meetreks> thats one big log
<stellar-slack> <sacarlson> it's been running for a few days now
<stellar-slack> <sacarlson> oh and one other thing I had to do to allow me using @fredolafritte github was changed this line var StellarBase = require("./src"); from var StellarBase = require("stellar-base");
<stellar-slack> <fredolafritte> which file ?
<stellar-slack> <sacarlson> this one I was doing basic sanity test with https://stellar-public.slack.com/files/sacarlson/F08TSFSLW/create_key_test.js
stellar-slack has quit [Ping timeout: 250 seconds]
stellar-slack has joined #stellar-dev
<stellar-slack> <scott> @meetreks: I haven’t yet thought through what the consequences of truncating the history database to some point in history will be, but to me it makes sense to provide such a system. It makes sense to provide some capability to restrict a “full import” into the history system, though: either restricting the db to transactions that effect a subset of accounts, or restricting the history to the last X a
<stellar-slack> some point in the future, but I’m also open to outside contribution.
graydon has joined #stellar-dev
nivah has joined #stellar-dev
sacarlson1 has joined #stellar-dev
sacarlson has quit [Ping timeout: 272 seconds]
de_henne has quit [Remote host closed the connection]
graydon has quit [Quit: Leaving.]
graydon has joined #stellar-dev
graydon has quit [Client Quit]
graydon has joined #stellar-dev
<stellar-slack> <graydon> Heads up to anyone working with the testnet: we're going to be shifting the port range (both p2p port and http port). The change attempts to avoid colliding with the ephemeral port range, so we're shifting p2p down to 11625 and http to 11626. These are new defaults in stellar-core and we're adjusting our testnet to match.
<stellar-slack> <graydon> if you find you can't connect in the next 24h or so, it's very likely the port shift. I'll try to be minimally disruptive but this is likely to disconnect some connections.
<stellar-slack> <graydon> (also there's a config file change to reduce the odds of misconfiguration by calculating the quorum threshold automatically to 67% of a validator set, so unless you have reason to override that you can just remove the THRESHOLD line from your configs when you next rebuild stellar-core)
<stellar-slack> <meetreks> @scott: You cannot have history just building up. The History DB must be only kept at one location and at another DR site. Local copies should be trunc at 'x' months of data only. Initially you can set the 'x' to 3 months. I can contribute to this, so let me know what you would want me to do.
<stellar-slack> <graydon> testnet is currently offline. apologies, config changes were worse than anticipated. currently working on it.
<stellar-slack> <scott> "You cannot have history just building up” while in the most absolute sense that is true, in my experience that limitations on database size can be stretched to an very high number by employing many techniques. As far as contributing, I would recommend that your work on a design document. What behavior do you propose, what motivations drive the design, how does it effect the api, what tradeoffs are being
<stellar-slack> etc. Open it up as an issue on go-horizon that the community can form a discussion around
<stellar-slack> <scott> For example, I’ve worked on databases in the past that had over a billion rows within a single table. Granted the box that db was running on was beefy, it at least expresses that we have some time to work on the design and consider the ramifications of a partial history database.
slippy has joined #stellar-dev
<stellar-slack> <graydon> testnet is back online but as I mentioned earlier, the port number has changed. p2p is 11625 and http is 11626.
stellar-slack has quit [Remote host closed the connection]
stellar-slack has joined #stellar-dev