Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to leave missing signatures as null #168

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

wiyarmir
Copy link
Member

@wiyarmir wiyarmir commented Dec 3, 2024

this helps backend do partial signatures in the right places

we also ensure fee payer stays at the top

this helps backend do partial signatures in the right places
@wiyarmir wiyarmir requested a review from jszmltr December 3, 2024 15:24
Copy link
Contributor

github-actions bot commented Dec 3, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

internal fun List<AccountMeta>.normalize(): List<AccountMeta> = groupBy { it.publicKey }
import net.avianlabs.solana.tweetnacl.ed25519.PublicKey

internal fun List<AccountMeta>.normalize(
Copy link
Contributor

Choose a reason for hiding this comment

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

would it make sense to have two separate functions ?
normalize() and normalizeWithFeePayer ?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, fee payer might be set or not

logger.warn { "Duplicate signatures detected" }
val signatures = signers.associate { signer ->
signer.publicKey to
TweetNaCl.Signature.sign(serializedMessage, signer.secretKey)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we do this now ?

Copy link
Member Author

Choose a reason for hiding this comment

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

so the signatures can preserve the order of account meta list

Copy link
Contributor

github-actions bot commented Dec 3, 2024

🥳 JUnit passed

Passed Failed Skipped
✅ 38 ❌ 0 ⚠️ 4

You can see the report here.

@wiyarmir wiyarmir enabled auto-merge December 3, 2024 15:34
@wiyarmir wiyarmir added this pull request to the merge queue Dec 3, 2024
@wiyarmir wiyarmir removed this pull request from the merge queue due to a manual request Dec 3, 2024
@wiyarmir wiyarmir merged commit 972f68a into main Dec 3, 2024
3 checks passed
@wiyarmir wiyarmir deleted the guillermo/allow-to-leave-missing-signatures-as-null branch December 3, 2024 15:54
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.

2 participants