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

SN pays for container estimations #3129

Closed
roman-khimov opened this issue Feb 13, 2025 · 4 comments · Fixed by #3167
Closed

SN pays for container estimations #3129

roman-khimov opened this issue Feb 13, 2025 · 4 comments · Fixed by #3167
Assignees
Labels
bug Something isn't working I4 No visible changes neofs-storage Storage node application issues S4 Routine U1 Critically important to resolve quickly
Milestone

Comments

@roman-khimov
Copy link
Member

Expected Behavior

Proxy contract paying for transactions.

Current Behavior

Hash:                   dabc2e80ad200628885a8cc484142eff8ec6f041f74c291ff7a16861c4ff9aca
OnChain:                true
BlockHash:              194efa322a7e17e2c5b15d2883ed04b7987f1fa5c6e0955f60d765ee34f9123d
Success:                true
Signer:                 NYmvupSPkJEuYWaofaNErKF3YF5Gddxyfg (WitnessScope(65))
SystemFee:              0.383705 GAS
NetworkFee:             0.0149052 GAS
Script:                 DCEDrv+KGfAgIJCvsJFrHAC0MjIb5+hiOgbJubXbjuXAU6QBpjoMIEIr1H2WHD5lfauVPVDc51Oyvv1VqY/FclDC7GzC/xLIAWNzFMAfDBBwdXRDb250YWluZXJTaXplDBTFDI4uqgbc3+qGfsvhcLWZ0mhuG0FifVtS
INDEX    OPCODE       PARAMETER
0        PUSHDATA1    03aeff8a19f0202090afb0916b1c00b432321be7e8623a06c9b9b5db8ee5c053a4    <<
35       PUSHINT16    15014 (a63a)
38       PUSHDATA1    422bd47d961c3e657dab953d50dce753b2befd55a98fc57250c2ec6cc2ff12c8
72       PUSHINT16    29539 (6373)
75       PUSH4        
76       PACK         
77       PUSH15       
78       PUSHDATA1    707574436f6e7461696e657253697a65 ("putContainerSize")
96       PUSHDATA1    c50c8e2eaa06dcdfea867ecbe170b599d2686e1b ("NdssLunr1BBMDm7V926M3FpQ1LPHR2RuYu", "0x1b6e68d299b570e1cb7e86eadfdc06aa2e8e0cc5")
118      SYSCALL      System.Contract.Call (627d5b52)

NYmvupSPkJEuYWaofaNErKF3YF5Gddxyfg is one of SNs. It signs and sends a transaction.

Possible Solution

Make proxy contract pay for it, make it sender and add alpha witness for it. Send as notary request.

Steps to Reproduce (for bugs)

Watch container estimations.

Context

Mainnet. This makes nodes lose their GAS pretty quickly as we get more and more containers on the network.

Regression

Probably in some way, once upon a time container estimations were completely broken. Now they're fine, but GAS is a problem.

Your Environment

  • Version used: 0.44.2
  • Server setup and configuration: mainnet
  • Operating System and version (uname -a): Debian stable
@roman-khimov roman-khimov added bug Something isn't working I4 No visible changes neofs-storage Storage node application issues S4 Routine U1 Critically important to resolve quickly labels Feb 13, 2025
@roman-khimov roman-khimov added this to the v0.45.0 milestone Feb 13, 2025
@End-rey End-rey self-assigned this Feb 17, 2025
@carpawell
Copy link
Member

Does it mean we also need to add Alphabet signature check to the PutContainerSize?

@roman-khimov
Copy link
Member Author

That's a somewhat separate matter. Ideally we should check SN belongs to the respective container. But we can't really do it now at the contract level. We can check IR-side when processing notary request, but this check doesn't prevent SN from misbehavior, so this means an additional alpha-sig check can be beneficial to prevent unauthorized puts.

@carpawell
Copy link
Member

I agree, that IR can do it much easier and it should do it. But since we always have alpha signature now, IMO, it should be checked.

Ideally we should check SN belongs to the respective container.

We... now can with https://github.com/nspcc-dev/neofs-contract/blob/6bc4a62a01e6b3940501e62084ad0c2b66c26b74/contracts/container/contract.go#L795-L818?

@roman-khimov
Copy link
Member Author

You know the current status of these lists, not yet.

End-rey added a commit that referenced this issue Feb 21, 2025
Add `AnnounceLoad` event, parser and processor for this event. Now
`putContainerSize` method tx sends as notary, make proxy contract pay for it,
make it sender and add alpha witness for it.

Closes #3129.

Signed-off-by: Andrey Butusov <[email protected]>
End-rey added a commit that referenced this issue Feb 21, 2025
Add `AnnounceLoad` event, parser and processor for this event. Now
`putContainerSize` method tx sends as notary, make proxy contract pay for it,
make it sender and add alpha witness for it.

Closes #3129.

Signed-off-by: Andrey Butusov <[email protected]>
End-rey added a commit that referenced this issue Feb 21, 2025
Add `AnnounceLoad` event, parser and processor for this event. Now
`putContainerSize` method tx sends as notary, make proxy contract pay for it,
make it sender and add alpha witness for it.

Closes #3129.

Signed-off-by: Andrey Butusov <[email protected]>
End-rey added a commit that referenced this issue Feb 21, 2025
Add `AnnounceLoad` event, parser and processor for this event. Now
`putContainerSize` method tx sends as notary, make proxy contract pay for it,
make it sender and add alpha witness for it.

Closes #3129.

Signed-off-by: Andrey Butusov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working I4 No visible changes neofs-storage Storage node application issues S4 Routine U1 Critically important to resolve quickly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants