Coder Social home page Coder Social logo

buttercoin's Introduction

This project is deprecated— we encourage you to fork it and continue the work

Buttercoin

An Open Source Bitcoin Exchange

Copyright © 2013 Buttercoin Developers

What is Buttercoin?

Following the events of April 2013 in which Bitcoin value dropped dramatically as a result of the short comings of existing exchanges it was decided that there should be a community driven and open source exchange. As such Buttercoin was born out of neccesity for this. Buttercoin allows the decentralisation of exchange between Bitcoin and other currencies.

License

Buttercoin is released under the terms of the MIT license. See LICENCE for more information or see http://opensource.org/licenses/MIT.

Development process

Developers work in their own trees, then submit pull requests when they are sure their feature or bug fix is ready.

The patch will be accepted if there is broad consensus that it is a good thing. Developers should expect to rework and resubmit patches if the code doesn't match the project's coding conventions or are controversial.

The master branch is regularly built and tested, but is not guaranteed to be completely stable.

This is an open project and all are encouraged to contribute.

Testing

Automated Testing

Developers are strongly encouraged to write unit tests for new code, and to submit new unit tests for old code.

Unit tests for the core code are in test/.

Discussion

Build Status

buttercoin's People

Contributors

aantonop avatar alainmeier avatar blackavar avatar davispuh avatar electblake avatar enki avatar kevin-buttercoin avatar marak avatar mks-m avatar pghalliday avatar qubey avatar revcbh avatar roboteddy avatar veox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

buttercoin's Issues

bin/dev-standalone fails - Windows

The dev-standalone script runs the api before the engine is ready to accept connections.

If possible, wait for the engine to be ready. Otherwise, implement a hard timeout.

Seems like this is actually due to windows, which doesn't like to bind '0.0.0.0'

Buttercoin Couldn't Deply on Debian 7.3 (wheezy) 32 bit: Worth looking at the code?

Hello,
I have tried to deploy Buttercoin on Debian and starting from npm test, I am seeing the following issues. What I would like to know is whether it is worth the time to look at the code myself and try to figure it out. (I have very little experience with node.js).
There is nothing on localhost:3000. I tried localhost:3001, localhost:3002, localhost:6151 and 6152 which has the sign "not implemented".
Thanks a lot!
Zarni

[email protected] test /root/buttercoin
sh test.sh
/root/buttercoin/test/test_helper.coffee:1
xports, require, module, __filename, __dirname) { global.chai = require 'chai'
^^^^^^
SyntaxError: Unexpected string
at Module.compile (module.js:439:25)
at Object.Module.extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module.load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at files (/root/buttercoin/nodemodules/mocha/bin/mocha:271:3)
at Array.forEach (native)
at Object. (/root/buttercoin/nodemodules/mocha/bin/mocha:270:10)
at Module.compile (module.js:456:26)
at Object.Module.extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module.load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3

buttercoin doesn't build on ubuntu

Hi, I am trying to start a buttecoin instance on an Ubuntu 12.04 LTS system. However I'm getting this error when I try to do that:

[email protected] install /home/nranjan/buttercoin/node_modules/buttercoin-engine/node_modules/bignum
node-gyp configure build

sh: 1: node-gyp: not found
npm ERR! error installing [email protected]
npm ERR! error installing [email protected]

npm ERR! [email protected] install: node-gyp configure build
npm ERR! sh "-c" "node-gyp configure build" failed with 127
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the bignum package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls bignum
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 3.2.0-32-generic-pae
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /home/nranjan/buttercoin
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] install: node-gyp configure build
npm ERR! message sh "-c" "node-gyp configure build" failed with 127
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/nranjan/buttercoin/npm-debug.log
npm not ok

Removal of entire development team

As a previous member of this development project who was removed without any prior notice. I would love to see an explanation as to why we were all removed.

That coupled with the 23.01259287 BTC currently being held for this project. Which amounts to $ 13,692.49 which I can only see as being stolen by the remaining single developer.

Whilst the money is not an issue, it was designed to pay back the developers for their time and effort. However no remuneration was ever made to developers kicked from the project without any notice.

An explanation would be nice.

Build for ubuntu 13.10

It looks like a working build of buttercoin for ubuntu 13.10 should be available, but I'm getting the same errors as everyone else:

[email protected] start /home/ubuntu/buttercoin
bin/dev-standalone

npm ERR! [email protected] start: bin/dev-standalone
npm ERR! sh "-c" "bin/dev-standalone" failed with 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is most likely a problem with the buttercoin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bin/dev-standalone
npm ERR! You can get their info via:
npm ERR! npm owner ls buttercoin
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.0-12-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! cwd /home/ubuntu/buttercoin
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

Can anyone please help to resolve this?

Thank you!

Travis Hooks

I tried to get this raised on IRC, but was met with some hostility.

We have a series of unit tests in tests with a shell script test.sh to execute these.

