- 12 peers
- for 5 rounds, each peer takes turns
- when it's each peer's turn, it pushes 20 characters to the RGA
Source: https://github.com/jimpick/peer-base/commit/d105155f893a464b5bb3d99d9b2e71a4ad8de048
Source: https://github.com/jimpick/peer-base/commit/d105155f893a464b5bb3d99d9b2e71a4ad8de048
Starting Rendezvous | |
Test Run 1 of 15 | |
PID: 8745 | |
Test Node.js | |
rendezvous: Listening on: http://0.0.0.0:9090 | |
[0m[0m | |
[0m collaboration with random changes[0m | |
Swarm listening on /ip4/127.0.0.1/tcp/9090/ws/p2p-websocket-star/ipfs/Qmc5WHmQzyBn9pi6qrMg9XHcU7m51Myo5CchEjMb3qmFo9 |
$ node rga-fail.js | |
replicaPear initial: p | |
replicaVowels: ea | |
replicaPear after applying vowels: pea | |
replicaPear final: pear | |
Apply deltas in original order: | |
replica1: pear | |
Apply deltas in modified order: |
// To run: node -r esm read-log | |
import ssbClient from 'ssb-client' | |
import pull from 'pull-stream' | |
import toIterator from 'pull-stream-to-async-iterator' | |
import { promisify } from 'util' | |
const openSsbClient = promisify(ssbClient) | |
async function run () { |
$ hexdump db-from-beaker/content/bitfield | |
0000000 05 02 57 00 00 0d 00 00 00 00 00 00 00 00 00 00 | |
0000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | |
* | |
0000d20 |
const CRDT = require('delta-crdts') | |
const ORMap = CRDT('ormap') | |
const membersPinner = ORMap('peer-zbe') | |
membersPinner.applySub('zbe', 'mvreg', 'write', [ 'maddr/zbe' ]) | |
console.log('pinner 1', membersPinner.value()) | |
console.log('pinner 1 state()', membersPinner.state()) |
{ | |
"handle": "Jim Pick", | |
"ipfsId": "QmX7S4KLxVfhMT7BwsyA2GkKfWD7LPHgPdK75pzErgqBWG", | |
"proof": { | |
"message": { | |
"statement": "I am @jimpick on github.com", | |
"username": "@jimpick", | |
"service": "github.com" | |
}, | |
"timestamp": 1541007329378, |
console.log(JSON.stringify([[...doc.shared.state()[0]], [...doc.shared.state()[1]], [...doc.shared.state()[2]]], null, 2)) |
$ echo 'record a' > record-a.bin | |
$ hexdump -C record-a.bin | |
00000000 72 65 63 6f 72 64 20 61 |record a| | |
00000008 | |
$ ipfs dag put -f raw --input-enc raw --hash blake2b-256 record-a.binzCT5htkeC8GjDQn53ve8HDuhFQS8q4UVh7NX9KhNHSjnAczWEUbS | |
$ cid format zCT5htkeC8GjDQn53ve8HDuhFQS8q4UVh7NX9KhNHSjnAczWEUbS -b base16 -f '%c%L %h %D' | |
raw 32 blake2b-256 d4309131176a941e14881dc27f85a10b17a1f35970a87a2e28c85179f2558851 |