use datoshi as the name of the smallest unit of GAS#3241
use datoshi as the name of the smallest unit of GAS#3241NGDAdmin merged 9 commits intoneo-project:masterfrom
Conversation
|
Datoshi is the name for the smallest unit of GAS. 1 datoshi = 1e-8 GAS Or 1_00_000_000 datoshi = 1_00_000 kdatoshi = 1_00 mdatoshi = 1 GAS |
cschuchardt88
left a comment
There was a problem hiding this comment.
what is this new datoshi thing? Just gas?
Yes, just give the smallest unit of GAS a name, cause people including our own are miss using GAS and the smallest unit of GAS, such as 20 GAS and 20_0000_0000 GAS. |
|
Does DA know this :) |
yes |
|
The problem is GAS not satoshi, isn't it? |
@shargon The problem is we dont have a name for the smallest unit of GAS while we are actually use it a lot. And in the core, sometimes we use GAS for GAS, sometimes we use the smallest GAS unit as GAS. Its misused. |
| { | ||
| GasConsumed = checked(GasConsumed + gas); | ||
| if (GasConsumed > gas_amount) | ||
| FeeConsumed = GasConsumed = checked(FeeConsumed + datoshi); |
There was a problem hiding this comment.
The warning is expected, marking and telling people that this is absolete. If we disable it here, people how use this will also not able to see it.
There was a problem hiding this comment.
But the warning will apif people use it, is not for us
There was a problem hiding this comment.
The warning shows to people exactly the way it shows us, during the build process, if we disable it here, it will also go disappear in users build terminal..... can be done easily, but i am not sure you like that.
roman-khimov
left a comment
There was a problem hiding this comment.
Two obligatory links:
Line 23 in 0b6526e
- https://pkg.go.dev/github.com/nspcc-dev/neo-go@v0.105.1/pkg/encoding/fixedn#Satoshi
And one minor note: I always expect users to operate with GAS, so things like "please input extra fee" SHOULD NOT accept satoshi values, they should just use 0.xxx GAS. At least that's the way NeoGo CLI is.
|
Its voting result. Fixed8 makes too much change to the existing code. And use 0.xxxGAS is good but will change existing neo-cli, a thing should be avoided in this pr. |
AnnaShaleva
left a comment
There was a problem hiding this comment.
I still prefer the old way of GAS/satoshi identification, but if it's the user's decision, then let's keep it.
|
I think there's a couple of places in the neo-devpack that needs to be updated as far. |
|
ready to merge |
|
@Jim8y maybe now with the mono-repo we need more changes, did you check it? |
|
I will check it now. |
b8656ff
Description
It is ambiguous to call both the smallest unit of GAS and GAS as GAS, thus i had started a discussion and vote in neo discord, and get a name of
datoshifor the smallest unit of GAS. This name has being approved by NF. Thus having this pr.Fixes # (issue)
Type of change
Test Configuration:
Checklist: