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

Optimize contract calls #3170

Merged
merged 6 commits into from
Mar 7, 2024
Merged

Optimize contract calls #3170

merged 6 commits into from
Mar 7, 2024

Conversation

shargon
Copy link
Member

@shargon shargon commented Feb 28, 2024

Description

Related to #3145 (comment)

We don't need to do some verification on each ContractState deserialization, it was already checked during deploy and update.

Type of change

  • Optimization

Jim8y
Jim8y previously approved these changes Feb 28, 2024
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.

The PR itself LGTM. Is it expected that Windows tests are failing? The reason seems not to be connected with this PR:

2024-03-06T08:04:08.6498402Z   Neo.CLI -> D:\a\neo\neo\src\Neo.CLI\bin\Debug\net7.0\neo-cli.dll
2024-03-06T08:04:09.9259426Z   Neo.UnitTests -> D:\a\neo\neo\tests\Neo.UnitTests\bin\Debug\net7.0\Neo.UnitTests.dll
2024-03-06T08:04:09.9332130Z Test run for D:\a\neo\neo\tests\Neo.UnitTests\bin\Debug\net7.0\Neo.UnitTests.dll (.NETCoreApp,Version=v7.0)
2024-03-06T08:04:09.9973775Z Microsoft (R) Test Execution Command Line Tool Version 17.7.2 (x64)
2024-03-06T08:04:09.9975436Z Copyright (c) Microsoft Corporation.  All rights reserved.
2024-03-06T08:04:10.0002537Z 
2024-03-06T08:04:10.1081193Z Starting test execution, please wait...
2024-03-06T08:04:10.1354227Z A total of 1 test files matched the specified pattern.
2024-03-06T08:04:12.3442822Z   Failed TestCreateAccount [35 ms]
2024-03-06T08:04:12.3443427Z   Error Message:
2024-03-06T08:04:12.3443861Z    Assert.IsTrue failed. 
2024-03-06T08:04:12.3444283Z   Stack Trace:
2024-03-06T08:04:12.3445530Z      at Neo.UnitTests.Wallets.NEP6.UT_NEP6Wallet.TestCreateAccount() in D:\a\neo\neo\tests\Neo.UnitTests\Wallets\NEP6\UT_NEP6Wallet.cs:line 94
2024-03-06T08:04:12.3447557Z    at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
2024-03-06T08:04:12.3449197Z    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
2024-03-06T08:04:12.3450058Z 
2024-03-06T08:04:26.9255779Z 
2024-03-06T08:04:26.9306468Z Failed!  - Failed:     1, Passed:   704, Skipped:     0, Total:   705, Duration: 16 s - Neo.UnitTests.dll (net7.0)

@shargon
Copy link
Member Author

shargon commented Mar 6, 2024

The PR itself LGTM. Is it expected that Windows tests are failing? The reason seems not to be connected with this PR:

2024-03-06T08:04:08.6498402Z   Neo.CLI -> D:\a\neo\neo\src\Neo.CLI\bin\Debug\net7.0\neo-cli.dll
2024-03-06T08:04:09.9259426Z   Neo.UnitTests -> D:\a\neo\neo\tests\Neo.UnitTests\bin\Debug\net7.0\Neo.UnitTests.dll
2024-03-06T08:04:09.9332130Z Test run for D:\a\neo\neo\tests\Neo.UnitTests\bin\Debug\net7.0\Neo.UnitTests.dll (.NETCoreApp,Version=v7.0)
2024-03-06T08:04:09.9973775Z Microsoft (R) Test Execution Command Line Tool Version 17.7.2 (x64)
2024-03-06T08:04:09.9975436Z Copyright (c) Microsoft Corporation.  All rights reserved.
2024-03-06T08:04:10.0002537Z 
2024-03-06T08:04:10.1081193Z Starting test execution, please wait...
2024-03-06T08:04:10.1354227Z A total of 1 test files matched the specified pattern.
2024-03-06T08:04:12.3442822Z   Failed TestCreateAccount [35 ms]
2024-03-06T08:04:12.3443427Z   Error Message:
2024-03-06T08:04:12.3443861Z    Assert.IsTrue failed. 
2024-03-06T08:04:12.3444283Z   Stack Trace:
2024-03-06T08:04:12.3445530Z      at Neo.UnitTests.Wallets.NEP6.UT_NEP6Wallet.TestCreateAccount() in D:\a\neo\neo\tests\Neo.UnitTests\Wallets\NEP6\UT_NEP6Wallet.cs:line 94
2024-03-06T08:04:12.3447557Z    at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
2024-03-06T08:04:12.3449197Z    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
2024-03-06T08:04:12.3450058Z 
2024-03-06T08:04:26.9255779Z 
2024-03-06T08:04:26.9306468Z Failed!  - Failed:     1, Passed:   704, Skipped:     0, Total:   705, Duration: 16 s - Neo.UnitTests.dll (net7.0)

looks like we have undeterministic error in wallets, but not related to this PR, we need to find the issue in a different pr...

@shargon shargon merged commit 413cfc4 into master Mar 7, 2024
6 checks passed
@shargon shargon deleted the core-optimize-contract-call branch March 7, 2024 09:19
AliceInHunterland added a commit to nspcc-dev/neo-go that referenced this pull request Mar 19, 2024
Port neo-project/neo#3170.

Close #3346

Signed-off-by: Ekaterina Pavlova <[email protected]>
@roman-khimov roman-khimov added this to the v3.7.0 milestone May 10, 2024
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.

5 participants