brunoblock / oystermesh

Oyster Mesh. Bandwidth Bound Consensus.
https://top.oyster.org
GNU General Public License v3.0
14 stars 4 forks source link

Oyster

Bandwidth Bound Consensus.

The Mesh

NOTICE: The mesh is currently offline or inaccessible whilst V6 development is underway

The Oyster Mesh Protocol provides:

Akoya Digital Currency

Akoya wallet + node: https://oyster.org/#akoya

Akoya testnet faucet: https://top.oyster.org/oy_akoya_faucet.html

Akoya characteristics:

Coin information:

Akoya for personal/commercial financial transactions:

Akoya for IoT Infrastructure:

Website Monetization

Here is the fully functioning one line of code for website monetization:

<script id="oy.js" payout=“AKOYA_ADDRESS” src="https://oyster.org/oy.js"></script>

Instructions:

  1. Go to https://oyster.org/#akoya and generate/load a wallet.
  2. Copy the public key to your clipboard.
  3. Replace AKOYA_ADDRESS with your public key.
  4. Add the one line code to the <head> section of your website.

That’s all it takes. You can check your dive earnings by loading your wallet at https://oyster.org/#akoya.

Oyster only consumes a significant amount of bandwidth, CPU usage is negligible. In future revisions there will be more advanced features like disabling ads only if the script confirms that they are diving on the mesh, scripted consent notices etc.

Don’t forget that fees are paid per wallet, not per transaction, so if you dive once for only a tiny amount your small earnings will eventually get consumed by the reoccurring microfee. Also keep in mind that these are testnet coins, balances will get periodically reset.

Data Push/Pull Example

Required files are oysterdepend.js (dependencies like PeerJS) and oystermesh.js (protocol logic):

<script src="https://github.com/brunoblock/oystermesh/raw/master/oysterdepend.js"></script>
<script src="https://github.com/brunoblock/oystermesh/raw/master/oystermesh.js"></script>

Example for pushing and then pulling data to/from the Oyster mesh:

function render(superhandle, data) {
    alert(data);//alert the data pulled from the mesh
}

function example() {
    let glue_count = 0;//track how many times the data has been stored on the mesh
    let callback = function() {//this callback is called when a data nonce (part) is confirmed as deposited on the mesh
        glue_count++;
        if (glue_count>=5) {//stop pushing when the data has been stored 5+ times on the mesh
            window.OY_DATA_PUSH[handle] = false;//stop pushing the data to the mesh by referencing the handle (data ID only, no decryption key included)
            oy_data_pull(superhandle, render);//pull the data from the mesh by referencing the superhandle (data ID + decryption key)
        }
    };

    let superhandle = oy_data_push("EXAMPLE-DATA-HERE", callback);//call protocol function to push data to mesh
    let handle = superhandle.split("@")[0].substr(0, 46);//superhandle is the key to identify and unlock the data, handle skips the decryption part and is used to manage threads
}

oy_init(example);//run example after oyster initializes via callback

See https://github.com/brunoblock/oystermesh/blob/master/example.html

Browser Support

Firefox

Firefox is the best browser to run Oyster. Connections are stable and CPU usage is minimal. I have noticed that, rarely, Oyster will run sluggishly after 12+ hrs of running continuously in Firefox and restarting the browser is the only solution. Make sure to use the latest stable version of Firefox.

Chrome

Chrome runs Oyster fine for 1 hour or less. Chrome has a known bug that affects all webRTC projects: https://bugs.chromium.org/p/chromium/issues/detail?id=825576. This bug will cause new webRTC connections to fail after ~1.5hrs of continuous use without a refresh. Otherwise Chrome works fine albeit with slightly heavier CPU usage than Firefox.

Safari

Safari used to work but was recently broken by a recent Apple update.

Questions/Contact

Open a Github issue if you have any questions about the technology.

Join us at the mesh chat room: https://oyster.org/#oystertalk.mesh

License

This project is licensed under GNU GPLv3 - see the LICENSE.md file for details.