Skip to content

[Postmortem] rippled 1.7 encoding change

Elliot Lee edited this page Jun 8, 2021 · 1 revision

Date: 2021-03-09

Updated: 2021-06-08

Authors/Contributors: Elliot Lee, Nathan Nichols, Nik Bougalis

Summary

There was an unintended API breaking change introduced in rippled v1.7.0 where leading zeros are now omitted from encoded values.

For example, values previously encoded as "0000000000000000" are now encoded as "0".

Impact

This impacted some advanced and legacy use cases, such as the importer used by the Data API v2.

This did not affect most basic usage of the XRP Ledger.

Certain uses of the ripple-binary-codec JavaScript library would throw an error.

Root Cause

A pull request that simplifies and modernizes substantial segments of the rippled codebase was merged and included in the 1.7.0 release.

https://github.com/ripple/rippled/pull/3646

Squashed commit: https://github.com/ripple/rippled/commit/f0724694090925b89cab3ccce0c723538d5ff037

Impacted Product(s)

  • Data API v2 importer
  • ripple-binary-codec

Method of Detection

Errors in logs.

Data API v2: https://github.com/ripple/rippled-historical-database

Resolution

Initial resolution

ripple-binary-codec patch: https://github.com/ripple/ripple-binary-codec/pull/121/files (patched in v1.1.2)

ripple-lib: patched in v1.9.2

This initial patch did not fully resolve the issue. Additional edge cases were reported by @nixer89 here: https://github.com/ripple/ripple-binary-codec/issues/132

Action Items

We don't currently have integration tests of client libraries against rippled. How can we create such integration tests?

Should we use standalone mode in order to reduce resource consumption when running tests?

Work with @manojsdoshi and @sgramkumar to leverage their existing testing frameworks.