<p>NOMP actually implements <a href="https://github.com/zone117x/node-open-mining-portal/#features" rel="nofollow noreferrer">MPOS compatibility mode</a>, so you can reference the data format it writes to MySQL: <a href="https://github.com/zone117x/node-open-mining-portal/blob/master/libs/mposCompatibility.js" rel="nofollow noreferrer">mposCompatibility.js</a>. For example:</p>

<p><strong>Storing shares:</strong></p>

<pre><code>INSERT INTO `shares` SET time = NOW(), rem_host = ?, username = ?, our_result = ?, upstream_result = ?, difficulty = ?, reason = ?, solution = ?
</code></pre>

<p><strong>Updating Miner Difficulty:</strong></p>

<pre><code>UPDATE `pool_worker` SET `difficulty` = ' + diff + ' WHERE `username` = ' + connection.escape(workerName)
</code></pre>

<p><strong>New Pool Worker:</strong></p>

<pre><code>INSERT INTO `pool_worker` (`account_id`, `username`, `password`) VALUES (?, ?, ?)
</code></pre>

CC BY-SA 4.0
2019-01-04T23:26:42.743Z
What data (tables and their schema) needs to be written to mySQL for a stratum server to be MPOS compatible?
sinoTrinity
CC BY-SA 4.0
2019-01-04T23:45:40.863Z
See this link https://github.com/MPOS/php-mpos/issues/2771 if anyone is interested.
sinoTrinity
CC BY-SA 4.0
2019-01-04T20:41:35.367Z
2019-01-04T22:09:45.957Z
2019-01-04T22:09:45.957Z
JBaczuk
<p>I'm setting up <a href="https://github.com/MPOS/php-mpos/wiki/Quick-Start-Guide" rel="nofollow noreferrer">MPOS</a>. There are 3 stratum server options: <a href="https://github.com/ahmedbodi/stratum-mining" rel="nofollow noreferrer">stratum-mining</a>, NOMP, and CoiniumServ. How does MPOS talk with stratum server? AFAIK, MPOS does not speak stratum protocol. Is it through the shared mysql database, where stratum server writes to it (e.g., submitted shared) and MPOS retrieves from.</p>

<p>I'm trying to use a stratum server other than the 3 options above, thus trying to see how to make it compatible with MPOS.</p>

<mining-pools><stratum>
How does MPOS communicate with stratum server?
sinoTrinity
# How does MPOS communicate with stratum server?

(Asked by: username_0 on 2019-01-04)

I'm setting up [MPOS](https://github.com/MPOS/php-mpos/wiki/Quick-Start-Guide). There are 3 stratum server options: [stratum-mining](https://github.com/ahmedbodi/stratum-mining), NOMP, and CoiniumServ. How does MPOS talk with stratum server? AFAIK, MPOS does not speak stratum protocol. Is it through the shared mysql database, where stratum server writes to it (e.g., submitted shared) and MPOS retrieves from.

I'm trying to use a stratum server other than the 3 options above, thus trying to see how to make it compatible with MPOS.

**Tags:** mining-pools, stratum


---

## 1 answers

### Answer by username_1 on 2019-01-04. Score: 2 | Accepted answer

NOMP actually implements MPOS compatibility mode, so you can reference the data format it writes to MySQL: mposCompatibility.js. For example:
Storing shares:
INSERT INTO `shares` SET time = NOW(), rem_host = ?, username = ?, our_result = ?, upstream_result = ?, difficulty = ?, reason = ?, solution = ?

Updating Miner Difficulty:
UPDATE `pool_worker` SET `difficulty` = ' + diff + ' WHERE `username` = ' + connection.escape(workerName)

New Pool Worker:
INSERT INTO `pool_worker` (`account_id`, `username`, `password`) VALUES (?, ?, ?)

> **Comments:**
> **username_0**: What data (tables and their schema) needs to be written to mySQL for a stratum server to be MPOS compatible?  
> **username_0**: See this link https://github.com/MPOS/php-mpos/issues/2771 if anyone is interested.  

---

