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

Add a new whitelist solution #3614

Merged
merged 23 commits into from
Dec 14, 2024
Merged

Add a new whitelist solution #3614

merged 23 commits into from
Dec 14, 2024

Conversation

chopin-fan
Copy link
Collaborator

@chopin-fan chopin-fan commented Sep 29, 2024

For issue #3610 .

Add *, +, - operators to BigIntValue type.
Add Keccak256, Bn254G1Mul, Bn254G1Add, and Bn254Pairing functions for the ZkVerify contract.
Add ValueTuple function to the whitelist.
Allow the StructuredState class.

Copy link

vizipi bot commented Sep 29, 2024

Pull request analysis by VIZIPI

Below you will find who is the most qualified team member to review your code.
This analysis includes his/her work on the code included in this Pull request, in addition to their experience in code affected by these changes ( partly found within the list of potential missing files below )   Feedback always welcome

Reviewers with knowledge related to these changes

Match % Person Commit Count Common Files
53.85% gldeng 14 7
30.77% eanzhao 32 4
30.77% ZhangXin 32 4
30.77% jason-hoopox 12 4
30.77% 轩辕焮痕 1 4
23.08% AbigailDeng 1 3

Potential missing files from this Pull request

files commonly committed with a subset of this pr, but not committed this time. (click to collapse)
FilePercentilerate
...test/AElf.OS.Network.Grpc.Tests/AElf.OS.Network.Grpc.Test66.67%2 out of 3 times
test/AElf.OS.Tests/AElf.OS.Tests.csproj66.67%2 out of 3 times
...test/AElf.Kernel.TransactionPool.Tests/AElf.Kernel.Transa66.67%2 out of 3 times
test/AElf.CrossChain.Tests/AElf.CrossChain.Tests.csproj66.67%2 out of 3 times
...test/AElf.Contracts.Genesis.Tests/AElf.Contracts.Genesis.66.67%2 out of 3 times
...test/AElf.Contracts.MultiToken.Tests/AElf.Contracts.Multi66.67%2 out of 3 times
test/AElf.Kernel.Core.Tests/AElf.Kernel.Core.Tests.csproj66.67%2 out of 3 times
...test/AElf.Runtime.CSharp.Tests/AElf.Runtime.CSharp.Tests.66.67%2 out of 3 times
...test/AElf.Contracts.CrossChain.Tests/AElf.Contracts.Cross66.67%2 out of 3 times
...test/AElf.Contracts.Election.Tests/AElf.Contracts.Electio66.67%2 out of 3 times

Committed file ranks

(click to expand)
  • 84.98%[...test/AElf.Sdk.CSharp.Tests/CSharpSmartContractContextTest]
  • 82.73%[src/AElf.Runtime.CSharp.Core/ContractCodeLoadContext.cs]
  • 0.00%[test/AElf.Sdk.CSharp.Tests/ed25519_testdata.json]
  • 99.29%[test/AElf.Sdk.CSharp.Tests/AElf.Sdk.CSharp.Tests.csproj]
  • 98.92%[src/AElf.Sdk.CSharp/CSharpSmartContractContext.cs]
  • 98.52%[AElf.All.sln]
  • 0.00%[src/AElf.Sdk.CSharp.Spec/IBuiltIns.cs]
  • 20.52%[src/AElf.Sdk.CSharp.Spec/AElf.Sdk.CSharp.Spec.csproj]
  • 0.00%[src/AElf.Sdk.CSharp.Internal/AssemblyInfo.cs]
  • 79.55%[src/AElf.Sdk.CSharp/CSharpSmartContractAbstract.cs]
  • Copy link

    codecov bot commented Sep 29, 2024

    Codecov Report

    Attention: Patch coverage is 91.37931% with 10 lines in your changes missing coverage. Please review.

    Project coverage is 73.49%. Comparing base (187d3ed) to head (187a4c5).

    Files with missing lines Patch % Lines
    src/AElf.Sdk.CSharp.Internal/InternalBuiltIns.cs 85.71% 5 Missing ⚠️
    ...Ops/Patchers/Module/CallAndBranchCounts/Patcher.cs 84.61% 2 Missing ⚠️
    ...ps/Validators/Module/ContractStructureValidator.cs 0.00% 2 Missing ⚠️
    src/AElf.Types/Types/BigIntValue.cs 97.05% 1 Missing ⚠️
    Additional details and impacted files

    Impacted file tree graph

    @@            Coverage Diff             @@
    ##              dev    #3614      +/-   ##
    ==========================================
    + Coverage   73.24%   73.49%   +0.25%     
    ==========================================
      Files         678      679       +1     
      Lines       26209    26316     +107     
      Branches     2364     2371       +7     
    ==========================================
    + Hits        19196    19342     +146     
    + Misses       6857     6818      -39     
      Partials      156      156              
    Files with missing lines Coverage Δ
    ...CSharp.CodeOps/Validators/Method/ArrayValidator.cs 95.17% <100.00%> (ø)
    ...CodeOps/Validators/Whitelist/IWhitelistProvider.cs 100.00% <100.00%> (ø)
    ...Application/IExecutionObserverThresholdProvider.cs 100.00% <100.00%> (ø)
    ...Elf.Runtime.CSharp.Core/ContractCodeLoadContext.cs 100.00% <100.00%> (ø)
    src/AElf.Sdk.CSharp/CSharpSmartContractAbstract.cs 100.00% <ø> (ø)
    src/AElf.Sdk.CSharp/CSharpSmartContractContext.cs 76.15% <100.00%> (+3.58%) ⬆️
    src/AElf.Types/Types/BigIntValue.cs 63.56% <97.05%> (+63.56%) ⬆️
    ...Ops/Patchers/Module/CallAndBranchCounts/Patcher.cs 96.72% <84.61%> (-3.28%) ⬇️
    ...ps/Validators/Module/ContractStructureValidator.cs 82.68% <0.00%> (-0.94%) ⬇️
    src/AElf.Sdk.CSharp.Internal/InternalBuiltIns.cs 85.71% <85.71%> (ø)

    @chopin-fan chopin-fan force-pushed the feature/whitelist-to-sdk branch from 47246dc to a57f39e Compare September 29, 2024 07:21
    @@ -5,9 +5,30 @@

    namespace AElf.Types
    {

    public partial class BigIntValue : IComparable, IComparable<BigIntValue>
    Copy link
    Contributor

    Choose a reason for hiding this comment

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

    Improved BigIntValue by the way, nice.

    Copy link
    Collaborator

    @David20240718 David20240718 left a comment

    Choose a reason for hiding this comment

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

    Everything checks out, approved.

    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    if this file hasn't anything actual code change, please maintain the old file

    @JimAelf JimAelf merged commit 71c5095 into dev Dec 14, 2024
    3 of 9 checks passed
    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.

    5 participants