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

Create Global Storage Space #686

Closed
igormcoelho opened this issue Apr 6, 2019 · 9 comments
Closed

Create Global Storage Space #686

igormcoelho opened this issue Apr 6, 2019 · 9 comments
Labels
discussion Initial issue state - proposed but not yet accepted

Comments

@igormcoelho
Copy link
Contributor

igormcoelho commented Apr 6, 2019

it's important for the network to have a Global Storage space, where CN can write important information that can be publicly read, or even, for them to reuse in the future.
One example: store GAS prices of opcodes, that may be variable in the future.
Another example: store exceeding non-fractional GAS, to allow us to easily implement fractional System Fees (#319).

One possibility is to use contract 0x0000...000000 as the storage (the fastest way to do it). Another possibilty is to convert consensus shared script (multisig) into a deployed one, so we can read and write there... one difference is that, after voting, the contract would change. Another problem is that if it's a real script contract, it should behave as one, with specific commands to read and write storage, which is complex to do now, but very possible if we implement this: #685

These updates could be part of MinerTx or another InvocationTx included after MinerTx, including Witness of the CN group, with the necessary updates on global storage.

@igormcoelho
Copy link
Contributor Author

What do you think @erikzhang , any better ideas to do it? It's a very important feature in my opinion.

@erikzhang erikzhang added the discussion Initial issue state - proposed but not yet accepted label Apr 6, 2019
@erikzhang
Copy link
Member

We don't need global storage space. We can create a contract and only allow CN to write data.

SYSCALL Neo.Blockchain.GetValidators
CAT
CAT
...
CAT
HASH160
SYSCALL System.Runtime.CheckWitness

@igormcoelho
Copy link
Contributor Author

Very good Erik, we can do this.
Now we need to find a place for CN to execute invocations. We could allow invocation on MinerTx, to not lose space, or we could add another invocation on every block. What is better?

@erikzhang
Copy link
Member

They can just send a normal InvocationTransaction.

@igormcoelho
Copy link
Contributor Author

Ok then, this is easier. I'll prototype the idea.

@erikzhang
Copy link
Member

Is there any data for CN to store? If no, I don't think we should do it immediately.

@igormcoelho
Copy link
Contributor Author

igormcoelho commented Apr 6, 2019

This will go together with a proposal to make system fee gas fractional. This is important to do soon enough, even on Neo 2.X.
The idea already works (in my mind), and depends on this. Good thing is that it will be backwards compatible, and easy to put on production on the fly without any chain/tx versioning.

I will explain the idea on another issue, when actually proposing the feature.

@erikzhang
Copy link
Member

The beneficiaries of the system fee are the neo holders and are part of the neo protocol and cannot be simply determined by the consensus nodes.

@igormcoelho
Copy link
Contributor Author

Ok Erik, I drafted the proposal here: #692
Consensus Nodes won't need to interfere in blockchain gas distribution, they will only store the missing system fee on a contract and re-count these on future blocks as long as the missing values become integer.

Thacryba pushed a commit to simplitech/neo that referenced this issue Feb 17, 2020
* Update cli.md

* Update cli.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Initial issue state - proposed but not yet accepted
Projects
None yet
Development

No branches or pull requests

2 participants