-
Notifications
You must be signed in to change notification settings - Fork 53
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
Implement NCIP-18 #2440
Implement NCIP-18 #2440
Conversation
ipdae
commented
Mar 6, 2024
- resolve Implement NCIP-18 #2438
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
@planetarium/9c-dev it might be sensitive code because it directly handles NCG. I will also take a quick look, but I hope at least 1 person need to review the whole execution code very carefully so that we can avoid potential vulnerability regarding it. thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems okay to me. We should care about TryGetAvatarState
logic's avatar ownership check spec not change.
Lib9c/Action/RetrieveAvatarAssets.cs
Outdated
context.UseGas(1); | ||
Address signer = context.Signer; | ||
var state = context.PreviousState; | ||
if (state.TryGetAvatarState(signer, AvatarAddress, out _)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this line's purpose is only to check AvatarAddress
is the address of context.Signer
's avatar, TryGetAvatarState()
method can be too heavy. It should deserialize AvatarState from raw bencodex. It may affect to this action's performance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be better to just call GetAgentState and then check the agentState.AvatarAddresses
🤔
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
1 similar comment
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |