Page MenuHomePhabricator

[alias-server] Use ecash-script to parse alias registrations according to latest spec
ClosedPublic

Authored by bytesofman on Jun 15 2023, 15:56.

Details

Summary

T3060

Responding to feedback of D13916. With ecash-script library developed and the spec finalized, implement here.

Key change is modifying the parseAliasTx function. This change requires new mocks, which requires changes to most unit test files.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bytesofman planned changes to this revision.EditedJun 15 2023, 15:57
  • Unit tests for txs with multiple OP_RETURN, fee good and fee bad
  • Unit tests for normal xec tx
  • Remove debug logging

More unit tests, remove debug logging

Fabien requested changes to this revision.Jun 16 2023, 13:20
Fabien added a subscriber: Fabien.
Fabien added inline comments.
apps/alias-server/src/alias.js
171 ↗(On Diff #40815)

But you did account for the fee despite the alias registration being invalid.
This is also worth a test to ensure this case is properly handled.

190 ↗(On Diff #40815)

The fees should be incremented at this time

This revision now requires changes to proceed.Jun 16 2023, 13:20

Increment fee only if alias is valid, add unit test to confirm

This revision is now accepted and ready to land.Jun 16 2023, 19:12