<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: 3obby</title>
    <description>The latest articles on Forem by 3obby (@3obby).</description>
    <link>https://forem.com/3obby</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1981009%2F411ae383-d246-4b8e-a2e1-15e617cb0269.jpeg</url>
      <title>Forem: 3obby</title>
      <link>https://forem.com/3obby</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/3obby"/>
    <language>en</language>
    <item>
      <title>peer review</title>
      <dc:creator>3obby</dc:creator>
      <pubDate>Tue, 03 Sep 2024 07:27:53 +0000</pubDate>
      <link>https://forem.com/3obby/peer-review-5cne</link>
      <guid>https://forem.com/3obby/peer-review-5cne</guid>
      <description>&lt;p&gt;I've begun writing tests in Hardhat, and I'm second-guessing some of my design choices.&lt;/p&gt;

&lt;p&gt;I feel most of the design work is done, and I'm reaching out to my good friend Carlos, a brilliant Ethereum security engineer to see how he would approach the design.&lt;/p&gt;

&lt;p&gt;Here's what I'm sharing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Stonewall is a decentralized text-based posting platform.
Data is permanant and undeditable.

This looks like reddit/twitter/etc, basically:
Topics (AMERICA)
Posts (Historical record- first-hand account of an event)
Comments (May have comments themselves, no limit to depth)

posts and comments are ordered beneath their parent by value-
authors and readers send value to posts and comments they like.
the order may change over time as readers donate or new posts/comments are created.

New topics like 'America' are created when users create them by posting about them.
Posts are stored as keccak hashes:
    keccak256(abi.encode("AMERICA")) -&amp;gt; 0xd2f...b0a6

Topics may have any number of posts
Posts may have any number of comments
Comments may have any number of sub-comments, of infinite/arbitrary depth

additionally, topics and posts each have their own 'relevance list'
the relevance list offers readers similar topics/posts
the relevance list is also user-generated and ranked by user-donated value

the MVP allows users to:
-create posts (which create a new topic, if it doesn't exist)
-create comments
-send value to posts and comments they like (maybe triggering the data to re-order)
-add topics to the relevance list for a topic/post
-see the ranked posts and comments beneath a topic
-see the relevance list of similar topics/posts

Challenges:
-storing comments of arbitrary nested depth
-re-ordering posts/comments efficiently
-ensuring content is stored statically, such that links never break
-ensuring content doesn't collide in storage
-designing a simple system to link topic/posts to relevance lists
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;my solutions to the challenges feel naive; to ensure unique data storage slot generation, I've decided store the structure of posts/comments in a uint256 2d array on each parent element-  each parent has its own defined depth and has a list of children which determine width. &lt;/p&gt;

&lt;p&gt;for value-based ordering, keep an ordered list of pointers in the parent element. re-ordering efficiently... a basic insertion algo will work, but it feels sloppy to not consider gas limits. It could be possible to allow users to determine where they'd like the data to be indexed, then simply calculate an appropriate cost and ensure there's no problem. Finally, the static linking would enable each parent to store a similarly-ordered list.&lt;/p&gt;

&lt;p&gt;Let's see what Carlos comes up with!&lt;/p&gt;

</description>
      <category>ethereum</category>
    </item>
    <item>
      <title>front-end considerations</title>
      <dc:creator>3obby</dc:creator>
      <pubDate>Thu, 29 Aug 2024 14:45:16 +0000</pubDate>
      <link>https://forem.com/3obby/front-end-considerations-28eh</link>
      <guid>https://forem.com/3obby/front-end-considerations-28eh</guid>
      <description>&lt;p&gt;threw together a stupid simple front-end with the help of &lt;a href="https://gptengineer.app" rel="noopener noreferrer"&gt;gptengineer&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl21hl0bk3huhqycljyjx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl21hl0bk3huhqycljyjx.png" alt="Image description" width="800" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Realized a few things today:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;topics need to be created/stored in a mapping upon the first post such that the front-end can promote trending topics&lt;/li&gt;
&lt;li&gt;gptengineer is for rapid prototyping (and probably not much else)&lt;/li&gt;
&lt;li&gt;probably other discoverability that people would find interesting are 'top comments', 'top of all time', 'most valued authors'&lt;/li&gt;
&lt;li&gt;It's possible to split donations between stonewall and authors, I think this is a good idea&lt;/li&gt;
&lt;li&gt;It's possible to allow people to 'post' for free without data permanence, or allow data from other sites to be cross-posted to stonewall and made permanent.&lt;/li&gt;
&lt;li&gt;trending topics could 'decay' over time&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>designing the skeleton</title>
      <dc:creator>3obby</dc:creator>
      <pubDate>Wed, 28 Aug 2024 16:53:19 +0000</pubDate>
      <link>https://forem.com/3obby/designing-the-skeleton-3lmo</link>
      <guid>https://forem.com/3obby/designing-the-skeleton-3lmo</guid>
      <description>&lt;p&gt;spent the day considering stonewall's architecture in bukit bintang's 🔥 breakfast spot. I've started building basic examples and tests in solidity in a hardhat project with js and have a bit more clarity.&lt;/p&gt;

&lt;p&gt;the data structure of stonewall looks like reddit/twitter/etc:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;topics&lt;/li&gt;
&lt;li&gt;posts&lt;/li&gt;
&lt;li&gt;comments (recursive)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;a 'topic' at the top level has a list of any number of posts, which has a list of any number of comments, which themselves may have a list of any number of comments, and so on. All lists are ordered by descending value, and must be re-ordered when the value changes.&lt;/p&gt;

&lt;p&gt;for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;politician name (topic)
    politician did bad thing!
        &amp;gt;and here's more proof...
        &amp;gt;no they didn't
            &amp;gt;ur an idiot
            &amp;gt;idiot dummy
    politician has fake hair?
        &amp;gt;lol watch this vid...
        &amp;gt;finally some real reporting...
        &amp;gt;yeah obv   
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;a few technical bits of stonewall:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;users' posts and comments must be stored in an array of arbitrary length, probably searchable in both directions, so a double linked list seems appropriate&lt;/li&gt;
&lt;li&gt;users' posts and comments must be re-organized upon receiving value&lt;/li&gt;
&lt;li&gt;comments may be nested arbitrarily deeply&lt;/li&gt;
&lt;li&gt;the text length of users' posts and comments submissions are limited by the EVM, but it is possible to allow authors to append more data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;posts and comments must be referenceable using unique static IDs both for the EVM and external sharing of content. For example, a link might look like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stonewall.com/post/" rel="noopener noreferrer"&gt;https://stonewall.com/post/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stonewall.com/comment/" rel="noopener noreferrer"&gt;https://stonewall.com/comment/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;in future planning, topics/posts will be upgraded to support some type of community-powered binding to improve discoverability&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Data Structure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Each topic 'already exists' and is discoverable as a hash of an upper-cased human-searchable string (e.g., "HARVARD UNIVERSITY"=0x4841525641524420554e4956455253495459). At this storage slot, there may or may not be a Post (aka an instance of the 'PostComment' struct- posts and comments are about the same) &lt;/p&gt;

&lt;p&gt;it's important to know how many top-level posts are here...&lt;br&gt;
Mapping Topic (b32) -&amp;gt; numPosts (used to generate unique PostComment ID for Topics)&lt;/p&gt;

&lt;p&gt;PostComments always exist in a double-linked list of posts ordered by value.&lt;/p&gt;

&lt;p&gt;Struct PostComment is stored at the hash of (topic(numPosts) for posts, parent(numComments) for comments)&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
author&lt;br&gt;
createdAt&lt;br&gt;
numPages (number of continued pages, else 0)&lt;br&gt;
nextPage (location of next page, else null)&lt;br&gt;
prevPost (location of adjacent higher-value post, otherwise null)&lt;br&gt;
nextPost (location of adjacent lower-value post, otherwise null)&lt;br&gt;
numComments (used to generate unique storage for children)&lt;br&gt;
valueSum&lt;br&gt;
}&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PostComments are stored in a double-linked list of PostComments allowing for unlimited size and easy modification due to value change (find new location, update old neighbors' prevPost/nextPost, update own + new neighbors prevPost/nextPost)&lt;/li&gt;
&lt;li&gt;Unique permanent storage slot identified by a static ID generated via keccak of parent + index&lt;/li&gt;
&lt;li&gt;Allows authors to append additional data, but not delete/modify&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;dev thoughts for later&lt;/em&gt;&lt;br&gt;
///hashing with keccak... encode vs encodepacked, keccak recursive depth limit&lt;br&gt;
///ordering by value optimization... keep another array of ordered values-&amp;gt;ids per parent?&lt;/p&gt;




&lt;p&gt;This design will need to be modified as I learn more.&lt;/p&gt;

&lt;p&gt;In the meantime, I've had some other thoughts about the project as a whole... loving the idea of a &lt;a href="https://owickstrom.github.io/the-monospace-web/" rel="noopener noreferrer"&gt;simple monospace retro&lt;/a&gt; design, can't wait to throw together a demo. in the end, the device to target is the phone, and most battery burn comes from the screen, so white on black minimalism also rocks for performance. Not sure about the final user experience- the most simple user experience I can think of for now is hitting a dex contract with your message and quoting+converting any erc-20 token on the fly.&lt;/p&gt;

&lt;p&gt;One little thing that irks me about so many social media sites like X is the fact that comments are hidden, requiring that you click on them. why?? just show the full chain&lt;/p&gt;

&lt;p&gt;A devious way to launch this would be to start posting shit about random topics, then get others to piggy-back the headlines. If anyone reads this retroactively, know I'm not dumb enough to actually do this.&lt;/p&gt;

&lt;p&gt;Next, I'll either formally define the set of functions or look into the limitations of nested mapping via recursive hashing... it'd be a shame to only get like 12 layers of comment depth.&lt;/p&gt;

</description>
      <category>evm</category>
    </item>
    <item>
      <title>building free speech forever</title>
      <dc:creator>3obby</dc:creator>
      <pubDate>Mon, 26 Aug 2024 18:26:15 +0000</pubDate>
      <link>https://forem.com/3obby/building-free-speech-forever-17en</link>
      <guid>https://forem.com/3obby/building-free-speech-forever-17en</guid>
      <description>&lt;p&gt;&lt;em&gt;If you could tell the world anything, what would you say?&lt;/em&gt;&lt;br&gt;
&lt;em&gt;How much would you pay to share that information?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In the wake of the arrest of Pavel Durov, I'm reminded there is an ongoing fight for freedom of speech.&lt;/p&gt;

&lt;p&gt;Today, I begin designing 'Stonewall Data Permanence', a tool to give normal people the ability to publish and comment on any topic, permanently, without moderation or censorship, with their content made easily discoverable by others.&lt;/p&gt;

&lt;p&gt;Keep an open mind while considering the resulting behavior of the few core design decisions:&lt;/p&gt;

&lt;p&gt;-anyone can post and comment anything about any topic, permanently and optionally anonymously&lt;br&gt;
-users pay per-character to post and comment&lt;br&gt;
-posts and comments may receive funding from the author or readers&lt;br&gt;
-&lt;strong&gt;posts and comments are ranked by monetary value&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This design accomplishes a few things:&lt;/p&gt;

&lt;p&gt;-&lt;strong&gt;Misinformation is magnitudes more expensive to promote&lt;/strong&gt;- consider that factual competition is indexed in both adjacent posts &amp;amp; their comments&lt;br&gt;
-bot/spam protection (economically unfeasible)&lt;br&gt;
-transparency of funding enables users to optionally filter content based on funders' behavior (bot-like patterns)&lt;br&gt;
-promoting information correlates directly to spend&lt;br&gt;
-the world collaborates to prioritize content&lt;/p&gt;

&lt;p&gt;Assuming this recipe provides novel value, the unknowns are tech stack and indexing. For the tech stack, I want Bitcoin's data permanence with Ethereum's smart contracts. I'm considering Ethereum, &lt;a href="https://rootstock.io" rel="noopener noreferrer"&gt;Rootstock&lt;/a&gt;, and &lt;a href="https://www.stacks.co/" rel="noopener noreferrer"&gt;Stacks&lt;/a&gt; as the main contenders for trust-minimized code execution.&lt;/p&gt;

&lt;p&gt;A front-end will need to be bulletproof with a reverse proxy on SporeStack, eventually.&lt;/p&gt;

&lt;p&gt;For indexing, maybe I'll first implement a basic topic lookup with a community-based 'similar topics' list within each topic... maybe some kind of vectorization that isn't gamifiable... perhaps community-driven.&lt;/p&gt;

&lt;p&gt;I'll keep building&lt;/p&gt;

</description>
      <category>evm</category>
      <category>blockchain</category>
    </item>
  </channel>
</rss>
