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

Change the way how to pay about >1024 transaction. (2x) #100

Closed

Conversation

lightszero
Copy link
Member

@lightszero lightszero commented May 30, 2019

#neo-project/neo-node#303

pay for every extrablock instread every bytes

in default extrablock=1024 bytes.
feeperextrablock=0.0124.gas

example:
txsize < 1024, pay 0 block,free
txsize =1025 ~ 2048 bytes, pay 1 block 0.01024gas
txsize =2049 ~ 3072 bytes, pay 2 block 0.02048gas

if you want pay by every extrabytes
set extrablock=1 bytes
feeperextrablock =0.0001gas

pay for every extrablock,not every bytes

in default extrablock=1024 bytes.

txsize =1025~2048 bytes, pay 1 block
txsize =2049~3072 bytes, pay 2 block
@igormcoelho
Copy link
Contributor

igormcoelho commented May 30, 2019

@lightszero could we accept these tests here first? #101

Then we update the tests on this branch to see how the new prices could possibly fit (and discuss them).

@vncoelho
Copy link
Member

Accepted and merged, those tests are great, @igormcoelho.

@vncoelho
Copy link
Member

@lightszero, what are the advantages of this? Are you afraid of any attack?
Are you planning this for both 2x and 3.0+?

@igormcoelho
Copy link
Contributor

@lightszero I added your proposed option as "standard" (VerifySizeLimits2) and kept old one too (VerifySizeLimits1). Now we can discuss and create more tests for your proposal.

@igormcoelho
Copy link
Contributor

@shargon could you fix the indent here for us? poor editor here hahaha

@jasonliu91
Copy link

This policy is for 2x ,use kb as fee unit can avoid the utxo loop calculation problem of the previous byte unit policy.

@igormcoelho
Copy link
Contributor

I think block calculation is a good idea. But since old formula has been around for a while , we should propose another obe which is compatible.. with lower or same prices.

@igormcoelho
Copy link
Contributor

igormcoelho commented May 31, 2019

@lightszero what about charging at every 512 bytes, and use FLOOR instead of CEILING? This reduces the UTXO combinations and effectively keep prices nearly the same or less (never increases, so no wallet will break).
fee = floor((txsize - 1024)/512)*pricePer512Chunk + basePrice

@lightszero
Copy link
Member Author

@lightszero, what are the advantages of this? Are you afraid of any attack?
Are you planning this for both 2x and 3.0+?

because they donot like #73

so this is another try

@lightszero lightszero closed this Jun 1, 2019
@lightszero lightszero reopened this Jun 1, 2019
Copy link
Member

@vncoelho vncoelho left a comment

Choose a reason for hiding this comment

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

I agree with think that this will be a good change which will simplify the calculus.
Nice job and idea.

@@ -2,8 +2,10 @@
"PluginConfiguration": {
"MaxTransactionsPerBlock": 500,
"MaxFreeTransactionsPerBlock": 20,
"MaxFreeTransactionSize": 1024,
"FeePerExtraByte": 0.00001,
Copy link
Member

Choose a reason for hiding this comment

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

It is a little bit strange to still keep FeePerExtraByte here.

However, the old VerifySizeLimits1 limit was kept.

Copy link
Contributor

@lock9 lock9 left a comment

Choose a reason for hiding this comment

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

What is the impact of merging this? Can it affect our current users negatively?

@shargon
Copy link
Member

shargon commented Jul 25, 2019

Is for neo2, i think that we shouldn't change the economic model in neo 2

@vncoelho
Copy link
Member

I also think so, @shargon, maybe let's close this one and think about adjusting it for NEO3.
What do you think @lightszero and @erikzhang ?

@lock9
Copy link
Contributor

lock9 commented Aug 4, 2019

Hello @neo-project/core, what should we do with this?

@vncoelho vncoelho changed the title Change the way how to pay about >1024 transaction. Change the way how to pay about >1024 transaction. (2x) Dec 18, 2019
@vncoelho
Copy link
Member

@lightszero, I think we can close this, right?
There is no more need of changes on NEO2x.
In my opinion, it was a good change but it was not merged in time.

However, fell free to reopen.

@vncoelho vncoelho closed this May 15, 2020
@vncoelho
Copy link
Member

Reopened due to neo-project/neo#1763, if we are going to charge for tx size better to charge this way.

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.

None yet

7 participants