There is a YAML file called .travis.yml which will tell Travis CI how to execute these tests.

Git repo admin needs to login to Travis and enable the testing for this repo.

This will run all the tests again any commits, pulls, branches, etc.

If this could get actioned, it would be appreciated.

Unit Tests Fail After Pull Merged

This pull was merged whilst I was checking the test changes. The tests however fail, and this was committed to master. It either needs to be rolled back or amended to fix.

Api
◦ should initialize: ✓ should initialize
◦ should start and provide a WS server: info: Buttercoin api server started on ws://0.0.0.0:3022
called api callback
✓ should start and provide a WS server
Market
◦ should initialize with a buy book and a sell book: ✓ should initialize with a buy book and a sell book
info: api server receiving incoming wss connection from localhost:3022
Currency
◦ should initialize with an empty balance: ✓ should initialize with an empty balance
◦ should be possible to cumulatively add to the balance: ✓ should be possible to cumulatively add to the balance
DataStore
◦ should initialize with a balance sheet and supermarket: ✓ should initialize with a balance sheet and supermarket
#add_order
◦ should ?: ✓ should ?
#add_deposit
◦ should create accounts as needed, apply deposit and return the new balance of the account: ✓ should create accounts as needed, apply deposit and return the new balance of the account
BalanceSheet
◦ should initialize with no accounts: ✓ should initialize with no accounts
◦ should add new account instances as they are requested if and only if they dont already exist: ✓ should add new account instances as they are requested if and only if they dont already exist
Account
◦ should initialize with no currencies: ✓ should initialize with no currencies
◦ should add new currency instances as they are requested if and only if they dont already exist: ✓ should add new currency instances as they are requested if and only if they dont already exist
SuperMarket
◦ should initialize with no markets: ✓ should initialize with no markets
◦ should add new market instances as they are requested if and only if they dont already exist: ✓ should add new market instances as they are requested if and only if they dont already exist
Front
◦ should initialize: ✓ should initialize
◦ should start a WSS: ✓ should start a WSS (197ms)
info: Buttercoin front-end server started on http://0.0.0.0:3020
warn: front attempting to log in to ws://localhost:3021
◦ should connect to the API: ✓ should connect to the API
TradeEngine
◦ can initialize: Stub got a connection
info: front connected to ws://localhost:3021
LOG DOES NOT EXIST

  1. can initialize
    INITIALIZING LOG
    ✖ 1 of 18 tests failed:
  2. TradeEngine can initialize:
    Error: socket hang up
    at createHangUpError (http.js:1373:15)
    at Socket.socketOnEnd as onend
    at TCP.onread (net.js:419:26)
    npm ERR! Test failed. See above for more details.
    npm ERR! not ok code 0
    The command "npm test" exited with 1.
    Done. Your build exited with 1.

Host Project Pages in New, Seperate Repo

The gh-pages branch should be moved to a new repo called buttercoin.github.io

This is advantageous as it will keep the main repo clean, commit logs clean, and will give us a cleaner URL to send people to.

buttercoin doesn't build on ubuntu

I fixed issue in 54 by updating node using n.
I am building buttercoin on ubuntu linux; this is the error that I am getting now,

module.js:340
throw err;
^
Error: Cannot find module 'graceful-fs'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/share/npm/lib/utils/ini.js:32:10)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

I looked around and was wondering is this is relevant http://stackoverflow.com/questions/16600209/require-cannot-find-custom-module-after-moving-to-server

Has the team actually ever tried building buttercoin on ubuntu system?

Datastore uses boolean truthyness test on values retrieved from object

The following places a value obtained from a data store object by user supplied key is subjected to a boolean truthyness test.

The key can be "Joe", "123", "MickeyMouseDollar" or "constructor", "hasOwnProperty" etc.

>>> a = {}
Object {}
>>> !a['Joe']
true
>>> !a['constructor']
false
>>> !a['hasOwnProperty']
false

The same result would ensue by comparisions against undefined, void 0, etc. I would suggest using instanceof.

>>> MyObj = function(){}
function (){}
>>> a['Joe'] instanceof MyObj
false
>>> a['constructor'] instanceof MyObj
false
>>> a['hasOwnProperty'] instanceof MyObj
false
>>> a['MickeyMouse'] = new MyObj()
MyObj {}
>>> a['MickeyMouse'] instanceof MyObj
true

Leverage bindler for plugin management

Thoughts? Happy to submit a PR if you'd be willing to consider it.

https://github.com/fgrehm/bindler

EDIT:
I might also suggest moving Vagrant-related files into a "development" or "vagrant" folder, as they might start cluttering the root. Specifically, if bindler was ok by you, I was next thinking about submitting a PR to implement a simple provision.rb standalone recipe (using vagrant-chef-apply for automating a few more things from VAGRANT.md (like npm install and a .bashrc snippet to auto cd into appropriate directory when vagrant sshing). It'd just be simple helper stuff, but happy to do it. But yeah, that would be another PR/discussion. Just asking about a new subdir for this one :)

Bithub for Disembursement of Donations

Seeing how there have been next to no commits to this project for the past year, coupled with the project holding 23.01259287 BTC (~$14,330 atm), and @RevCBH asking for a disbursement scheme better than having donators prove ownership of sending addresses, i say use Bithub.

Afaik, the project seems dead, but this will allow us to put the donations up the way they were intended.

buttercoin can't run in ubuntu 13.10 .After npm start ,I cant see "info: Buttercoin front-end server started on http://localhost:3000"

@ubuntu:~/buttercoin$ npm start

[email protected] start /home/amo/buttercoin
bin/dev-standalone

03:10:09.136 - INFO - ProcessingChainEntrance - Starting PCE
03:10:09.164 - INFO - ProcessingChainEntrance - Bumping serial to: 0
03:10:09.181 - INFO - ProcessingChainEntrance - FORWARDING 5
03:10:09.185 - INFO - ProcessingChainEntrance - INITIALIZED/REPLAYED LOG
03:10:09.191 - INFO - WebsocketListener - LISTENING
03:10:09.201 - INFO - ProcessingChainEntrance - Starting PCE
03:10:09.209 - INFO - ProcessingChainEntrance - PCE LOADING SNAPSHOT
03:10:09.210 - INFO - ProcessingChainEntrance - PCE LOADED SNAPSHOT. EXPECTING SERIAL 1
03:10:09.211 - INFO - ProcessingChainEntrance - INITIALIZED/REPLAYED LOG
03:10:09.212 - INFO - EngineWebsocketSlave - CONNECT UPSTREAM
03:10:09.214 - INFO - SlaveProtocol - STARTING PROTOCOL
03:10:09.215 - INFO - Initiator - Connection #0 - STARTING TO CONNECT: ws://localhost:6150
03:10:09.261 - INFO - WebsocketListener - Connection #1 - handle_open
03:10:09.263 - INFO - EngineProtocol - STARTING PROTOCOL
03:10:09.266 - INFO - Initiator - Connection #0 - handle_open
03:10:09.267 - INFO - EngineWebsocketSlave - CONNECTED
03:10:09.268 - INFO - Initiator - Connection #0 - ONCEOPEN
03:10:09.278 - INFO - EngineProtocol - TAKING PCE SNAPSHOT
03:10:09.281 - INFO - EngineProtocol - SNAPSHOT DONE
1
03:10:09.285 - INFO - SlaveProtocol - SLAVE GOT SNAPSHOT_RESULT
03:10:09.286 - INFO - EngineWebsocketSlave - SLAVE GOT SNAPSHOT
03:10:09.286 - INFO - ProcessingChainEntrance - PCE LOADING SNAPSHOT
03:10:09.287 - INFO - ProcessingChainEntrance - PCE LOADED SNAPSHOT. EXPECTING SERIAL 1
03:10:09.287 - INFO - ProcessingChainEntrance - PCE DUMPING SNAPSHOT
03:10:09.300 - INFO - ProcessingChainEntrance - DONE DUMPING SNAPSHOT
03:10:09.301 - INFO - EngineWebsocketSlave - SLAVE INITIALIZING DOWNSTREAM LISTENER
03:10:09.301 - INFO - WebsocketListener - LISTENING
03:10:09.312 - INFO - EngineWebsocketSlave - QUERY SERVER LISTENING { port: 6151 }
03:10:09.321 - INFO - EngineWebsocketSlave - SLAVE BOOT COMPLETE

engine coffee transaction log

I noticed the incoming messages first get JSON.parsed @socket.on 'message' and then passed to engine.receive_message. Wherein it gets JSON.stringified.

  • Transaction log is a misleading name. Wouldn't the term disruptionLog be more accurate?
  • Shouldn't the disruptionLog be built by a separate process so that the process running the Engine has one less task to do. The disruptor process/service would be tasked to build the disruptorLog, then check the validity of the disruption and then forward the message to the transaction engine. This can then serve as a means to keep the transaction engine discoupled from the internet.
  • The engine should then send it's output to the output disruptor. The output disrupt would then build the transaction log. This can be called the transaction log because it actually is the log of performed transactions.

Not working on FreeBSD

Hi Guys,

I know it is a long shot but I have tried running Buttercoin on FreeBSD. If you expect that it should work can you please have a look at the logs below?

bsd# sh ./test.sh

0 tests complete (4 ms)

done

bsd# npm start

[email protected] start /usr/home/ghostcorps/buttercoin-master
bin/dev-standalone

Error: Cannot find module '../lib/buttercoin'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/home/ghostcorps/buttercoin-master/bin/dev-standalone:6:1, :4:16)
at Object. (/usr/home/ghostcorps/buttercoin-master/bin/dev-standalone:14:4)
at Module._compile (module.js:456:26)

npm ERR! [email protected] start: bin/dev-standalone
npm ERR! sh "-c" "bin/dev-standalone" failed with 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is most likely a problem with the buttercoin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bin/dev-standalone
npm ERR! You can get their info via:
npm ERR! npm owner ls buttercoin
npm ERR! There is likely additional logging output above.

npm ERR! System FreeBSD 8.3-RELEASE-p3
npm ERR! command "node" "/usr/local/bin/npm" "start"
npm ERR! cwd /usr/home/ghostcorps/buttercoin-master
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/home/ghostcorps/buttercoin-master/npm-debug.log
npm ERR! not ok code 0

I am not a programmer but if you are interested in getting it going in FreeBSD I would be glad to help however I can :)

How to run application?

When i type npm run gives the following:

bin/dev-standalone

17:57:28.331 - INFO - ProcessingChainEntrance - Starting PCE
17:57:28.353 - INFO - ProcessingChainEntrance - INITIALIZED/REPLAYED LOG
17:57:28.354 - INFO - WebsocketListener - LISTENING
17:57:28.371 - INFO - ProcessingChainEntrance - Starting PCE
17:57:28.388 - INFO - ProcessingChainEntrance - INITIALIZED/REPLAYED LOG
17:57:28.388 - INFO - EngineWebsocketSlave - CONNECT UPSTREAM
17:57:28.389 - INFO - SlaveProtocol - STARTING PROTOCOL
17:57:28.389 - INFO - Initiator - Connection #0 - STARTING TO CONNECT: ws://localhost:6150
17:57:28.402 - INFO - WebsocketListener - Connection #1 - handle_open
17:57:28.403 - INFO - EngineProtocol - STARTING PROTOCOL
17:57:28.404 - INFO - Initiator - Connection #0 - handle_open
17:57:28.405 - INFO - EngineWebsocketSlave - CONNECTED
17:57:28.405 - INFO - Initiator - Connection #0 - ONCEOPEN
17:57:28.408 - INFO - EngineProtocol - TAKING PCE SNAPSHOT
17:57:28.409 - INFO - EngineProtocol - SNAPSHOT DONE
1
17:57:28.410 - INFO - SlaveProtocol - SLAVE GOT SNAPSHOT_RESULT
17:57:28.410 - INFO - EngineWebsocketSlave - SLAVE GOT SNAPSHOT
17:57:28.410 - INFO - ProcessingChainEntrance - PCE LOADING SNAPSHOT
17:57:28.411 - INFO - ProcessingChainEntrance - PCE LOADED SNAPSHOT. EXPECTING SERIAL 0
17:57:28.411 - INFO - ProcessingChainEntrance - PCE DUMPING SNAPSHOT
17:57:28.412 - INFO - ProcessingChainEntrance - DONE DUMPING SNAPSHOT
17:57:28.413 - INFO - EngineWebsocketSlave - SLAVE INITIALIZING DOWNSTREAM LISTENER
17:57:28.413 - INFO - WebsocketListener - LISTENING
17:57:28.413 - INFO - EngineWebsocketSlave - QUERY SERVER LISTENING { port: 6151 }
17:57:28.415 - INFO - EngineWebsocketSlave - SLAVE BOOT COMPLETE

When i open localhost:6150 gives "Not implemented", how do i run the application?

Front session middleware error

Steps to reproduce:

  1. run ./start.sh
  2. visit http://localhost:3000

I don't have any cookies. Commenting out app.use(express.session({ store: store, secret: secret, key: 'sid' })) stops the exception from happening.

› killall -9 node; ./start.sh                                                                                                                     1
No matching processes belonging to you were found
engine: Buttercoin trading engine started
info: Buttercoin api server started on ws://0.0.0.0:3001
SockJS v0.3.5 bound to "/sock"
info: Buttercoin front-end server started on http://0.0.0.0:3000
GET /sock/info 1ms 200
GET /sock/657/8qjh2rk6/websocket 0ms (unfinished)
warn: front attempting to log in to ws://localhost:3001
info: api server receiving incoming wss connection from localhost:3001
info: front connected to ws://localhost:3001
info: front 24654 received message: i am api server 24653
info: api server 24653 received message: i am front-end 24654
TypeError: Cannot read property 'sid' of undefined
    at Object.session [as handle] (/Users/ted/Projects/buttercoin/node_modules/connect/lib/middleware/session.js:238:32)
    at next (/Users/ted/Projects/buttercoin/node_modules/connect/lib/proto.js:190:15)
    at resume (/Users/ted/Projects/buttercoin/node_modules/connect/lib/middleware/static.js:60:7)
    at SendStream.error (/Users/ted/Projects/buttercoin/node_modules/connect/lib/middleware/static.js:73:37)
    at SendStream.EventEmitter.emit (events.js:126:20)
    at SendStream.error (/Users/ted/Projects/buttercoin/node_modules/connect/node_modules/send/lib/send.js:147:51)
    at SendStream.onStatError (/Users/ted/Projects/buttercoin/node_modules/connect/node_modules/send/lib/send.js:248:48)
    at SendStream.pipe (/Users/ted/Projects/buttercoin/node_modules/connect/node_modules/send/lib/send.js:320:26)
    at Object.oncomplete (fs.js:297:15)

Error "Not implemented"

Hi I have installed buttercoin using the github docs on Mac os x, Ubuntu and using the Vagrant vm.

Here is the out put from Mac os x 10.8.4:

sudo npm test

[email protected] test /Users/test/project/buttercoin
sh test.sh

EWS
◦ should listen and be connectable: STARTING
13:06:07.199 - INFO - ProcessingChainEntrance - Starting PCE
13:06:07.205 - INFO - ProcessingChainEntrance - Bumping serial to: 0
13:06:07.207 - INFO - ProcessingChainEntrance - Bumping serial to: 1
13:06:07.208 - INFO - ProcessingChainEntrance - Bumping serial to: 2
13:06:07.208 - INFO - ProcessingChainEntrance - Bumping serial to: 3
13:06:07.208 - INFO - ProcessingChainEntrance - Bumping serial to: 4
13:06:07.208 - INFO - ProcessingChainEntrance - Bumping serial to: 5
13:06:07.209 - INFO - ProcessingChainEntrance - Bumping serial to: 6
13:06:07.209 - INFO - ProcessingChainEntrance - Bumping serial to: 7
13:06:07.209 - INFO - ProcessingChainEntrance - Bumping serial to: 8
13:06:07.210 - INFO - ProcessingChainEntrance - FORWARDING 5
13:06:07.210 - INFO - ProcessingChainEntrance - FORWARDING 10
13:06:07.210 - INFO - ProcessingChainEntrance - FORWARDING 15
13:06:07.210 - INFO - ProcessingChainEntrance - FORWARDING 20
13:06:07.210 - INFO - ProcessingChainEntrance - FORWARDING 25
13:06:07.210 - INFO - ProcessingChainEntrance - FORWARDING 30
13:06:07.211 - INFO - ProcessingChainEntrance - FORWARDING 35
13:06:07.211 - INFO - ProcessingChainEntrance - FORWARDING 40
13:06:07.211 - INFO - ProcessingChainEntrance - FORWARDING 45
13:06:07.212 - INFO - ProcessingChainEntrance - INITIALIZED/REPLAYED LOG
13:06:07.212 - INFO - WebsocketListener - LISTENING
13:06:07.216 - INFO - started
13:06:07.216 - INFO - InitiatorProtocol - STARTING PROTOCOL
13:06:07.217 - INFO - Initiator - Connection #0 - STARTING TO CONNECT: ws://localhost:6150/
13:06:07.229 - INFO - WebsocketListener - Connection #1 - handle_open
13:06:07.230 - INFO - EngineProtocol - STARTING PROTOCOL
13:06:07.233 - INFO - Initiator - Connection #0 - handle_open
13:06:07.234 - INFO - Initiator - Connection #0 - ONCEOPEN
13:06:07.238 - INFO - ProcessingChainEntrance - Bumping serial to: 9
13:06:07.239 - INFO - ProcessingChainEntrance - FORWARDING 50
13:06:07.239 - INFO - EngineProtocol - PCE COMPLETED { operation:
{ kind: 'ADD_DEPOSIT',
account: 'peter',
amount: '5',
currency: 'BTC',
opid: '0m81rok19t9fj00z7ahcq1jepznm',
serial: 9 },
retval: '50' }
1
13:06:07.242 - INFO - GOT RETVAL { operation:
{ kind: 'ADD_DEPOSIT',
account: 'peter',
amount: '5',
currency: 'BTC',
opid: '0m81rok19t9fj00z7ahcq1jepznm',
serial: 9 },
retval: '50' }
✓ should listen and be connectable
CLEANING UP
13:06:07.244 - INFO - EngineWebsocketServer - SHUTTING DOWN
13:06:07.244 - INFO - EngineWebsocketServer - LISTENER CLOSED
13:06:07.245 - INFO - WebsocketListener - Connection #1 - CLOSING
13:06:07.245 - INFO - WebsocketListener - Connection #1 - Connection Closed
13:06:07.246 - INFO - EngineProtocol - PROTOCOL CLOSED
13:06:07.246 - INFO - EngineWebsocketServer - ALL CONNS CLOSED
13:06:07.247 - INFO - Initiator - Connection #0 - Connection Closed
13:06:07.248 - INFO - InitiatorProtocol - PROTOCOL CLOSED
13:06:07.248 - WARN - InitiatorProtocol - Connection Lost Not Implemented
13:06:07.248 - INFO - Initiator - Connection #0 - ONCECLOSE
- should replicate

1 passing (57 ms)
1 pending

done

sudo npm start

[email protected] start /Users/test/project/buttercoin
bin/dev-standalone

