Page MenuHomePhabricator

[ecash-herald] Prelim parsing for alias registration txs
ClosedPublic

Authored by bytesofman on Jul 4 2023, 14:43.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC629f7190d19f: [ecash-herald] Prelim parsing for alias registration txs
Summary

As we start testing alias registrations, we'd like these to not appear garbled.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
herald-alias-prelim-support
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 24343
Build 48295: Build Diffecash-herald-tests
Build 48294: arc lint + arc unit

Event Timeline

image.png (101×231 px, 8 KB)

output from npm run sendMsgByBlock 799377

Fabien requested changes to this revision.Jul 4 2023, 16:22
Fabien added a subscriber: Fabien.
Fabien added inline comments.
apps/ecash-herald/src/parse.js
434 ↗(On Diff #41237)

Now I can crash your herald whenever I want with 0x6a042e78656305426F6F6D21 as a script for my tx.

This revision now requires changes to proceed.Jul 4 2023, 16:22

Add basic validation for alias registration txs

validate for alias tx version number

unit test for invalid tx by invalid version

Fabien requested changes to this revision.Jul 4 2023, 16:36
Fabien added inline comments.
apps/ecash-herald/test/mocks/appTxSamples.js
444 ↗(On Diff #41242)

You can also add a test for the case I crafted and have a stack of a single push

This revision now requires changes to proceed.Jul 4 2023, 16:36

test vector with empty stack after alias prefix

This revision is now accepted and ready to land.Jul 4 2023, 18:16