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

call 'visibilityRules' method #2058

Merged
merged 3 commits into from
Sep 19, 2024
Merged

Conversation

tudor-malene
Copy link
Collaborator

Why this change is needed

Part 3 of the visibility config implementation.
After #2057 and #2056

What changes were made as part of this PR

  • define the solidity interface
  • call the visibilityRules method
  • implement the config in the OBSErc20

PR checks pre-merging

Please indicate below by ticking the checkbox that you have read and performed the required
PR checks

  • PR checks reviewed and performed

Copy link
Collaborator

@BedrockSquirrel BedrockSquirrel left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me but I'm not super familiar with the solidity usage.

@@ -196,7 +199,7 @@ func executeTransaction(

// Create a new context to be used in the EVM environment
blockContext := gethcore.NewEVMBlockContext(header, bc, author)
vmenv := vm.NewEVM(blockContext, vm.TxContext{BlobHashes: tx.Tx.BlobHashes(), GasPrice: header.BaseFee}, statedb, config, cfg)
vmenv = vm.NewEVM(blockContext, vm.TxContext{BlobHashes: tx.Tx.BlobHashes(), GasPrice: header.BaseFee}, statedb, config, cfg)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not really sure why this applyTx nested function exists, makes this quite hard to follow. But seems like vmenv will always be created or we'd have returned with error before you use it outside the function so guess it works.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

tbh, I don't remember either. I think @StefanIliev545 might have worked in this area as well.
At some point we were depending on geth internal functions, which eventually became public

Copy link
Collaborator

@BedrockSquirrel BedrockSquirrel left a comment

Choose a reason for hiding this comment

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

LGTM

@tudor-malene tudor-malene merged commit d0e17cb into main Sep 19, 2024
3 checks passed
@tudor-malene tudor-malene deleted the tudor/event_visibility_part3 branch September 19, 2024 16:06
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.

2 participants