Skip to content

Ensure that view interops can't be changed outside#3812

Merged
NGDAdmin merged 35 commits intomasterfrom
read-only-interops
Apr 15, 2025
Merged

Ensure that view interops can't be changed outside#3812
NGDAdmin merged 35 commits intomasterfrom
read-only-interops

Conversation

@shargon
Copy link
Member

@shargon shargon commented Mar 7, 2025

Description

Ensure that view interop can't be changed outside.
There are views that returns interop types related to the storage, if this are changed, it will be changed.

Complementary to #3802

Type of change

  • Optimization (the change is only an optimization)
  • Style (the change is only a code style for better maintenance or standard purpose)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Test A
  • Test B

Test Configuration:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@shargon shargon changed the title Ensure that view interop can't be changed outside Ensure that view interops can't be changed outside Mar 7, 2025
@shargon
Copy link
Member Author

shargon commented Mar 7, 2025

Please @superboyiii could you help testing this one?

@superboyiii
Copy link
Member

Please @superboyiii could you help testing this one?

Sure

@superboyiii
Copy link
Member

It's compatible on mainnet.

@shargon
Copy link
Member Author

shargon commented Mar 12, 2025

Require #3829

@shargon shargon added the Blocked This issue can't be worked at the moment label Mar 12, 2025
AnnaShaleva
AnnaShaleva previously approved these changes Mar 17, 2025
Copy link
Member

@AnnaShaleva AnnaShaleva left a comment

Choose a reason for hiding this comment

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

Also checked NeoGo regarding the same problem, but our DB structure is a bit simpler in that we don't have such cache for native contracts (we always perform an "honest" serialization), hence we don't have this problem.

BTW, some testing workflows are failing, is it expected?

@shargon shargon added Ready to Merge and removed Waiting for Review Blocked This issue can't be worked at the moment labels Mar 17, 2025
Wi1l-B0t
Wi1l-B0t previously approved these changes Mar 18, 2025
@shargon
Copy link
Member Author

shargon commented Apr 3, 2025

Removed some methods, it will require a deep review for add GetContract and TransactionState

cschuchardt88
cschuchardt88 previously approved these changes Apr 4, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

@Jim8y Jim8y requested a review from AnnaShaleva April 12, 2025 03:59
@NGDAdmin NGDAdmin merged commit 910ae72 into master Apr 15, 2025
7 checks passed
@NGDAdmin NGDAdmin deleted the read-only-interops branch April 15, 2025 05:54
Jim8y added a commit to Jim8y/neo that referenced this pull request Apr 17, 2025
* master:
  DBFTPlugin: include consensus time into block interval (neo-project#3900)
  Isolate unit tests (neo-project#3904)
  Use DateTime.UtcNow (neo-project#3902)
  Update workflow (neo-project#3901)
  optimize: show state more readable (neo-project#3899)
  Optimize KeyedCollectionSlim (neo-project#3877)
  Native: move MillisecondsPerBlock setting to native Policy (neo-project#3895)
  optimize: history command support (neo-project#3892)
  Ensure that view interops can't be changed outside (neo-project#3812)
cschuchardt88 added a commit to cschuchardt88/neo that referenced this pull request Jun 8, 2025
* Ensure that view interop can't be changed outside

* revent one line

* Add ut

* more oracle

* Add neo

* Optimize

* SmartContract: fix XML comment formatting

No functional changes.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>

* fix serialize empty value

* Remove some clones

* check if it's sealed

* optimize

* change !

* clean

---------

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com>
Co-authored-by: Jimmy <jinghui@wayne.edu>
Co-authored-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Co-authored-by: Jimmy <jimmy@r3e.network>
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.

9 participants