-
Notifications
You must be signed in to change notification settings - Fork 198
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
FIX: ProcessBuiltIn + SetBurnRole #6157
FIX: ProcessBuiltIn + SetBurnRole #6157
Conversation
} | ||
|
||
// SendGlobalSettingToAll handles sending global settings information | ||
func (sovHost *sovereignVMContext) SendGlobalSettingToAll(sender []byte, input []byte) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need for this. Please revert. like really really no need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the context handler.
} | ||
|
||
// NewSovereignVMContext creates a new sovereign vm context | ||
func NewSovereignVMContext(vmContext vm.ContextHandler) (*sovereignVMContext, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is NewSystemVMEEI - SovereignVMContext sounds bad.
It is ok that you pushed this context handler, but it needs a new name. It is the execution environmnent interface for the SystemVM.
vm/systemSmartContracts/eei.go
Outdated
BalanceDelta: big.NewInt(0), | ||
} | ||
host.outputAccounts[string(destAcc.Address)] = destAcc | ||
} | ||
|
||
destAcc.BalanceDelta = big.NewInt(0).Add(destAcc.BalanceDelta, value) | ||
if host.isSovereignSCToSCCall(input) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isInShardSCToSCCall is a better name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, fixed it
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/chain-go-sdk #6157 +/- ##
=====================================================
- Coverage 78.11% 78.07% -0.04%
=====================================================
Files 874 878 +4
Lines 103470 103589 +119
=====================================================
+ Hits 80828 80880 +52
- Misses 17153 17197 +44
- Partials 5489 5512 +23 ☔ View full report in Codecov by Sentry. |
# Conflicts: # cmd/sovereignnode/go.mod # cmd/sovereignnode/go.sum # errors/errors.go # go.mod # go.sum # vm/systemSmartContracts/esdt.go
} | ||
|
||
// NewSystemVMEEI creates a new system vm eei context, mainly used for now in sovereign chain | ||
func NewSystemVMEEI(vmContext vm.ContextHandler) (*systemVMEEI, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be NewOneShardSystemVMEEI, the name is not good.
And should also have a rework on ProcessBuiltInFunction as well, without the sameShard IF in that case.
vmContext, | ||
}, nil | ||
} | ||
|
||
// SendGlobalSettingToAll handles sending global settings information | ||
func (sovHost *systemVMEEI) SendGlobalSettingToAll(sender []byte, input []byte) error { | ||
func (sovHost *oneShardSystemVMEEI) SendGlobalSettingToAll(sender []byte, input []byte) error { | ||
// TODO: MX-15470 remove sameShard check from ProcessBuiltInFunction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually have your own definition of ProcessBuiltInFunction - do not touch the ProcessBuiltInFunction from the original EEI.
Reasoning behind the pull request
ProcessBuiltInFunction
and fix forSetBurnRole
Proposed changes
vmContext
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?