Skip to content

Repository files navigation

Field

Field is a Proxy for your IRI, that sends regular statistics to the Field server (http://field.deviota.com) and accepts jobs from the server's load balancer (optional).

Table of contents

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

It is expected that you have already installed Java, downloaded the IRI jar file and know how to start it. The local IRI instance must have api enabled and accepting local connections.

Field is running on Node.js You will have to install node (at least version LTS 8.9.4) and npm (node package manager) on your system. Alternatively to npm you can (and should) use yarn package manager.

Port Forwarding

If you are trying to run a Field node at home, you may need to open some ports (port forwarding) in your NAT Router, apart of the ports for your IRI:

  • TCP 21310

Please refer to your Router's manual on how to do that.

Furthermore, please be aware that apart of firewall and port-forwarding in router, your Internet provider may also be an issue. Some providers (like Vodafone in Germany) do not have enough IPv4 addresses for homes and thus use something called "IPv4 over DS Lite". In those cases the traffic will not come through over the ports mentioned above. Unfortunately, there is no quick fix for this issue (maybe changing providers). There is some hope with the upcoming PCP-protocol, this will not happen this year (2018) for most providers, though.

WARNING FOR IMAGE-BASED LINUX INSTALLATIONS

Field relies on a unique machine identification. Image-based/VPS installations usually have the same id. If you run it, your field might be blacklisted or wrongly listed on the field server. To change the ID, do the following:

# 1. Remove the existing machine ID file:
sudo rm /var/lib/dbus/machine-id
# 2. Generate a new machine id:
sudo dbus-uuidgen --ensure
# 3. Reboot to apply the new machine ID system-wide:
sudo shutdown -r now

WARNING FOR UBUNTU

Ubuntu 16.04 apt comes with an outdated Node version (4.X). You need to install the latest version separately:

https://nodejs.org/en/download/package-manager/

Installing

Globally install Field

npm install -g field.cli

And run it

field --pow --address SOZAIPJMQUBOFCTDTJJDXCZEKNIYZGIGVDLFMH9FFBAYK9SWGTBCWVUTFHXDOUESZAXRJJCJESJPIEQCCKBUTVQPOW

The --pow option allows the Field server to pass "attachToTangle" jobs to your IRI.

With the --address option you can specify an IOTA address for donations.

Below is the list of all possible options.

Upgrading

To upgrade your Field to version X.X.X, simply run:

npm install -g field.cli@x.x.x

Please check where npm installs your global packages! It happens very often that the first installed binary is put into /usr/local/bin and the updated into /usr/bin. Run field --version after the upgrade to make sure you are using the most recent one. Update your scripts and/or services to point to the right binary!

Running as a service

You can use the node process manager to run Field as a service. Just do the following:

# Install the process manager:
npm install pm2 -g
# Make pm2 start at startup:
pm2 startup
# Start the Field as service
# If you created a field config somewhere on your system, provide the path to the config:
pm2 start field -- --config /path/to/field-config.ini
# Otherwise you can just do: pm2 start field
# Save current processes runing with pm2 to startup on boot:
pm2 save
# Get Field logs:
pm2 monit
# or
pm2 log

Docker

Provided you have docker installed, Field can be started as follows:

docker run <docker opts> romansemko/field.cli <field command line opts>

Building Locally

If you are a developer you may want to build the project locally and play around with the sources. Otherwise, ignore this section. Make sure you have yarn package manager installed. Checkout the project:

git clone https://github.com/SemkoDev/field.cli.git
cd field.cli

Install dependencies:

yarn

Run tests and make binaries:

yarn make

Try to run Field:

node ./dist/field.js --pow -y

Configuration

You are free to either use command line options or an .ini file to configure Field. If you use a config file, it has precedence and all command line options are ignored.

config.ini

To use a configuration file, run Field with --config option:

field --config ./config.ini
# Alternatively, set an environment variable:
FIELD_CONFIG= ./config.ini field

You can provide one or more of the following options in your ini file. Example:

[field]
name = MyField
; Optional, which IP to bind the node on
bindAddress = 0.0.0.0
port = 21310
; If you want Field to generate a custom id, instead of using machine-id.
; This is the safest and favored way:
customFieldId = true
; You can choose which Field(s) to connect to:
fieldHostname[] = field.deviota.com:80
; It can be several Fields. Just repeat:
; fieldHostname[] = field.deviota.com:80
; fieldHostname[] = another.field.com:8080
; fieldHostname[] = mytest.field.com:5000
; IRI connection details:
IRIPort = 14265
IRIHostname = localhost
address = SOZAIPJMQUBOFCTDTJJDXCZEKNIYZGIGVDLFMH9FFBAYK9SWGTBCWVUTFHXDOUESZAXRJJCJESJPIEQCCKBUTVQPOW
; Alternatively to address, you can provide a (NEW) seed
; In this case, the Field client will be generating new, unused addresses dynamically.
; seed = XYZ
; What jobs your node should be able to accept:
; both true - only attachToTangle jobs accepted
; disableIRI false - all jobs accepted
; pow false - no jobs accepted
; both false - all jobs except attachToTangle accepted
pow = true
disableIRI = false

Command line options

Command line options are named the same as INI options. Some have additional short versions.

Options description

OptionDescriptionDefault
--nameName your node. This identifier will appear on the DevIOTA Field DashboardDeviota Field
--address, -aOptional IOTA address for donations.
--seed, -bOptional. If no donation address is provided, you can provide a seed. In that case the field client will generate new, unused addresses dynamically. WARNING! Please do not use your usual, main seed. Generate a new one for this occasion. It is easy and adds up to everyone's security.
--config, -cPath to Field configuration file.
--disableIRI, -dDo not allow jobs to be passed from the Field load balancer. Just send the statistics about my node.false
--fieldHostname, -fField Server hostname (including port) or a space-separated list of multiple Field Server hostnames.field.deviota.com:80
--iriHostname, -hHostname where your IRI instance is running.localhost
--iriPort, -iAPI port of your IRI instance.14265
--port, -pField port to be used21310
--silent, -sDo not print log messagesfalse
--pow, -wAllow attachToTangle jobs to be passed from the Field server load balancer. When disableIRI and pow are true, only PoW work will be passed to IRI.false
--customFieldId, -yIf you want Field to generate a custom id, instead of using machine-id. This is required for VPS and servers created from an image, which often have the same machine ID.false

Run PoW jobs only

If you disableIRI and set "pow" to true, your node will only pass attachToTangle jobs t IRI. The jobs will be sent, even if your IRI is not synchronized, since proof-of-work does not require a synchronized node.

Sample config:

# Disable IRI Jobs
disableIRI = true
# Except attachToTangle proof-of-work
pow = true

Contributing

Donate to the Nodes

We are currently working to add automatic donations to participating nodes based on the work done. This feature is still in progress, however you can already tip the nodes. Just go to http://field.deviota.com select a node, copy its donation address and show it some love!

Authors

License

This project is licensed under the ICS License - see the LICENSE.md file for details

About

WE HAVE MOVED TO A NEW REPOSITORY

Resources

Stars

34 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
GitHub - SemkoDev/field.cli: WE HAVE MOVED TO A NEW REPOSITORY · GitHub
Skip to content

Repository files navigation

Field

Field is a Proxy for your IRI, that sends regular statistics to the Field server (http://field.deviota.com) and accepts jobs from the server's load balancer (optional).

Table of contents

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

It is expected that you have already installed Java, downloaded the IRI jar file and know how to start it. The local IRI instance must have api enabled and accepting local connections.

Field is running on Node.js You will have to install node (at least version LTS 8.9.4) and npm (node package manager) on your system. Alternatively to npm you can (and should) use yarn package manager.

Port Forwarding

If you are trying to run a Field node at home, you may need to open some ports (port forwarding) in your NAT Router, apart of the ports for your IRI:

  • TCP 21310

Please refer to your Router's manual on how to do that.

Furthermore, please be aware that apart of firewall and port-forwarding in router, your Internet provider may also be an issue. Some providers (like Vodafone in Germany) do not have enough IPv4 addresses for homes and thus use something called "IPv4 over DS Lite". In those cases the traffic will not come through over the ports mentioned above. Unfortunately, there is no quick fix for this issue (maybe changing providers). There is some hope with the upcoming PCP-protocol, this will not happen this year (2018) for most providers, though.

WARNING FOR IMAGE-BASED LINUX INSTALLATIONS

Field relies on a unique machine identification. Image-based/VPS installations usually have the same id. If you run it, your field might be blacklisted or wrongly listed on the field server. To change the ID, do the following:

# 1. Remove the existing machine ID file:
sudo rm /var/lib/dbus/machine-id
# 2. Generate a new machine id:
sudo dbus-uuidgen --ensure
# 3. Reboot to apply the new machine ID system-wide:
sudo shutdown -r now

WARNING FOR UBUNTU

Ubuntu 16.04 apt comes with an outdated Node version (4.X). You need to install the latest version separately:

https://nodejs.org/en/download/package-manager/

Installing

Globally install Field

npm install -g field.cli

And run it

field --pow --address SOZAIPJMQUBOFCTDTJJDXCZEKNIYZGIGVDLFMH9FFBAYK9SWGTBCWVUTFHXDOUESZAXRJJCJESJPIEQCCKBUTVQPOW

The --pow option allows the Field server to pass "attachToTangle" jobs to your IRI.

With the --address option you can specify an IOTA address for donations.

Below is the list of all possible options.

Upgrading

To upgrade your Field to version X.X.X, simply run:

npm install -g field.cli@x.x.x

Please check where npm installs your global packages! It happens very often that the first installed binary is put into /usr/local/bin and the updated into /usr/bin. Run field --version after the upgrade to make sure you are using the most recent one. Update your scripts and/or services to point to the right binary!

Running as a service

You can use the node process manager to run Field as a service. Just do the following:

# Install the process manager:
npm install pm2 -g
# Make pm2 start at startup:
pm2 startup
# Start the Field as service
# If you created a field config somewhere on your system, provide the path to the config:
pm2 start field -- --config /path/to/field-config.ini
# Otherwise you can just do: pm2 start field
# Save current processes runing with pm2 to startup on boot:
pm2 save
# Get Field logs:
pm2 monit
# or
pm2 log

Docker

Provided you have docker installed, Field can be started as follows:

docker run <docker opts> romansemko/field.cli <field command line opts>

Building Locally

If you are a developer you may want to build the project locally and play around with the sources. Otherwise, ignore this section. Make sure you have yarn package manager installed. Checkout the project:

git clone https://github.com/SemkoDev/field.cli.git
cd field.cli

Install dependencies:

yarn

Run tests and make binaries:

yarn make

Try to run Field:

node ./dist/field.js --pow -y

Configuration

You are free to either use command line options or an .ini file to configure Field. If you use a config file, it has precedence and all command line options are ignored.

config.ini

To use a configuration file, run Field with --config option:

field --config ./config.ini
# Alternatively, set an environment variable:
FIELD_CONFIG= ./config.ini field

You can provide one or more of the following options in your ini file. Example:

[field]
name = MyField
; Optional, which IP to bind the node on
bindAddress = 0.0.0.0
port = 21310
; If you want Field to generate a custom id, instead of using machine-id.
; This is the safest and favored way:
customFieldId = true
; You can choose which Field(s) to connect to:
fieldHostname[] = field.deviota.com:80
; It can be several Fields. Just repeat:
; fieldHostname[] = field.deviota.com:80
; fieldHostname[] = another.field.com:8080
; fieldHostname[] = mytest.field.com:5000
; IRI connection details:
IRIPort = 14265
IRIHostname = localhost
address = SOZAIPJMQUBOFCTDTJJDXCZEKNIYZGIGVDLFMH9FFBAYK9SWGTBCWVUTFHXDOUESZAXRJJCJESJPIEQCCKBUTVQPOW
; Alternatively to address, you can provide a (NEW) seed
; In this case, the Field client will be generating new, unused addresses dynamically.
; seed = XYZ
; What jobs your node should be able to accept:
; both true - only attachToTangle jobs accepted
; disableIRI false - all jobs accepted
; pow false - no jobs accepted
; both false - all jobs except attachToTangle accepted
pow = true
disableIRI = false

Command line options

Command line options are named the same as INI options. Some have additional short versions.

Options description

OptionDescriptionDefault
--nameName your node. This identifier will appear on the DevIOTA Field DashboardDeviota Field
--address, -aOptional IOTA address for donations.
--seed, -bOptional. If no donation address is provided, you can provide a seed. In that case the field client will generate new, unused addresses dynamically. WARNING! Please do not use your usual, main seed. Generate a new one for this occasion. It is easy and adds up to everyone's security.
--config, -cPath to Field configuration file.
--disableIRI, -dDo not allow jobs to be passed from the Field load balancer. Just send the statistics about my node.false
--fieldHostname, -fField Server hostname (including port) or a space-separated list of multiple Field Server hostnames.field.deviota.com:80
--iriHostname, -hHostname where your IRI instance is running.localhost
--iriPort, -iAPI port of your IRI instance.14265
--port, -pField port to be used21310
--silent, -sDo not print log messagesfalse
--pow, -wAllow attachToTangle jobs to be passed from the Field server load balancer. When disableIRI and pow are true, only PoW work will be passed to IRI.false
--customFieldId, -yIf you want Field to generate a custom id, instead of using machine-id. This is required for VPS and servers created from an image, which often have the same machine ID.false

Run PoW jobs only

If you disableIRI and set "pow" to true, your node will only pass attachToTangle jobs t IRI. The jobs will be sent, even if your IRI is not synchronized, since proof-of-work does not require a synchronized node.

Sample config:

# Disable IRI Jobs
disableIRI = true
# Except attachToTangle proof-of-work
pow = true

Contributing

Donate to the Nodes

We are currently working to add automatic donations to participating nodes based on the work done. This feature is still in progress, however you can already tip the nodes. Just go to http://field.deviota.com select a node, copy its donation address and show it some love!

Authors

License

This project is licensed under the ICS License - see the LICENSE.md file for details

About

WE HAVE MOVED TO A NEW REPOSITORY

Resources

Stars

34 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - SemkoDev/field.cli: WE HAVE MOVED TO A NEW REPOSITORY · GitHub
Skip to content

Repository files navigation

Field

Field is a Proxy for your IRI, that sends regular statistics to the Field server (http://field.deviota.com) and accepts jobs from the server's load balancer (optional).

Table of contents

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

It is expected that you have already installed Java, downloaded the IRI jar file and know how to start it. The local IRI instance must have api enabled and accepting local connections.

Field is running on Node.js You will have to install node (at least version LTS 8.9.4) and npm (node package manager) on your system. Alternatively to npm you can (and should) use yarn package manager.

Port Forwarding

If you are trying to run a Field node at home, you may need to open some ports (port forwarding) in your NAT Router, apart of the ports for your IRI:

  • TCP 21310

Please refer to your Router's manual on how to do that.

Furthermore, please be aware that apart of firewall and port-forwarding in router, your Internet provider may also be an issue. Some providers (like Vodafone in Germany) do not have enough IPv4 addresses for homes and thus use something called "IPv4 over DS Lite". In those cases the traffic will not come through over the ports mentioned above. Unfortunately, there is no quick fix for this issue (maybe changing providers). There is some hope with the upcoming PCP-protocol, this will not happen this year (2018) for most providers, though.

WARNING FOR IMAGE-BASED LINUX INSTALLATIONS

Field relies on a unique machine identification. Image-based/VPS installations usually have the same id. If you run it, your field might be blacklisted or wrongly listed on the field server. To change the ID, do the following:

# 1. Remove the existing machine ID file:
sudo rm /var/lib/dbus/machine-id
# 2. Generate a new machine id:
sudo dbus-uuidgen --ensure
# 3. Reboot to apply the new machine ID system-wide:
sudo shutdown -r now

WARNING FOR UBUNTU

Ubuntu 16.04 apt comes with an outdated Node version (4.X). You need to install the latest version separately:

https://nodejs.org/en/download/package-manager/

Installing

Globally install Field

npm install -g field.cli

And run it

field --pow --address SOZAIPJMQUBOFCTDTJJDXCZEKNIYZGIGVDLFMH9FFBAYK9SWGTBCWVUTFHXDOUESZAXRJJCJESJPIEQCCKBUTVQPOW

The --pow option allows the Field server to pass "attachToTangle" jobs to your IRI.

With the --address option you can specify an IOTA address for donations.

Below is the list of all possible options.

Upgrading

To upgrade your Field to version X.X.X, simply run:

npm install -g field.cli@x.x.x

Please check where npm installs your global packages! It happens very often that the first installed binary is put into /usr/local/bin and the updated into /usr/bin. Run field --version after the upgrade to make sure you are using the most recent one. Update your scripts and/or services to point to the right binary!

Running as a service

You can use the node process manager to run Field as a service. Just do the following:

# Install the process manager:
npm install pm2 -g
# Make pm2 start at startup:
pm2 startup
# Start the Field as service
# If you created a field config somewhere on your system, provide the path to the config:
pm2 start field -- --config /path/to/field-config.ini
# Otherwise you can just do: pm2 start field
# Save current processes runing with pm2 to startup on boot:
pm2 save
# Get Field logs:
pm2 monit
# or
pm2 log

Docker

Provided you have docker installed, Field can be started as follows:

docker run <docker opts> romansemko/field.cli <field command line opts>

Building Locally

If you are a developer you may want to build the project locally and play around with the sources. Otherwise, ignore this section. Make sure you have yarn package manager installed. Checkout the project:

git clone https://github.com/SemkoDev/field.cli.git
cd field.cli

Install dependencies:

yarn

Run tests and make binaries:

yarn make

Try to run Field:

node ./dist/field.js --pow -y

Configuration

You are free to either use command line options or an .ini file to configure Field. If you use a config file, it has precedence and all command line options are ignored.

config.ini

To use a configuration file, run Field with --config option:

field --config ./config.ini
# Alternatively, set an environment variable:
FIELD_CONFIG= ./config.ini field

You can provide one or more of the following options in your ini file. Example:

[field]
name = MyField
; Optional, which IP to bind the node on
bindAddress = 0.0.0.0
port = 21310
; If you want Field to generate a custom id, instead of using machine-id.
; This is the safest and favored way:
customFieldId = true
; You can choose which Field(s) to connect to:
fieldHostname[] = field.deviota.com:80
; It can be several Fields. Just repeat:
; fieldHostname[] = field.deviota.com:80
; fieldHostname[] = another.field.com:8080
; fieldHostname[] = mytest.field.com:5000
; IRI connection details:
IRIPort = 14265
IRIHostname = localhost
address = SOZAIPJMQUBOFCTDTJJDXCZEKNIYZGIGVDLFMH9FFBAYK9SWGTBCWVUTFHXDOUESZAXRJJCJESJPIEQCCKBUTVQPOW
; Alternatively to address, you can provide a (NEW) seed
; In this case, the Field client will be generating new, unused addresses dynamically.
; seed = XYZ
; What jobs your node should be able to accept:
; both true - only attachToTangle jobs accepted
; disableIRI false - all jobs accepted
; pow false - no jobs accepted
; both false - all jobs except attachToTangle accepted
pow = true
disableIRI = false

Command line options

Command line options are named the same as INI options. Some have additional short versions.

Options description

OptionDescriptionDefault
--nameName your node. This identifier will appear on the DevIOTA Field DashboardDeviota Field
--address, -aOptional IOTA address for donations.
--seed, -bOptional. If no donation address is provided, you can provide a seed. In that case the field client will generate new, unused addresses dynamically. WARNING! Please do not use your usual, main seed. Generate a new one for this occasion. It is easy and adds up to everyone's security.
--config, -cPath to Field configuration file.
--disableIRI, -dDo not allow jobs to be passed from the Field load balancer. Just send the statistics about my node.false
--fieldHostname, -fField Server hostname (including port) or a space-separated list of multiple Field Server hostnames.field.deviota.com:80
--iriHostname, -hHostname where your IRI instance is running.localhost
--iriPort, -iAPI port of your IRI instance.14265
--port, -pField port to be used21310
--silent, -sDo not print log messagesfalse
--pow, -wAllow attachToTangle jobs to be passed from the Field server load balancer. When disableIRI and pow are true, only PoW work will be passed to IRI.false
--customFieldId, -yIf you want Field to generate a custom id, instead of using machine-id. This is required for VPS and servers created from an image, which often have the same machine ID.false

Run PoW jobs only

If you disableIRI and set "pow" to true, your node will only pass attachToTangle jobs t IRI. The jobs will be sent, even if your IRI is not synchronized, since proof-of-work does not require a synchronized node.

Sample config:

# Disable IRI Jobs
disableIRI = true
# Except attachToTangle proof-of-work
pow = true

Contributing

Donate to the Nodes

We are currently working to add automatic donations to participating nodes based on the work done. This feature is still in progress, however you can already tip the nodes. Just go to http://field.deviota.com select a node, copy its donation address and show it some love!

Authors

License

This project is licensed under the ICS License - see the LICENSE.md file for details

About

WE HAVE MOVED TO A NEW REPOSITORY

Resources

Stars

34 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - SemkoDev/field.cli: WE HAVE MOVED TO A NEW REPOSITORY · GitHub
Skip to content

Repository files navigation

Field

Field is a Proxy for your IRI, that sends regular statistics to the Field server (http://field.deviota.com) and accepts jobs from the server's load balancer (optional).

Table of contents

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

It is expected that you have already installed Java, downloaded the IRI jar file and know how to start it. The local IRI instance must have api enabled and accepting local connections.

Field is running on Node.js You will have to install node (at least version LTS 8.9.4) and npm (node package manager) on your system. Alternatively to npm you can (and should) use yarn package manager.

Port Forwarding

If you are trying to run a Field node at home, you may need to open some ports (port forwarding) in your NAT Router, apart of the ports for your IRI:

  • TCP 21310

Please refer to your Router's manual on how to do that.

Furthermore, please be aware that apart of firewall and port-forwarding in router, your Internet provider may also be an issue. Some providers (like Vodafone in Germany) do not have enough IPv4 addresses for homes and thus use something called "IPv4 over DS Lite". In those cases the traffic will not come through over the ports mentioned above. Unfortunately, there is no quick fix for this issue (maybe changing providers). There is some hope with the upcoming PCP-protocol, this will not happen this year (2018) for most providers, though.

WARNING FOR IMAGE-BASED LINUX INSTALLATIONS

Field relies on a unique machine identification. Image-based/VPS installations usually have the same id. If you run it, your field might be blacklisted or wrongly listed on the field server. To change the ID, do the following:

# 1. Remove the existing machine ID file:
sudo rm /var/lib/dbus/machine-id
# 2. Generate a new machine id:
sudo dbus-uuidgen --ensure
# 3. Reboot to apply the new machine ID system-wide:
sudo shutdown -r now

WARNING FOR UBUNTU

Ubuntu 16.04 apt comes with an outdated Node version (4.X). You need to install the latest version separately:

https://nodejs.org/en/download/package-manager/

Installing

Globally install Field

npm install -g field.cli

And run it

field --pow --address SOZAIPJMQUBOFCTDTJJDXCZEKNIYZGIGVDLFMH9FFBAYK9SWGTBCWVUTFHXDOUESZAXRJJCJESJPIEQCCKBUTVQPOW

The --pow option allows the Field server to pass "attachToTangle" jobs to your IRI.

With the --address option you can specify an IOTA address for donations.

Below is the list of all possible options.

Upgrading

To upgrade your Field to version X.X.X, simply run:

npm install -g field.cli@x.x.x

Please check where npm installs your global packages! It happens very often that the first installed binary is put into /usr/local/bin and the updated into /usr/bin. Run field --version after the upgrade to make sure you are using the most recent one. Update your scripts and/or services to point to the right binary!

Running as a service

You can use the node process manager to run Field as a service. Just do the following:

# Install the process manager:
npm install pm2 -g
# Make pm2 start at startup:
pm2 startup
# Start the Field as service
# If you created a field config somewhere on your system, provide the path to the config:
pm2 start field -- --config /path/to/field-config.ini
# Otherwise you can just do: pm2 start field
# Save current processes runing with pm2 to startup on boot:
pm2 save
# Get Field logs:
pm2 monit
# or
pm2 log

Docker

Provided you have docker installed, Field can be started as follows:

docker run <docker opts> romansemko/field.cli <field command line opts>

Building Locally

If you are a developer you may want to build the project locally and play around with the sources. Otherwise, ignore this section. Make sure you have yarn package manager installed. Checkout the project:

git clone https://github.com/SemkoDev/field.cli.git
cd field.cli

Install dependencies:

yarn

Run tests and make binaries:

yarn make

Try to run Field:

node ./dist/field.js --pow -y

Configuration

You are free to either use command line options or an .ini file to configure Field. If you use a config file, it has precedence and all command line options are ignored.

config.ini

To use a configuration file, run Field with --config option:

field --config ./config.ini
# Alternatively, set an environment variable:
FIELD_CONFIG= ./config.ini field

You can provide one or more of the following options in your ini file. Example:

[field]
name = MyField
; Optional, which IP to bind the node on
bindAddress = 0.0.0.0
port = 21310
; If you want Field to generate a custom id, instead of using machine-id.
; This is the safest and favored way:
customFieldId = true
; You can choose which Field(s) to connect to:
fieldHostname[] = field.deviota.com:80
; It can be several Fields. Just repeat:
; fieldHostname[] = field.deviota.com:80
; fieldHostname[] = another.field.com:8080
; fieldHostname[] = mytest.field.com:5000
; IRI connection details:
IRIPort = 14265
IRIHostname = localhost
address = SOZAIPJMQUBOFCTDTJJDXCZEKNIYZGIGVDLFMH9FFBAYK9SWGTBCWVUTFHXDOUESZAXRJJCJESJPIEQCCKBUTVQPOW
; Alternatively to address, you can provide a (NEW) seed
; In this case, the Field client will be generating new, unused addresses dynamically.
; seed = XYZ
; What jobs your node should be able to accept:
; both true - only attachToTangle jobs accepted
; disableIRI false - all jobs accepted
; pow false - no jobs accepted
; both false - all jobs except attachToTangle accepted
pow = true
disableIRI = false

Command line options

Command line options are named the same as INI options. Some have additional short versions.

Options description

OptionDescriptionDefault
--nameName your node. This identifier will appear on the DevIOTA Field DashboardDeviota Field
--address, -aOptional IOTA address for donations.
--seed, -bOptional. If no donation address is provided, you can provide a seed. In that case the field client will generate new, unused addresses dynamically. WARNING! Please do not use your usual, main seed. Generate a new one for this occasion. It is easy and adds up to everyone's security.
--config, -cPath to Field configuration file.
--disableIRI, -dDo not allow jobs to be passed from the Field load balancer. Just send the statistics about my node.false
--fieldHostname, -fField Server hostname (including port) or a space-separated list of multiple Field Server hostnames.field.deviota.com:80
--iriHostname, -hHostname where your IRI instance is running.localhost
--iriPort, -iAPI port of your IRI instance.14265
--port, -pField port to be used21310
--silent, -sDo not print log messagesfalse
--pow, -wAllow attachToTangle jobs to be passed from the Field server load balancer. When disableIRI and pow are true, only PoW work will be passed to IRI.false
--customFieldId, -yIf you want Field to generate a custom id, instead of using machine-id. This is required for VPS and servers created from an image, which often have the same machine ID.false

Run PoW jobs only

If you disableIRI and set "pow" to true, your node will only pass attachToTangle jobs t IRI. The jobs will be sent, even if your IRI is not synchronized, since proof-of-work does not require a synchronized node.

Sample config:

# Disable IRI Jobs
disableIRI = true
# Except attachToTangle proof-of-work
pow = true

Contributing

Donate to the Nodes

We are currently working to add automatic donations to participating nodes based on the work done. This feature is still in progress, however you can already tip the nodes. Just go to http://field.deviota.com select a node, copy its donation address and show it some love!

Authors

License

This project is licensed under the ICS License - see the LICENSE.md file for details

About

WE HAVE MOVED TO A NEW REPOSITORY

Resources

Stars

34 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' GitHub - SemkoDev/field.cli: WE HAVE MOVED TO A NEW REPOSITORY · GitHub
Skip to content

Repository files navigation

Field

Field is a Proxy for your IRI, that sends regular statistics to the Field server (http://field.deviota.com) and accepts jobs from the server's load balancer (optional).

Table of contents

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

It is expected that you have already installed Java, downloaded the IRI jar file and know how to start it. The local IRI instance must have api enabled and accepting local connections.

Field is running on Node.js You will have to install node (at least version LTS 8.9.4) and npm (node package manager) on your system. Alternatively to npm you can (and should) use yarn package manager.

Port Forwarding

If you are trying to run a Field node at home, you may need to open some ports (port forwarding) in your NAT Router, apart of the ports for your IRI:

  • TCP 21310

Please refer to your Router's manual on how to do that.

Furthermore, please be aware that apart of firewall and port-forwarding in router, your Internet provider may also be an issue. Some providers (like Vodafone in Germany) do not have enough IPv4 addresses for homes and thus use something called "IPv4 over DS Lite". In those cases the traffic will not come through over the ports mentioned above. Unfortunately, there is no quick fix for this issue (maybe changing providers). There is some hope with the upcoming PCP-protocol, this will not happen this year (2018) for most providers, though.

WARNING FOR IMAGE-BASED LINUX INSTALLATIONS

Field relies on a unique machine identification. Image-based/VPS installations usually have the same id. If you run it, your field might be blacklisted or wrongly listed on the field server. To change the ID, do the following:

# 1. Remove the existing machine ID file:
sudo rm /var/lib/dbus/machine-id
# 2. Generate a new machine id:
sudo dbus-uuidgen --ensure
# 3. Reboot to apply the new machine ID system-wide:
sudo shutdown -r now

WARNING FOR UBUNTU

Ubuntu 16.04 apt comes with an outdated Node version (4.X). You need to install the latest version separately:

https://nodejs.org/en/download/package-manager/

Installing

Globally install Field

npm install -g field.cli

And run it

field --pow --address SOZAIPJMQUBOFCTDTJJDXCZEKNIYZGIGVDLFMH9FFBAYK9SWGTBCWVUTFHXDOUESZAXRJJCJESJPIEQCCKBUTVQPOW

The --pow option allows the Field server to pass "attachToTangle" jobs to your IRI.

With the --address option you can specify an IOTA address for donations.

Below is the list of all possible options.

Upgrading

To upgrade your Field to version X.X.X, simply run:

npm install -g field.cli@x.x.x

Please check where npm installs your global packages! It happens very often that the first installed binary is put into /usr/local/bin and the updated into /usr/bin. Run field --version after the upgrade to make sure you are using the most recent one. Update your scripts and/or services to point to the right binary!

Running as a service

You can use the node process manager to run Field as a service. Just do the following:

# Install the process manager:
npm install pm2 -g
# Make pm2 start at startup:
pm2 startup
# Start the Field as service
# If you created a field config somewhere on your system, provide the path to the config:
pm2 start field -- --config /path/to/field-config.ini
# Otherwise you can just do: pm2 start field
# Save current processes runing with pm2 to startup on boot:
pm2 save
# Get Field logs:
pm2 monit
# or
pm2 log

Docker

Provided you have docker installed, Field can be started as follows:

docker run <docker opts> romansemko/field.cli <field command line opts>

Building Locally

If you are a developer you may want to build the project locally and play around with the sources. Otherwise, ignore this section. Make sure you have yarn package manager installed. Checkout the project:

git clone https://github.com/SemkoDev/field.cli.git
cd field.cli

Install dependencies:

yarn

Run tests and make binaries:

yarn make

Try to run Field:

node ./dist/field.js --pow -y

Configuration

You are free to either use command line options or an .ini file to configure Field. If you use a config file, it has precedence and all command line options are ignored.

config.ini

To use a configuration file, run Field with --config option:

field --config ./config.ini
# Alternatively, set an environment variable:
FIELD_CONFIG= ./config.ini field

You can provide one or more of the following options in your ini file. Example:

[field]
name = MyField
; Optional, which IP to bind the node on
bindAddress = 0.0.0.0
port = 21310
; If you want Field to generate a custom id, instead of using machine-id.
; This is the safest and favored way:
customFieldId = true
; You can choose which Field(s) to connect to:
fieldHostname[] = field.deviota.com:80
; It can be several Fields. Just repeat:
; fieldHostname[] = field.deviota.com:80
; fieldHostname[] = another.field.com:8080
; fieldHostname[] = mytest.field.com:5000
; IRI connection details:
IRIPort = 14265
IRIHostname = localhost
address = SOZAIPJMQUBOFCTDTJJDXCZEKNIYZGIGVDLFMH9FFBAYK9SWGTBCWVUTFHXDOUESZAXRJJCJESJPIEQCCKBUTVQPOW
; Alternatively to address, you can provide a (NEW) seed
; In this case, the Field client will be generating new, unused addresses dynamically.
; seed = XYZ
; What jobs your node should be able to accept:
; both true - only attachToTangle jobs accepted
; disableIRI false - all jobs accepted
; pow false - no jobs accepted
; both false - all jobs except attachToTangle accepted
pow = true
disableIRI = false

Command line options

Command line options are named the same as INI options. Some have additional short versions.

Options description

OptionDescriptionDefault
--nameName your node. This identifier will appear on the DevIOTA Field DashboardDeviota Field
--address, -aOptional IOTA address for donations.
--seed, -bOptional. If no donation address is provided, you can provide a seed. In that case the field client will generate new, unused addresses dynamically. WARNING! Please do not use your usual, main seed. Generate a new one for this occasion. It is easy and adds up to everyone's security.
--config, -cPath to Field configuration file.
--disableIRI, -dDo not allow jobs to be passed from the Field load balancer. Just send the statistics about my node.false
--fieldHostname, -fField Server hostname (including port) or a space-separated list of multiple Field Server hostnames.field.deviota.com:80
--iriHostname, -hHostname where your IRI instance is running.localhost
--iriPort, -iAPI port of your IRI instance.14265
--port, -pField port to be used21310
--silent, -sDo not print log messagesfalse
--pow, -wAllow attachToTangle jobs to be passed from the Field server load balancer. When disableIRI and pow are true, only PoW work will be passed to IRI.false
--customFieldId, -yIf you want Field to generate a custom id, instead of using machine-id. This is required for VPS and servers created from an image, which often have the same machine ID.false

Run PoW jobs only

If you disableIRI and set "pow" to true, your node will only pass attachToTangle jobs t IRI. The jobs will be sent, even if your IRI is not synchronized, since proof-of-work does not require a synchronized node.

Sample config:

# Disable IRI Jobs
disableIRI = true
# Except attachToTangle proof-of-work
pow = true

Contributing

Donate to the Nodes

We are currently working to add automatic donations to participating nodes based on the work done. This feature is still in progress, however you can already tip the nodes. Just go to http://field.deviota.com select a node, copy its donation address and show it some love!

Authors

License

This project is licensed under the ICS License - see the LICENSE.md file for details

About

WE HAVE MOVED TO A NEW REPOSITORY

Resources

Stars

34 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - SemkoDev/field.cli: WE HAVE MOVED TO A NEW REPOSITORY · GitHub
Skip to content

Repository files navigation

Field

Field is a Proxy for your IRI, that sends regular statistics to the Field server (http://field.deviota.com) and accepts jobs from the server's load balancer (optional).

Table of contents

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

It is expected that you have already installed Java, downloaded the IRI jar file and know how to start it. The local IRI instance must have api enabled and accepting local connections.

Field is running on Node.js You will have to install node (at least version LTS 8.9.4) and npm (node package manager) on your system. Alternatively to npm you can (and should) use yarn package manager.

Port Forwarding

If you are trying to run a Field node at home, you may need to open some ports (port forwarding) in your NAT Router, apart of the ports for your IRI:

  • TCP 21310

Please refer to your Router's manual on how to do that.

Furthermore, please be aware that apart of firewall and port-forwarding in router, your Internet provider may also be an issue. Some providers (like Vodafone in Germany) do not have enough IPv4 addresses for homes and thus use something called "IPv4 over DS Lite". In those cases the traffic will not come through over the ports mentioned above. Unfortunately, there is no quick fix for this issue (maybe changing providers). There is some hope with the upcoming PCP-protocol, this will not happen this year (2018) for most providers, though.

WARNING FOR IMAGE-BASED LINUX INSTALLATIONS

Field relies on a unique machine identification. Image-based/VPS installations usually have the same id. If you run it, your field might be blacklisted or wrongly listed on the field server. To change the ID, do the following:

# 1. Remove the existing machine ID file:
sudo rm /var/lib/dbus/machine-id
# 2. Generate a new machine id:
sudo dbus-uuidgen --ensure
# 3. Reboot to apply the new machine ID system-wide:
sudo shutdown -r now

WARNING FOR UBUNTU

Ubuntu 16.04 apt comes with an outdated Node version (4.X). You need to install the latest version separately:

https://nodejs.org/en/download/package-manager/

Installing

Globally install Field

npm install -g field.cli

And run it

field --pow --address SOZAIPJMQUBOFCTDTJJDXCZEKNIYZGIGVDLFMH9FFBAYK9SWGTBCWVUTFHXDOUESZAXRJJCJESJPIEQCCKBUTVQPOW

The --pow option allows the Field server to pass "attachToTangle" jobs to your IRI.

With the --address option you can specify an IOTA address for donations.

Below is the list of all possible options.

Upgrading

To upgrade your Field to version X.X.X, simply run:

npm install -g field.cli@x.x.x

Please check where npm installs your global packages! It happens very often that the first installed binary is put into /usr/local/bin and the updated into /usr/bin. Run field --version after the upgrade to make sure you are using the most recent one. Update your scripts and/or services to point to the right binary!

Running as a service

You can use the node process manager to run Field as a service. Just do the following:

# Install the process manager:
npm install pm2 -g
# Make pm2 start at startup:
pm2 startup
# Start the Field as service
# If you created a field config somewhere on your system, provide the path to the config:
pm2 start field -- --config /path/to/field-config.ini
# Otherwise you can just do: pm2 start field
# Save current processes runing with pm2 to startup on boot:
pm2 save
# Get Field logs:
pm2 monit
# or
pm2 log

Docker

Provided you have docker installed, Field can be started as follows:

docker run <docker opts> romansemko/field.cli <field command line opts>

Building Locally

If you are a developer you may want to build the project locally and play around with the sources. Otherwise, ignore this section. Make sure you have yarn package manager installed. Checkout the project:

git clone https://github.com/SemkoDev/field.cli.git
cd field.cli

Install dependencies:

yarn

Run tests and make binaries:

yarn make

Try to run Field:

node ./dist/field.js --pow -y

Configuration

You are free to either use command line options or an .ini file to configure Field. If you use a config file, it has precedence and all command line options are ignored.

config.ini

To use a configuration file, run Field with --config option:

field --config ./config.ini
# Alternatively, set an environment variable:
FIELD_CONFIG= ./config.ini field

You can provide one or more of the following options in your ini file. Example:

[field]
name = MyField
; Optional, which IP to bind the node on
bindAddress = 0.0.0.0
port = 21310
; If you want Field to generate a custom id, instead of using machine-id.
; This is the safest and favored way:
customFieldId = true
; You can choose which Field(s) to connect to:
fieldHostname[] = field.deviota.com:80
; It can be several Fields. Just repeat:
; fieldHostname[] = field.deviota.com:80
; fieldHostname[] = another.field.com:8080
; fieldHostname[] = mytest.field.com:5000
; IRI connection details:
IRIPort = 14265
IRIHostname = localhost
address = SOZAIPJMQUBOFCTDTJJDXCZEKNIYZGIGVDLFMH9FFBAYK9SWGTBCWVUTFHXDOUESZAXRJJCJESJPIEQCCKBUTVQPOW
; Alternatively to address, you can provide a (NEW) seed
; In this case, the Field client will be generating new, unused addresses dynamically.
; seed = XYZ
; What jobs your node should be able to accept:
; both true - only attachToTangle jobs accepted
; disableIRI false - all jobs accepted
; pow false - no jobs accepted
; both false - all jobs except attachToTangle accepted
pow = true
disableIRI = false

Command line options

Command line options are named the same as INI options. Some have additional short versions.

Options description

OptionDescriptionDefault
--nameName your node. This identifier will appear on the DevIOTA Field DashboardDeviota Field
--address, -aOptional IOTA address for donations.
--seed, -bOptional. If no donation address is provided, you can provide a seed. In that case the field client will generate new, unused addresses dynamically. WARNING! Please do not use your usual, main seed. Generate a new one for this occasion. It is easy and adds up to everyone's security.
--config, -cPath to Field configuration file.
--disableIRI, -dDo not allow jobs to be passed from the Field load balancer. Just send the statistics about my node.false
--fieldHostname, -fField Server hostname (including port) or a space-separated list of multiple Field Server hostnames.field.deviota.com:80
--iriHostname, -hHostname where your IRI instance is running.localhost
--iriPort, -iAPI port of your IRI instance.14265
--port, -pField port to be used21310
--silent, -sDo not print log messagesfalse
--pow, -wAllow attachToTangle jobs to be passed from the Field server load balancer. When disableIRI and pow are true, only PoW work will be passed to IRI.false
--customFieldId, -yIf you want Field to generate a custom id, instead of using machine-id. This is required for VPS and servers created from an image, which often have the same machine ID.false

Run PoW jobs only

If you disableIRI and set "pow" to true, your node will only pass attachToTangle jobs t IRI. The jobs will be sent, even if your IRI is not synchronized, since proof-of-work does not require a synchronized node.

Sample config:

# Disable IRI Jobs
disableIRI = true
# Except attachToTangle proof-of-work
pow = true

Contributing

Donate to the Nodes

We are currently working to add automatic donations to participating nodes based on the work done. This feature is still in progress, however you can already tip the nodes. Just go to http://field.deviota.com select a node, copy its donation address and show it some love!

Authors

License

This project is licensed under the ICS License - see the LICENSE.md file for details

About

WE HAVE MOVED TO A NEW REPOSITORY

Resources

Stars

34 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - SemkoDev/field.cli: WE HAVE MOVED TO A NEW REPOSITORY · GitHub
Skip to content

Repository files navigation

Field

Field is a Proxy for your IRI, that sends regular statistics to the Field server (http://field.deviota.com) and accepts jobs from the server's load balancer (optional).

Table of contents

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

It is expected that you have already installed Java, downloaded the IRI jar file and know how to start it. The local IRI instance must have api enabled and accepting local connections.

Field is running on Node.js You will have to install node (at least version LTS 8.9.4) and npm (node package manager) on your system. Alternatively to npm you can (and should) use yarn package manager.

Port Forwarding

If you are trying to run a Field node at home, you may need to open some ports (port forwarding) in your NAT Router, apart of the ports for your IRI:

  • TCP 21310

Please refer to your Router's manual on how to do that.

Furthermore, please be aware that apart of firewall and port-forwarding in router, your Internet provider may also be an issue. Some providers (like Vodafone in Germany) do not have enough IPv4 addresses for homes and thus use something called "IPv4 over DS Lite". In those cases the traffic will not come through over the ports mentioned above. Unfortunately, there is no quick fix for this issue (maybe changing providers). There is some hope with the upcoming PCP-protocol, this will not happen this year (2018) for most providers, though.

WARNING FOR IMAGE-BASED LINUX INSTALLATIONS

Field relies on a unique machine identification. Image-based/VPS installations usually have the same id. If you run it, your field might be blacklisted or wrongly listed on the field server. To change the ID, do the following:

# 1. Remove the existing machine ID file:
sudo rm /var/lib/dbus/machine-id
# 2. Generate a new machine id:
sudo dbus-uuidgen --ensure
# 3. Reboot to apply the new machine ID system-wide:
sudo shutdown -r now

WARNING FOR UBUNTU

Ubuntu 16.04 apt comes with an outdated Node version (4.X). You need to install the latest version separately:

https://nodejs.org/en/download/package-manager/

Installing

Globally install Field

npm install -g field.cli

And run it

field --pow --address SOZAIPJMQUBOFCTDTJJDXCZEKNIYZGIGVDLFMH9FFBAYK9SWGTBCWVUTFHXDOUESZAXRJJCJESJPIEQCCKBUTVQPOW

The --pow option allows the Field server to pass "attachToTangle" jobs to your IRI.

With the --address option you can specify an IOTA address for donations.

Below is the list of all possible options.

Upgrading

To upgrade your Field to version X.X.X, simply run:

npm install -g field.cli@x.x.x

Please check where npm installs your global packages! It happens very often that the first installed binary is put into /usr/local/bin and the updated into /usr/bin. Run field --version after the upgrade to make sure you are using the most recent one. Update your scripts and/or services to point to the right binary!

Running as a service

You can use the node process manager to run Field as a service. Just do the following:

# Install the process manager:
npm install pm2 -g
# Make pm2 start at startup:
pm2 startup
# Start the Field as service
# If you created a field config somewhere on your system, provide the path to the config:
pm2 start field -- --config /path/to/field-config.ini
# Otherwise you can just do: pm2 start field
# Save current processes runing with pm2 to startup on boot:
pm2 save
# Get Field logs:
pm2 monit
# or
pm2 log

Docker

Provided you have docker installed, Field can be started as follows:

docker run <docker opts> romansemko/field.cli <field command line opts>

Building Locally

If you are a developer you may want to build the project locally and play around with the sources. Otherwise, ignore this section. Make sure you have yarn package manager installed. Checkout the project:

git clone https://github.com/SemkoDev/field.cli.git
cd field.cli

Install dependencies:

yarn

Run tests and make binaries:

yarn make

Try to run Field:

node ./dist/field.js --pow -y

Configuration

You are free to either use command line options or an .ini file to configure Field. If you use a config file, it has precedence and all command line options are ignored.

config.ini

To use a configuration file, run Field with --config option:

field --config ./config.ini
# Alternatively, set an environment variable:
FIELD_CONFIG= ./config.ini field

You can provide one or more of the following options in your ini file. Example:

[field]
name = MyField
; Optional, which IP to bind the node on
bindAddress = 0.0.0.0
port = 21310
; If you want Field to generate a custom id, instead of using machine-id.
; This is the safest and favored way:
customFieldId = true
; You can choose which Field(s) to connect to:
fieldHostname[] = field.deviota.com:80
; It can be several Fields. Just repeat:
; fieldHostname[] = field.deviota.com:80
; fieldHostname[] = another.field.com:8080
; fieldHostname[] = mytest.field.com:5000
; IRI connection details:
IRIPort = 14265
IRIHostname = localhost
address = SOZAIPJMQUBOFCTDTJJDXCZEKNIYZGIGVDLFMH9FFBAYK9SWGTBCWVUTFHXDOUESZAXRJJCJESJPIEQCCKBUTVQPOW
; Alternatively to address, you can provide a (NEW) seed
; In this case, the Field client will be generating new, unused addresses dynamically.
; seed = XYZ
; What jobs your node should be able to accept:
; both true - only attachToTangle jobs accepted
; disableIRI false - all jobs accepted
; pow false - no jobs accepted
; both false - all jobs except attachToTangle accepted
pow = true
disableIRI = false

Command line options

Command line options are named the same as INI options. Some have additional short versions.

Options description

OptionDescriptionDefault
--nameName your node. This identifier will appear on the DevIOTA Field DashboardDeviota Field
--address, -aOptional IOTA address for donations.
--seed, -bOptional. If no donation address is provided, you can provide a seed. In that case the field client will generate new, unused addresses dynamically. WARNING! Please do not use your usual, main seed. Generate a new one for this occasion. It is easy and adds up to everyone's security.
--config, -cPath to Field configuration file.
--disableIRI, -dDo not allow jobs to be passed from the Field load balancer. Just send the statistics about my node.false
--fieldHostname, -fField Server hostname (including port) or a space-separated list of multiple Field Server hostnames.field.deviota.com:80
--iriHostname, -hHostname where your IRI instance is running.localhost
--iriPort, -iAPI port of your IRI instance.14265
--port, -pField port to be used21310
--silent, -sDo not print log messagesfalse
--pow, -wAllow attachToTangle jobs to be passed from the Field server load balancer. When disableIRI and pow are true, only PoW work will be passed to IRI.false
--customFieldId, -yIf you want Field to generate a custom id, instead of using machine-id. This is required for VPS and servers created from an image, which often have the same machine ID.false

Run PoW jobs only

If you disableIRI and set "pow" to true, your node will only pass attachToTangle jobs t IRI. The jobs will be sent, even if your IRI is not synchronized, since proof-of-work does not require a synchronized node.

Sample config:

# Disable IRI Jobs
disableIRI = true
# Except attachToTangle proof-of-work
pow = true

Contributing

Donate to the Nodes

We are currently working to add automatic donations to participating nodes based on the work done. This feature is still in progress, however you can already tip the nodes. Just go to http://field.deviota.com select a node, copy its donation address and show it some love!

Authors

License

This project is licensed under the ICS License - see the LICENSE.md file for details

About

WE HAVE MOVED TO A NEW REPOSITORY

Resources

Stars

34 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); GitHub - SemkoDev/field.cli: WE HAVE MOVED TO A NEW REPOSITORY · GitHub
Skip to content

Repository files navigation

Field

Field is a Proxy for your IRI, that sends regular statistics to the Field server (http://field.deviota.com) and accepts jobs from the server's load balancer (optional).

Table of contents

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

It is expected that you have already installed Java, downloaded the IRI jar file and know how to start it. The local IRI instance must have api enabled and accepting local connections.

Field is running on Node.js You will have to install node (at least version LTS 8.9.4) and npm (node package manager) on your system. Alternatively to npm you can (and should) use yarn package manager.

Port Forwarding

If you are trying to run a Field node at home, you may need to open some ports (port forwarding) in your NAT Router, apart of the ports for your IRI:

  • TCP 21310

Please refer to your Router's manual on how to do that.

Furthermore, please be aware that apart of firewall and port-forwarding in router, your Internet provider may also be an issue. Some providers (like Vodafone in Germany) do not have enough IPv4 addresses for homes and thus use something called "IPv4 over DS Lite". In those cases the traffic will not come through over the ports mentioned above. Unfortunately, there is no quick fix for this issue (maybe changing providers). There is some hope with the upcoming PCP-protocol, this will not happen this year (2018) for most providers, though.

WARNING FOR IMAGE-BASED LINUX INSTALLATIONS

Field relies on a unique machine identification. Image-based/VPS installations usually have the same id. If you run it, your field might be blacklisted or wrongly listed on the field server. To change the ID, do the following:

# 1. Remove the existing machine ID file:
sudo rm /var/lib/dbus/machine-id
# 2. Generate a new machine id:
sudo dbus-uuidgen --ensure
# 3. Reboot to apply the new machine ID system-wide:
sudo shutdown -r now

WARNING FOR UBUNTU

Ubuntu 16.04 apt comes with an outdated Node version (4.X). You need to install the latest version separately:

https://nodejs.org/en/download/package-manager/

Installing

Globally install Field

npm install -g field.cli

And run it

field --pow --address SOZAIPJMQUBOFCTDTJJDXCZEKNIYZGIGVDLFMH9FFBAYK9SWGTBCWVUTFHXDOUESZAXRJJCJESJPIEQCCKBUTVQPOW

The --pow option allows the Field server to pass "attachToTangle" jobs to your IRI.

With the --address option you can specify an IOTA address for donations.

Below is the list of all possible options.

Upgrading

To upgrade your Field to version X.X.X, simply run:

npm install -g field.cli@x.x.x

Please check where npm installs your global packages! It happens very often that the first installed binary is put into /usr/local/bin and the updated into /usr/bin. Run field --version after the upgrade to make sure you are using the most recent one. Update your scripts and/or services to point to the right binary!

Running as a service

You can use the node process manager to run Field as a service. Just do the following:

# Install the process manager:
npm install pm2 -g
# Make pm2 start at startup:
pm2 startup
# Start the Field as service
# If you created a field config somewhere on your system, provide the path to the config:
pm2 start field -- --config /path/to/field-config.ini
# Otherwise you can just do: pm2 start field
# Save current processes runing with pm2 to startup on boot:
pm2 save
# Get Field logs:
pm2 monit
# or
pm2 log

Docker

Provided you have docker installed, Field can be started as follows:

docker run <docker opts> romansemko/field.cli <field command line opts>

Building Locally

If you are a developer you may want to build the project locally and play around with the sources. Otherwise, ignore this section. Make sure you have yarn package manager installed. Checkout the project:

git clone https://github.com/SemkoDev/field.cli.git
cd field.cli

Install dependencies:

yarn

Run tests and make binaries:

yarn make

Try to run Field:

node ./dist/field.js --pow -y

Configuration

You are free to either use command line options or an .ini file to configure Field. If you use a config file, it has precedence and all command line options are ignored.

config.ini

To use a configuration file, run Field with --config option:

field --config ./config.ini
# Alternatively, set an environment variable:
FIELD_CONFIG= ./config.ini field

You can provide one or more of the following options in your ini file. Example:

[field]
name = MyField
; Optional, which IP to bind the node on
bindAddress = 0.0.0.0
port = 21310
; If you want Field to generate a custom id, instead of using machine-id.
; This is the safest and favored way:
customFieldId = true
; You can choose which Field(s) to connect to:
fieldHostname[] = field.deviota.com:80
; It can be several Fields. Just repeat:
; fieldHostname[] = field.deviota.com:80
; fieldHostname[] = another.field.com:8080
; fieldHostname[] = mytest.field.com:5000
; IRI connection details:
IRIPort = 14265
IRIHostname = localhost
address = SOZAIPJMQUBOFCTDTJJDXCZEKNIYZGIGVDLFMH9FFBAYK9SWGTBCWVUTFHXDOUESZAXRJJCJESJPIEQCCKBUTVQPOW
; Alternatively to address, you can provide a (NEW) seed
; In this case, the Field client will be generating new, unused addresses dynamically.
; seed = XYZ
; What jobs your node should be able to accept:
; both true - only attachToTangle jobs accepted
; disableIRI false - all jobs accepted
; pow false - no jobs accepted
; both false - all jobs except attachToTangle accepted
pow = true
disableIRI = false

Command line options

Command line options are named the same as INI options. Some have additional short versions.

Options description

OptionDescriptionDefault
--nameName your node. This identifier will appear on the DevIOTA Field DashboardDeviota Field
--address, -aOptional IOTA address for donations.
--seed, -bOptional. If no donation address is provided, you can provide a seed. In that case the field client will generate new, unused addresses dynamically. WARNING! Please do not use your usual, main seed. Generate a new one for this occasion. It is easy and adds up to everyone's security.
--config, -cPath to Field configuration file.
--disableIRI, -dDo not allow jobs to be passed from the Field load balancer. Just send the statistics about my node.false
--fieldHostname, -fField Server hostname (including port) or a space-separated list of multiple Field Server hostnames.field.deviota.com:80
--iriHostname, -hHostname where your IRI instance is running.localhost
--iriPort, -iAPI port of your IRI instance.14265
--port, -pField port to be used21310
--silent, -sDo not print log messagesfalse
--pow, -wAllow attachToTangle jobs to be passed from the Field server load balancer. When disableIRI and pow are true, only PoW work will be passed to IRI.false
--customFieldId, -yIf you want Field to generate a custom id, instead of using machine-id. This is required for VPS and servers created from an image, which often have the same machine ID.false

Run PoW jobs only

If you disableIRI and set "pow" to true, your node will only pass attachToTangle jobs t IRI. The jobs will be sent, even if your IRI is not synchronized, since proof-of-work does not require a synchronized node.

Sample config:

# Disable IRI Jobs
disableIRI = true
# Except attachToTangle proof-of-work
pow = true

Contributing

Donate to the Nodes

We are currently working to add automatic donations to participating nodes based on the work done. This feature is still in progress, however you can already tip the nodes. Just go to http://field.deviota.com select a node, copy its donation address and show it some love!

Authors

License

This project is licensed under the ICS License - see the LICENSE.md file for details

About

WE HAVE MOVED TO A NEW REPOSITORY

Resources

Stars

34 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages