# Weeknotes: October 30, 2023

*A weekly digest of progress, updates, and insights from Tableland.*

By [Tableland](https://paragraph.com/@tableland) · 2023-10-30

web3, tutorial

---

Begin transmission…
===================

Postgres Logical Replication in Rust
------------------------------------

by [Avichal Pandey](https://github.com/avichalp)

Basin uses Postgres' streaming replication protocol to read the changes on a database and archive them in Filecoin. The [basin cli](https://github.com/tablelandnetwork/basin-cli) is written in Go. It leverages mature libraries, especially [pgx](https://github.com/jackc/pgx) and [pglogrepl](https://github.com/jackc/pglogrepl). The latter offers higher-level abstractions to communicate with a Postgres server to extract WAL updates.

While trying to write a streaming replication client in Rust, I found that the logical replication libraries are not as mature. The [rust-postgres](https://github.com/sfackler/rust-postgres) project has a couple of open [pull](https://github.com/sfackler/rust-postgres/pull/778) [requests](https://github.com/sfackler/rust-postgres/pull/696). These will add convenient higher-level methods for working with logical replication, but these still need to be merged.

Materialize's fork of [rust-postgres](https://github.com/MaterializeInc/rust-postgres) has these features merged. It is stable and used by MaterializedInc in production. However, it has minimal documentation. The [logical decoding](https://github.com/seddonm1/logicaldecoding) example by [@seddonm1](https://github.com/seddonm1) is an excellent starting point for someone trying to build apps that use Postgres streaming replication capabilities. It uses [decoderbuf](https://github.com/debezium/postgres-decoderbufs) to extract the WAL messages.

I want to share a [repository](https://github.com/tablelandnetwork/pglogrepl-rust) that uses Materialize's fork of rust-postgres mentioned above. It uses the [wal2json](https://github.com/eulerto/wal2json) plugin to extract and read WAL messages from Postgres and replicate them on an embedded [DuckDB](https://duckdb.org/) instance. The code illustrates the following:

1.  creating [publications](https://www.postgresql.org/docs/current/logical-replication-publication.html#LOGICAL-REPLICATION-PUBLICATION)
    
2.  creating and using replication [slots](https://www.postgresql.org/docs/current/logical-replication-subscription)
    
3.  extracting JSON-encoded WAL messages
    
4.  sending timely commit and keepalive [messages](https://www.postgresql.org/docs/current/protocol-replication.html) to the Postgres server
    
5.  using an embedded duck db instance to replicate changes
    

Wrapping up ETHOnline
---------------------

by [Dan Buchholz](https://github.com/dtbuchholz)

ETHOnline 2023 is in the books! There were a lot of teams that built on Tableland…77 total, in fact. The judging process took quite some time, and although we wanted to reward everyone for their efforts, we ended up distributing 4 "top" prizes for first, second, and two runner up bounties, and then an additional 20 teams also split the pool. We also had a small pool for the teams that built with the (experimental) [Basin CLI](https://github.com/tablelandnetwork/basin-cli).

Here'a quick overview of the top projects:

*   1st place: [Zuko](https://ethglobal.com/showcase/zuko-cx92f)—zk privacy social dapp where all logic (likes, comments, etc.) is stored in tables.
    
*   2nd place: [Vibecheck](https://ethglobal.com/showcase/vibecheck-ohj87)—a web3 game that stores GPT-generated character attributes and certain game data in Tableland.
    
*   Runner up: [Web3Agent](https://ethglobal.com/showcase/web3agent-t6vjn)—use AI/LLM agent to deploy contracts, send txs, ask web3 questions…and use Tableland for saving/querying chat history.
    
*   Runner up: [Deano](https://ethglobal.com/showcase/deano-t0hn9)—marketplace for ML models to train datasets and get feedback from users in an open community market.
    
*   Pool (Studio): [One Click dApp](https://ethglobal.com/showcase/one-click-dapp-euzqw), [Super Assistant](https://ethglobal.com/showcase/super-assistant-oxsux), [POP!](https://ethglobal.com/showcase/pop-b0avo), [Bwise](https://ethglobal.com/showcase/bwise-j8o9e), [Qryptopost](https://ethglobal.com/showcase/qryptopost-foytg), [TrustBytes](https://ethglobal.com/showcase/trustbytes-mg2qr), [Adora.Promo](https://ethglobal.com/showcase/adora-promo-ia4yu), [#console](https://ethglobal.com/showcase/console-gutbc), [MultiDeploy](https://ethglobal.com/showcase/multideploy-epzn6), [NEBULA](https://ethglobal.com/showcase/nebula-vos6a), [Loyo](https://ethglobal.com/showcase/loyo-05xdt), [ZeppelinFinance](https://ethglobal.com/showcase/zeppelinfinance-gvawn), [guestbook](https://ethglobal.com/showcase/guestbook-unwpw), [AGRAA](https://ethglobal.com/showcase/agraa-23k5o), [Cabal Sorel](https://ethglobal.com/showcase/cabal-sorel-uwvfa), [GitRaven](https://ethglobal.com/showcase/gitraven-ighb8), [TheRegistry](https://ethglobal.com/showcase/theregistry-fj5rt), [Early Adopters Space](https://ethglobal.com/showcase/early-adopters-space-75zww), [GaloisGuilds](https://ethglobal.com/showcase/galoisguilds-ofxdi), [3Jocks](https://ethglobal.com/showcase/3jocks-ywshn)
    
*   Pool (Basin): [WalletPass](https://ethglobal.com/showcase/walletpass-ejhf5), [Token Tutor](https://ethglobal.com/showcase/token-tutor-bfyx4), [GovChainBoard](https://ethglobal.com/showcase/govchainboard-x64wa)
    

Now, we're off to the [Dataverse](https://dorahacks.io/hackathon/rebuild-ownership-2/detail) hackathon, which kicks off on November 9th and runs for about a month. See y'all there!

Progressing the Studio with more user research
----------------------------------------------

by [Jim Kosem](https://github.com/jkosem)

We've concluded our first round trip research, which means we began with an audit of the Studio software as it was, and then designed out based on assumptions of what would work for users, tested that, revised the designs based on those testing insights and then tested yet again. While following to an extent the well known [Double Diamond design process](https://en.wikipedia.org/wiki/Double_Diamond_\(design_process_model\)), we have made our first massive step in creating evidence and insight based, user-centred design at Textile. As with every user-centred design effort, the process is always a negotiation, but we succeeded in validating some assumptions and future product developments like history and data inspector, while realising some UI assumptions weren't useful for people.

Optimism Goerli fixes in the SDK
--------------------------------

by [Dan Buchholz](https://github.com/dtbuchholz)

During ETHOnline, we uncovered a bug in the SDK that affected downstream usage in clients like the Studio and even the CLI tool. Basically, Tableland has a devnet / "staging" environment for the Optism Goerli testnet, which is only used internally for testing purposes on a live network. Then, there's an Optimism Goerli testnet deployment that is open for anyone to use as they would any other chain that Tableland supports.

The problem was that the SDK didn't properly filter out the "staging" environment, so SDK users had no way to specify the correct Optimism Goerli chain. For example, if you used the Studio to deploy a table to Optimism Goerli, it created the table on the _staging_ contract, and subsequent SDK APIs don't treat that data the same because it's materialized / exposed at a custom staging gateway.

Anyways, the change is now fixed with `@tableland/sdk@4.3.5`, the Tableland CLI has this change incorporated, and the Studio will be releasing broader changes the include fix in the near term.

* * *

Other updates t**his week**
===========================

*   We’re heads down on a **_lot_** from the protocol perspective, so keep an eye out over the coming months for more information about [Tableland Basin](https://github.com/tablelandnetwork/basin-cli) and how it fits into the overall protocol vision. But, if you’re interested, feel free to reach out to `contact@tableland.xyz` and drop a line about what you’re building…DePINs, especially!
    

End transmission…
=================

Want to dive deeper, ask questions, or just nerd out with us? Jump into our weekly [research office hours](https://calendly.com/carsonfarmer/research-office-hours). Or, for hands-on technical support, you can join our weekly [developer office hours](https://calendly.com/dan-buchholz/dev-office-hours).

And if you’d like to discuss any of these topics in more detail, comment on the [issue over in GitHub](https://github.com/tablelandnetwork/weeknotes/issues)!

---

*Originally published on [Tableland](https://paragraph.com/@tableland/weeknotes-october-30,-2023)*
