Skip to content

[TEST - DO NOT MERGE] retest: xrpld CI changes on MPT feature branch#293

Open
e-desouza wants to merge 18 commits intomainfrom
test/xrpld-ci-mpt-retest
Open

[TEST - DO NOT MERGE] retest: xrpld CI changes on MPT feature branch#293
e-desouza wants to merge 18 commits intomainfrom
test/xrpld-ci-mpt-retest

Conversation

@e-desouza
Copy link
Copy Markdown
Collaborator

Purpose

Retest the exact file set from PR #291 (ci/pin-rippled-image) against the XLS-33 MPT feature branch (PR #131) to confirm the rippled→xrpld CI migration still passes with MPT transaction types, binary codec, and integration fixtures included.

Do not merge. This branch exists only to prove that nothing in the MPT feature is broken by the xrpld image switch.

Applied changes (identical to PR #291)

  • .github/workflows/integration_test.ymlrippleci/xrpld:develop, --standalone, /etc/opt/xrpld/ mount, curl RPC poll
  • .ci-config/rippled.cfg.ci-config/xrpld.cfg with internal /var/lib/xrpld/… paths
  • docker-compose.yml — service renamed, wget healthcheck
  • CONTRIBUTING.md — developer docs updated

Expected signal

Integration Test job must pass green. Other jobs (Build & Lint, Unit, Quality) are unchanged from the MPT branch and serve as a sanity baseline.

Add a 192-bit (24-byte) hash type required by MPT fields such as
MPTokenIssuanceID. Follows the same implementation pattern as
Hash128/Hash160/Hash256 with full trait coverage (Hash, XRPLType,
TryFromParser, TryFrom<&str>, Display, AsRef<[u8]>) and unit tests.
Add MPTokenAuthorize, MPTokenIssuanceCreate, MPTokenIssuanceDestroy,
and MPTokenIssuanceSet to the TransactionType enum for use by MPT
transaction models.
Add the MPTokenIssuanceCreate transaction with fields for asset_scale,
maximum_amount, transfer_fee, and mptoken_metadata. Includes flags
(TfMPTCanLock, TfMPTRequireAuth, TfMPTCanEscrow, TfMPTCanTrade,
TfMPTCanTransfer, TfMPTCanClawback), transfer fee validation, builder
methods, and serde roundtrip tests.

Also adds InvalidFlagCombination variant to XRPLModelException for use
by MPTokenIssuanceSet validation.
Add the MPTokenIssuanceDestroy transaction with mptoken_issuance_id
field. Uses NoFlags since this transaction has no flag-specific
behavior. Includes builder method, serde roundtrip, and validation
tests.
Add the MPTokenIssuanceSet transaction with mptoken_issuance_id and
optional holder fields. Includes TfMPTLock/TfMPTUnlock flags with
validation that prevents setting both simultaneously. Builder methods,
serde roundtrip, and conflict detection tests included.
Add the MPTokenAuthorize transaction with mptoken_issuance_id and
optional holder fields. Includes TfMPTUnauthorize flag for opt-out
flows. Builder methods, serde roundtrip, holder opt-in, and
deauthorize flow tests included.
Add MPToken (account balance) and MPTokenIssuance (issuance definition)
ledger entry types with full serde support, LedgerEntryType enum
variants, and LedgerEntry enum variants. Includes serde roundtrip and
ledger entry type tests for both objects.
Tests cover:
- Field name encoding/decoding for all 7 new MPT fields (Hash192,
  AccountID, UInt8, UInt64, Blob types)
- Transaction type code resolution (codes 54-57)
- Ledger entry type code resolution (codes 126-127)
- Field instance metadata validation
- Full encode() roundtrip for all 4 MPT transaction types with
  hex pattern verification
- encode_for_signing() with signing prefix
- Flag serialization (combined TfMPTCanTransfer | TfMPTCanLock)
- Deterministic encoding output
…ture reference

Post-rebase fixup on feat/mpt-binary-codec:
- Fix #[path = "..."] attributes for external test modules: inline mod test{}
  resolves paths relative to the test/ subdirectory, not binarycodec/
- Remove test_encode_additional_fixtures which referenced
  load_additional_tx_fixtures() that does not exist in test_cases.rs
…uilds

- Change mod test gate from #[cfg(test)] to #[cfg(all(test, feature = "std"))]
  to match main's approach: the external test files and MPT encode tests all
  require serde_json/to_string which is unavailable in no_std builds
- Tighten alloc::boxed::Box import in exceptions.rs to only compile when
  both no_std and websocket are active (Box only used by XRPLWebSocketError)
The asset_scale field is documented as accepting values 0-9, but
rippled rejects values above 9. Without validation, values 10-255
would silently pass model validation and fail at submission time.

Add a _get_asset_scale_error helper (mirroring _get_transfer_fee_error)
and call it from get_errors(). Include tests for boundary values and
the error message format.
…gration tests

Update field-level doc comments on MPToken and MPTokenIssuance ledger
objects to match the canonical descriptions from xrpl.org.

Add integration tests for all four MPToken transaction types:
- MPTokenIssuanceCreate (base + with_metadata)
- MPTokenAuthorize (holder opt-in)
- MPTokenIssuanceSet (lock issuance)
- MPTokenIssuanceDestroy (destroy empty issuance)

Add create_mptoken_issuance() helper in tests/common that creates an
issuance and returns the derived MPTokenIssuanceID for dependent tests.
…e) visibility

The FlagCollection tuple constructor is pub(crate), so integration tests
(which live outside the crate) cannot use it directly. Use Vec::into()
which invokes the public From<Vec<T>> impl instead.
The rippleci/rippled:develop image updated after 2026-04-01 and broke
integration tests across all PRs (container exits before becoming healthy,
causing Connection refused on localhost:5005).

Pin to the last known-good digest and replace the simple until loop with
a bounded retry that checks container liveness, prints status per attempt,
and dumps container logs on failure.
Removing hardcoded fee: Some("10") lets sign_and_submit autofill compute
the correct fee for the pinned rippled image (was causing telINSUF_FEE_P).

Add TfMPTCanTransfer to the metadata test so transfer_fee is accepted
(was temMALFORMED). Add TfMPTCanLock in the create_mptoken_issuance
helper so the lock test has permission (was tecNO_PERMISSION).

All 5 MPT integration tests now pass against rippled develop.
- Raise MAX_MPT_ASSET_SCALE from 9 to 19 to match rippled preflight (no
  hard cap; practical ceiling is bounded by maxMPTokenAmount near 2^63).
- Replace NoFlags on the MPTokenIssuance and MPToken ledger objects with
  dedicated flag enums (MPTokenIssuanceFlag, MPTokenFlag) so the ledger
  flag bits returned by rippled are preserved instead of being dropped.
- MPTokenIssuanceSet now requires exactly one of TfMPTLock or TfMPTUnlock
  (DomainID-only modifications are not yet modelled); the previous flipped
  test_default assertion is corrected and split into passing and failing
  cases.
- Validate MPTokenIssuanceID across MPTokenIssuanceSet, MPTokenAuthorize,
  and MPTokenIssuanceDestroy as a 48-char ASCII hex string (24-byte
  Hash192 per XLS-33), and validate the optional holder field as a
  classic XRPL address. Unit-test fixtures updated to the spec-correct
  48-char form; integration fixtures continue to build IDs dynamically.
Retest the exact file set from PR #291 (rippled -> xrpld) against the
XLS-33 MPT feature branch to confirm the integration suite still passes
with MPT transaction types and binary codec changes included.

Do not merge — test branch only.
@e-desouza e-desouza changed the base branch from feat/mpt-binary-codec to main April 20, 2026 22:23
@e-desouza e-desouza closed this Apr 20, 2026
@e-desouza e-desouza reopened this Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant