hakkane84 / decentralizer-cli Goto Github PK
View Code? Open in Web Editor NEWContracts micro-managing and unsafe hosts protection for Sia (CLI)
Home Page: https://keops.cc/decentralizer
License: GNU General Public License v3.0
Contracts micro-managing and unsafe hosts protection for Sia (CLI)
Home Page: https://keops.cc/decentralizer
License: GNU General Public License v3.0
I haven't thought about the details of this yet but it would be really cool if decentralizer was able to accept a region (such as USA) and only keep host contracts with hosts in that region. I could see this being useful for users who have region requirements (like the data must stay in the UK).
I can see a use case where you might want hosts only INSIDE the US to keep latency down. And I can see a situation where you would want hosts only OUTSIDE the US to reduce chance of data liability, etc.
Instead of hard-coding the warning at 15 hosts. It would make more sense to warn if removing more than 1/3 of the hosts, or maybe something slightly less than that.
Detecting hosting farms among contracts
timers.js:498
timer._onTimeout();
^
TypeError: Cannot read property 'length' of undefined
at siastatsProcess (/snapshot/decentralizer-cli/decentralizer.js:0:0)
at processHosts (/snapshot/decentralizer-cli/decentralizer.js:0:0)
at Timeout._onTimeout (/snapshot/decentralizer-cli/decentralizer.js:0:0)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)
If a user has 0 contracts decentralizer reports that it can't connect to Sia. Sia is working fine, but there are 0 contracts.
tbenz9@spartan1:~/dev/Decentralizer$ siac consensus
Synced: Yes
Block: 00000000000000003e3e9bfd5afc6552de4f9a4cdd9517960b2e7df82479e5a5
Height: 171947
Target: [0 0 0 0 0 0 0 0 94 113 5 180 246 255 34 127 87 84 142 152 124 42 80 136 87 48 186 61 192 94 179 160]
Difficulty: 50003089916781990517
tbenz9@spartan1:~/dev/Decentralizer$ siac version
Sia Client
Version 1.3.4
Git Revision 805b342e
Build Time Wed Sep 12 10:17:03 PDT 2018
Sia Daemon
Version 1.3.4
Git Revision 805b342e
Build Time Wed Sep 12 10:17:03 PDT 2018
tbenz9@spartan1:~/dev/Decentralizer$ node decentralizer.js scan
*** KEOPS DECENTRALIZER v0.1.0 ***
Connecting to Sia...
Geolocating hosts:
Error retrieving data from Sia. Is Sia working, synced and connected to internet? Try this script again after restarting Sia.
tbenz9@spartan1:~/dev/Decentralizer$ siac renter contracts
Active Contracts:
No active contracts.
Inactive Contracts:
No inactive contracts.
The duplicate hosts tables are hard to read. I recommend integrating a table package to format the tables nicely. Perhaps something like this: https://www.npmjs.com/package/table
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.