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

[Suggestion]: Some unusable module functions for normal users have existed #148

Open
0xOutOfGas opened this issue Sep 26, 2022 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@0xOutOfGas
Copy link

Desc:
Some block and transaction-related module functions must be called under account GENESIS_ADDRES. Since these functions are not allowed for normal users to access, remove or hide them away from normal users. Removing or hiding these functions can reduce risk and many code lines.

Code Location:
sources/TransactionManager.move, sources/Block.move, sources/BlockReward.move, sources/Account.move

Functions:

// below functions can't be called from normal users

TransactionManager::block_prologue, TransactionManager::epilogue
Block::process_block_metadata
BlockReward::process_block_reward
Account::txn_prologue, Account::txn_epilogue
@0xOutOfGas 0xOutOfGas added the bug Something isn't working label Sep 26, 2022
@jolestar
Copy link
Member

This is a historical problem, as the friend function was not supported by Move in the early days.

If we want to change it to friend now, we have to deprecate the old function and use a new function name and let the new one to friend function.

@sanlee42

@jolestar jolestar added this to the v12 milestone Oct 11, 2022
@jolestar jolestar modified the milestones: v12, v13 Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants