Giter Site home page Giter Site logo

canoed's Introduction

NOT MAINTAINED ANYMORE

Canoe is not maintained, the Canoe website with the binary downloads is not live anymore and this wallet backend is not running. The domain "getcanoe.io" will not be renewed at end of 2021. This means Canoe can no longer be used but if you used Canoe earlier you can easily import your seed to another wallet, no funds are lost. Canoe is fully Open Source and anyone could revive it, rebrand and start their own server. If anyone is interested in doing that, feel free to contact me.

regards, Göran and the rest of the developers of Canoe


Canoed

Canoed is a backend for the Canoe Nano wallet. It uses a rai_node and creates a middle layer for mediating RPC calls, holding external state, forwarding blocks over MQTT and various other things Canoe needs to be done on the server. It uses a runing rai_node, Redis, PostgreSQL and VerneMQ.

Nodejs

Canoed was first written in Nim, a modern high performance language that produces small and fast binaries by compiling via C. I love Nim, but we switched to Nodejs because there is no properly working MQTT library in Nim. The code style is fairly plain vanilla.

Running Canoed

It's the standard:

npm install
./canoed

See source code to find the default canoed.conf JSON configuration.

Adding a systemd service

This presumes you already have a rai_node.service defined according to the wiki page.

Create /etc/systemd/system/canoed.service:

[Unit]
Description=Canoed
Documentation=https://github.com/gokr/canoed
After=network.target httpd.service rai_node.service

[Service]
User=canoed
WorkingDirectory=/home/canoed
ExecStart=/home/canoed/canoed/canoed
KillMode=mixed
KillSignal=SIGTERM
Restart=always
RestartSec=2s
NoNewPrivileges=yes
StandardOutput=syslog+console
StandardError=syslog+console

[Install]
WantedBy=multi-user.target

Then enable it:

systemctl daemon-reload
systemctl enable canoed
systemctl start canoed

canoed's People

Contributors

gokr avatar nifni avatar schott12521 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

canoed's Issues

Set a default representative via the config

Setting a default representative via the backend config would be desireable to help dencetralise the network even more. Right now the default rep is hard coded in the client correct?

Banning IPs to prevent continuous work requests

It might be interesting to add some kind of IP banning to be able to ban people trying to DoS by requesting work over and over again. Maybe some fail2ban setup could also work and automatically ban clients that request too much work.

error: Error: Connection refused: Not authorized

Error when initialising the canoed

[error: Error: Connection refused: Not authorized
    at MqttClient._handleConnack (/root/canoed/node_modules/mqtt/lib/client.js:893:15)
    at MqttClient._handlePacket (/root/canoed/node_modules/mqtt/lib/client.js:329:12)
    at work (/root/canoed/node_modules/mqtt/lib/client.js:271:12)
    at Writable.writable._write (/root/canoed/node_modules/mqtt/lib/client.js:281:5)
    at doWrite (/root/canoed/node_modules/readable-stream/lib/_stream_writable.js:428:64)
    at writeOrBuffer (/root/canoed/node_modules/readable-stream/lib/_stream_writable.js:417:5)
    at Writable.write (/root/canoed/node_modules/readable-stream/lib/_stream_writable.js:334:11)
    at Socket.ondata (_stream_readable.js:693:20)
    at Socket.emit (events.js:197:13)
    at addChunk (_stream_readable.js:288:12) ](url)

Here is terminal Script

root@acvd:~/canoed# canoed
info: Connected to Postgres
info: Connecting to Redis ...
info: Http server started on port 8180
info: Connected to Redis
error: Error: Connection refused: Not authorized
    at MqttClient._handleConnack (/root/canoed/node_modules/mqtt/lib/client.js:893:15)
    at MqttClient._handlePacket (/root/canoed/node_modules/mqtt/lib/client.js:329:12)
    at work (/root/canoed/node_modules/mqtt/lib/client.js:271:12)
    at Writable.writable._write (/root/canoed/node_modules/mqtt/lib/client.js:281:5)
    at doWrite (/root/canoed/node_modules/readable-stream/lib/_stream_writable.js:428:64)
    at writeOrBuffer (/root/canoed/node_modules/readable-stream/lib/_stream_writable.js:417:5)
    at Writable.write (/root/canoed/node_modules/readable-stream/lib/_stream_writable.js:334:11)
    at Socket.ondata (_stream_readable.js:693:20)
    at Socket.emit (events.js:197:13)
    at addChunk (_stream_readable.js:288:12)
info: Calling exit...
info: Cleaning up...

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.