Skip to content
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

Merged
merged 6 commits into from
Aug 22, 2023

Conversation

howjmay
Copy link
Member

@howjmay howjmay commented Jul 28, 2023

closes #2742

@howjmay howjmay force-pushed the linear-event-gas branch 4 times, most recently from eb36df7 to 2de5240 Compare July 28, 2023 21:01
@howjmay howjmay marked this pull request as draft July 31, 2023 08:28
@howjmay howjmay force-pushed the linear-event-gas branch 24 times, most recently from 9e10b71 to 65b78c0 Compare August 8, 2023 00:30
@howjmay howjmay requested review from jorgemmsilva, BugFreeSoftware and dessaya and removed request for jorgemmsilva August 8, 2023 23:41
@@ -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
Copy link
Member Author

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?

Copy link
Contributor

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

Copy link
Member Author

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

@howjmay howjmay force-pushed the linear-event-gas branch 2 times, most recently from 5cb42fb to aa1332a Compare August 9, 2023 14:24
@@ -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,
Copy link
Collaborator

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@howjmay howjmay force-pushed the linear-event-gas branch 8 times, most recently from 139e2dc to 98fffe2 Compare August 10, 2023 08:21
@howjmay howjmay requested a review from dessaya August 10, 2023 08:38
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
Copy link
Collaborator

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?

Copy link
Member Author

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

@howjmay howjmay merged commit a9e20a7 into iotaledger:develop Aug 22, 2023
@howjmay howjmay deleted the linear-event-gas branch August 22, 2023 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Event publishing gas should be linear, not fixed
3 participants