-
Notifications
You must be signed in to change notification settings - Fork 152
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
feat: Change gas for emit event as linear #2760
Conversation
eb36df7
to
2de5240
Compare
9e10b71
to
65b78c0
Compare
65b78c0
to
8574530
Compare
packages/vm/gas/table.go
Outdated
@@ -66,7 +66,7 @@ var burnTable = BurnTable{ | |||
BurnCodeUtilsBLSValidSignature: {"bls valid", constValue(2000)}, | |||
BurnCodeUtilsBLSAddrFromPubKey: {"bls addr", constValue(50)}, | |||
BurnCodeUtilsBLSAggregateBLS1P: {"bls aggregate", linear(CoefBLSAggregate)}, | |||
BurnCodeMinimumGasPerRequest1P: {"minimum gas per request", minBurn(10000)}, // TODO maybe make it configurable (gov contract?) | |||
BurnCodeMinimumGasPerRequest1P: {"minimum gas per request", minBurn(10000)}, // TODO maybe make it configurable (gov contract?) // FIXME not equal to wasmlib.MinGasFee |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This value is not relative to wasmlib.MinGasFee. Should it relate to wasmlib.MinGasFee?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess wasmlib needs to be updated to whatever value we set here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was not the same too. But as you said, I think it is better to synchronize them
5cb42fb
to
aa1332a
Compare
packages/chain/cons/cons_test.go
Outdated
@@ -346,7 +347,8 @@ func testChained(t *testing.T, n, f, b int) { | |||
inccounter.FuncIncCounter.Hname(), | |||
dict.New(), | |||
uint64(i*reqPerBlock+ii), | |||
20000, | |||
// FIXME may user other MinGasFee instead of wasmlib.MinGasFee | |||
wasmlib.MinGasFee, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the very least, wasp core packages like this should not depend on wasmlib.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
139e2dc
to
98fffe2
Compare
BurnCodeGetAllowance: {"allowance", constValue(10)}, | ||
BurnCodeTransferAllowance: {"transfer", constValue(10)}, | ||
BurnCodeEstimateStorageDepositCost: {"storage deposit estimate", constValue(5)}, | ||
BurnCodeSendL1Request: {"send", linear(Coef1Send)}, | ||
BurnCodeDeployContract: {"deploy", constValue(10)}, | ||
BurnCodeStorage1P: {"storage", linear(1)}, // 1 gas per byte | ||
BurnCodeStorage1P: {"storage", linear(55)}, // 55 gas per byte |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, how did you arrive at this number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is about the ratio of gas per byte of ETH storage and event
98fffe2
to
6706234
Compare
6706234
to
436a210
Compare
436a210
to
f7083b7
Compare
closes #2742