Bugfix/user check - #27
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Hardens user authorization, request validation, nonce allocation, and Solana transaction handling.
Changes:
- Verifies request senders against registered Mix addresses.
- Adds stricter payload, asset, mint, session, and nonce validation.
- Improves transfer indexing, RPC handling, and failure/refund flows.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
store/nonce.go |
Limits nonce accounts per Mix address. |
solana/system_call.go |
Validates system-call fees and referenced assets. |
solana/solana.go |
Improves lookup errors and subsystem restrictions. |
solana/signer.go |
Hardens signer message and session validation. |
solana/rpc.go |
Extracts NFT account validation. |
solana/observer.go |
Validates calls before nonce confirmation. |
solana/mvm.go |
Adds user authentication and request validation. |
solana/http.go |
Returns a rate-limit response for nonce caps. |
apps/solana/transaction.go |
Revises transfer indexing and priority fees. |
apps/solana/rpc.go |
Exposes additional mint-state fields. |
apps/solana/common.go |
Rejects transactions without instructions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+234
to
+235
| func isNFTAccount(acc *rpc.GetAccountInfoResult) (bool, error) { | ||
| data := acc.GetBinary() |
Comment on lines
+528
to
+532
| if index < solanaInnerIndexBase { | ||
| if index >= int64(len(msg.Instructions)) { | ||
| return solana.CompiledInstruction{}, false | ||
| } | ||
| return msg.Instructions[index], true |
Comment on lines
+1196
to
+1202
| func checkUser(ctx context.Context, req *store.Request, mix *bot.MixAddress) bool { | ||
| if common.CheckTestEnvironment(ctx) { | ||
| return true | ||
| } | ||
| senders := append([]string(nil), req.Output.Senders...) | ||
| return mix.Threshold == byte(req.Output.SendersThreshold) && | ||
| bot.HashMembers(mix.Members()) == bot.HashMembers(senders) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.