Skip to content

Releases: kwilteam/kwil-db

v0.7.0-beta

16 Feb 22:08
Compare
Choose a tag to compare
v0.7.0-beta Pre-release
Pre-release

Introduction

Kwil v0.7 changes the underlying database engine from SQLite to Postgres. Furthermore, Kwil v0.7 features a new programmable oracle system, allowing network validators to simultaneously operate as network oracles.

Breaking Changes

Kwil v0.7 has a few minor breaking changes. These were mostly due to changing the underlying database, and removing incompatible features that are not used:

  • Removes several SQLite specific functions that were exposed in Kuneiform and unused.
  • Removes RTRIM and BINARY collation types.
  • Extra type safety in the database enforces type-casting for any statement that performs math on two parameters without utilizing a database column. For example, SELECT $1 + $2; must now be SELECT $1::int + $2::int;.
  • Node operators must now specify a Postgres instance to connect to when starting their node.

Kuneiform

  • Kuneiform now features type assertions for all SQL language expressions. Type assertions can be added to any expression using double colons: SELECT id::text, username FROM users WHERE age%10 = ($age%10)::int;.
  • Kuneiform now supports the SUM() aggregate functions.

Nodes

  • When running kwild, a Postgres connection with superuser access must be specified. It must have the following configurations:
    • wal_level=logical
    • max_wal_senders=10
    • max_replication_slots=10
    • max_prepared_transactions=2
  • Nodes can be configured to credit account balances based on EVM logs. Logs must follow the log signature Credit(address,uint256).

Extensions

Coinciding with the open-sourcing of Kwil, v0.7 includes new compile-time extensions. Using compiled extensions, developers can build custom kwild binaries with custom rules, logic, and functionality. Examples for each type of extension have been included. The different types of extensions are:

  • auth: Custom hooks for asymmetric cryptographic signature verification. This allows networks to build support for virtually any type of asymmetric signature scheme, which will integrate wallets directly into Kwil's native account store. Examples include ed25519 signatures and NEAR's nep413 signing standard.
  • actions: Custom action execution logic, which was debuted using Docker containers in v0.5, can now be compiled directly into the kwild binary. Compiled action extensions can directly read and write to network schemas, as well as to Postgres directly. Examples include an ad-hoc DML/DQL extension, allowing networks to support ad-hoc user-submitted INSERT, UPDATE, DELETE, and SELECT statements.
  • oracles (experimental): Nodes can be programmed to operate as network oracles, receiving rewards when successfully performing oracle duties. Oracles are meant to be driven around event data from other systems, such as EVM logs. >2/3rds of the validating power of the network must agree on an event within a pre-defined time period. Examples include an erc20 deposit oracle, which is capable of crediting users native Kwil gas when an EVM log is triggered.
  • resolutions (experimental): Related to oracles, resolutions can be programmed to specify custom logic to be executed when external event data has been agreed upon by >2/3rds validators. Examples include gas credits, which credit native Kwil accounts.

v0.6.0

06 Dec 19:16
Compare
Choose a tag to compare

What's Changed

Read more

v0.5.0

03 Aug 17:11
Compare
Choose a tag to compare

What's Changed