[Neo Core StdLib] Add Base64url#3453
Merged
shargon merged 8 commits intoneo-project:HF_Echidnafrom Aug 8, 2024
Merged
Conversation
AnnaShaleva
reviewed
Aug 7, 2024
cschuchardt88
suggested changes
Aug 8, 2024
cschuchardt88
approved these changes
Aug 8, 2024
shargon
approved these changes
Aug 8, 2024
Jim8y
pushed a commit
that referenced
this pull request
Oct 2, 2024
* add base64url * active in * update placehold hf height * fix hf issue and move methods to proper place. * fix test * use identifymodel instead.
Jim8y
pushed a commit
that referenced
this pull request
Nov 6, 2024
* add base64url * active in * update placehold hf height * fix hf issue and move methods to proper place. * fix test * use identifymodel instead.
Jim8y
pushed a commit
that referenced
this pull request
Nov 17, 2024
* add base64url * active in * update placehold hf height * fix hf issue and move methods to proper place. * fix test * use identifymodel instead.
NGDAdmin
pushed a commit
that referenced
this pull request
Jan 23, 2025
* add hardofork HF_Echidna * Add entries to `Designation` event (#3397) * Add entries to Designation event * Change to HF_Echidna * Add UT * Add count * [Neo Core StdLib] Add Base64url (#3453) * add base64url * active in * update placehold hf height * fix hf issue and move methods to proper place. * fix test * use identifymodel instead. * add hardofork HF_Echidna * Add entries to `Designation` event (#3397) * Add entries to Designation event * Change to HF_Echidna * Add UT * Add count * [Neo Core StdLib] Add Base64url (#3453) * add base64url * active in * update placehold hf height * fix hf issue and move methods to proper place. * fix test * use identifymodel instead. * add hardofork HF_Echidna * Add entries to `Designation` event (#3397) * Add entries to Designation event * Change to HF_Echidna * Add UT * Add count * [Neo Core StdLib] Add Base64url (#3453) * add base64url * active in * update placehold hf height * fix hf issue and move methods to proper place. * fix test * use identifymodel instead. * format * Fixed typo * Added back #3397 * Fixed tests * fixed global.json * Update src/Neo/Neo.csproj * Update src/Neo/Neo.csproj * [`Fix`]: integer overflow in `JumpTable.SubStr ` (#3496) * fix: int overflow in SubStr * fix: int overflow in SubStr * format * Versioning change * Clean * Rename * Show change * Space * remove duplicated lines in gitignroe --------- Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: Shargon <shargon@gmail.com> * Fix NEO callstates (#3599) * Allow callstates to use HF * Rename to method * Other rename * Change the way * Reduce changes * Reduce changes * Adapt name always * Avoid string when only is lower the first char * UT * Test all * Update src/Neo/ProtocolSettings.cs Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> * Update src/Neo/ProtocolSettings.cs Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> * Reuse Load from stream * Unify * Fix default logic * Change ContractMethod to allowMultiple * Use LowerInvariant * Move CheckingHardfork * Remove optional arg * Fix build * Avoid file not found error --------- Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> * fix tests error (#3636) * fux build error * Update src/Neo/SmartContract/ApplicationEngine.cs --------- Co-authored-by: Shargon <shargon@gmail.com> * NeoToken: accept candidate registration via onNEP17Payment (#3597) Solves two problems: * inability to estimate GAS needed for registerCandidate in a regular way because of its very high fee (more than what normal RPC servers allow) * inability to have MaxBlockSystemFee lower than the registration price which is very high on its own (more than practically possible to execute) Fixes #3552. Signed-off-by: Roman Khimov <roman@nspcc.ru> * specify the argument exception information. * Fix Ut (#3635) * NeoToken: add NEP-27 to supported standards list starting from Echidna (#3643) #3597 introduces `onNEP17Payment` handler to native NeoToke contract starting from Echidna hardfork. We need to update the list of supported standards respectively. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> * ut: fix HF_Echidna unit tests (#3646) * Fix UT * Update src/Neo/ProtocolSettings.cs Co-authored-by: nan01ab <yjcc201374@outlook.com> * Update src/Neo/ProtocolSettings.cs Co-authored-by: nan01ab <yjcc201374@outlook.com> * Update src/Neo/ProtocolSettings.cs Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> --------- Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: nan01ab <yjcc201374@outlook.com> Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> * [Core Add] Add support to Ed25519 (#3507) * fix unnecessary change * Clean using --------- Co-authored-by: Fernando Diaz Toledano <shargon@gmail.com> * Fix `HF_Echidna` comments (#3679) * Fix obsolete * Fix https://github.com/neo-project/neo/pull/3454/files#r1912152270 * Fix comment * Update RoleManagement.cs * Unset HF_Echidna * Revert getTransaction * Revert verifyWithECDsa * format --------- Signed-off-by: Roman Khimov <roman@nspcc.ru> Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> Co-authored-by: nan01ab <yjcc201374@outlook.com> Co-authored-by: Roman Khimov <roman@nspcc.ru> Co-authored-by: Anna Shaleva <shaleva.ann@nspcc.ru> Co-authored-by: Vitor Nazário Coelho <vncoelho@gmail.com>
NGDAdmin
added a commit
that referenced
this pull request
Mar 5, 2025
* add hardofork HF_Echidna * Add entries to `Designation` event (#3397) * Add entries to Designation event * Change to HF_Echidna * Add UT * Add count * [Neo Core StdLib] Add Base64url (#3453) * add base64url * active in * update placehold hf height * fix hf issue and move methods to proper place. * fix test * use identifymodel instead. * add hardofork HF_Echidna * Add entries to `Designation` event (#3397) * Add entries to Designation event * Change to HF_Echidna * Add UT * Add count * [Neo Core StdLib] Add Base64url (#3453) * add base64url * active in * update placehold hf height * fix hf issue and move methods to proper place. * fix test * use identifymodel instead. * SmartContract: restrict the number of allowed notifications Fix the problem described in nspcc-dev/neo-go#3490. Port the solution from nspcc-dev/neo-go#3640. MaxNotificationsCount constraint is chosen based on the Mainnet statistics of the number of notifications per every transaction, ref. nspcc-dev/neo-go#3490 (comment). Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> * SmartContract: fix format Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> * Update src/Neo/SmartContract/ApplicationEngine.Runtime.cs * Avoid notification creation * add hardofork HF_Echidna * Add entries to `Designation` event (#3397) * Add entries to Designation event * Change to HF_Echidna * Add UT * Add count * [Neo Core StdLib] Add Base64url (#3453) * add base64url * active in * update placehold hf height * fix hf issue and move methods to proper place. * fix test * use identifymodel instead. * format * Fixed typo * Added back #3397 * fix format * Update src/Neo/SmartContract/Native/RoleManagement.cs * Neo.CLI: revert configuration changes Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> --------- Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com>
AnnaShaleva
added a commit
to nspcc-dev/neo-go
that referenced
this pull request
Apr 8, 2025
Parameter and return value have invalid type starting from b096e68. This commit fixes genesis state difference between C#/Go nodes, ref. neo-project/neo#3453. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
AnnaShaleva
added a commit
to nspcc-dev/neo-go
that referenced
this pull request
Apr 8, 2025
Parameter and return value have invalid type starting from b096e68. This commit fixes genesis state difference between C#/Go nodes, ref. neo-project/neo#3453. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
cschuchardt88
added a commit
to cschuchardt88/neo
that referenced
this pull request
Jun 8, 2025
…ect#3548) * add hardofork HF_Echidna * Add entries to `Designation` event (neo-project#3397) * Add entries to Designation event * Change to HF_Echidna * Add UT * Add count * [Neo Core StdLib] Add Base64url (neo-project#3453) * add base64url * active in * update placehold hf height * fix hf issue and move methods to proper place. * fix test * use identifymodel instead. * add hardofork HF_Echidna * Add entries to `Designation` event (neo-project#3397) * Add entries to Designation event * Change to HF_Echidna * Add UT * Add count * [Neo Core StdLib] Add Base64url (neo-project#3453) * add base64url * active in * update placehold hf height * fix hf issue and move methods to proper place. * fix test * use identifymodel instead. * SmartContract: restrict the number of allowed notifications Fix the problem described in nspcc-dev/neo-go#3490. Port the solution from nspcc-dev/neo-go#3640. MaxNotificationsCount constraint is chosen based on the Mainnet statistics of the number of notifications per every transaction, ref. nspcc-dev/neo-go#3490 (comment). Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> * SmartContract: fix format Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> * Update src/Neo/SmartContract/ApplicationEngine.Runtime.cs * Avoid notification creation * add hardofork HF_Echidna * Add entries to `Designation` event (neo-project#3397) * Add entries to Designation event * Change to HF_Echidna * Add UT * Add count * [Neo Core StdLib] Add Base64url (neo-project#3453) * add base64url * active in * update placehold hf height * fix hf issue and move methods to proper place. * fix test * use identifymodel instead. * format * Fixed typo * Added back neo-project#3397 * fix format * Update src/Neo/SmartContract/Native/RoleManagement.cs * Neo.CLI: revert configuration changes Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> --------- Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> Co-authored-by: Jimmy <jinghui@wayne.edu> Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com> Co-authored-by: NGD Admin <154295625+NGDAdmin@users.noreply.github.com>
Wi1l-B0t
reviewed
Dec 31, 2025
| /// <param name="s">The base64Url string.</param> | ||
| /// <returns>The decoded base64Url string.</returns> | ||
| [ContractMethod(Hardfork.HF_Echidna, CpuFee = 1 << 5)] | ||
| public static string Base64UrlDecode([MaxLength(MaxInputLength)] string s) |
Contributor
There was a problem hiding this comment.
Why the return type of Base64UrlDecode is string, but Base64Decode returns byte[]?
Wi1l-B0t
reviewed
Dec 31, 2025
| /// <param name="data">The base64Url to be encoded.</param> | ||
| /// <returns>The encoded base64Url string.</returns> | ||
| [ContractMethod(Hardfork.HF_Echidna, CpuFee = 1 << 5)] | ||
| public static string Base64UrlEncode([MaxLength(MaxInputLength)] string data) |
Contributor
There was a problem hiding this comment.
Why the input type of Base64UrlEncode is string, but the input type of Base64UrlEncode is byte[]?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pr answers #3451 and adds base64url support.
Fixes # #3451
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: