SN pays for container estimations #1334

Closed
opened 2025-12-28 17:22:37 +00:00 by sami · 4 comments
Owner

Originally created by @roman-khimov on GitHub (Feb 13, 2025).

Originally assigned to: @End-rey on GitHub.

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
Originally created by @roman-khimov on GitHub (Feb 13, 2025). Originally assigned to: @End-rey on GitHub. ## 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
sami 2025-12-28 17:22:37 +00:00
Author
Owner

@carpawell commented on GitHub (Feb 20, 2025):

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

@carpawell commented on GitHub (Feb 20, 2025): Does it mean we also need to add Alphabet signature check to the [PutContainerSize](https://github.com/nspcc-dev/neofs-contract/blob/9cf9dc7d0a2f52d2379ff8f43d770ea0304cbf1a/contracts/container/contract.go#L899)?
Author
Owner

@roman-khimov commented on GitHub (Feb 20, 2025):

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.

@roman-khimov commented on GitHub (Feb 20, 2025): 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.
Author
Owner

@carpawell commented on GitHub (Feb 20, 2025):

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 nspcc-dev/neofs-contract@6bc4a62a01/contracts/container/contract.go (L795-L818)?

@carpawell commented on GitHub (Feb 20, 2025): 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?
Author
Owner

@roman-khimov commented on GitHub (Feb 20, 2025):

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

@roman-khimov commented on GitHub (Feb 20, 2025): You know the current status of these lists, not yet.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-node#1334
No description provided.