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 P2PNotary node role for native RoleManagement contract #978

Merged
merged 4 commits into from
Mar 3, 2024

Conversation

AnnaShaleva
Copy link
Member

Port neo-project/neo#3172. Depends on #977 and thus, waiting for it to be merged.

Add missing NeoFSAlphabetNode role. We should keep this list in sync
with Core so that users are able to use these roles.

Signed-off-by: Anna Shaleva <[email protected]>
It's nice when user-facing things are well-documented.

Signed-off-by: Anna Shaleva <[email protected]>
shargon
shargon previously approved these changes Mar 3, 2024
roman-khimov
roman-khimov previously approved these changes Mar 3, 2024
@roman-khimov
Copy link

Rebase, pls. Then it will depend on neo-project/neo#3172.

@shargon shargon dismissed stale reviews from roman-khimov and themself March 3, 2024 10:49

The merge-base changed after approval.

@shargon shargon merged commit f0f797c into neo-project:master Mar 3, 2024
4 checks passed
cschuchardt88 pushed a commit to cschuchardt88/neo-devpack-dotnet that referenced this pull request Mar 21, 2024
…ct#978)

* Keep native RoleManagement roles in sync with Neo core

Add missing NeoFSAlphabetNode role. We should keep this list in sync
with Core so that users are able to use these roles.

Signed-off-by: Anna Shaleva <[email protected]>

* Add documentation to native RoleManagement roles

It's nice when user-facing things are well-documented.

Signed-off-by: Anna Shaleva <[email protected]>

* Add P2PNotary node role for native RoleManagement contract

Port neo-project/neo#3172.

Signed-off-by: Anna Shaleva <[email protected]>

---------

Signed-off-by: Anna Shaleva <[email protected]>
Co-authored-by: Shargon <[email protected]>
cschuchardt88 added a commit to cschuchardt88/neo-devpack-dotnet that referenced this pull request Mar 21, 2024
* Added standalone workflow

* Update description for inputs
Step name change

* step command fix

* Change dotnet command

* Fix dotnet command again

* Add file icon for nccs

* Added cleanup to workflow

* Fixed names

* submodules

* fix catch

* cancel optimization on exception

* Fixed `PackageReference` for `neo` (neo-project#897)

* Modify changelog during release (neo-project#900)

Reference: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes

* bug: Fix default value when Stored (neo-project#895)

* Fix default value when Stored

* Fix Default value

* Fix

* add Int16

* Fix ut

* Improve reading

* Apply suggestions from code review

* added types

* Breaking changes reporting during releases

* Delete .github/workflows/release.yml

---------

Co-authored-by: Jimmy <[email protected]>

* Added `publish` to `github packages` and fix submodules (neo-project#899)

* Copy of neo-project/neo#3072

* fix delete

* reduce changes

* fix empty line

* Reduce changes

* Remove comment

* Add recursive

* remove disable PublishToGithub (neo-project#901)

* TestEngine: Get instruction coverage and move to net standard (neo-project#898)

* Get execution coverage

* Improve coverage comments

* Get coverage

* GetCoverage extension

* format

* Net standard and CoveredPercentage

* AbiMethod

* clean

* Allow coverage on Read&Write properties

* format

* Update README.md

* Allow to sum coverages

* clean

* Allow to sum coverage contracts

* Allow to join coverage from multiple sources

* change to public and ready to review

* Format and load methods in contract

* LF

* Rename to CoverageHit

* Enable or disable recover coverage

* Fix hit

* [Framework Add] predefine manifest (neo-project#903)

* predefine manifest

* one attribute per file

* remove empty line

* Update tests/Neo.SmartContract.Framework.UnitTests/ManifestAttributeTest.cs

* Update src/Neo.SmartContract.Framework/Attributes/ManifestExtraAttribute.cs

* Update src/Neo.SmartContract.Framework/Attributes/ManifestExtraAttribute.cs

* Update src/Neo.Compiler.CSharp/CompilationContext.cs

---------

Co-authored-by: Shargon <[email protected]>

* [Compiler]  Further Split long expression files (neo-project#884)

* add comments to expression

* change namespace style

* remove

* update neo to latest

* adapt to latest neo version

* dotnet format

* Apply suggestions from code review

Clean empty lines

* remove comments

* update neo

* Update BinaryExpression.cs

* Update src/Neo.Compiler.CSharp/MethodConvert/Expression/CastExpression.cs

* Update src/Neo.Compiler.CSharp/MethodConvert/Expression/CastExpression.cs

* merge master

---------

Co-authored-by: Shargon <[email protected]>

* update neo (neo-project#906)

* update neo

* Remove init, and compile, now allow to change storage during executions

---------

Co-authored-by: Fernando Diaz Toledano <[email protected]>

* Basic devcontainer (neo-project#907)

* Basic devcontainer

* Update devcontainer.json

* Nep17 UnitTests (neo-project#893)

* Draft Nep17 UT

* LF

* Fix TotalSupply

* Some UT still failing, checking bugs

* Ensure OnSetOwner is raised during deploy

* Fix string

* Fix mint test

* Test burn

* check burn

* Test transfer

* Remove token reception in Nep17, not required for a template

* Fix csproj

* Try to execute template compilation

* Update src/Neo.SmartContract.Template/templates/neocontractnep17/ProjectName.csproj

* Rename project

* Use same path as tested project

* Fix ut contract=filename

* fix comment

* Update src/Neo.SmartContract.Template/templates/neocontractnep17/Nep17Contract.cs

* Need help

* Create project with template, and compile, new errors

* Generate nef and manifest before compile

* Compile works

* Only left neo-project#895

* forgot files

* LF and remove artifact library

* format

* Update tests/Neo.SmartContract.Template.UnitTests/templates/neocontractnep17/Nep17ContractTests.cs

* Remove artifacts

* Remove artifacts compilation

* Revert "Remove artifacts compilation"

This reverts commit 62466f1.

* Remove artifacts and use the compiled library

* Remove duplicate neo reference in Compiler

* Update Neo.Compiler.CSharp.csproj

* With source works fine

* Reduce changes

* Ut pass in local

* dotnet format

* Prepare for coverage check

* Update test with coverage

* Fix git notifications

* sort coverage dump

* remove using

* fix bug

* Increase transfer coverage using invalid types

* Add to workflow

* Fix test order

* Remove some artifacts

* fix comment

* ir require artifacts

* Remove artifacts and generate them by workflow

* Split build

* fix path

* fix path

* fix nccs dll

* fix relative

* Fix artifacts path

* clean project

* Update README.md

* Sandobx UT

* Clean

* remove nullable

* cleaner

* Update console log

* Clean table

* Update tests/Neo.SmartContract.Template.UnitTests/templates/neocontractnep17/Nep17ContractTests.cs

Co-authored-by: Jimmy <[email protected]>

* Update src/Neo.SmartContract.Testing/Coverage/CoveredContract.cs

Co-authored-by: Christopher Schuchardt <[email protected]>

* cschuchardt88's and Jimmy's feedback & Ownable & Nep17UT

* some fixes

* Rename test

* TestBase

* Add Assert

* Use same format for auth check

* Fix typo

* Update src/Neo.SmartContract.Testing/Coverage/CoveredContract.cs

Co-authored-by: Christopher Schuchardt <[email protected]>

* cschuchardt88's feedback

* Wait for neo-project/neo#3143

---------

Co-authored-by: Jimmy <[email protected]>
Co-authored-by: Christopher Schuchardt <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>

* Update README.md (neo-project#909)

* Fix workflow issues (neo-project#910)

* Update pkgs-delete.yml

* Move release

* Fix Neo.SmartContract.Testing package (neo-project#913)

* Fix publish netstandard in Testing package (neo-project#914)

* TestEngine: add Checkpoints, RpcStorage and Dump to html (neo-project#904)

* Draft Checkpoint

* fix namespaces

* Add ut

* Update src/Neo.SmartContract.Testing/Storage/EngineStorage.cs

Co-authored-by: Jimmy <[email protected]>

* Rpc Storage

* Seek

* clean

* By pass RPC Backward

* Change to testnet

* Fix bug

* clean using

* Conflicts

* Dump to html

* Fix coverage during OnFault

* print string when possible

* Coverage 100%

* fix comment

* Update README

* Update src/Neo.SmartContract.Testing/TestingApplicationEngine.cs

* format

* Improve method name

* Refactor AbiMethod constructor

* Update tests/Neo.SmartContract.Template.UnitTests/templates/neocontractnep17/CoverageContractTests.cs

---------

Co-authored-by: Jimmy <[email protected]>

* Clean myget (neo-project#918)

* Clean myget

* Update pkgs-delete.yml

* Update pkgs-delete.yml

* Update pkgs-delete.yml

* Update main.yml

* Update pkgs-delete.yml (neo-project#919)

* Update pkgs-delete.yml

* Update pkgs-delete.yml

* Update pkgs-delete.yml (neo-project#920)

* Update pkgs-delete.yml

* Update .github/workflows/pkgs-delete.yml

* Update .github/workflows/pkgs-delete.yml

* Update pkgs-delete.yml (neo-project#922)

* Update pkgs-delete.yml

* Update pkgs-delete.yml

* Remove big nuget packages (neo-project#923)

* Remove big nuget packages

* Update pkgs-delete.yml

* Update .github/workflows/pkgs-delete.yml

* Update pkgs-delete.yml (neo-project#924)

Remove selective remove

* Fix: compilation and coverage issues (neo-project#921)

* Fix compiler length

* Fix method detection

* Fix ut transfer

* allow to check multiple

* Fix IList<object>

* Allow CALLT and different methods detection

* Clean code

* add comment

* clean

* Fix clean

* Allow to release the mock from engine

* Release mock

* Show error when access to storage without deploy

* remove 0x

* use params

* Dictionary

* Update NuGet.Config

* Update NuGet.Config

Co-authored-by: Jimmy <[email protected]>

* Update src/Neo.SmartContract.Testing/SmartContractStorage.cs

---------

Co-authored-by: Jimmy <[email protected]>

* Fix neo version with submodule (neo-project#925)

* Fix neo version with submodule

* Update submodule

* Update main.yml (neo-project#926)

* Update main.yml (neo-project#927)

* Update main.yml (neo-project#928)

* Update main.yml

* Update .github/workflows/main.yml

* Update .github/workflows/main.yml

* Update main.yml (neo-project#929)

* Update main.yml

* Update main.yml

* Update main.yml (neo-project#932)

* Fix clean framework package (neo-project#933)

* TestEngine: Some fixes in TestEngine (neo-project#934)

* Fix mock properties

* Simplify class conversion

* Add value types and fix namespace

* TestEngine: Compute coverage branches (neo-project#936)

* Compute coverage branches

* fix ut

* format

* Reduce changes

* TestEngine: Source code coverage (neo-project#937)

* Source code coverage

* Move update to directory build

* LF

* Rename

* Move class

* fix extension

* Split MethodConvert.cs file (neo-project#935)

* split file

* format

* Clean code

---------

Co-authored-by: Jimmy <[email protected]>
Co-authored-by: Shargon <[email protected]>

* Ensure correct execution of basic commands (neo-project#939)

This ensure that dev can run `dotnet build` or `dotnet test` without problems because, for some unknown reason, if you use these comands first without running `dotnet restore` it will generate errors that are just solved with `dotnet clean`

Co-authored-by: Shargon <[email protected]>

* Fix emitting hidden warnings (neo-project#940)

* Close neo-project#751

* Optimize Success

* TestEngine: Fix some snapshots problems (neo-project#941)

* Fix some snapshots problems

* Clean ut

* Update src/Neo.SmartContract.Testing/TestingApplicationEngine.cs

* clean method

* Update Readme

* Apply suggestions from code review

* Fix method name

* format

* replace interface

* Fix `if` statement sequence points and `SequencePointInserter` (neo-project#938)

* Fix SequencePointInserter

* reuse variable

* clean code

* Stop if was found

* Update src/Neo.Compiler.CSharp/SequencePointInserter.cs

* Update SequencePointInserter.cs

* Fix if branch

* clean else

* Remove breaks

* Clean ut

* Ensure all expressions are covered by sequence point

* Remove insertions for one `ConvertExpression`, it's done inside

* missmatch

* fix ut

* Fix branch if

* 100% branch coverage in template nep17

* fix

* Optimize GetBranchInstructions

* Allow to use license in reporting

---------

Co-authored-by: Vitor Nazário Coelho <[email protected]>

* Fix branch % (neo-project#942)

* Fix coverage (neo-project#943)

* Fix coverage

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Update main.yml

* Move check format first

---------

Co-authored-by: Jimmy <[email protected]>

* More fixes on optimizer (neo-project#911)

* fix try if

* safer dumpnef

* no ABORT in try with catch & catch with finally

* safer debuginfo changes; nef & manifest UNHANDLED

* format

* cover catch before any return of branch type

---------

Co-authored-by: Jimmy <[email protected]>
Co-authored-by: Shargon <[email protected]>

* TestEngine: Allow to change the caller (neo-project#944)

* Allow to change the caller

* Change comments

* Update README

* Update README.md

* Remove template (neo-project#947)

* [Dependency Update]this pr apply latest neo to devpack (neo-project#948)

* this pr apply latest neo to devpack

* Update tests/Neo.SmartContract.Testing.UnitTests/TestEngineTests.cs

* Update tests/Neo.SmartContract.Testing.UnitTests/TestEngineTests.cs

* Update tests/Neo.SmartContract.Testing.UnitTests/TestEngineTests.cs

---------

Co-authored-by: Shargon <[email protected]>

* TestEngine changes (neo-project#946)

* Update core

* fix issue

* Apply suggestions from code review

Co-authored-by: Jimmy <[email protected]>

* Add expected hash to OnXScriptHash

* Add storage methods

* clean change

* Update neo

---------

Co-authored-by: Jimmy <[email protected]>

* [Compiler Add] allow multiple smart contract exist in one project (neo-project#908)

* allow multiple smart contract exist in one project

* fix remaining issues

* update unit tests

* code optimization

* Update tests/Neo.SmartContract.TestEngine/TestEngine.cs

* Test it: Compile to artifacts

* clean changes

* fix complication issue

* multiple smart contract topology analysis. Making it easier to support cross contract call.

* Move artifact generation to the test project

* fix conflict

* update neo

* fix error

* this pr apply latest neo to devpack

* update signle contract check

* add comments

---------

Co-authored-by: Shargon <[email protected]>

* Fixes for compiling multi contracts in single csproj (neo-project#953)

* ensure finally executed on exceptions from catch (neo-project#954)

* TestEngine: added Ownable and Oracle templates uts & fixes (neo-project#950)

* Ownable unit tests

* Allow to export html and console joined coverage

* Fix preview lang

* fix html too

* update workflow to generate artifacts

* Clean format method selection

* Export nef and manifest as static

* Rename

* replace typeof

* clean csproj

* Fix moq with transfer

* Test oracle

---------

Co-authored-by: Jimmy <[email protected]>

* [Framework] add interfaces (neo-project#952)

* Regex: add couple of regex methods to  the devpack (neo-project#796)

* add couple of regex methods to  the devpack

* Rename methods

* Clean code

* update regex methods

* add comments

---------

Co-authored-by: Fernando Diaz Toledano <[email protected]>

* Allow to compile a cs files without a project (neo-project#958)

* start

* Try

* Fix

* [Compiler Fix] Fix exception name typo (neo-project#957)

* print compile exception

* print exception, but not stop complition

* revert exception print

* [Compiler Fix + Framework Add] add oracle interface and fix issue (neo-project#959)

* add oracle interface and fix issue

* Update OracleTest.cs

* Update src/Neo.Compiler.CSharp/CompilationEngine.cs

---------

Co-authored-by: Shargon <[email protected]>

* TestEngine: Template testing optimization (neo-project#956)

* Ensure compilation

* Update src/Neo.SmartContract.Testing/Coverage/Formats/ConsoleFormat.cs

* TODO

* Move namespace

* LF

* LF

* LF

* Fix remove

* indent comment

* Change artifact name

* Split options

* Fix Context result

* Clean debugInfo from artifacts

* Fix compilation

* Cleanup

* format

* remove artifacts

* fix nep17 template

* Fix type

* Rename artifacts

* some fixes

* Update .github/workflows/main.yml

* Clean

* Allow old code

* Fix old ECPoint

* Jimmy's feedback

* Fix

---------

Co-authored-by: Jimmy <[email protected]>

* Fix optimizations using `CompilationEngine` (neo-project#960)

* Full optimize

* clean using

* Allow to choose the kind of optimization (neo-project#964)

* Avoid NoX argument

* Fix

* Use all

* fix ut

* rename (neo-project#965)

Co-authored-by: Shargon <[email protected]>

* test assert & abort (neo-project#961)

* test assert & abort

* Update src/Neo.Compiler.CSharp/Optimizer/DumpNef.cs

---------

Co-authored-by: Shargon <[email protected]>

* use optimization in tests (neo-project#962)

* use optimization in tests

* fix type error te re-activate optimizer

* change nef and manifest at last for consistency

* use this.Nef.Script to run optimized script

* Fix ut

* Clean TestEngine

---------

Co-authored-by: Shargon <[email protected]>

* TestEngine: Merge smart contract coverage with coverlet (neo-project#963)

* Create coverlet json

* Fix lang preview

* Listen env var

* Expand variable

* Read test argument

* fix

* Fix init

* use env

* Expand env

* print

* Replace nuget compilation

* reduce changes

* fix

* Fix only source by exe

* Insert extern sequence points

* Check sequence point methods

* Check

* Clean

* Remove

* Remove !

* Remove double expand

* fixes on optimizer about CATCH, ENDFINALLY and PUSHA (neo-project#966)

* fixes on CATCH and ENDFINALLY

* fix methodEnd

* comments on Abort & Assert tests

* TryGetValue for performance

* set PUSHA target to itself

* correct branch return type

* correct branch return type

* Move basic optimizer

* clean changes

* Update tests/Neo.Compiler.CSharp.UnitTests/UnitTest_Abort.cs

* Change visibility

---------

Co-authored-by: Fernando Diaz Toledano <[email protected]>

* [Framwork Add]Add examples (neo-project#931)

* TestEngine: Some fixes (neo-project#969)

* Some fixes

* Update TestEngine.cs

* Update TestBase.cs

* Update TestEngine.cs

* Add id to SmartContract storage

* Update TestEngine.cs

* Update TestEngine.cs

* Allow to use pointers

* Update

* Testing Syscall

* Update src/Neo.SmartContract.Testing/TestEngine.cs

* Update native contracts (neo-project#967)

* Update native contracts

* clean using

* Add ut

* Split ut

* clean test

* test recursion (neo-project#970)

Co-authored-by: Shargon <[email protected]>

* Refator: Entry point analyser (neo-project#971)

* Add directory `Analysers`

* entry point analyser

---------

Co-authored-by: Shargon <[email protected]>

* TestEngine: Migrate current Framework's ut (neo-project#968)

* Migrate current ut's

* Restore tests not related to a contract

* revert namespace change

* All artifacts

* revert address

* Migrate some UT

* format

* Migrate 3 ut

* migrate 2 ut

* fix namespace

* Remove SyscallTest

* Migrate 2 ut more

* Helper ut

* Two uts more

* Workflow

* Two ut more

* Oracle

* clean

* Rename contract and StdLib

* Runtime

* One ut more

* Native ut

* UT fail, how to send an interopInterface? :S

* Ut pointers

* Fix ut

* Clean and extend

* Contract UT

* TODO BlockchainTest

* Update csproj

* Fix conflicts

* clean

* Start with blockchain its

* Revert using short

* TODO Crypto

* Blockchain UT

* secp256k1

* Increase coverage

* Fix merge

* fix using sort

* Add Uint coverage

* Fix CurrentBlock

* previous from storage

* Update src/Neo.SmartContract.Testing/Native/LedgerContract.cs

* Persisting block

* clean

* Clean

* Clean

* Add `getCommitteeAddress` (neo-project#973)

* Update natives

* Update submodule

* Update neo

* CommitteeAddress

* Update src/Neo.SmartContract.Testing/Native/OracleContract.cs

* Add in framework too

* Update src/Neo.SmartContract.Framework/Native/NEO.cs

* fix comment (neo-project#975)

* Sync native RoleManagement node roles with the Neo core (neo-project#977)

* Keep native RoleManagement roles in sync with Neo core
  Add missing NeoFSAlphabetNode role. We should keep this list in sync
  with Core so that users are able to use these roles.

* Add documentation to native RoleManagement roles
   It's nice when user-facing things are well-documented.

Signed-off-by: Anna Shaleva <[email protected]>

* Add P2PNotary node role for native RoleManagement contract (neo-project#978)

* Keep native RoleManagement roles in sync with Neo core

Add missing NeoFSAlphabetNode role. We should keep this list in sync
with Core so that users are able to use these roles.

Signed-off-by: Anna Shaleva <[email protected]>

* Add documentation to native RoleManagement roles

It's nice when user-facing things are well-documented.

Signed-off-by: Anna Shaleva <[email protected]>

* Add P2PNotary node role for native RoleManagement contract

Port neo-project/neo#3172.

Signed-off-by: Anna Shaleva <[email protected]>

---------

Signed-off-by: Anna Shaleva <[email protected]>
Co-authored-by: Shargon <[email protected]>

* TestingEngine: Native contracts manifest reuse (neo-project#976)

* [Compiler Add]allow direct assignment to UInt160, UInt256, and ECPoint. (neo-project#974)

* Basic block analyser (neo-project#981)

* Add directory `Analysers`

* entry point analyser

* basic block analyser (tested but unused)

* fix tests

* Apply suggestions from code review

* Update tests/Neo.Compiler.CSharp.UnitTests/UnitTest_Optimizer/UnitTest_BasicBlock.cs

* Update src/Neo.Compiler.CSharp/Optimizer/Analysers/InstructionCoverage.cs

* fix ut test

* Remove generatedRegex

* string.IsNullOrEmpty

---------

Co-authored-by: Shargon <[email protected]>
Co-authored-by: Jimmy <[email protected]>
Co-authored-by: Jim8y <[email protected]>

* [Compuler Bug] fix void bug (neo-project#986)

* add comments (neo-project#988)

* Fix is (pattern) (neo-project#987)

* init

* Clean empty lines

* Clean empty lines

---------

Co-authored-by: Shargon <[email protected]>

* comment for Expression (neo-project#980)

* comment for Pattern (neo-project#991)

* update

* update

* DeclarationPatternSyntax

* update

* Update Contract_Pattern.cs

* Apply suggestions from code review

---------

Co-authored-by: Shargon <[email protected]>

* [Compiler UT] Ut readonly property (neo-project#984)

* add property method test

* format

* Update tests/Neo.Compiler.CSharp.TestContracts/Contract_PropertyMethod.cs

* update UT

* fix readonly set

* update comments

* add document reference

* fix comments

* remvoe static set. Its not supported by C#

* format

* remove constructor check as syntax analyzer will handle it.

---------

Co-authored-by: Shargon <[email protected]>

* [Compiler Fix] neo-project#992 (neo-project#994)

* neo-project#992

* add UT

* remvoe extra using

* update UT as chenzhitong suggests

* revert UT change and add UT tests

* [Compiler Add ]Recursive pattern (neo-project#995)

* fix recursivepattern

* fix support

* remvoe extra using

* Apply suggestions from code review

---------

Co-authored-by: Shargon <[email protected]>

* [Framework and Examples] Update examples (neo-project#993)

* Updated `standalone.yml` workdlow

---------

Signed-off-by: Anna Shaleva <[email protected]>
Co-authored-by: Jimmy <[email protected]>
Co-authored-by: Shargon <[email protected]>
Co-authored-by: Hecate2 <[email protected]>
Co-authored-by: Vitor Nazário Coelho <[email protected]>
Co-authored-by: 陈志同 <[email protected]>
Co-authored-by: Anna Shaleva <[email protected]>
Co-authored-by: Jimmy <[email protected]>
Co-authored-by: Shine Li <[email protected]>
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.

4 participants