13:07:48.155 - INFO - ProcessingChainEntrance - Starting PCE
13:07:48.167 - INFO - ProcessingChainEntrance - Bumping serial to: 0
13:07:48.170 - INFO - ProcessingChainEntrance - Bumping serial to: 1
13:07:48.171 - INFO - ProcessingChainEntrance - Bumping serial to: 2
13:07:48.171 - INFO - ProcessingChainEntrance - Bumping serial to: 3
13:07:48.171 - INFO - ProcessingChainEntrance - Bumping serial to: 4
13:07:48.172 - INFO - ProcessingChainEntrance - Bumping serial to: 5
13:07:48.172 - INFO - ProcessingChainEntrance - Bumping serial to: 6
13:07:48.172 - INFO - ProcessingChainEntrance - Bumping serial to: 7
13:07:48.172 - INFO - ProcessingChainEntrance - Bumping serial to: 8
13:07:48.173 - INFO - ProcessingChainEntrance - Bumping serial to: 9
13:07:48.173 - INFO - ProcessingChainEntrance - FORWARDING 5
13:07:48.174 - INFO - ProcessingChainEntrance - FORWARDING 10
13:07:48.174 - INFO - ProcessingChainEntrance - FORWARDING 15
13:07:48.174 - INFO - ProcessingChainEntrance - FORWARDING 20
13:07:48.174 - INFO - ProcessingChainEntrance - FORWARDING 25
13:07:48.174 - INFO - ProcessingChainEntrance - FORWARDING 30
13:07:48.174 - INFO - ProcessingChainEntrance - FORWARDING 35
13:07:48.174 - INFO - ProcessingChainEntrance - FORWARDING 40
13:07:48.175 - INFO - ProcessingChainEntrance - FORWARDING 45
13:07:48.175 - INFO - ProcessingChainEntrance - FORWARDING 50
13:07:48.176 - INFO - ProcessingChainEntrance - INITIALIZED/REPLAYED LOG
13:07:48.177 - INFO - WebsocketListener - LISTENING
13:07:48.180 - INFO - ProcessingChainEntrance - Starting PCE
13:07:48.183 - INFO - ProcessingChainEntrance - PCE LOADING SNAPSHOT
13:07:48.183 - INFO - ProcessingChainEntrance - PCE LOADED SNAPSHOT. EXPECTING SERIAL 8
13:07:48.184 - INFO - ProcessingChainEntrance - INITIALIZED/REPLAYED LOG
13:07:48.184 - INFO - EngineWebsocketSlave - CONNECT UPSTREAM
13:07:48.185 - INFO - SlaveProtocol - STARTING PROTOCOL
13:07:48.186 - INFO - Initiator - Connection #0 - STARTING TO CONNECT: ws://localhost:6150
13:07:48.205 - INFO - WebsocketListener - Connection #1 - handle_open
13:07:48.207 - INFO - EngineProtocol - STARTING PROTOCOL
13:07:48.209 - INFO - Initiator - Connection #0 - handle_open
13:07:48.210 - INFO - EngineWebsocketSlave - CONNECTED
13:07:48.210 - INFO - Initiator - Connection #0 - ONCEOPEN
13:07:48.214 - INFO - EngineProtocol - TAKING PCE SNAPSHOT
13:07:48.215 - INFO - EngineProtocol - SNAPSHOT DONE
1
13:07:48.217 - INFO - SlaveProtocol - SLAVE GOT SNAPSHOT_RESULT
13:07:48.218 - INFO - EngineWebsocketSlave - SLAVE GOT SNAPSHOT
13:07:48.218 - INFO - ProcessingChainEntrance - PCE LOADING SNAPSHOT
13:07:48.218 - INFO - ProcessingChainEntrance - PCE LOADED SNAPSHOT. EXPECTING SERIAL 10
13:07:48.218 - INFO - ProcessingChainEntrance - PCE DUMPING SNAPSHOT
13:07:48.219 - INFO - ProcessingChainEntrance - DONE DUMPING SNAPSHOT
13:07:48.220 - INFO - EngineWebsocketSlave - SLAVE INITIALIZING DOWNSTREAM LISTENER
13:07:48.220 - INFO - WebsocketListener - LISTENING
13:07:48.221 - INFO - EngineWebsocketSlave - QUERY SERVER LISTENING { port: 6151 }
13:07:48.222 - INFO - EngineWebsocketSlave - SLAVE BOOT COMPLETE

The Nodejs version is:
node -v
v0.10.13

from the above output nothing is listening on the port 3000 which I have verifyed using telnet and when I navigate to ports 6151 and 6150 the message "Not implemented" appears. Am I missing something? Any help is much appreciated.

Please advise.

Thanks for this great project!

Split buttercoin actors into separate github projects

At some point in the future each actor ( api, engine, front ) could be split into separate github projects.

When the time comes where a problem arises with having all the actors in one project, we'll split them up.

