### The Distributed Network DLUX is run on Open_Token software that is meant to be a modular architecture for community management. As we build toward our future it's only becoming more apparent that trust is paramount to maintain society. Open_Token is a Proof of Stake system to determine truth in a distributed system that's primary goal is processing a chain of transactions and determining changes to the community state file. Open_Token should be modular across multiple blockchains as well; allowing for nodes to report on truth in other APIs. With the coming introduction of multiple authority keys, side processes can easily be implemented to include a process hash with the consensus reports. Allowing Layer 3 systems to be run by a subgroup of nodes.  Explained Building a Module: Build a Commuity Fork of the software: ``` $ git clone https://github.com/dluxio/dlux_open_token.git $ cd Open_Token $ git checkout -b sub-branch // git checkout sub-branch $ npm install $ vim index.js // nano index.js // code index.js ``` File Structure here is pretty simple, You'll need to add a line like the following: ``` // function startApp() { processor = hiveState(client, hive, startingBlock, 10, config.prefix, streamMode, cycleAPI); + processor.on('customFunction', newFunction) processor.on('send', HR.send); ``` This will call `newFunction()` when a custom_json tx is found in a block with the id `coinprefix_customFunction` Then define your function to handle a discrete memory system and the Process Chain object You can of course locate these in the HR obj for tidiness ``` function newFunction = (json, from, active, pc) => { // types: // OBJ from custom_json parsed to an obj with block_num and transaction ID // STRING who signed // BOOL for active key | posting key // OBJ Process Chain controller var postPromise = getPathObj(['posts', `${json.a}/${json.p}`]); //active PoB posts in consensus var nodeMarket = getPathObj(['markets', 'node']); //where node reports are stored pc[0](pc[2]) // Execute the process chain's next function outside of the Promise Promise.all([postPromise, nodeMarket]) .then(function(v) { var post = v[0]; var reports = v[1]; ops = [], if (Object.keys(post).length) { //sanity check for nil returns if (from == plasma.custom_func.auths[from].self) { //pull from a json memory client.database.call('get_content', [json.a, json.p]).then(result => { //Do something clever with information from anywhere item = scan_for_computable_data(result) plasma.custum_func.hashable.things[item.id] = item }); }) } } }) .catch(function(e) { console.log(e); }); } ``` Depending on what API is drawn from will determine a hashable / consensable result. These should all be relatively live but be careful of things like votes that can change from second to second. and how you want to handle microforking. result."last_update" might be checked for >5 minute update time with an appropriate catcher to ask again after the remaining time has elapsed. A great place to trigger a chron function: ``` if (num % 100 === 5 && processor.isStreaming()) { //block number mod and live update. //check_function(num) //not promised, read only } + if (num % 45 === 50 && processor.isStreaming()) { //reports go out at 100, set a time to consolidate or make reports custom_report(plasma) //plasma is the existing non-consensus node memory .then(nodeOp => { //Return a nodeOp to schedule txs on the next block console.log(nodeOp) NodeOps.unshift(nodeOp) //unshift for immediate | push for queued execution }) //to sign custom reports shift an Operation to be signed into the queue // nodeOp = [ //formatting help // [0,0], //counter for broadcast errors // [ // ["custom_json", { //or op of your choice // required_auths: [config.username], // required_posting_auths: [], // id: `${config.prefix}newFunction}`, // json: JSON.stringify({ // hash: plasma.custom_func.hash, // block: plasma.hashBlock, // p: 'permlink' //address for mock function above, // a: `author` // }) // } // ] // ] // ] //or trigger a broadcast for a different wallet .catch(e => { console.log(e) }) } ``` Saving the side chain's memory can be done by saving it to IPFS and putting the hash in plasma.privHash which automatically posts with the consensus Layer2 posts. Giving you a way to manage restarts and microforks. ### Multi-Sig What is arguably the most important feature to come to Hive's Layer 2 is autonomous multi-sig. Which let's interested accounts collectively control outflows from a main net account. This tool adds major trust improvements which enable features like partial fills of DEX trades, and cross chain bridges to chain controlled accounts. That's right, the ultimate DAO. I hope you can take a few seconds to support [Proposal 171](https://peakd.com/proposals/171) ### What is possible? Build and maintain sub tokens. These can be for projects, NFTs, tokenization of property, computing that requires multi-party verification. Automate tasks that are dependent on chain transactions. Anything you could write a smart contract for... What can't it do? What would you like to see improve, what do you envision people collectively managing?
author | disregardfiat |
---|---|
permlink | distributed-computing-with-open-token-and-hive |
category | hive-167922 |
json_metadata | "{"app":"peakd/2021.05.5","format":"markdown","description":"The basic idea for building Layer 3 via DLUX","tags":["defi","dao","dlux"],"users":[],"image":["https://files.peakd.com/file/peakd-hive/disregardfiat/23tGw3Vb24ar5HRhTYrGNXJdxm6kzbf2j4tnCV8u1dSg5REeCnyCec8wSLKddphBnLLPA.png"]}" |
created | 2021-06-04 20:13:39 |
last_update | 2021-06-04 20:13:39 |
depth | 0 |
children | 3 |
last_payout | 2021-06-11 20:13:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 7.026 HBD |
curator_payout_value | 6.365 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 6,022 |
author_reputation | 345,167,653,752,093 |
root_title | "Distributed Computing with Open Token and Hive" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 104,133,231 |
net_rshares | 22,532,181,158,354 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
onealfa | 0 | 7,902,791,597 | 14.92% | ||
netaterra | 0 | 177,066,333,034 | 7% | ||
oldtimer | 0 | 4,372,670,853 | 14% | ||
seckorama | 0 | 14,266,297,933 | 10.4% | ||
disregardfiat | 0 | 65,825,560,481 | 100% | ||
dylanhobalart | 0 | 55,619,749,120 | 22% | ||
siniceku | 0 | 142,179,835 | 25.1% | ||
udeesther | 0 | 769,001,096 | 100% | ||
preparedwombat | 0 | 424,846,257,012 | 42% | ||
jerrybanfield | 0 | 84,394,866,442 | 10% | ||
ammonite | 0 | 293,461,706,374 | 100% | ||
wdougwatson | 0 | 3,411,284,215 | 100% | ||
adambarratt | 0 | 4,465,343,184 | 25% | ||
sujitsawant | 0 | 69,245,138,776 | 100% | ||
ahlawat | 0 | 1,946,676,386 | 8.4% | ||
duekie | 0 | 130,145,060 | 100% | ||
nuthman | 0 | 1,851,050,884,326 | 100% | ||
nadhora | 0 | 1,255,011,476 | 46.6% | ||
bahagia-arbi | 0 | 20,073,205,836 | 100% | ||
stoodkev | 0 | 5,386,309,549,084 | 100% | ||
pele23 | 0 | 141,802,338,581 | 30% | ||
amphlux | 0 | 2,524,488,032 | 100% | ||
yangyanje | 0 | 64,823,719,099 | 100% | ||
rodent | 0 | 4,774,697,230 | 22.5% | ||
b00m | 0 | 5,439,929,306 | 12.5% | ||
sgt-dan | 0 | 56,201,058,063 | 25% | ||
fjcalduch | 0 | 2,332,075,601 | 1% | ||
hetty-rowan | 0 | 4,516,318,000 | 12.5% | ||
hallmann | 0 | 835,101,608,378 | 100% | ||
edicted | 0 | 7,304,601,587,180 | 100% | ||
shmoogleosukami | 0 | 23,265,964,098 | 10% | ||
dwayne16 | 0 | 2,203,665,816 | 100% | ||
erikah | 0 | 310,014,579,194 | 25% | ||
bil.prag | 0 | 108,054,868,565 | 20% | ||
abrockman | 0 | 23,932,655,294 | 10% | ||
phasewalker | 0 | 33,977,847 | 0.2% | ||
dlux-io | 0 | 1,737,500,351,417 | 100% | ||
fw206 | 0 | 410,032,825,106 | 100% | ||
davidesimoncini | 0 | 3,805,902,324 | 28% | ||
spamfarmer | 0 | 1,889,348,220 | 25% | ||
strumcoach | 0 | 987,717,631 | 100% | ||
haccolong | 0 | 5,310,389,555 | 10.1% | ||
smartvote | 0 | 44,101,063,616 | 2.1% | ||
bezkresu | 0 | 5,048,893,691 | 100% | ||
luppers | 0 | 15,861,080,053 | 1.25% | ||
bengiles | 0 | 739,374,193,201 | 100% | ||
harpreetjanda | 0 | 402,520,289 | 2% | ||
pauliinasoilu | 0 | 8,833,179,255 | 100% | ||
misterc | 0 | 73,224,678,764 | 50% | ||
khan.dayyanz | 0 | 897,372,920 | 5% | ||
charitycurator | 0 | 6,134,315,956 | 12.5% | ||
jacuzzi | 0 | 8,799,381,782 | 12.5% | ||
richardfyates | 0 | 24,298,043,092 | 100% | ||
joseph230 | 0 | 1,993,427,338 | 100% | ||
hashkings | 0 | 81,776,709,394 | 100% | ||
javiersebastian | 0 | 18,048,700,893 | 100% | ||
tiffin | 0 | 1,305,626,557 | 12.5% | ||
mindtrap-leo | 0 | 600,922,586 | 25% | ||
no-advice | 0 | 3,885,873,299 | 100% | ||
ejmh | 0 | 1,139,069,776 | 25% | ||
taskmaster4450le | 0 | 115,867,905,228 | 25% | ||
urun | 0 | 23,032,465,276 | 100% | ||
tonimontana.leo | 0 | 823,810,154 | 30.8% | ||
therealyme | 0 | 446,129,792,190 | 7% | ||
lnakuma | 0 | 2,220,217,184 | 25% | ||
sharkthelion | 0 | 336,007,846,468 | 100% | ||
davidlionfish | 0 | 35,313,215,770 | 50.3% | ||
beewolf | 0 | 70,188,540 | 37.5% | ||
kyleana | 0 | 7,916,949,406 | 100% | ||
localgrower | 0 | 2,151,504,793 | 12.5% | ||
dealhunter | 0 | 190,523,769 | 25% | ||
maltchrist | 0 | 617,559,864 | 100% | ||
nelizareva | 0 | 240,845,956 | 100% | ||
deadswitch | 0 | 918,053,199 | 25% | ||
rupinder | 0 | 432,399,051 | 2% | ||
lbi-token | 0 | 91,612,021,022 | 25% | ||
gptfan | 0 | 576,779,680 | 100% | ||
news.hobo.run | 0 | 653,561,447 | 100% | ||
mrhappypants | 0 | 3,489,765,443 | 100% | ||
thebeardflex | 0 | 1,494,591,529 | 14.32% | ||
bananass | 0 | 9,413,380,534 | 9.69% | ||
zdigital222 | 0 | 260,048,288 | 88.6% | ||
star.leo | 0 | 654,303,398 | 25% | ||
drricksanchez | 0 | 524,134,085 | 3.5% | ||
mohammad12kh | 0 | 14,945,497,692 | 100% | ||
stellify | 0 | 5,936,020,088 | 100% | ||
sagardyola | 0 | 605,285,983 | 47% | ||
dandelionfluff | 0 | 1,809,518,407 | 100% | ||
rsntpl | 0 | 0 | 1.11% | ||
primalamusica | 0 | 168,697,808,601 | 50% | ||
ch41m1e | 0 | 29,669,771,566 | 50% | ||
venus2203 | 0 | 678,352,028,572 | 100% | ||
amyli33 | 0 | 123,596,052 | 100% |

