regen-network / regen-ledger

:seedling: Blockchain for planetary regeneration
https://docs.regen.network
Other
214 stars 103 forks source link

Set sane minimum gas price #284

Closed aaronc closed 2 years ago

aaronc commented 3 years ago

Currently minimum gas prices are enforced by individual validators in their configs. By default, the price is 0. This price is controlled by FlagMinGasPrices (minimum-gas-prices).

I propose that we set a sane default denominated in REGEN in the mainnet binary so that validators would need to actively set the value to 0. Ethan Buchman proposed this as a simple way to avoid early mainnet spam.

What do you think @clevinson @anilCSE @glandua ?

If we go with this approach, we would need to figure out a safe default gas price. Maybe we could assume REGEN is in the $1-2 range initially??

anilcse commented 3 years ago

Let's go with this for mainnet :+1:

anilcse commented 3 years ago

Only issue I see is with vesting accounts. If an account has all the tokens in vesting and no Validator allowed 0 fees, they cannot withdraw rewards

aaronc commented 3 years ago

Hmmm... vested tokens can't be used for fees?? I guess not. Well that's just terrible then

anilcse commented 3 years ago

May be this would be a problem for our case as we have a number of accounts in vesting. We can mitigate this by allowing only one node with zero fees which will be connected/disclosed privately with kelpr

anilcse commented 3 years ago

Hmmm... vested tokens can't be used for fees?? I guess not. Well that's just terrible then

I believe so, logically they are not spendable coins. But not 💯 sure on this. I can cross check and confirm

aaronc commented 3 years ago

I think you're right @anilCSE. Thanks for pointing this out.

This is so disappointing on so many levels...

clevinson commented 3 years ago

I don't see the problem here. We're talking about setting a sane default. Validators can of course override this default when they want to pull their initial fees out / withdraw rewards right?

aaronc commented 3 years ago

It's not just validators @clevinson. It's everyone. You and I couldn't even delegate tokens without zero fees

glandua commented 3 years ago

This is likely the core reason the hub and other chains launch with zero fees to start. We can change this param at the vote to enable transfers, or vote to set minimum fees socially, or vote a protocolized fee inforcement. It seems like we just need to take the same strategy as the cosmos hub launch which is to launch with zero fees so that people can withdraw some rewards and have those to use in the future....Then ask everyone to bring up fees afterwards. Perhaps at a later date we and upgrade to have a protocoled fee enforcement as needed.

glandua commented 3 years ago

Alternatively we could "airdrop" from an unvested account like the community boot strapping fund a single regen to every address so that everyone has enough to withdraw the first round of tokens produced from inflation and still launch with a minimum fee.

glandua commented 3 years ago

I actually like the idea of a network wide "airdrop" from the community bootstraping fund or sale pools of a minor amount. None of this really matters until transfers are enabled anyway, when we launch there are no transfers enabled at all so withdrawing staking rewards is not even possible.

aaronc commented 3 years ago

We just want people to be able to delegate at launch right?

glandua commented 3 years ago

Yes, people need to be able to delegate as the network comes online.

CShear commented 3 years ago

I landed on the same solution that Gregory did. Perhaps as part of that governance proposal to enable transfers they also vote to send 10 REGEN to each wallet as a gift to cover delegation fees. We're likely to launch with about 500 wallets maybe a bit more.

glandua commented 3 years ago

I am not sure what the spam threat is here Aaron. Why are you so concerned about spam in the early days? I understand why it WILL be important, but I dont understand why at the beginning we cannot just have zero fee's to allow this to all work easily.

glandua commented 3 years ago

also: I prefer this threaded convo about this topic here on github to doing so in slack. thanks for catalyzing that aaron.

robert-zaremba commented 3 years ago

I like the idea of airdrop - but only registered accounts (team/investors + validators) and to some super small amount - which will allow to do all operations which are needed by the time they will receive staking rewords. We can multiply that amount 2x to assure everything is fine. Later when we will like to create new accounts we can also airdrop some small amount of REGEN to cover operation costs.

aaronc commented 3 years ago

I landed on the same solution that Gregory did. Perhaps as part of that governance proposal to enable transfers they also vote to send 10 REGEN to each wallet as a gift to cover delegation fees. We're likely to launch with about 500 wallets maybe a bit more.

This all has to happen way before any governance proposal. That takes weeks. This has to happen on launch

aaronc commented 3 years ago

I am not sure what the spam threat is here Aaron. Why are you so concerned about spam in the early days? I understand why it WILL be important, but I dont understand why at the beginning we cannot just have zero fee's to allow this to all work easily.

