Fix inconsistent creation fee for containers #46

Merged
alexvanin merged 1 commit from alexvanin/frostfs-contract:fix/cnr-create-gas/master into master 2024-09-04 19:51:17 +00:00
Owner

Contains fixes from #42 and #45. Also changes balance contract to make consistent fee for transfer operations, which happen when container fee is not zero.

Merge after #42.

Contains fixes from #42 and #45. Also changes balance contract to make consistent fee for transfer operations, which happen when container fee is not zero. Merge after #42.
alexvanin added 6 commits 2023-10-24 10:45:19 +00:00
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
Persisting a transaction is done in 2 stages:
1. TestInvoke
2. Sign and send to the network.
3. At some point the tx is persisted.
Some time passes between 1 and 3, this could lead to different GAS
costs. It is a known issue for container delete: different epoch can
have different size in bytes and thus different cost to store.
Here we introduce fixed-length encoding for integers, so that the
problem can be avoided.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
[#45] balance: Fix inconsistent fee of transfer operations
All checks were successful
DCO action / DCO (pull_request) Successful in 1m58s
Tests / Tests (1.19) (pull_request) Successful in 2m5s
Tests / Tests (1.20) (pull_request) Successful in 2m5s
e834a66117
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
alexvanin requested review from fyrchik 2023-10-24 10:46:18 +00:00
alexvanin requested review from acid-ant 2023-10-24 10:46:19 +00:00
alexvanin requested review from dstepanov-yadro 2023-10-24 10:46:21 +00:00
alexvanin requested review from dkirillov 2023-10-24 10:46:21 +00:00
alexvanin requested review from aarifullin 2023-10-24 10:46:22 +00:00
alexvanin changed title from Fix inconsistent creation fee for containers to WIP: Fix inconsistent creation fee for containers 2023-10-24 10:46:44 +00:00
alexvanin changed title from WIP: Fix inconsistent creation fee for containers to Fix inconsistent creation fee for containers 2023-10-24 13:50:01 +00:00
dstepanov-yadro approved these changes 2023-10-24 13:55:54 +00:00
fyrchik approved these changes 2023-10-25 12:44:51 +00:00
alexvanin merged commit e834a66117 into master 2023-10-26 06:55:45 +00:00
alexvanin deleted branch fix/cnr-create-gas/master 2023-10-26 06:55:46 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
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: TrueCloudLab/frostfs-contract#46
No description provided.