authentication?

We could start with existing, simple authentication for Node such as passport. If this is fine, then I can work on a pull with auth tests.

Use of objects as hashmaps without hasOwnProperty guard

Datastore uses objects as hashmaps:

Use of these then happens by accessing the hashmap to store or retrieve a value by key:

Some of the keys might be user supplied, and can be things such as "Joe", "1234" or "toString", "constructor" etc.

So before setting a property on an object from user supplied values, you will have to check with hasOwnProperty if that property is available. However this presents a problem, since the key could also be "hasOwnProperty"

>>> a = {}
Object {}
>>> a.hasOwnProperty('hasOwnProperty')
false
>>> a['hasOwnProperty'] = 'asdf'
"asdf"
>>> a.hasOwnProperty('hasOwnProperty')
TypeError: Property 'hasOwnProperty' of object #<Object> is not a function

Read more about this issue there: http://www.devthought.com/2012/01/18/an-object-is-not-a-hash/

Doesn't run on OSX 10.8.4

Running npm start gives the following output:

10:15:15.395 - INFO - ProcessingChainEntrance - Starting PCE
10:15:15.408 - INFO - ProcessingChainEntrance - Bumping serial to: 0
10:15:15.411 - INFO - ProcessingChainEntrance - FORWARDING 5
10:15:15.412 - INFO - ProcessingChainEntrance - INITIALIZED/REPLAYED LOG
10:15:15.413 - INFO - WebsocketListener - LISTENING
10:15:15.416 - INFO - ProcessingChainEntrance - Starting PCE
10:15:15.419 - INFO - ProcessingChainEntrance - PCE LOADING SNAPSHOT
10:15:15.419 - INFO - ProcessingChainEntrance - PCE LOADED SNAPSHOT. EXPECTING SERIAL 1
10:15:15.419 - INFO - ProcessingChainEntrance - INITIALIZED/REPLAYED LOG
10:15:15.420 - INFO - EngineWebsocketSlave - CONNECT UPSTREAM
10:15:15.421 - INFO - SlaveProtocol - STARTING PROTOCOL
10:15:15.421 - INFO - Initiator - Connection #0 - STARTING TO CONNECT: ws://localhost:6150
10:15:15.437 - INFO - WebsocketListener - Connection #1 - handle_open
10:15:15.438 - INFO - EngineProtocol - STARTING PROTOCOL
10:15:15.441 - INFO - Initiator - Connection #0 - handle_open
10:15:15.442 - INFO - EngineWebsocketSlave - CONNECTED
10:15:15.442 - INFO - Initiator - Connection #0 - ONCEOPEN
10:15:15.447 - INFO - EngineProtocol - TAKING PCE SNAPSHOT
10:15:15.447 - INFO - EngineProtocol - SNAPSHOT DONE
1
10:15:15.449 - INFO - SlaveProtocol - SLAVE GOT SNAPSHOT_RESULT
10:15:15.450 - INFO - EngineWebsocketSlave - SLAVE GOT SNAPSHOT
10:15:15.450 - INFO - ProcessingChainEntrance - PCE LOADING SNAPSHOT
10:15:15.450 - INFO - ProcessingChainEntrance - PCE LOADED SNAPSHOT. EXPECTING SERIAL 1
10:15:15.450 - INFO - ProcessingChainEntrance - PCE DUMPING SNAPSHOT
10:15:15.452 - INFO - ProcessingChainEntrance - DONE DUMPING SNAPSHOT
10:15:15.452 - INFO - EngineWebsocketSlave - SLAVE INITIALIZING DOWNSTREAM LISTENER
10:15:15.453 - INFO - WebsocketListener - LISTENING
10:15:15.454 - INFO - EngineWebsocketSlave - QUERY SERVER LISTENING { port: 6151 }
10:15:15.460 - INFO - EngineWebsocketSlave - SLAVE BOOT COMPLETE

Supported NODE and NPM Versions

I currently have a hard time to find the correct NODE and NPM versions per OS.

It would be nice if this where mentioned in the docs.

Error "Not implemented" - Issue #57 resubmission

While trying to compile buttercoin in ubuntu :

npm test

sh test.sh
EWS
◦ should listen and be connectable: STARTING
10:01:25.332 - INFO - ProcessingChainEntrance - Starting PCE
10:01:25.336 - INFO - ProcessingChainEntrance - INITIALIZED/REPLAYED LOG
10:01:25.337 - INFO - WebsocketListener - LISTENING
10:01:25.341 - INFO - started
10:01:25.342 - INFO - InitiatorProtocol - STARTING PROTOCOL
10:01:25.343 - INFO - Initiator - Connection #0 - STARTING TO CONNECT: ws://localhost:6150/
10:01:25.358 - INFO - WebsocketListener - Connection #1 - handle_open
10:01:25.360 - INFO - EngineProtocol - STARTING PROTOCOL
10:01:25.362 - INFO - Initiator - Connection #0 - handle_open
10:01:25.363 - INFO - Initiator - Connection #0 - ONCEOPEN
10:01:25.367 - INFO - ProcessingChainEntrance - Bumping serial to: 0
10:01:25.369 - INFO - ProcessingChainEntrance - FORWARDING 5
10:01:25.369 - INFO - EngineProtocol - PCE COMPLETED { operation:
{ kind: 'ADD_DEPOSIT',
account: 'peter',
amount: '5',
currency: 'BTC',
opid: '1owpobo0kbd1gc0pdi4k61vyh7vw',
serial: 0 },
retval: '5' }
1
10:01:25.372 - INFO - GOT RETVAL { operation:
{ kind: 'ADD_DEPOSIT',
account: 'peter',
amount: '5',
currency: 'BTC',
opid: '1owpobo0kbd1gc0pdi4k61vyh7vw',
serial: 0 },
retval: '5' }
✓ should listen and be connectable
CLEANING UP
10:01:25.374 - INFO - EngineWebsocketServer - SHUTTING DOWN
10:01:25.375 - INFO - EngineWebsocketServer - LISTENER CLOSED
10:01:25.375 - INFO - WebsocketListener - Connection #1 - CLOSING
10:01:25.375 - INFO - WebsocketListener - Connection #1 - Connection Closed
10:01:25.376 - INFO - EngineProtocol - PROTOCOL CLOSED
10:01:25.376 - INFO - EngineWebsocketServer - ALL CONNS CLOSED
10:01:25.377 - INFO - Initiator - Connection #0 - Connection Closed
10:01:25.377 - INFO - InitiatorProtocol - PROTOCOL CLOSED
10:01:25.378 - WARN - InitiatorProtocol - Connection Lost Not Implemented
10:01:25.378 - INFO - Initiator - Connection #0 - ONCECLOSE
- should replicate
1 passing (58ms)
1 pending
done

Note "1 Pending". After this .... npm start doesn't work

10:01:41.538 - INFO - ProcessingChainEntrance - Starting PCE
10:01:41.549 - INFO - ProcessingChainEntrance - Bumping serial to: 0
10:01:41.551 - INFO - ProcessingChainEntrance - FORWARDING 5
10:01:41.553 - INFO - ProcessingChainEntrance - INITIALIZED/REPLAYED LOG
10:01:41.555 - INFO - WebsocketListener - LISTENING
10:01:41.559 - INFO - ProcessingChainEntrance - Starting PCE
10:01:41.563 - INFO - ProcessingChainEntrance - INITIALIZED/REPLAYED LOG
10:01:41.563 - INFO - EngineWebsocketSlave - CONNECT UPSTREAM
10:01:41.565 - INFO - SlaveProtocol - STARTING PROTOCOL
10:01:41.567 - INFO - Initiator - Connection #0 - STARTING TO CONNECT: ws://localhost:6150
10:01:41.584 - INFO - WebsocketListener - Connection #1 - handle_open
10:01:41.584 - INFO - EngineProtocol - STARTING PROTOCOL
10:01:41.586 - INFO - Initiator - Connection #0 - handle_open
10:01:41.586 - INFO - EngineWebsocketSlave - CONNECTED
10:01:41.586 - INFO - Initiator - Connection #0 - ONCEOPEN
10:01:41.589 - INFO - EngineProtocol - TAKING PCE SNAPSHOT
10:01:41.590 - INFO - EngineProtocol - SNAPSHOT DONE
1
10:01:41.591 - INFO - SlaveProtocol - SLAVE GOT SNAPSHOT_RESULT
10:01:41.591 - INFO - EngineWebsocketSlave - SLAVE GOT SNAPSHOT
10:01:41.591 - INFO - ProcessingChainEntrance - PCE LOADING SNAPSHOT
10:01:41.592 - INFO - ProcessingChainEntrance - PCE LOADED SNAPSHOT. EXPECTING SERIAL 1
10:01:41.592 - INFO - ProcessingChainEntrance - PCE DUMPING SNAPSHOT
10:01:41.595 - INFO - ProcessingChainEntrance - DONE DUMPING SNAPSHOT
10:01:41.595 - INFO - EngineWebsocketSlave - SLAVE INITIALIZING DOWNSTREAM LISTENER
10:01:41.596 - INFO - WebsocketListener - LISTENING
10:01:41.597 - INFO - EngineWebsocketSlave - QUERY SERVER LISTENING { port: 6151 }
10:01:41.598 - INFO - EngineWebsocketSlave - SLAVE BOOT COMPLETE

After this, nothing happens and the service is not started on any port but 6050 and 6051 are being used. Please help.

Add twitter bootstrap to front

I understand that there are bigger fish to fry, but I like having pretty/extensible UIs to work with. I've already converted index.html & /public to twitter bootstrap + handlebars. If issue gets comment(s)/approved I'll send merge req.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.