Logged Conversation (all times UTC)
[03:05] <stellar-slack> @scott:
[03:05] <stellar-slack> @eva: mentioned that you are the best person for smart contracts
[03:05] <stellar-slack> can you share any doco within stellar?
[03:07] <stellar-slack> @fredolafritte: re: book orders
[03:07] <stellar-slack> there are 2 ways to do it
[03:08] <stellar-slack> 1. Asset Pair to book offers
[03:08] <stellar-slack> Here, run a scan on the gateway server state
[03:08] <stellar-slack> it will return the currencies it supports
[03:09] <stellar-slack> match the asset pair with the return
[03:09] <stellar-slack> if it is OK, then run book offers for that gateway
[03:09] <stellar-slack> 2. using static_path_find
[03:10] <stellar-slack> In this method, just provide the from and to as per the asset pair combo
[03:10] <stellar-slack> and see what stellar as a network returns
[07:23] <stellar-slack> 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?
[07:24] <stellar-slack> gulp test
[07:24] <stellar-slack> for unit test
[07:25] <stellar-slack> $gulp test
[07:25] <stellar-slack> I assume I cd to some point
[07:25] <stellar-slack> mocha test/setup/node.js test/functional/functional_test.js
[07:26] <stellar-slack> For the end to end testing
[07:26] <stellar-slack> ok from what directory?
[07:26] <stellar-slack> indeed
[07:26] <stellar-slack> I guess from above test
[07:30] <stellar-slack> ok first error is mocha no command found so that's something that needs to be installed
[07:37] <stellar-slack> looks like mocha is installed with npm install -g mocha ; but at what point do install this or will it install itself?
[07:54] <stellar-slack> 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?
[07:59] <stellar-slack> do you use my fork or the vanilla js-stellar-base ?
[08:01] <stellar-slack> the tests are written in es6 and the easiest way to run them is by using mocha
[08:02] <stellar-slack> so where is it you install mocha? or just install it global?
[08:04] <stellar-slack> npm install -g mocha
[08:05] <stellar-slack> 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
[08:06] <stellar-slack> js-stellar-base$ ./node_modules/.bin/mocha test/setup/node.js test/unit/operation_test.js
[08:06] <stellar-slack> remind you I"m a total nob on nodejs
[08:06] <stellar-slack> remind you I'm a total nob on ruby
[08:06] <stellar-slack> yes but this is your stuf now ha ha
[08:07] <stellar-slack> so cd under js-stellar-base then npm install -g mocha and we should be good to go?
[08:08] <stellar-slack> yes
[08:10] <stellar-slack> oh I get this error on attempt npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules' so it's attempting to install globaly
[08:10] <stellar-slack> so I guess sudo npm install -g mocha
[08:11] <stellar-slack> all other npm I've done has been local
[08:13] <stellar-slack> after the sudo install I get /usr/bin/env: node: No such file or directory
[08:16] <stellar-slack> seems on linux mint they renamed it so to fix this you need: sudo ln -s /usr/bin/nodejs /usr/bin/node
[08:19] <stellar-slack> # mocha test/setup/node.js test/unit/operation_test.js
[08:20] <stellar-slack> @fredolafritte: should I give your github branch a wak?
[08:20] <stellar-slack> the file test/setup/node.js only contains global variables
[08:20] <stellar-slack> setting the trust doesn't work on the vanilla lib, still waiting for my changes to be merged ....
[08:21] <stellar-slack> well what I was at least hoping that did work was the decodeing of the errors that doesn't seem to work on ruby
[08:23] <stellar-slack> decoding the error is only on my fork for now
[08:23] <stellar-slack> hope it will be merged soon
[08:23] <stellar-slack> no problem I'm fully willing to give yours a try
[08:33] <stellar-slack> for sure *mocha test/setup/node.js* is the wrong command to start the test
[08:33] <stellar-slack> try: *mocha test/setup/node.js test/unit/operation_test.js*
[08:34] <stellar-slack> same error seen
[08:34] <stellar-slack> *sudo npm install* ?
[08:35] <stellar-slack> sudo npm install of mocha? yes
[08:36] <stellar-slack> and *sudo npm install* ?
[08:36] <stellar-slack> you want me to try that $sudo npm install; on the command line?
[08:37] <stellar-slack> yes
[08:38] <stellar-slack> it's downloading tons of stuf
[08:39] <stellar-slack> after that install now it passed the first mocha test/setup/node.js
[08:59] <stellar-slack> 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
[09:56] <stellar-slack> @fredolafritte: what do I point the require("stellar-base") when I use your github version?
[10:19] <stellar-slack> Try the command gulp build to build the library
[10:19] <stellar-slack> never mind I figured it out as you have to run the setup node.js in the same sesion then run the next
[10:21] <stellar-slack> oh no that's not even required just mocha ./create_key_test.js works
[10:22] <stellar-slack> with nodejs ./create_key_test.js it has the import problem
[10:31] <stellar-slack> @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
[10:41] <stellar-slack> 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
[10:43] <stellar-slack> IC but I didn't think my stellar-core was listening on port 8000 but maybe it was
[10:44] <stellar-slack> go-horizon is listening on 8000, not stellar-core
[10:44] <stellar-slack> now it's running but your tests are failing sounding like it fails to reach my core
[10:44] <stellar-slack> change the url back to *https://horizon-testnet.stellar.org*
[10:44] <stellar-slack> oh ok, so it should fail on my side as I don't have horizon running on my side on localhost
[10:45] <stellar-slack> ok I'll try that
[10:47] <stellar-slack> now I get 4 passing (35s) 1 pending 13 failing
[10:48] <stellar-slack> these tests are not fully working at the first pass
[10:48] <stellar-slack> I don't understand how I could have posibly got 14 passing on my first run without a running localhorizon
[10:50] <stellar-slack> same results on another run
[10:50] <stellar-slack> which url is set ?
[10:51] <stellar-slack> I now have it set to https://horizon-testnet.stellar.org
[10:51] <stellar-slack> want the full results ?
[10:52] <stellar-slack> 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
[10:53] <stellar-slack> ok well at least I learned something thanks
[10:56] <stellar-slack> 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
[10:56] <stellar-slack> not a 500
[10:58] <stellar-slack> wild guess is that they are still using base58 and not base32
[10:58] <stellar-slack> that's ok I don't need horizon yet. hopefully I'll get the trustlines working on ruby with my localhosted -core
[10:59] <stellar-slack> and as it doesn't look to require much resources maybe I'll just finalize that everyone has a running core
[11:02] <stellar-slack> maybe 10,000 poker players all running stellar-core will just strengthen the network ha ha
[11:03] <stellar-slack> @sacarlson: what advantagesdoes one get by running the core?
[11:03] <stellar-slack> you can still access all the end points cant you?
[11:03] <stellar-slack> well at this point you get stability as they reset the stellar-core almost every 4 - 10 days
[11:03] <stellar-slack> :)
[11:04] <stellar-slack> I am asking more long term
[11:04] <stellar-slack> you must be able to hit the main net anyways
[11:04] <stellar-slack> sure as far as I know there is nothing you can't do with horizon that you can do with a local stellar-core
[11:05] <stellar-slack> if it worked
[11:06] <stellar-slack> 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
[11:07] <stellar-slack> I see the files are already about 300megs for db, maybe they get biger over time
[11:08] <stellar-slack> I had the same issue with Ripple
[11:08] <stellar-slack> the DB was increasing at alarming levels
[11:08] <stellar-slack> so gave it up
[11:08] <stellar-slack> 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
[11:09] <stellar-slack> oh ok good to know about the DB size expectations
[11:14] <stellar-slack> Need to ask scott if we can trunc the size in any ways
[11:14] <stellar-slack> I just looked again and it's the log that's now 500megs the db is only 25meg
[11:15] <stellar-slack> :)
[11:15] <stellar-slack> not sure I really have to have the log or not
[11:15] <stellar-slack> thats one big log
[11:15] <stellar-slack> it's been running for a few days now
[11:24] <stellar-slack> 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");
[11:28] <stellar-slack> which file ?
[11:29] <stellar-slack> this one I was doing basic sanity test with https://stellar-public.slack.com/files/sacarlson/F08TSFSLW/create_key_test.js
[15:41] <stellar-slack> @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
[15:41] <stellar-slack> some point in the future, but I’m also open to outside contribution.
[21:26] <stellar-slack> 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.
[21:26] <stellar-slack> 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.
[21:28] <stellar-slack> (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)
[22:17] <stellar-slack> @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.
[22:22] <stellar-slack> testnet is currently offline. apologies, config changes were worse than anticipated. currently working on it.
[22:28] <stellar-slack> "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
[22:28] <stellar-slack> etc. Open it up as an issue on go-horizon that the community can form a discussion around
[22:30] <stellar-slack> 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.
[23:14] <stellar-slack> testnet is back online but as I mentioned earlier, the port number has changed. p2p is 11625 and http is 11626.
About StellarVerse IRC Logger
StellarValue IRC Logger
is part of