<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Plugin on Medium]]></title>
        <description><![CDATA[Stories by Plugin on Medium]]></description>
        <link>https://medium.com/@GoPlugin?source=rss-fdf89b9752be------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nnZIuMSqNm3YeXZ8_4tIfQ.png</url>
            <title>Stories by Plugin on Medium</title>
            <link>https://medium.com/@GoPlugin?source=rss-fdf89b9752be------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 24 Jun 2026 20:07:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@GoPlugin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[For users Succeeded with Dockerized way of running PLI node before 15th Dec 2021]]></title>
            <link>https://medium.com/@GoPlugin/for-users-succeeded-with-dockerized-way-of-running-pli-before-15th-dec-2021-bea30aaaa282?source=rss-fdf89b9752be------2</link>
            <guid isPermaLink="false">https://medium.com/p/bea30aaaa282</guid>
            <dc:creator><![CDATA[Plugin]]></dc:creator>
            <pubDate>Wed, 15 Dec 2021 11:32:35 GMT</pubDate>
            <atom:updated>2021-12-16T16:43:24.345Z</atom:updated>
            <content:encoded><![CDATA[<p>A major security patch for our users who succeeded in setting up PLI node on or before 15th of Dec 2021.</p><p>If you had set up docker container for PLI node and it is already <br> running successfully, then kindly follow the below mentioned steps for a secure PLI node set up.</p><h3><strong>Kindly run the command mentioned below to proceed further.</strong></h3><p>“<em>grep ‘listen_address’ /etc/postgresql/12/main/postgresql.conf</em>”</p><p>If the output for the above command is (<em>listen_addresses = ‘172.17.0.1’</em>) then you can don’t need to do any thing, just close this page. Else, if the output is (<em>listen_addresses = ‘*’</em>) then follow further steps mentioned in this article.</p><blockquote>1) Stop the running docker instance and remove the container<br> using the below mentioned commands.<br> a) <strong><em>sudo docker ps -a</em></strong><em> </em><br> =&gt; get &lt;CONTAINER_ID&gt;<br> b) <strong>sudo docker stop &lt;CONTAINER_ID&gt;</strong><br> c) <strong>sudo docker rm &lt;CONTAINER_ID&gt;</strong></blockquote><blockquote>2) Execute the perl one liner as given below.<br> <strong>sudo perl -i -p -e “s/^listen_addresses.*$/listen_addresses = \’172.17.0.1\’/” /etc/postgresql/12/main/postgresql.conf</strong></blockquote><blockquote>3) Restart postgresql:<br> <strong>sudo pg_ctlcluster 12 main restart</strong></blockquote><blockquote>4) Now start a fresh container inside your existing plugin-deployment directory, since you already made changes for the password, you don’t need to make any changes now.<br> a) <strong>cd plugin-deployment</strong><br> b) <strong>sudo docker images</strong><br> =&gt; get &lt;IMAGE_ID&gt;<br> c) <strong>sudo docker run --env-file plugin.env -it -d -p 6688:6688 -v &lt;Absolute_path_of_your_plugin-deplyment directory&gt;:/pluginAdm --add-host=host:192.168.0.1 &lt;IMAGE_ID&gt;</strong><br> d) <strong>sudo docker ps -a </strong><br> =&gt; get &lt;CONTAINER_ID&gt; <br> 5) <strong>sudo docker exec -it &lt;CONTAINER_ID&gt; /bin/bash -c “. ~/.profile &amp;&amp; pm2 start /pluginAdm/startNode.sh”</strong></blockquote><p>You can refer <a href="https://medium.com/@GoPlugin/how-to-run-plugin-node-through-dockerized-container-9fb03a75d526">plugin node through docker</a> page for further details.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bea30aaaa282" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GoPlugin bounty contest 2021]]></title>
            <link>https://medium.com/@GoPlugin/goplugin-bounty-contest-2021-abcd5b844867?source=rss-fdf89b9752be------2</link>
            <guid isPermaLink="false">https://medium.com/p/abcd5b844867</guid>
            <category><![CDATA[bounty-program]]></category>
            <category><![CDATA[goplugin]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[contests]]></category>
            <dc:creator><![CDATA[Plugin]]></dc:creator>
            <pubDate>Mon, 13 Dec 2021 13:43:15 GMT</pubDate>
            <atom:updated>2021-12-13T13:43:15.349Z</atom:updated>
            <content:encoded><![CDATA[<p>We are inviting participants to contest in developing an AI / ML Based node monitoring application. Below are the criteria to fulfill.</p><ul><li>AI / ML program should be able to integrate our existing node platform with very little dependency</li><li>The program can be in any language, but writing it in Python will add more value</li><li>If the participant is using a different language than Python, expecting the participant to contribute further for enhancement in the future and they will be rewarded accordingly</li><li>Program / Application should make sure to verify the following:</li></ul><p><strong><em>Node is up-to-date with security patches</em></strong></p><p><strong><em>Node is up &amp; running 24 / 7</em></strong></p><p><strong><em>Capture the node downtime along with timestamps/reasons if any</em></strong></p><p><strong><em>Once the data is captured, perform some analytics over the node such as</em></strong></p><p><strong><em>Response time vs Downtime</em></strong></p><p><strong><em>Number of Hits vs Response time</em></strong></p><p><strong><em>Downtime frequency (Weekly, Daily, Monthly, Date range)</em></strong></p><p>Any security loophole such as possible attacks might occur.</p><p><strong><em>DDOS attacks</em></strong></p><ul><li>Ranking for Nodes based on various criteria like availability, response time, etc.</li><li>Vulnerability reports (not mandatory), but will give additional points for the participants</li><li>Scanning report of various ports associated with the IP of the server and their port-security</li><li>Create a knowledge graph to predict the failover ( Knowledge graph is an effect end product of a model with which we can map our state )</li><li>Once sufficient data is available, we also expect the contestants to build a model to predict a node failure pattern.</li></ul><p>Once the program/application has been developed the same can be uploaded to git and shared with the plugin team at <a href="mailto:info@goplugin.co">support@goplugin.co</a>.</p><p>Wish you all good luck and happy exploring.!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abcd5b844867" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to run Plugin node through Dockerized container]]></title>
            <link>https://medium.com/@GoPlugin/how-to-run-plugin-node-through-dockerized-container-9fb03a75d526?source=rss-fdf89b9752be------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fb03a75d526</guid>
            <dc:creator><![CDATA[Plugin]]></dc:creator>
            <pubDate>Thu, 09 Dec 2021 17:21:43 GMT</pubDate>
            <atom:updated>2021-12-15T10:34:44.106Z</atom:updated>
            <content:encoded><![CDATA[<p>Running the node through docker container minimize the hassle to install the required utilities for running the node.<br>In this method, we advocate the user to install the database(postgresql) in a host machine, and the containerized image<br>is connected with the postgresql in the host. So, when the user accidentally stops the container, their database will remain unaffected.</p><p>System Requirements :<br>=====================</p><p>Standalone host OS: Ubuntu linux OS — 20.04</p><p>RAM: 2GB (minimum) — More the better</p><p>Storage Space: 50GB(minimum) — More the better</p><p>############################################<br>IMPORTANT: The docker method of running the node is tried and tested in below mentioned environments.</p><p>1. Standalone host OS: Ubuntu linux — 20.04<br> 2. AWS EC2 hosted OS:Ubuntu linux — 20.04</p><p>In other environments the set up steps may or may not work. We continuously try the setup in other environments and we will update this space.</p><p>User should have sudo access in the host OS<br>############################################</p><p>Download the Plugin Installation:</p><pre>git clone -b docker_branch <a href="https://github.com/GoPlugin/plugin-deployment.git">https://github.com/GoPlugin/plugin-deployment.git</a> &amp;&amp; cd plugin-deployment</pre><p>POSTGRESQL SET UP SECTION:<br>=================</p><p>To set up custom password for postgresql database execute the below mentioned command in plugin-deployment directory. The user needs to change the word ‘password’ to their own password for the database.</p><pre>perl -i -p -e &#39;s/\&lt;PWD\&gt;/password/g&#39; postgresInstall.bash plugin.env</pre><p>Install postgresql &amp; Config postgresql:</p><pre>1) /bin/bash postgresInstall.bash</pre><pre>2) sudo perl -i -p -e &quot;s/^\#listen_addresses.*$/listen_addresses = \&#39;172.17.0.1\&#39;/&quot; /etc/postgresql/12/main/postgresql.conf</pre><pre>3) sudo chmod 666 /etc/postgresql/12/main/pg_hba.conf</pre><pre>4) sudo echo &quot;host    all     all             172.17.0.1/16                 md5&quot; &gt;&gt;/etc/postgresql/12/main/pg_hba.conf</pre><pre>5) sudo pg_ctlcluster 12 main start</pre><p>DOCKER SET UP SECTION:<br>==============</p><p>If your Host System doesn’t have docker installed, then follow the steps mentioned in STEP:1, else you can go to STEP:2</p><p>STEP:1<br>====</p><pre>1) sudo apt update</pre><pre>2) sudo apt install apt-transport-https ca-certificates curl software-properties-common</pre><pre>3) curl -fsSL <a href="https://download.docker.com/linux/ubuntu/gpg">https://download.docker.com/linux/ubuntu/gpg</a> | sudo apt-key add -</pre><pre>4) sudo add-apt-repository &quot;deb [arch=amd64] <a href="https://download.docker.com/linux/ubuntu">https://download.docker.com/linux/ubuntu</a> focal stable&quot;</pre><pre>5) apt-cache policy docker-ce<br>   <br>   You’ll see output like this, although the version number for Docker may be different:<br>   docker-ce:<br>   Installed: (none)<br>   Candidate: 5:20.10.11~3-0~ubuntu-focal<br>   Version table:<br>      5:20.10.11~3-0~ubuntu-focal 500<br>         500 <a href="https://download.docker.com/linux/ubuntu">https://download.docker.com/linux/ubuntu</a> focal/stable amd64 Packages</pre><pre>   Notice that docker-ce is not installed, but the candidate for installation is from the Docker repository for Ubuntu 20.04 (focal).</pre><p>Finally, install Docker:</p><pre>6) sudo apt install docker-ce<br>         <br>7) sudo systemctl status docker<br>   The output should be similar to the following, showing that the service is active and running:<br>      Output<br>     ● docker.service - Docker Application Container Engine<br>     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)<br>     Active: active (running) since Mon 2020-05-18 13:00:41 UTC; 19s ago<br>     TriggeredBy: ● docker.socket<br>       Docs: <a href="https://docs.docker.com">https://docs.docker.com</a><br>     Main PID: 24358 (dockerd)<br>      Tasks: 8<br>     Memory: 46.4M<br>     CGroup: /system.slice/docker.service<br>             └─24358 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock</pre><p>STEP:2<br>====</p><p>Steps to run dockerized Plugin node:<br>===================</p><pre>1) sudo docker pull goplugin/pluginnode:latest</pre><pre>2) sudo docker images =&gt; get the IMAGE_ID</pre><pre>3) sudo docker run --env-file plugin.env -it -d -p 6688:6688 -v &lt;ABSOLUTE PATH OF plugin-deployment DIRECTORY&gt;:/pluginAdm --add-host=host:192.168.0.1 &lt;IMAGE_ID&gt;</pre><pre>4) sudo docker ps -a =&gt; Get the &lt;container_ID&gt;</pre><p>############################################<br> # IMPORTANT MESSAGE #<br> ############################################<br> Make sure you have the below mentioned 2 files are available and populated as given below. <br><br> File 1: password.txt =&gt; contains your keystore password <br> *** KEYSTORE PASSWORD SHOULD FOLLOW THIS CONDITIONS *** <br> “must be longer than 12 characters”, <br> “must contain at least 3 lowercase characters”, <br> “must contain at least 3 uppercase characters”, <br> “must contain at least 3 numbers”, <br> “must contain at least 3 symbols”, <br> “must not contain more than 3 identical consecutive <br> characters”. <br> File 2: apicredentials.txt =&gt; first line of the file contains email id for UI<br> second line of the file contains password for UI<br> (This password should be strong, but need not <br> follow keystore password condition). <br> <br> NOTE: This 2 files have default contents, please change the mail &amp; passwords before starting he next command <br> ############################################</p><pre>5) sudo pg_ctlcluster 12 main restart</pre><pre>6) sudo docker exec -it &lt;container_ID&gt; /bin/bash -c &quot;. ~/.profile &amp;&amp; pm2 start /pluginAdm/startNode.sh&quot;</pre><p>Your node will start with status as ‘online’.</p><p>If you want to probe your running node, then you can use the command format as given below.</p><pre>sudo docker exec -it &lt;container_ID&gt; /bin/bash -c &quot;&lt;YOUR_COMMAND&gt;&quot;</pre><p>You can replace &lt;YOUR_COMMAND&gt; with</p><p>- pm2 status<br>- pm2 logs 0</p><h3>Login to UI:</h3><pre>http://&lt;IP_ADDRESS_OF_YOUR_HOST_MACHINE&gt;:6688</pre><p>To login to Plugin node UI, replace &lt;IP_ADDRESS_OF_YOUR_HOST_MACHINE&gt; with the actual IP address and run it through a browser</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fb03a75d526" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to add PLI token in your XDCPay wallet]]></title>
            <link>https://medium.com/@GoPlugin/how-to-add-pli-token-in-your-xdcpay-wallet-eab04c7c027c?source=rss-fdf89b9752be------2</link>
            <guid isPermaLink="false">https://medium.com/p/eab04c7c027c</guid>
            <category><![CDATA[goplugin]]></category>
            <category><![CDATA[xinfin]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[xdc-network]]></category>
            <category><![CDATA[decentralized-oracles]]></category>
            <dc:creator><![CDATA[Plugin]]></dc:creator>
            <pubDate>Wed, 24 Nov 2021 10:59:57 GMT</pubDate>
            <atom:updated>2021-11-24T10:59:57.365Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/132/0*c4FRuZjU-ymN090G.png" /></figure><p>Step 1 — Download XDCPay from your Android or add XDCPay chrome extension in your web browser(if desktop)</p><ul><li><a href="https://chrome.google.com/webstore/detail/xdcpay/bocpokimicclpaiekenaeelehdjllofo?hl=en">https://chrome.google.com/webstore/detail/xdcpay/bocpokimicclpaiekenaeelehdjllofo?hl=en</a></li><li><a href="https://play.google.com/store/apps/details?id=com.xdcwallet&amp;hl=en&amp;gl=US">https://play.google.com/store/apps/details?id=com.xdcwallet&amp;hl=en&amp;gl=US</a></li></ul><p>This article shows how to add PLI token in your XDCPay wallet in web browser</p><p>Step 2 — Open XDCPay and point your network to XDC Mainnet</p><p>Step 3 — Go to “Tokens” Section &amp; click “Add Token”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/329/1*8iGWUJtm41uzbEk59u_8Aw.png" /></figure><p>Step 4 — Add PLI Mainnet token address and details like below and click “Add”</p><p>PLI Mainnet token address -&gt; <a href="https://xdc.network/token/xdcff7412ea7c8445c46a8254dfb557ac1e48094391">xdcff7412ea7c8445c46a8254dfb557ac1e48094391</a></p><p>Symbol — PLI</p><p>Decimals- 18</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/329/1*MKP3ALul9KS30fDJZwsHOw.png" /></figure><p>Step 5 — You will be able to see your PLI Balance like below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*1tr363_CnP9Y9LrdZradJQ.png" /></figure><p>Please note, PLI will balance will only show if your wallet has received PLI either from exchanges or you bought few from our node operator portal.</p><p>So it is highly critical that, you are giving right wallet to receive the PLI tokens</p><p>Join our discord link for any questions with respect to technical support — <a href="https://discord.com/invite/4ATypYHudd">https://discord.com/invite/4ATypYHudd</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eab04c7c027c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GOPLUGIN — How to deploy oracle contract, external-initiator and bridge PLUGIN Node?]]></title>
            <link>https://medium.com/@GoPlugin/goplugin-how-to-deploy-oracle-contract-external-initiator-and-bridge-plugin-node-3c3c7c862fc4?source=rss-fdf89b9752be------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c3c7c862fc4</guid>
            <category><![CDATA[goplugin]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[decentralization]]></category>
            <category><![CDATA[xinfin]]></category>
            <category><![CDATA[xinfin-remix]]></category>
            <dc:creator><![CDATA[Plugin]]></dc:creator>
            <pubDate>Tue, 23 Nov 2021 21:45:29 GMT</pubDate>
            <atom:updated>2021-12-15T04:43:21.788Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/132/0*b30ikvPSM-JXDuqW.png" /></figure><h3>GOPLUGIN — How to deploy oracle contract, external-initiator and bridge PLUGIN Node?</h3><h3>Plugin Node + External Initiator + Oracle Contract</h3><p>There are three main steps to perform:</p><ol><li>Ensure the Plugin Node is up &amp; running — Follow this article</li></ol><p>— — <a href="https://medium.com/@GoPlugin/how-to-setup-a-plugin-node-a-decentralized-oracle-service-d959bb0a2af0">How to setup a Plugin Node- A Decentralized Oracle Service</a></p><p>— — <a href="https://medium.com/@GoPlugin/setup-a-plugin-node-automated-way-using-shell-script-fbdec48a0dea">Through script way</a></p><p>— — <a href="https://hub.docker.com/r/eramosr19/plugin-node">Dockerized way</a></p><p>2. Setup External Initiator</p><p>3. Deploy Oracle Contract &amp; create JOB_ID</p><p>Step 1 — has been well discussed in all those article, and we will not spend much time here. Let’s move onto step 2 and discuss why External-Initiator is required and how important it is</p><p><strong>Step 2 — </strong>External initiators can listen to event and run for any webhook job that it has been linked to, so it is highly critical unit for Node to bridge with External-initiator and it can listen to events from client contract that uses the oracle.</p><h3>Download and Setup Customized External Initiator in local system using this plugin(External Initiator)</h3><p>External initiators observe a blockchain node endpoint and will trigger runs on the Plugin node.</p><p>Clone and build the <a href="https://github.com/GoPlugin/external-Initiator">external initiator repository</a></p><pre>git clone <a href="https://github.com/GoPlugin/external-Initiator">https://github.com/GoPlugin/external-Initiator</a><br>cd external-Initiator<br>git checkout main<br>go install</pre><p>Create a .env file in the external-initiator folder with the following contents:</p><pre>EI_DATABASEURL=postgresql://$USERNAME:$PASSWORD@$SERVER:$PORT/$DATABASE<br>EI_CHAINLINKURL=http://localhost:6688<br>EI_IC_ACCESSKEY=&lt;INSERT KEY&gt;<br>EI_IC_SECRET=&lt;INSERT KEY&gt;<br>EI_CI_ACCESSKEY=&lt;INSERT KEY&gt;<br>EI_CI_SECRET=&lt;INSERT KEY&gt;</pre><p><em>Note: the database in the URL should be separate from the PLUGIN node database</em></p><p>The 4 keys in the external-initiator/.env file are generated by the Plugin node with the following process.</p><ol><li>Once you run “plugin node start” and your plugin is in running mode, then open a new terminal and type plugin admin login and the username/password from when the container is created.</li><li>To create the keys, plugin initiators create &lt;NAME&gt; &lt;URL&gt;. Note that in this case the name is xdc and the url is http://localhost:8080/jobs to access the locally running external-initiator (otherwise, they are on two different networks). The 4 keys are generated in the same order as listed above. (&lt;NAME&gt; is user defined )</li></ol><pre>plugin initiators create <strong>xdc</strong> http://localhost:8080/jobs</pre><p><strong>Note</strong>: if you do not see “initiators” in the options when you type command (plugin help), please follow the below commands</p><p>pm2 start 2_nodeStartPM2 export FEATURE_EXTERNAL_INITIATORS=true plugin admin login plugin initiators create xdc <a href="http://localhost:8080/jobs">http://localhost:8080/jobs</a></p><ul><li>then go to the terminal where plugin node is running currently and halt the job by pressing(CTRL+C). == Keep this terminal open. Let’s call it as terminal A</li><li>Open another terminal B and run “plugin node start”, once it started running go to next step</li><li>Now in terminal A, try giving this command (plugin help) and you should be able to see “initiator” options</li><li>then do “plugin admin login” and login with your email &amp; password(had setup while setting up plugin node)</li><li>then give a command “ plugin initiators create <strong>xdc</strong> <a href="http://localhost:8080/jobs">http://localhost:8080/jobs</a> ”</li></ul><p>The external initiator can be started up using:</p><pre>external-initiator &quot;{\&quot;name\&quot;:\&quot;xinfin-mainnet\&quot;,\&quot;type\&quot;:\&quot;xinfin\&quot;,\&quot;url\&quot;:\&quot;<a href="https://gopluginrpc.blocksscan.io/">https://pluginrpc.blocksscan.io</a><a href="https://rpc.xinfin.network\">\</a>&quot;}&quot; --chainlinkurl &quot;<a href="http://localhost:6688/">http://localhost:6688/</a>&quot;</pre><p><strong>Note</strong> : If your plugin node is running on mainnet url, then external initator should also be pointed to mainnet.</p><p><strong>Step 3 — By now, your external-initiator would be running and you are all set to go to “Step 3”</strong></p><p>Oracle Contract —</p><pre>pragma solidity 0.4.24; <br>import “https://github.com/GoPlugin/contracts/blob/main/src/v0.4/Oracle.sol&quot;;</pre><p>Launch Xinfin Remix ( <a href="https://remix.xinfin.network/">https://remix.xinfin.network/</a> )</p><p>Make sure, you have “Injected web3” and XDCPay wallet is connected. Deploy Oracle by overriding PLI Token address(Mainnet — 0x<a href="https://xdc.network/token/xdcff7412ea7c8445c46a8254dfb557ac1e48094391">ff7412ea7c8445c46a8254dfb557ac1e48094391</a> ) — Once deployed, copy the contract address → this is going to be your O<strong>racle address</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*JjMfMV4M_0o7-39QmkC9-g.png" /></figure><p>After deployment, you will receive an Oracle address from above step — <strong><em>xdcf180e56bb575806aefaf2a7616622a9fc180b51c</em></strong></p><h4>3a) Run SetfulfillmentPermission of your Plugin node address in Oracle</h4><p>Copy the “<strong>Account_address</strong>” from <strong>Plugin GUi(http://&lt;remoteip or localhost&gt;:6688/) </strong>under Key sections, you will find “regular” account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*NKYO3hosijPAKeIClpu1Lw.png" /></figure><p>Copy this address and pass it in “<strong><em>setFulfilmentPermission</em></strong>” method, with boolean value “true” like below (without quotes)</p><p>This address basically talks to Oracle contract.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*ctceTsehQDNqHf7k_wLllw.png" /></figure><p>*** The above step is critical*** and do not miss this to perform</p><p>=====================================</p><p><strong>3b) Let’s create a JOB, so you can test and see if your oracle is getting interacted with external world</strong></p><p>Create an Alarm Job in Plugin node.</p><p>Steps to create Alarm Job -</p><ul><li>Login to Plugin node</li><li>Navigate to Jobs and click on New Job</li><li>Copy the job specification mentioned below</li><li>Paste the contents into the Json Spec field and create the job</li><li>Copy the newly created job ID which we will be using later</li><li>Submit clientcontract using xinfin.remix</li></ul><pre>{<br>    &quot;initiators&quot;:[<br>        {<br>            &quot;type&quot;:&quot;external&quot;,<br>            &quot;params&quot;:{<br>      &quot;name&quot;: &quot;xdcnew&quot;,<br>               &quot;body&quot;: {<br>      &quot;endpoint&quot;: &quot;<strong>xinfin-mainnet</strong>&quot;,<br>      &quot;addresses&quot;: [&quot;<strong>0x<em>f180e56bb575806aefaf2a7616622a9fc180b51c</em></strong>&quot;]<br>    }<br>            }<br>        }<br>    ],<br>    &quot;tasks&quot;:[<br>        {<br>            &quot;type&quot;:&quot;sleep&quot;,<br>            &quot;confirmations&quot;:null,<br>            &quot;params&quot;:{<br>            }<br>        },<br>        {<br>            &quot;type&quot;:&quot;ethbool&quot;,<br>            &quot;confirmations&quot;:null,<br>            &quot;params&quot;:{<br>            }<br>        },<br>        {<br>            &quot;type&quot;:&quot;ethtx&quot;,<br>            &quot;confirmations&quot;:null,<br>            &quot;params&quot;:{<br>            }<br>        }<br>    ],<br>    &quot;startAt&quot;:null,<br>    &quot;endAt&quot;:null<br>}<br></pre><p>Here, “Sleep”, “ethbool”, “ethtx” are core-adapters,</p><p>Core adapters are the built-in functionality that every Plugin node supports. Strung together, they act as tasks that need to be performed to complete a Job. Adapters that are prefixed with “Eth” refer to tasks that post data onto the chain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nSFXc8pNZfs_vGnukjlufw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*6gp8EhtB22ppF6Nvso2x8g.png" /></figure><p><strong><em>Client Contract</em></strong></p><p>Override your oracle address &amp; job id in below client contract and deploy it in remix by overriding PLI mainnet address like below</p><pre>// SPDX-License-Identifier: MIT<br>pragma solidity ^0.4.24;</pre><pre>import &quot;<a href="https://github.com/GoPlugin/contracts/blob/main/src/v0.4/PluginClient.sol">https://github.com/GoPlugin/contracts/blob/main/src/v0.4/PluginClient.sol</a>&quot;;<br>import &quot;<a href="https://github.com/GoPlugin/contracts/blob/main/src/v0.4/vendor/Ownable.sol">https://github.com/GoPlugin/contracts/blob/main/src/v0.4/vendor/Ownable.sol</a>&quot;;</pre><pre>contract AlarmClockSample is PluginClient,Ownable {<br>    using Plugin for Plugin.Request;<br>    <br>    bool public alarmDone;<br>    address private oracle;<br>    bytes32 private jobId;<br>    uint256 private fee;<br>    <br>    /**<br>     * Network: Mainnet<br>     * Oracle: Plugin - <strong>0x<em>f180e56bb575806aefaf2a7616622a9fc180b51c</em></strong><br>     * Job ID: Plugin - <strong>bcbac9232272445294102fdd1ee97c98</strong><br>     * Fee: 0.1 PLI<br>     */<br>    constructor(address _pli) public Ownable() {<br>        setPluginToken(_pli);<br>        oracle = <strong>0x<em>f180e56bb575806aefaf2a7616622a9fc180b51c</em></strong>;<br>        jobId = &quot;<strong>982105d690504c5e9ce374d040c08654</strong>&quot;;<br>        fee = 0.1 * 10 ** 18; // 0.1 PLI<br>        alarmDone = false;<br>    }<br>    <br>    /**<br>     * Create a Plugin request to start an alarm and after<br>     * the time in seconds is up, return throught the fulfillAlarm<br>     * function<br>     */<br>    function requestAlarmClock(uint256 durationInSeconds) public returns (bytes32 requestId) <br>    {<br>        Plugin.Request memory request = buildPluginRequest(jobId, address(this), this.fulfillAlarm.selector);<br>        // This will return in 90 seconds<br>        request.addUint(&quot;until&quot;, block.timestamp + durationInSeconds);<br>        return sendPluginRequestTo(oracle, request, fee);<br>    }<br>    <br>    /**<br>     * Receive the response in the form of uint256<br>     */ <br>    function fulfillAlarm(bytes32 _requestId, uint256 _volume) public recordPluginFulfillment(_requestId)<br>    {<br>        alarmDone = true;<br>    }</pre><pre>function withdrawPli() public onlyOwner() { <br>        PliTokenInterface pliToken = PliTokenInterface(pluginTokenAddress());<br>        require(pliToken.transfer(msg.sender, pliToken.balanceOf(address(this))), &quot;Unable to transfer&quot;);<br>    }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SVhDQeq17tWNdPVEaRCZIA.png" /></figure><p>After deployment the contract address received -&gt; <strong>xdc</strong>3017a414bf657a42fc183143e90d378f05ff0004</p><p>Fund this contract address with PLI ( let’s say 1 PLI) before you trigger alarmclock</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*vRFx905R790JaQfGcOOu8g.png" /></figure><p>Once you submit the “requestAlarm”, a job will be triggered in your PLUGIN Node like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tuS1OXIGObyqc98oNtxYZw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6SxjQxiIwDGBRzuv3UlpVA.png" /></figure><p>Yay!!!!, if you are accomplished till this!!, your node &amp; oracle with job id is ready to display in marketplace..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c3c7c862fc4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to withdraw XDC / PLI from Plugin Node & Oracle Address]]></title>
            <link>https://medium.com/@GoPlugin/how-to-withdraw-xdc-pli-from-plugin-node-oracle-address-a9ebe6ff2dd7?source=rss-fdf89b9752be------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9ebe6ff2dd7</guid>
            <category><![CDATA[goplugin]]></category>
            <category><![CDATA[decentralized-oracles]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[decentralization]]></category>
            <category><![CDATA[xinfin]]></category>
            <dc:creator><![CDATA[Plugin]]></dc:creator>
            <pubDate>Sat, 20 Nov 2021 12:54:21 GMT</pubDate>
            <atom:updated>2021-11-20T12:54:21.218Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/132/0*seNgw8h4mssy8Vlh.png" /></figure><p>This article will walk you through, how to withdraw your XDC / PLI form your Plugin Node and oracle contract address.</p><p>Whenever you setup a plugin node, a dedicated wallet will be generated and it is unique to that plugin node address. It is necessary to sufficiently fund your Plugin node with XDC for transaction fee &amp; PLI for oracle fee.</p><p>So what if you want to withdraw a portion of this to your wallet?, this guide will help you to achieve the same.</p><h3>Withdraw PLI / XDC from Plugin Node</h3><p>1 — Every plugin node generates the unique wallet and generates the private key in database</p><p>2 — You can find the “private key’” for your wallet in “Keys” table in postgres</p><p>3 — With sudo user, you can view the json value in the table</p><p>4 — copy down the json into a json file(let’s say — Test.json)</p><p>5 — Import this json into metamask to view your XDC / PLI balance</p><p>Step 1 — -</p><pre>sudo -u postgres -i</pre><p>Step 2 —</p><pre>select json from keys LIMIT 1;</pre><p>step 3 —</p><pre>copy the complete json values into a test file.. say test.json</pre><p>For ex — below data(mock) for your reference..</p><p>{“id”: “afa354f-8a9a-4cb2-ba22–8bc19d842b7d”, “crypto”: {“kdf”: “scrypt”, “mac”: “04d3dd0f3f2b44444f9350560bfa828b3658703676636c2751993c983d9b40c6”, “cipher”: “aes-128-ctr”, “kdfparams”: {“n”: 262144, “p”: 1, “r”: 8, “salt”: “6d99ff17d887763d3774aa5bc00631e2a79763be68884af1e4f262cd8cd0828”, “dklen”: 32}, “ciphertext”: “3bfee9e6ed917f1b335e95df5554ebc72c80e63979027e74634f2aebf08f02f1”, “cipherparams”: {“iv”: “eb3bcbabf6d871c829e5948da9a690c0”}}, “address”: “bb4d8683f2924473c579c539436810d5ac28aab3”, “version”: 3}</p><p>step 4 — add Xinfin mainnet in Metamask using “Add a network” option</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jctesAQZg6wZSu-vCLu64w.png" /></figure><p>Step 5 — Now choose “Import account” and select JSON file as type. (Pass word should be same as your keystore password which you entered while you setup Plugin Node)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qjn6JD3pdaX77urE6suTsA.png" /></figure><p>Note — this step will take some time so please be patient also ensure, your node is running and the Plugin UI is logged in (localhost:6688)</p><p>Step 6 — You can see the address loaded and showing the right balance of XDC &amp; PLI</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SJkAj8Bifh-OcRrTjAkfZw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hfzaQGboeXNI9VF8mb4szg.png" /></figure><p>to view the PLI balance, click “Import token”</p><p>Step 7 — Copy paste the PLI mainnet smart contract address (prefix to be changed from XDC to 0x) and click “Add custom token”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mBy6OylkeMGL8nss4j3GDw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZX-Q40GVwUfa8S19T_icSg.png" /></figure><h3>Withdaw PLI from Oracle Contract</h3><p>As a node operator, you are free to setup how much PLI to receive as fee for your oracle and those Fee can be withdrawn using the oracle smart contract using below step</p><p>Step 1 — Go to remix ( <a href="https://remix.xinfin.network/">https://remix.xinfin.network/</a> )</p><p>Step 2 — Point Environment to “Injected Web3”</p><p>Step 3 — Open your Oracle smart contract with your oracle address</p><p>Step 4 — You can see “Withdraw” option.</p><ul><li>Receipient can be your wallet where you want the PLI to be transferred or withdrawn</li><li>Amount — number of PLI’s to be withdrawn</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*E14e3lUDfNVxjiLRtP-6yw.png" /><figcaption>tep</figcaption></figure><p>After the above steps, you should be able to withdraw the PLI or XDC from your node or oracle smart contract</p><p>!!!Happy Exploring!!!</p><p>Join our discord link for any questions with respect to these — <a href="https://discord.com/invite/4ATypYHudd">https://discord.com/invite/4ATypYHudd</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9ebe6ff2dd7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup a Plugin Node — Automated way using shell script]]></title>
            <link>https://medium.com/@GoPlugin/setup-a-plugin-node-automated-way-using-shell-script-fbdec48a0dea?source=rss-fdf89b9752be------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbdec48a0dea</guid>
            <category><![CDATA[decentralized-oracles]]></category>
            <category><![CDATA[oracle]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Plugin]]></dc:creator>
            <pubDate>Fri, 19 Nov 2021 18:04:28 GMT</pubDate>
            <atom:updated>2022-04-19T08:46:08.763Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/132/0*eXr6piHT_S_-NHMd.png" /></figure><h3>******** IMPORTANT*************</h3><h3>This Article is deprecated, please read through our official docs and connect us in discord for support.</h3><h3><a href="https://docs.goplugin.co">https://docs.goplugin.co</a></h3><h3>***********</h3><p>=======================================</p><h3>Setup a Plugin Node — Automated way using shell script</h3><p>This article is in continuation to the Plugin Node setup article published <a href="https://medium.com/@GoPlugin/how-to-setup-a-plugin-node-a-decentralized-oracle-service-d959bb0a2af0"><strong>here</strong></a>.</p><p>We at GoPlugin are working towards building a better decentralized world by making the life easier for our community and users by improvising things which will help greater adaptability of our product very quickly and in a hassle-free manner.</p><p>And here we are making things easy for one of the most important actors who are helping us to achieve Trust and Reliability by the way of Decentralization, the <strong>Node Operators</strong>.</p><p>As we wanted to make the process simpler, we are releasing the Node setup Automation guide which will help to set up a Plugin Node in an easy manner. This is not the end, but we are working on Dockerizing the setup process and will be available for use sooner.</p><p><strong>IMPORTANT INFO:</strong></p><p>The setup and steps provided for initializing a Plugin Node is to be done on a cloud or remote server(which runs 24/7). Please, don’t setup in a standalone computer or system, because your standalone system could be switched off and it leads to a complete wipe out of the set up. Moreover, your repudiation will get a major hit.</p><p>Please follow the below steps to setup and run a Plugin Node.</p><h3>System Requirements :</h3><p>Operating System — Ubuntu / Linux Kernel</p><p>RAM — 2GB (minimum) — More the better</p><p>Storage Space — 50GB(minimum) — More the better</p><p>For the purpose of this demo, we use AWS EC2 instances</p><p><strong>Below mentioned steps(Step1:, Step2:) are for the latest installation scripts</strong>. Since many users in the community are following <a href="https://www.youtube.com/watch?v=GEp_OmT-WwY">Mr.Blockchain22</a>, the code explained in the video can be utilized by following method.</p><blockquote><strong>To follow Mr.Blockchain22 Video tutorial.</strong></blockquote><blockquote>Steps to be followed:<br>=====================<br>1) git clone <a href="https://github.com/GoPlugin/plugin-deployment.git">https://github.com/GoPlugin/plugin-deployment.git</a><br>2) cd plugin-deployment<br>3) git checkout plugin-dep-mb22</blockquote><h3>Step 1:</h3><p>Download Plugin deployment script:</p><blockquote>git clone <a href="https://github.com/GoPlugin/plugin-deployment.git">https://github.com/GoPlugin/plugin-deployment.git</a> &amp;&amp; cd plugin-deployment</blockquote><h3>Step 2:</h3><p>This repo contains the script for installing <a href="https://goplugin.co/">Plugin</a> Node setup which can be used by the Node operators.</p><p>There are 2 scripts in this repo(1_prerequisite.bash,2_nodeStartPM2.sh) &amp; 2 files (apicredentials.txt, password.txt).</p><ol><li>Before executing the 1_prerequisite.bash script, please change the database password to your own — strongly typed password(we just given a default as ‘postgres’, just change ‘your_password’) at line number 202 of 1_prerequisite.bash and also change the highlighted password at ‘DATABASE_URL=postgresql://postgres:<strong>postgres</strong>@127.0.0.1:5432/plugin_mainnet_db?sslmode=disable’ in file 2_nodeStartPM2.sh(line number: 12). This script will install all the prerequisite tools, utilities for Plugin.</li></ol><blockquote><strong>./1_prerequisite.bash</strong></blockquote><p>This script will install all the required packages for the setup and make it ready to use. This runs for 15to 20 minutes depending on the speed of your internet connectivity.</p><p>2. After successful execution of 1_prerequisite.bash, kindly go through the instructions to be followed for executing 2_nodeStartPM2.sh as mentioned below (‘IMPORTANT MESSAGE’).</p><p>In case of any issues, while the script runs, you will be notified with an error message and it terminates.</p><pre>#####################################################################<br># 			IMPORTANT MESSAGE                                    #<br>#     ################################################################################<br># Make sure you have the below mentioned 2  files are available and #populated  as given below. <br># Then start &#39;pm2 start 2_nodeStartPM2.sh&#39; script to run your  <br># node in the background. To view your node log use &#39;pm2 logs 0&#39;.              #<br>#                                                                              #<br># File 1: password.txt =&gt; contains your keystore password                      #<br>#  *** KEYSTORE PASSWORD SHOULD FOLLOW THIS CONDITIONS ***	     #<br>#   “must be longer than 12 characters”,			    <br>#   “must contain at least 3 lowercase characters”,	     <br>#   “must contain at least 3 uppercase characters”,	     <br>#   “must contain at least 3 numbers”,			     <br>#   “must contain at least 3 symbols”,			     <br>#   “must not contain more than 3 identical consecutive 	 #characters”.						     <br>#     <br># File 2: apicredentials.txt =&gt; first line of the file contains #email id for UI<br>#  second line of the file contains password for UI<br>#  (This password should be strong, but need not   <br>#  follow keystore password condition).	     <br>#						<br>#<br># NOTE: This 2 files have default contents, please change the mail&amp;passwords before starting &#39;pm2 2_nodeStartPM2.sh #start&#39;.			     <br>#      ####################################################################  </pre><pre>####################################################################</pre><p>3. Before proceeding to next step, please <strong>change the default contents of ‘apicredentials.txt’ &amp; ‘password.txt’ to your own credentials</strong> <strong>and safely keep note of this contents.</strong> It is important to keep note of this password somewhere. <strong>If it gets lost, there is no way to retrieve it </strong>and the funds managed by the private key also get lost. Each time you start, you need to enter this password to unlock the Keystore. The node requires to sign the transaction through the private key of the Keystore and submit it to the blockchain.</p><blockquote><strong>pm2 start 2_nodeStartPM2.sh</strong></blockquote><p>You should be able to view the logs on the console and also the list of existing jobs using below command</p><blockquote><strong>plugin jobs list</strong>:-</blockquote><p>You can now see the PLUGIN node running in the following url</p><p><a href="http://locahost:6688/"><em>http://&lt;remote-ip or localhost&gt;:6688</em></a></p><p>Login into Plugin using the email ID &amp; password, which you mentioned in apicredentials.txt file.</p><p>If you face any issues during the node setup feel free to reach us on Discord.</p><p>Join our discord link for any questions with respect to setup the node — <a href="https://discord.com/invite/4ATypYHudd">https://discord.com/invite/4ATypYHudd</a></p><p><strong><em>NOTE:</em></strong> Please try running this on Apothem network. Also we have a known issue related to importing the account to the wallet using the keys in tempdir which is being investigated by our team.</p><p>Stay tuned for more updates and thanks for your continuous support.!!</p><h4>Below are some of the FAQs and solutions to issues faced in the process.</h4><p><strong><em>1) What credentials I should feed</em></strong><br>Keystore password — This will be used to import your account into the wallet (keep it safe).<br>API email and password — This will be used to login to your Plugin Node UI (http://&lt;remote-ip or localhost&gt;:6688) once the node is up at 6688 <br>(Different from Plugin Node Dashboard (<a href="https://oracles.goplugin.co/dashboard">https://oracles.goplugin.co/dashboard</a>) or your Git login)<br> <br><strong><em>2) Not able to view the Node UI in &lt;localhost&gt; </em></strong><br>If you are running locally use localhost:6688 and if you are running on the cloud you could use &lt;public_ip&gt;:6688any queries</p><p><strong><em>3) Node is up but cannot see on the dashboard</em></strong><br>Add Node option on Dashboard initially will be available to the bounty program winners soon.<br>You can try to install the Node, test it and make sure you are successfully able to do it to ensure you are good to go.<br>Once the option to Add node option is available users can add register their node to the platform which will become Active once reviewed and approved by the Plugin Team.<br>(For non-bounty users the option to Add node will be available in Jan)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbdec48a0dea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Storing PLI on Ellipal Titan Cold Wallet]]></title>
            <link>https://medium.com/@GoPlugin/storing-pli-on-ellipal-titan-cold-wallet-5e34e2a8cafc?source=rss-fdf89b9752be------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e34e2a8cafc</guid>
            <dc:creator><![CDATA[Plugin]]></dc:creator>
            <pubDate>Sun, 14 Nov 2021 09:04:09 GMT</pubDate>
            <atom:updated>2021-11-14T09:04:09.831Z</atom:updated>
            <content:encoded><![CDATA[<p>Ellipal Titan cold wallet is purely an Air-Gapped crypto hardware wallet. Ellipal Titan cold wallet is shielded from unwarranted access, cyber-attacks, and all other liabilities which accompany the usage of the internet. A cold wallet is on the pedestal of security standards of crypto wallet. Wallet owners exercise complete ownership of their private keys. Users can opt to store their PLI risk-free on an Ellipal Titan Cold wallet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x1qpcDI8OYeNsJvrS86T4w.jpeg" /></figure><p><strong>Process of Storing PLI tokens on Ellipal Cold wallet</strong></p><p>Following are the guidelines to store your PLI tokens on the Ellipal Cold Wallet.</p><p><strong>Step-1:- Download the Ellipal app on your mobile and link it with the Ellipal cold wallet;. Navigate to the dashboard where the XDC is located.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/1*1JbFKQAVF__J1yOw47MA0A.png" /><figcaption>(XinFin Network). Click on XDC</figcaption></figure><p><strong>Step-2:- Upon clicking the XDC, the XDC (XiFin XDC Network) is accessible, tap the + button to add PLI.</strong></p><p><strong>Step-3:-</strong> <strong>Locate PLI and add it to the XDC (XinFin XDC Network).</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/282/1*_8H8nQmhXsg7iQffCqNx_A.png" /></figure><p><strong>Step-4:- Next, avail the PLI token below XDC.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/299/1*XtZKowLdohPKYgZKbPlNxw.png" /></figure><p><strong>Step-5:- Now, you can send and receive the PLI tokens on the Ellipal Titan cold wallet.</strong></p><p><strong>What is <em>Plugin</em>?</strong></p><p><strong>A Secure, Scalable Blockchain Agnostic Decentralized Oracle.</strong></p><p>Plugin’s <em>Decentralized Oracle Platform</em> facilitates a feasible panacea of solutions to any smart contract which runs on Xinfin Eco System.</p><p>Plugin allows the smart contract to link up with the real-time world along with the information that it receives from the data feed provider. Plugin maintains the highest level of security thereby fostering a trusted environment. Furthermore, Plugin’s <em>Off-chain</em> computation caters to both receiving feed from a plethora of providers and accumulating the same.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e34e2a8cafc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GOPLUGIN — How to setup external-initiator and bridge PLUGIN Node?]]></title>
            <link>https://medium.com/@GoPlugin/goplugin-how-to-setup-external-initiator-and-bridge-plugin-node-fbaf7dfaaa2?source=rss-fdf89b9752be------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbaf7dfaaa2</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[decentralization]]></category>
            <category><![CDATA[goplugin]]></category>
            <category><![CDATA[externalinitiator]]></category>
            <category><![CDATA[oracle-network]]></category>
            <dc:creator><![CDATA[Plugin]]></dc:creator>
            <pubDate>Sat, 06 Nov 2021 15:26:58 GMT</pubDate>
            <atom:updated>2021-11-07T17:54:31.008Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/132/0*m4k0NbcMF1ig110U.png" /></figure><h3>GOPLUGIN — How to setup external-initiator and bridge PLUGIN Node?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*_eT0VwWp4N8UpmZL" /></figure><h3>Xinfin Network + Plugin: Authenticated API Data pull from Vinterapi.com</h3><p>Demonstrating how to connect XDC Network and Plugin together, and thus bringing the world of oracles to Xinfin Network. This is a simple demonstration of how to use an <a href="https://github.com/GoPlugin/Xinfin-Plugin/blob/main/EI">external initiator</a> and <a href="https://github.com/GoPlugin/Xinfin-Plugin/blob/main/EA">external adapter</a> that allows for an external Authenticated API to pull the data and write on-chain through smart contract.</p><p>There are two main implications:</p><ol><li>The connection of Plugin to Xinfin Network allows for the growth of all types of oracles on Xinfin Network to power exchanges, other oracle needs, and bridge Web2 technology with Web3.</li><li>Automating the process by including the CRON so that it updates the price value periodically</li></ol><h3>Setup Steps</h3><p>Generalized setup steps for the configuration of Plugin components — more details are provided for connecting the various pieces together.</p><p>Please see <a href="https://medium.com/@GoPlugin/how-to-setup-a-plugin-node-a-decentralized-oracle-service-d959bb0a2af0">Plugin</a> <a href="https://howto.xinfin.org//">XinFin</a> documentation if more details on configuration and setup are needed.</p><h3>Steps to be done If you want to try this locally</h3><ol><li>Setup &amp; Run Plugin Node in local system</li><li>Download and Setup Customized External Initiator in local system using this PLUGIN(PLI)(External Initiator)</li><li>Deploy Contracts in Apothem Network</li></ol><ul><li>3a) Deploy PliToken.sol in “Apothem” network</li><li>3b) Deploy Oracle.sol in “Apothem” network by overriding the PLI contract address</li></ul><p>4. Run SetfulfillmentPermission of your Plugin node address in Oracle</p><p>5. Deploy XinfinVinterClient.sol in “Apothem” network</p><p>6. Fund your “XinfinVinterClient” contract address with PLI token</p><p>7. Go to PLugin GUI</p><ul><li>7a) Create a bridge to connect external adapter</li><li>7b) Create a job spec with Oracle address — It will result JOB ID</li><li>7c) Copy this JOB_ID and feed this in .env file in API_AccessRequest folder</li></ul><p>8. Fund your plugin node address(regular) with enough XDC &amp; PLI token</p><p>9. Execute VinterAPI_Adapter and keep listening for events</p><p>10. Trigger “Request.js” file to register the request</p><p>Before configuring the Plugin components, there needs to be an oracle contract on the Xinfin Network that emits events. This is needed for the EI(External Initiator) to trigger job runs on the Plugin node.</p><h3>1) Setup &amp; Run Plugin Node in local system</h3><p>This step involves running a Plugin node baremetal as specified in the <a href="https://github.com/GoPlugin/Plugin">developer documentation</a>. Below is a sample .env file that should be included in the \.plugin* or you can override in terminalfolder.</p><pre>export ETH_CHAIN_ID=51<br>export ETH_URL=wss://ws.apothem.network<br>export MIN_OUTGOING_CONFIRMATIONS=2<br>export PLI_CONTRACT_ADDRESS=0x0b3a3769109f17af9d3b2fa52832b50d600a9b1a<br>export PLUGIN_TLS_PORT=0<br>export SECURE_COOKIES=false<br>export ALLOW_ORIGINS=*<br>export DATABASE_TIMEOUT=0<br>export FEATURE_EXTERNAL_INITIATORS=true<br>export PLUGIN_DEV=true<br>export DATABASE_URL=postgresql://127.0.0.1:5432/plugin_db?sslmode=disable<br>export ENABLE_EXPERIMENTAL_ADAPTERS=true</pre><p>Then the following command is run (<em>note: may be different depending on folder configuration</em>)</p><pre>cd ~/.plugin<br>make install ( first time or whenever you make some changes) ==&gt; this step will take some time so pls be patient<br>plugin node start</pre><p>During setup, a node password and a username/password is required for setup. The node password is used each time the node is started. The username/password is used for accessing the node UI at http://&lt;localhost or remoteIP&gt;:6688 and for other parts of setup. So do not forget this password, if you forgot, then you have to redo the plugin node setup from beginning.</p><h3>2) Download and Setup Customized External Initiator in local system using this plugin(External Initiator)</h3><p>External initiators observe a blockchain node endpoint and will trigger runs on the Plugin node.<br><em>Note: Prerequisite for Go to be installed. See </em><a href="https://golang.org/doc/install"><em>here</em></a><em> for instructions.</em></p><p>Clone and build the <a href="https://github.com/XinFinOrg/Xinfin-External-Initiator/tree/master">external initiator repository</a></p><pre>git clone https://github.com/GoPlugin/external-Initiator<br>git checkout main<br>cd external-initiator<br>go install</pre><p>Create a .env file in the external-initiator folder with the following contents:</p><pre>EI_DATABASEURL=postgresql://$USERNAME:$PASSWORD@$SERVER:$PORT/$DATABASE<br>EI_CHAINLINKURL=http://localhost:6688<br>EI_IC_ACCESSKEY=&lt;INSERT KEY&gt;<br>EI_IC_SECRET=&lt;INSERT KEY&gt;<br>EI_CI_ACCESSKEY=&lt;INSERT KEY&gt;<br>EI_CI_SECRET=&lt;INSERT KEY&gt;</pre><p><em>Note: the database URL should be separate from the PLUGIN node database</em></p><p>The 4 keys in the external-initiator/.env file are generated by the Plugin node with the following process.</p><ol><li>Once you run “plugin node start” and your plugin is in running mode, then open a new terminal and type plugin admin login and the username/password from when the container is created.</li><li>To create the keys, plugin initiators create &lt;NAME&gt; &lt;URL&gt;. Note that in this case the name is xdc and the url is http://localhost:8080/jobs to access the locally run external-initiator (otherwise, they are on two different networks). The 4 keys are generated in the same order as listed above.</li></ol><p>The external initiator can be started up using:</p><pre>./external-initiator &quot;{\&quot;name\&quot;:\&quot;xinfin-testnet\&quot;,\&quot;type\&quot;:\&quot;xinfin\&quot;,\&quot;url\&quot;:\&quot;https://rpc.apothem.network\&quot;}&quot; --chainlinkurl &quot;http://localhost:6688/&quot;</pre><h3>3) Deploy Contracts in Apothem Network</h3><h4>3a) Deploy PLIToken.sol in “Apothem” network</h4><p>do download this repo and do the following</p><pre>git clone https://github.com/GoPlugin/XinFin-Plugin.git<br>cd Xinfin-Plugin</pre><p>copy PliToken.sol from contracts folder and do the deployment using remix IDE — <a href="https://remix.xinfin.network/">https://remix.xinfin.network/</a></p><p>Make sure, you have “Injected web3” and XDCPay wallet is connected. Once deployed, copy the contract address → this is going to be the key address for all the steps. This address has to be overriden in .env before you run plugin node using -&gt; PLI_CONTRACT_ADDRESS paramater</p><p>Or if you want to get PLI from faucet, try this link -&gt; <a href="https://faucet.goplugin.co/">https://faucet.goplugin.co/</a></p><p>Provide your XDCPay wallet address in 0x prefix(remove xdc &amp; replace xdc with 0x) and choose number of token you want to withdraw in APOTHEM net, once you are done then add the following contract address in your XDC Pay — Add token &amp; provide following parameters</p><p>Address — 0x33f4212b027e22af7e6ba21fc572843c0d701cd1</p><p>Decimal — 18</p><p>Symbol — PLI</p><h4>3b) Deploy Oracle.sol in “Apothem” network by overriding the PLI contract address</h4><p>copy Oracle.sol from contracts folder and do the deployment using remix IDE — <a href="https://remix.xinfin.network/">https://remix.xinfin.network/</a></p><p>Make sure, you have “Injected web3” and xinpay wallet is connected. Deploy Oracle by overriding PLI Token address which you got from step 3a) — Once deployed, copy the contract address → this is going to be the oracle address which will be overriden while you deploy Vinter contract — so keep it safe</p><p>Note: Create one .env file under “API_AccessRequest folder” and keep tracking these</p><pre>PRIVATE_KEY=<br>ACCOUNT_ADDRESS=<br>PLI_TOKEN=<br>ORACLE_CONTRACT=<br>REQUESTOR_CONTRACT=<br>JOB_ID=</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*3qSjfad4dvyyxKcs1X3zKg.png" /></figure><h3>4) Run SetfulfillmentPermission of your Plugin node address in Oracle</h3><p>Copy the “Account_address” from Plugin GUi under Key sections, you will find “regular” account. This address basically talks to Oracle contract. To enable this, we need to run “Oracle.js” from API_AccessRequest folder</p><ul><li>Make sure that you have overriden Oracle contract address &amp; Account Address in .env file</li></ul><pre>cd API_AccessRequest<br>node Oracle.js</pre><p>This step, will perform “setfulfilmentpermission” method and set the flag to “True”, after this step your Plugin node can connect with Oracle and do proper handshaking.</p><h3>5) Deploy XinfinVinterClient.sol in “Apothem” network</h3><p>copy XinfinVinterClient.sol from contracts folder and do the deployment using remix IDE — <a href="https://remix.xinfin.network/">https://remix.xinfin.network/</a></p><p>Make sure, you have “Injected web3” and xinpay wallet is connected. Deploy Contract by overriding PLI Token address which you got from step 3a) — Once deployed, copy the contract address → this is going to be the requester address which will be overriden in .env file under -&gt; REQUESTOR_CONTRACT paramaeter</p><h3>6) Fund your “XinfinVinterClient” contract address with PLI token</h3><p>Make sure you fund your contract address with enough PLI token — This is key step, without which you will not be able to trigger requestPrice function — it will throw Json-RPC error. So keep this in mind and dont skip it.</p><h3>7) Create Bridge &amp; Job Spec in Plugin GUI</h3><h4>7a) Create a bridge to register the “External adapter”</h4><ul><li>Login Plugin UI using the email ID &amp; Password which you have setup during plugin node setup</li><li>Go to Bridge section</li><li>Give a name(user defined) for ex — cyrptoprice</li><li>Give a URL and it should be <a href="http://localhost:5000/">http://&lt;</a>localhost or remoteIP&gt;<a href="http://localhost:5000/">:5000</a></li></ul><p>once done, save this and you should be good.</p><h4>7b) Create a Job ID using following job spec</h4><ul><li>Login plugin UI using the email ID &amp; Password which you have setup during plugin node setup</li><li>Go to Job section</li><li>Click “New Job” and copy paste the following job spec</li></ul><pre>{<br>  &quot;initiators&quot;: [<br>    {<br>      &quot;type&quot;: &quot;external&quot;,<br>      &quot;params&quot;: {<br>        &quot;name&quot;: &quot;xdcnew&quot;,<br>        &quot;body&quot;: {<br>          &quot;endpoint&quot;: &quot;xinfin-testnet&quot;,<br>          &quot;addresses&quot;: [&quot;0xac01be7848651fbc7a9f3e8b72f9d47a0f4ceb47&quot;]<br>        }<br>      }<br>    }<br>  ],<br>  &quot;tasks&quot;: [<br>    {<br>      &quot;type&quot;: &quot;cryptoprice&quot;<br>    },<br>    {<br>      &quot;type&quot;: &quot;copy&quot;,<br>        &quot;params&quot;: {<br>        &quot;copyPath&quot;: [<br>          &quot;result&quot;<br>        ]<br>      }<br>    },<br>    {<br>      &quot;type&quot;: &quot;multiply&quot;<br>    },<br>    {<br>      &quot;type&quot;: &quot;ethuint256&quot;<br>    },<br>    {<br>       &quot;type&quot;: &quot;EthTx&quot;<br>    }<br>  ]<br>}</pre><p>The initiators set the contract address that triggers the Plugin node to initiate a specific job, while tasks defines the work pipeline for this job. Note that the parameter “address: 0xac01be7848651fbc7a9f3e8b72f9d47a0f4ceb47” indicates that the node will only listen to that address for the job ID, which should be updated with the deployed Oracle contract address properly.</p><p>For example, the “tasks” define that the PLugin node will first retrieve data from the external adapter “cryptoprice” (i.e., the Bridge will interact with the URL endpoint of external adapter to access the data in JSON format), copy the data field, multiply it by 100, and convert it into uint256 type. The new Job can be found in the Tab of “Jobs” as below.</p><p>once done, save this and you should be get a job ID in this format → 8cbc3e6ceed04d5b9a7591374325b640</p><h4>7c) Copy this JOB_ID and feed this in .env file in API_AccessRequest folder</h4><p>This job id should be overriden in .env file. Everytime, you creates a new job, that has to be overriden in .env file. Since this job Id &amp; Oracle is tightly coupled which bridge the pipeline.</p><h3>8) Fund your plugin node address(regular) with enough XDC &amp; PLI token</h3><p>Fund your plugin node address (Regular) with enough XDC &amp; PLI token. Once you transfer enough token and XDC, you will be able to see the balances in Plugin GUI under Key Sections.</p><h3>9) Execute VinterAPI_Adapter and keep listening for events</h3><p>External adapters are provided in the <a href="https://github.com/GoPlugin/Xinfin-Plugin/blob/main/VinterAPI_Adapter">VinterAPI_Adapter</a> folder. They are simple servers built using Express that receives a post API call from the Plugin node and sends the information to the smart contract on Xinfin Network.</p><p>It requires a .env file in the folder that contain:</p><pre>API_KEY=APIkey of vinterapi.com</pre><pre>cd VinterAPI_Adapter<br>yarn<br>yarn start</pre><p>Don’t forget to install packages with yarn and then start the servers with yarn start. The external servers will start on <a href="http://localhost:5000">http://localhost:5000</a></p><h3>10) Trigger “Request.js” file to register the request</h3><p>Now it is time to trigger the request and register our requestPrice. Before you do so, please</p><pre>cd API_AccessRequest<br>yarn add &quot;xdc3&quot;<br>yarn add &quot;plugin-test-helpers&quot;<br>yarn start<br>node Request.js</pre><p>Note:</p><ul><li>Make sure, you have proper values set in .env file in this folder.</li></ul><p>Once the above step is successful, you will be able to see the job is triggered in Plugin UI and task will be succesfully writing price on blockchain.</p><p>!!!Happy Exploring!!!</p><p>Join our discord link for any questions with respect to setup the node — <a href="https://discord.com/invite/4ATypYHudd">https://discord.com/invite/4ATypYHudd</a></p><p>— Docker mode setup is in progress, should be out soon —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbaf7dfaaa2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to setup a Plugin Node- A Decentralized Oracle Service]]></title>
            <link>https://medium.com/@GoPlugin/how-to-setup-a-plugin-node-a-decentralized-oracle-service-d959bb0a2af0?source=rss-fdf89b9752be------2</link>
            <guid isPermaLink="false">https://medium.com/p/d959bb0a2af0</guid>
            <category><![CDATA[decentralization]]></category>
            <category><![CDATA[goplugin]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[oracle-network]]></category>
            <category><![CDATA[xinfin]]></category>
            <dc:creator><![CDATA[Plugin]]></dc:creator>
            <pubDate>Fri, 05 Nov 2021 16:59:49 GMT</pubDate>
            <atom:updated>2021-11-24T10:36:15.840Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/132/0*3w3xeU_HVaSLA3EL.png" /></figure><p>Blockchain is evolving every week and we get to hear back about new innovations in the field. While it is important to adopt the blockchain for every industry and it is equally important as to bridge the blockchain to the external world so it can communicate to pull and push the data onto Decentralized network.</p><p>Plugin is one such network which is decentralized oracle that helps blockchain system to connect to the external world. Let’s dive in to the article and see how we can setup a Plugin node in development mode.</p><h3><strong>What is Plugin?</strong></h3><p><strong>Secure, Scalable Blockchain Agnostic Decentralized Oracle</strong></p><p>Decentralized Oracle Platform, provides cost effective solutions to any smart contract which runs on Xinfin Eco System.</p><p>Plugin enables the smart contract to connect with the real-time world and the data that it receives from the data feed provider is trustable by maintaining high degree of security. Off-chain computation it does takes care of receiving feed from multiple provider and aggregates the same.</p><h3>System Requirements :</h3><p>Operating System — Ubuntu / Linux Kernel</p><p>RAM — 2GB (minimum) — More the better</p><p>Storage Space — 50GB(minimum) — More the better</p><p>For the purpose of this demo, we use AWS EC2 intance</p><p><strong><em>Let’s set the environment right by following these steps.</em></strong></p><p><strong>Step 1–-</strong> <a href="https://golang.org/doc/install">Install Go 1.1</a>7, and add your GOPATH’s <a href="https://golang.org/doc/code.html#GOPATH">bin directory to your PATH</a></p><pre>sudo apt remove --autoremove golang</pre><pre>sudo rm -rf /usr/local/go</pre><pre>sudo tar -C /usr/local -xzf ~/Downloads/go*.linux-amd64.tar.gz</pre><pre>sudo sh -c &#39;echo &quot;export PATH=$PATH:/usr/local/go/bin&quot; &gt;&gt; /etc/profile&#39;</pre><ul><li>sudo nano ~/.profile</li></ul><pre>export GOROOT=$HOME/go<br>export GOPATH=$HOME/work<br>export PATH=$PATH:$GOROOT/bin:$GOPATH/bin</pre><ul><li>source ~/.profile</li></ul><p><strong>Step 2 — </strong>Install <a href="https://nodejs.org/en/download/package-manager/">NodeJS 12.18</a> &amp; <a href="https://yarnpkg.com/lang/en/docs/install/">Yarn</a></p><ul><li>curl -fsSL <a href="https://deb.nodesource.com/setup_12.x">https://deb.nodesource.com/setup_12.x</a> | sudo -E bash -</li><li>sudo apt-get install -y nodejs</li></ul><p>NVM</p><ul><li><a href="https://github.com/nvm-sh/nvm#install--update-script">https://github.com/nvm-sh/nvm#install--update-script</a></li><li>wget -qO- <a href="https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh">https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh</a> | bash</li><li>It might be easier long term to use <a href="https://nodejs.org/en/download/package-manager/#nvm">nvm</a> to switch between node versions for different projects: nvm install 12.18 &amp;&amp; nvm use 12.18</li></ul><p>YARN</p><ul><li>sudo npm install — global yarn</li></ul><p><strong>Step 3 —</strong> Install <a href="https://wiki.postgresql.org/wiki/Detailed_installation_guides">Postgres (&gt;= 11.x)</a>.</p><ul><li>You should <a href="https://www.postgresql.org/docs/12/ssl-tcp.html">configure Postgres</a> to use SSL connection</li><li><a href="https://www.postgresql.org/download/linux/ubuntu/">https://www.postgresql.org/download/linux/ubuntu/</a></li><li>sudo apt-get install postgresql-12</li><li>sudo systemctl start postgresql@12-main</li></ul><p><strong>Step 4 — </strong>Download Plugin: git clone <a href="https://github.com/GoPlugin/Plugin">https://github.com/GoPlugin/Plugin</a> &amp;&amp; cd Plugin</p><ul><li>sudo apt install make</li><li>apt-get install build-essential</li><li>make install</li><li>yarn install</li><li>Build and install Plugin: make install</li><li>If you get any errors regarding locked yarn package, try running yarn install before this step</li><li>If yarn install throws a network connection error, try increasing the network timeout by running yarn install --network-timeout 150000 before this step</li></ul><p><strong>Step 5 — </strong>Run the node</p><p>By now, you are good with the environment setup &amp; ready to bootstrap the PLUGIN node. Before you start the plugin node, you need a database to setup in POSTGRES.</p><pre>sudo -u postgres psql<br>create database plugin_db;<br>alter user postgres PASSWORD &#39;YOURSTRONGPASSWORD&#39;;</pre><p>Below environment variables need to be set in order to get connected with Apothem Network using websocket</p><pre>export<strong> ETH_CHAIN_ID=51</strong><br>export <strong>ETH_URL=wss://ws.apothem.network</strong><br>export MIN_OUTGOING_CONFIRMATIONS=2<br>export PLI_CONTRACT_ADDRESS=0x0b3a3769109f17af9d3b2fa52832b50d600a9b1a<br>export PLUGIN_TLS_PORT=0<br>export SECURE_COOKIES=false<br>export ALLOW_ORIGINS=*<br>export DATABASE_TIMEOUT=0<br>export FEATURE_EXTERNAL_INITIATORS=true<br>export PLUGIN_DEV=true<br>export DATABASE_URL=postgresql://127.0.0.1:5432/plugin_db?sslmode=disable<br>export ENABLE_EXPERIMENTAL_ADAPTERS=true</pre><p>Now, start your “Node” using below command</p><pre>plugin node start</pre><p>During initial setup, administrator has to set a Keystore password and the confirmation of the node account. It is important to keep note of this password somewhere. If it gets lost, there is no way to retrieve it and the funds managed by the private key also get lost. Each time you start, you need to enter this password to unlock the Keystore.</p><p><strong>*** KEYSTORE PASSWORD SHOULD FOLLOW THIS CONDITIONS ***</strong></p><ul><li>“must be longer than 12 characters”,</li><li>“must contain at least 3 lowercase characters”,</li><li>“must contain at least 3 uppercase characters”,</li><li>“must contain at least 3 numbers”,</li><li>“must contain at least 3 symbols”,</li><li>“must not contain more than 3 identical consecutive characters”,</li></ul><p>The node requires to sign the transaction through the private key of the Keystore and submit it to the blockchain.</p><p>You should be able to view the list of existing jobs using below command</p><pre>plugin jobs list</pre><p>Hope you are able to setup and see the PLUGIN running in the following url</p><p><a href="http://locahost:6688">http://&lt;remote-ip or localhost&gt;:6688</a></p><p>Login into Plugin using the email ID &amp; password, you had setup using <strong>Step 5</strong></p><p>— Let us know if you face any issues during the node setup in Discord</p><p>We will soon come back with another article to setup External Initiators &amp; show you, how to get connected these two ( Plugin Node &amp; External Initiator) to deploy your first oracle service.</p><p>!!!Happy Exploring!!!</p><p>Join our discord link for any questions with respect to setup the node — <a href="https://discord.com/invite/4ATypYHudd">https://discord.com/invite/4ATypYHudd</a></p><p>— Docker mode setup is in progress, should be out soon —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d959bb0a2af0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>