Probably not a big issue when only staking and gov will work.

glandua commented 3 years ago

I would propose we move forward with a zero fee launch, so that we can recover rewards easily and with a minimum of work. I do not think this is a threat worth dealing with at the protocol or even param level when we only have gov and staking enabled.

Down the road when spam is a threat to utility (when we are upgrading to data module) we can either have a protocol level fix, or if a protocol level fix is challenging, simply change the param to set a min fee in the binary for the new version of the chain we are upgrading to, and let people know that the foundation and RND inc will only delegate to validators who maintain a min fee, and ask if some other token holders make similar statements so there is a social consensus approach.

On Thu, Mar 4, 2021 at 5:04 PM Aaron Craelius notifications@github.com wrote:

I am not sure what the spam threat is here Aaron. Why are you so concerned about spam in the early days? I understand why it WILL be important, but I dont understand why at the beginning we cannot just have zero fee's to allow this to all work easily.

Probably not a big issue when only staking and gov will work.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/regen-network/regen-ledger/issues/284#issuecomment-790977337, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIIO6SK5GDV3L42DV5ELMLTTB77VDANCNFSM4YT4MBHA .

--

http://www.regen.network/

Gregory Landua

Chief Regeneration Officer www.regen.network

+1 541 740 6121 https://medium.com/regen-network https://t.me/regen_network https://twitter.com/regen_network?lang=en https://www.facebook.com/weareregennetwork/

clevinson commented 3 years ago

If we are expecting to be upgrading with other modules in the coming months (modules which require some spam prevention mesaures and min fees), then that means we will in the next several months we will expect to have some min-fees in play.

This means that all token holders (many of whome have a 1-year lockup from mainnet atleast) will not be able to ever stake REGEN if they miss this crucial window of first X months in which 0 fees are enabled.

If we feel comfortable with the airdrop strategy, I feel that this is the only way to guarantee that all token holders will be able to stake, given that many may not be actively paying attention in the first months following launch (when 0 fee transactions are still enabled)

amaury1093 commented 3 years ago

We can mitigate this by allowing only one node with zero fees which will be connected/disclosed privately with kelpr

i'm putting this proposition by anil up again. This node can also disable all other txs except withdrawing rewards/delegating, to avoid spam. It seems like a solution with way less machinery involved than an airdrop, and still allows spam-protection on the network level.

aaronc commented 3 years ago

This node can also disable all other txs except withdrawing rewards/delegating, to avoid spam

In order to filter non-delegation/withdraw txs from the mempool that validator would need a custom ante decorator. Not sure we want to make it that complex. But we can consider... @anilCSE ?

Maybe for now, we allow/encourage zero fee validators because only staking/gov really will work. And later, we ensure there is at least one zero-fee node, maybe... with custom ante logic...

anilcse commented 3 years ago

This node can also disable all other txs except withdrawing rewards/delegating, to avoid spam

In order to filter non-delegation/withdraw txs from the mempool that validator would need a custom ante decorator. Not sure we want to make it that complex. But we can consider... @anilCSE ?

Maybe for now, we allow/encourage zero fee validators because only staking/gov really will work. And later, we ensure there is at least one zero-fee node, maybe... with custom ante logic...

If we disable transfers, I think those are the only txs possible mostly . Custom ante decorator would be complex. Let's go with simple path.

Option-1 :

Option-2 :

Option-3:

I would prefer option-1 for it's simplicity but option-2 also works same.

aaronc commented 3 years ago

Let's start with option 1 and maybe transition to option 2 at the first upgrade.

robert-zaremba commented 3 years ago

What's wrong with Airdrop?

aaronc commented 3 years ago

What's wrong with Airdrop?

We can't do a post genesis airdrop until transferred as enabled. And there are other reasons we can't do a genesis airdrop. Later on maybe we could...

Bambarello commented 3 years ago

I would support option-1, @clevinson @anilCSE - will you update the mainnet validator setup inscructions with clear statement and example of app.toml config, which directs all validators to setup 0 fees at the mainnet start?

clevinson commented 3 years ago

@Bambarello the default app.toml config already has 0 minimum gas price, so there's no action needed here for defaults to be set correctly :)

robert-zaremba commented 3 years ago

Discussing Gov proposal to have a consensus controlled chain min gas price: https://forum.regen.network/t/gov-controlled-min-gas-price/213

ryanchristo commented 2 years ago

Closing this issue. Any further discussion about a consensus controlled minimum price can continue in the governance forum. Updated link: https://commonwealth.im/regen/discussion/3511-gov-controlled-min-gas-price