Skip to content

feat: use passphrase for validator registration/update#199

Merged
ItsANameToo merged 44 commits into
feat/mainsailfrom
feat/implement-validator-passphrase
Jun 17, 2026
Merged

feat: use passphrase for validator registration/update#199
ItsANameToo merged 44 commits into
feat/mainsailfrom
feat/implement-validator-passphrase

Conversation

@shahin-hq

@shahin-hq shahin-hq commented Jun 16, 2026

Copy link
Copy Markdown

Summary

Closes: https://app.clickup.com/t/2570579/86e1kedx0

This PR refactors validator registration/update to use passphrase instead of public key.

ts PR for reference: https://github.com/ArdentHQ/typescript-crypto/pull/76/

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

alfonsobries and others added 30 commits July 16, 2024 15:25
# Conflicts:
#	.gitignore
#	composer.json
#	composer.lock
#	src/Enums/Fees.php
#	src/Enums/TypeGroup.php
#	src/Enums/Types.php
#	src/Helpers.php
#	src/Identities/Address.php
#	src/Identities/PrivateKey.php
#	src/Identities/PublicKey.php
#	src/Identities/WIF.php
#	src/Transactions/Builder/AbstractTransactionBuilder.php
#	src/Transactions/Deserializer.php
#	src/Transactions/Serializer.php
#	src/Transactions/Types/HtlcLock.php
#	src/Transactions/Types/IPFS.php
#	src/Transactions/Types/MultiPayment.php
#	src/Transactions/Types/Transaction.php
#	src/Transactions/Types/Transfer.php
#	tests/Unit/Transactions/Builder/HtlcClaimTest.php
#	tests/Unit/Transactions/Builder/HtlcLockTest.php
@shahin-hq shahin-hq changed the base branch from develop to feat/mainsail June 16, 2026 12:56
Comment thread src/Utils/AbiDecoder.php
{
$dataOffset = self::readUInt($bytes, $offset);
$bytesOffset = $offset + $dataOffset;
$bytesOffset = $dataOffset;

@shahin-hq shahin-hq Jun 16, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ABI encodes dynamic-type pointers as absolute byte offsets from the start of the params buffer. decodeDynamicBytes and decodeString were computing $offset + $dataOffset, which works accidentally for the first argument ($offset = 0) but adds a spurious slot-width for every subsequent one, landing mid-data and causing a hexdec float overflow. Fix: use $dataOffset directly as the absolute position.

@shahin-hq shahin-hq marked this pull request as ready for review June 16, 2026 16:07
@shahin-hq shahin-hq requested a review from ItsANameToo June 16, 2026 16:08
@ItsANameToo ItsANameToo changed the title feat: use passphrase for validator registeration/update feat: use passphrase for validator registration/update Jun 17, 2026
@ItsANameToo ItsANameToo marked this pull request as draft June 17, 2026 09:20
@ItsANameToo ItsANameToo marked this pull request as ready for review June 17, 2026 09:22
@ItsANameToo ItsANameToo merged commit 43799f9 into feat/mainsail Jun 17, 2026
4 checks passed
@ItsANameToo ItsANameToo deleted the feat/implement-validator-passphrase branch June 17, 2026 09:22
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.

4 participants