Skip to content

0.9.0

Choose a tag to compare

@AlexanderBuzz AlexanderBuzz released this 23 Oct 11:06
· 27 commits to master since this release
7abbb1a

The schema works on PostgreSQL: the CTID moves to a column PostgreSQL does not reserve, and a malformed CTID is refused before any database can truncate it.

Changed

Xrpl\Schema stores the CTID in tx_ctid, not ctid. PostgreSQL gives every table the system columns tableoid, xmin, cmin, xmax, cmax and ctid, and no user column may take one of those names; quoting does not help. ledger_direct_xrpl_tx could therefore not be created on PostgreSQL (SQLSTATE[42701]: column name "ctid" conflicts with a system column name), found through the Laravel bridge. The column is tx_ctid now, VARCHAR(16) NOT NULL as before. The PaymentIntent field ctid, XrplTransaction::$ctid and every port and service signature are unchanged; no core code reads physical column names, so column and record field are named differently on purpose. INVARIANTS.md documents the name and the rule.

A malformed CTID is refused on hydration. SyncService::hydrate() skips, and logs, a ledger entry whose ctid is not C followed by fifteen upper-case hex digits (XrplTransaction::CTID_PATTERN, isValidCtid()), the way it already skips one without a hash. The column holds sixteen characters and not every database refuses a longer value: MySQL truncates silently under INSERT IGNORE, WordPress switches the strict modes off, SQLite checks no length at all. The check sits before storage so that no adapter needs its own; it is not in the XrplTransaction constructor, so rows already stored with a truncated CTID still hydrate.

Added

  • Schema::POSTGRES_SYSTEM_COLUMNS, and a schema test that no column of any table the core describes may use one of those names. Xahau inherits it through Xrpl\Schema; the Stellar schema follows when it is rebased.
  • docs/testing.md on the versions of 2026-10-10 (Shopware 1.4.4, PrestaShop 0.5.1, Magento 1.1.1, WooCommerce 1.4.0, harness 0.1.0), with two open points: PS-04 is proven across asset classes on all four platforms, and the WooCommerce PS-11 gap, a payment on a cancelled order staying invisible until the receiving account syncs again, with the follow-up the plugins get next.

Fixed

  • XrplTransactionRepositoryContractTestCase::transaction() used a 23-character CTID for a 16-character column. It only passed where storage truncated silently or checked no length; PostgreSQL rejected it. The fixture is a real CTID now (C000006400000001), likewise in SyncServiceTest and XrplTransactionTest.

Upgrading

Nothing changes for code that goes through the ports and services; the payment record keeps its ctid field.

What changes is the table. An adapter that creates its tables from Schema::tables() or Schema::mysql() gets tx_ctid on new installations; today that is only the unreleased Laravel bridge. The four shop plugins carry their own DDL and are unaffected by this release on its own: each follows with a rename migration in its next release, idempotent, and raises its constraint to ^0.9 in the same change, so that no installation runs a core that expects tx_ctid against a table that still has ctid:

ALTER TABLE ledger_direct_xrpl_tx CHANGE COLUMN ctid tx_ctid VARCHAR(16) NOT NULL;

Until those plugin releases are out, keep the plugins on ^0.8.1.

Full Changelog: 0.8.1...0.9.0