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

Integrate new vm-common: events for "claim developer rewards" #6117

Merged
merged 4 commits into from
Apr 17, 2024

Conversation

andreibancioiu
Copy link
Collaborator

@andreibancioiu andreibancioiu commented Apr 15, 2024

Reasoning behind the pull request

Previously, the execution of ClaimDeveloperRewards did not emit an event / log entry. Thus, the reason behind a value movement (as a smart contract result) wasn't very explicit.

Additionally, when a Parent contract was invoking ClaimDeveloperRewards on its Children, it was possible for the actual value movement (the Parent receiving the reward) to be completely opaque. For example, see: https://explorer.multiversx.com/transactions?function=claimRewardsAllContracts

Proposed changes

Testing procedure

  • Was separately tested with the Rosetta (Mesh) Checker (on Testnet).
  • Standard testing
  • Deploy integrationTests/vm/wasm/testdata/developer-rewards/output/developer_rewards.wasm, then follow the same scenario as depicted in integrationTests/vm/wasm/developerRewards/developerRewards_test.go (invoke a function, then call ClaimDeveloperRewards). In the API, look for the new events / logs.

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@andreibancioiu andreibancioiu self-assigned this Apr 15, 2024
@andreibancioiu andreibancioiu changed the title Integration newer vm-common: events for "claim developer rewards" Integration new vm-common: events for "claim developer rewards" Apr 15, 2024
@andreibancioiu andreibancioiu marked this pull request as ready for review April 15, 2024 12:10
@@ -224,7 +224,7 @@ func (context *TestContext) initFeeHandlers() {
RewardsConfigByEpoch: []config.EpochRewardSettings{
{
LeaderPercentage: 0.1,
DeveloperPercentage: 0.0,
DeveloperPercentage: 0.3,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Seems to not have an impact on other tests.

Comment on lines +34 to +35
byte zero32_red[32] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
byte zero32_green[32] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Dummy registries (as in red-green-blue).

@andreibancioiu andreibancioiu changed the title Integration new vm-common: events for "claim developer rewards" Integrate new vm-common: events for "claim developer rewards" Apr 15, 2024
Copy link
Collaborator

@gabi-vuls gabi-vuls left a comment

Choose a reason for hiding this comment

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

Normal allin test: v1.6.15-dev-config-eb2e06c06d -> integrate-vm-common-events-5d76ebffdf

--- Specific errors ---

block hash does not match 1750
wrong nonce in block 852
miniblocks does not match 0
num miniblocks does not match 0
miniblock hash does not match 0
block bodies does not match 0
receipts hash missmatch 0

/------/

--- Statistics ---

Nr. of all ERRORS: 0
Nr. of all WARNS: 244
Nr. of new ERRORS: 0
Nr. of new WARNS: 3
Nr. of PANICS: 0

/------/

--- ERRORS ---

/------/

--- WARNINGS ---

/------/

@andreibancioiu andreibancioiu merged commit f0a917b into rc/v1.7.next1 Apr 17, 2024
8 checks passed
@andreibancioiu andreibancioiu deleted the integrate-vm-common-events-04-15 branch April 17, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants