You are reading content from Scuttlebutt
@cel %Ylr4TEMOHGumBt9tvX8zNTOs3XKQDMsOepBZR8u7ftg=.sha256

Minimal sbot in C: Dev Diary

Applied to #ssbc-grants : %SQ6BGiW...
Accepted: %tKE8YsM....
Project repo: %4w0BO1K...

@cel %ICu6NQwKZ7ifUzbWEDJ7Us+qOX6CZa9DBjE3lrG3UT4=.sha256

Implemented event loop and receiving secret-handshake connections: %FZDUM0W...

User has not chosen to be hosted publicly
User has not chosen to be hosted publicly
@cel %v3koTZ5XL+dDQ8TyUhsNX5/vlCqYMNUhaetq0sHu2ns=.sha256

@C-Keen @C-Keen-Work
You can push to a branch of the repo, and optionally @-mention me. Or any other way you feel is appropriate

User has not chosen to be hosted publicly
User has not chosen to be hosted publicly
@cel %Q56tGf9JsjfkE7t1wZXTDqz21ZEMs+g04ByqjxJ8cv8=.sha256

It can now respond to the whoami command: %DrWoXIQ...

@cel %w0kG9y0XqB7K3vjRGzgnX45oMzzorzalWxcheN24kKk=.sha256

Dev update. I left off on this a few weeks ago because of personal things and having trouble with the asynchronous IO, and picked it up a little a week ago: %RdaAmAm.... More recently I have been focusing on ssb-npm instead where I have been making progress. Today I did an easy thing for the C implementation which was to implement testing the server's secret-handshake implementation using shs1-testsuite: %MfSXBJs.... I am thinking next I might try to implement message verification and signing, which the server will need later, and other projects may be able to use as well.

@cel %4uitC0qYbXllP//IEi//eN+NU2oOYyZs6D2VFS/qGSQ=.sha256

Some progress, including debugging substream handling and implementing the blobs.get RPC method: %yW3j6xL... %yRRuyXO....
Implementing outgoing peer connections is underway.
I also implemented some separate tools to read flumedb files (flumecat, ssbget), and from those experiences I think I will try to use the same file formats in this project for storing messages and their index by id.

@cel %iDfY7X9UyC7JHJJV5jcYsl1G77yLKl7RLhTZpwP8d5Q=.sha256

Implemented outgoing peer connections: %ski5T3O.... Tested with shs1-testsuite. Uses asynchronous DNS via GNU extension getaddrinfo_a, or synchronous getaddrinfo if make variable NO_GNU is set.

@cel %97W0PcbS+EGNN384tGy6X+5ZOFM9WxnXoz9zENKsAMo=.sha256

Started implementing blob gossip: %lXnxSNE.... Need to figure out what state exactly is needed for this.

@cel %Ttiu0j//wd+r3qY61Fif799rvhGuJeq5mE79pUvGBQQ=.sha256

Implemented blob gossip: %07LR0NA.... There is a bug where it the server can get into a send/receive loop, which I am debugging now.

@cel %8LW3sal7Y/Vt1tIi3QZisfV3ncaOwr62Hb5AplaZw3g=.sha256

Fixed the send/receive loop bug [%Gid8YrX...].

@Anders %Va0CAXABuyCd+qcnI+d/Q8p7CGGI6vQ3jGaJJav1sE0=.sha256
Voted Implemented blob gossip: %07LR0NAo70k5QYW54kwRsieL2Ad8TBZd6/LCEiwNfvo=.sha2
@cel %3OZxCa/l3MhsmkhM/3tkQx63Yj5FozBiyyDGikNLUlI=.sha256

%I1liEhf...: Implemented the get RPC method, to read a SSB message from the flumelog and keys hash table as written by scuttlebot, reusing code from ssbget.
Also implemented accepting connections via local unix noauth socket.
Also added a manifest method [%PIqXk7G...].

Some of the RPC methods I've implemented are not strictly required for replication, but they help with testing, debugging and administration/usage, and mostly don't add a lot of complexity. (i.e. blobs.{add,has,size,want}, manifest, stop). So I think this is okay. I might change my mind though if I can figure out a good way to test blobs gossip without blobs.want, for example.

The filesystem operations are synchronous/blocking. That is reading, writing and statting blobs, and reading (and eventually writing) messages and message indexes. It would be nice to make these async, to ensure responsiveness and minimize peers disconnections due to timeouts. This could be done using an additional thread(s), or aio - but it would increase implementation complexity. For now I want to focus on feature completeness and correctness.

Next things to do:

  • fix an issue with blobs.want
  • implement ooo message gossip
  • update keys hashtable
  • message verification

Later things to do:

  • message indexing by feed+sequence and latest per feed
  • createHistoryStream
  • ebt
  • contact graph indexing and traversal; requesting remote feeds
  • local peer discovery
  • gossip scheduler; pub message indexing
  • more testing

More things to do later, maybe:

  • message canonicalizing and signing
  • out-of-process plugins
  • index backlinks
  • web[socket] server
  • hsdt
@Anders %FIHFrgI2YXm6IL6bqCbMAFqE6u8HkIUdYpzosVs/daQ=.sha256
Voted %I1liEhfCAUU9rCu+DcXVo1HJnPdUg9QDlfeu20130ck=.sha256: Implemented the `get`
@cel %qNGh5gvmheAYCkXw/Jb7d8bXodDRPkhfl+OYsmOEiCE=.sha256

Status: blobs replication is buggy and needs reworking. It is harder than I thought. Estimated work done: 20 days, 10 remaining. Motivation low.

User has chosen not to be hosted publicly
@cel %G2o97N9syoWXZnVmwsr6Ks5ideKnxm1Kr0t5bVzOxeA=.sha256

I had a call a few weeks ago with @w about my status on project (re: %ecWj6gQ...). In the 1-2 weeks left of the grant time I didn't feel I would be able to complete the goal of the project. I was encountering difficult to debug and reason about situations while trying to implement the blobs replication and I/O scheduling.
However, there are still some things I could try to do:

  • Implementing message signing and/or canonicalization, and verification, could be done orthogonal of I/O, and could be useful later. But I don't much of a use case for this.
  • Implement ssb-tunnel. An sbot not even implementing SSB replication but just the ssb-tunnel API, would be useful.
  • Implement client and server commands just for secret-handshake. This could be useful for building a sbot in a modular way, to have secret-handshake factored out into a separate process. It could also enable wrapping other protocols in secret-handshake.
@Anders %N61ndxaXBgIkcHJsjdWlt7yi5PA0luhjuYQA4Pj4keA=.sha256
Voted I had a call a few weeks ago with @w about my status on project (re: %ecWj6
@Gordon %rHLcIFIT17bXmZ6YhN77FqYncGqxU7Ig/YvQV5baj7s=.sha256
Voted I had a call a few weeks ago with @w about my status on project (re: %ecWj6
Join Scuttlebutt now