author | fjcalduch |
---|---|
permlink | re-disregardfiat-qubwg8 |
category | hive-167922 |
json_metadata | {"tags":["hive-167922"],"app":"peakd/2021.05.5"} |
created | 2021-06-07 11:12:09 |
last_update | 2021-06-07 11:12:09 |
depth | 1 |
children | 0 |
last_payout | 2021-06-14 11:12:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 137 |
author_reputation | 64,019,430,177,639 |
root_title | "Distributed Computing with Open Token and Hive" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 104,185,440 |
net_rshares | 0 |
Cool post! Let's be friends :D
author | phasewalker |
---|---|
permlink | re-disregardfiat-202166t081477z |
category | hive-167922 |
json_metadata | {"tags":["defi","dao","dlux"],"app":"ecency/3.0.17-vision","format":"markdown+html"} |
created | 2021-06-05 22:08:12 |
last_update | 2021-06-05 22:08:12 |
depth | 1 |
children | 1 |
last_payout | 2021-06-12 22:08:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 30 |
author_reputation | -39,005,620,294,143 |
root_title | "Distributed Computing with Open Token and Hive" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 104,154,060 |
net_rshares | 0 |
Ok, I followed you. Hope to see you on [discord](https://discord.gg/Beeb38j)
author | disregardfiat |
---|---|
permlink | re-phasewalker-qu9ed6 |
category | hive-167922 |
json_metadata | {"tags":["hive-167922"],"app":"peakd/2021.05.5"} |
created | 2021-06-06 02:46:21 |
last_update | 2021-06-06 02:46:21 |
depth | 2 |
children | 0 |
last_payout | 2021-06-13 02:46:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 76 |
author_reputation | 345,167,653,752,093 |
root_title | "Distributed Computing with Open Token and Hive" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 104,157,897 |
net_rshares | 0 |