-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Describe the bug
When I look at the "declared" and "occupied" amounts, either they do not intuitively make sense to me, or the amounts are incorrect.
I assume "declared" to mean the total amount of CKB within the cell. I would suggest using the more standard term of "capacity" here. If it has some other meaning I am unclear on it. It says 145 CKBytes which seems to indicate the capacity.
I assume "occupied" is the amount of data actually used by the data within the cell. It says 128 CKBytes, which does not seem to add up as I would expect.
To Reproduce
- Go to https://explorer.nervos.org/transaction/0x20826a6762a40a9bda477c84464999ba5e1e7c4ca29c2659c3c5c065fd5b33a9
- Click on Cell Info for Output 1.
- Click on Capacity Usage.
Expected behavior
Here is the lock script, type script, and data:
Lock Script
{
"code_hash": "0xd00c84f0ec8fd441c38bc3f87a371f547190f2fcff88e642bc5bf54b9e318323",
"args": "0x00017170e87d1b34d166745b7274e0105a3fe7100a04",
"hash_type": "type"
}
In the lock script the code_hash is 32 bytes, args is 22 bytes, hash_type is 1 byte. This is 55 bytes total.
Type Script
{
"code_hash": "0x50bd8d6680b8b9cf98b73f3c08faf8b2a21914311954118ad6609be6e78a1b95",
"args": "0x8a0d5884ef2b7bf7e6c06c32482015b4eb0985f9cc4112c12a20ca36716066c6",
"hash_type": "data1"
}
In the type script the code_hash is 32 bytes, args is 32 bytes, hash_type is 1 byte. This is 65 bytes total.
Data
{
"data": "0x00ca9a3b000000000000000000000000"
}
The data is 16 bytes total.
The capacity field of the cell is 8 bytes total.
| Field | Occupied |
|---|---|
| Lock Script | 55 bytes |
| Type Script | 65 bytes |
| Data | 16 bytes |
| Capacity | 8 bytes |
| Total | 144 bytes |
This does not match the "occupied" capacity of "128 CKBytes".
