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 hardfork HF_Echidna #3454

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open

Add hardfork HF_Echidna #3454

wants to merge 43 commits into from

Conversation

@Jim8y Jim8y added the Blocked This issue can't be worked at the moment label Aug 7, 2024
@Jim8y Jim8y marked this pull request as draft August 7, 2024 16:44
@@ -40,7 +40,8 @@
"HF_Aspidochelone": 3000000,
"HF_Basilisk": 4500000,
"HF_Cockatrice": 5800000,
"HF_Domovoi": 5800000
"HF_Domovoi": 5800000,
"HF_Echidna": 0
Copy link
Member

Choose a reason for hiding this comment

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

It's hard to plan when we're going to have the next release. May be we can postpone configuration changes until some real proximity to the release and in this PR add only HF_Echidna enum?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's hard to plan when we're going to have the next release. May be we can postpone configuration changes until some real proximity to the release and in this PR add only HF_Echidna enum?

Its placeholder, can be updated before merge to the master.

Copy link
Contributor

Choose a reason for hiding this comment

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

This will make configs stored in the master branch unusable for real synchronization for some time, nothing good about that. Better omit it, declare HF_Echidna (we need it and will use it), but update configs later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will make configs stored in the master branch unusable for real synchronization for some time, nothing good about that. Better omit it, declare HF_Echidna (we need it and will use it), but update configs later.

this will not be merged to the master branch until we decides to release new version.

* Add entries to Designation event

* Change to HF_Echidna

* Add UT

* Add count
@Jim8y Jim8y added this to the v3.8.0 milestone Aug 8, 2024
* add base64url

* active in

* update placehold hf height

* fix hf issue and move methods to proper place.

* fix test

* use identifymodel instead.
Jim8y and others added 9 commits October 2, 2024 20:55
* Add entries to Designation event

* Change to HF_Echidna

* Add UT

* Add count
* add base64url

* active in

* update placehold hf height

* fix hf issue and move methods to proper place.

* fix test

* use identifymodel instead.
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
* Add entries to Designation event

* Change to HF_Echidna

* Add UT

* Add count
* add base64url

* active in

* update placehold hf height

* fix hf issue and move methods to proper place.

* fix test

* use identifymodel instead.
# Conflicts:
#	src/Neo/Neo.csproj
#	src/Neo/SmartContract/Native/RoleManagement.cs
@Jim8y Jim8y changed the title Add hardofork HF_Echidna Add hardfork HF_Echidna Nov 20, 2024
shargon and others added 11 commits December 19, 2024 15:37
* 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>
* fux build error

* Update src/Neo/SmartContract/ApplicationEngine.cs

---------

Co-authored-by: Shargon <shargon@gmail.com>
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>
#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>
* 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>
* fix unnecessary change

* Clean using

---------

Co-authored-by: Fernando Diaz Toledano <shargon@gmail.com>
@Jim8y Jim8y added Waiting for Review and removed Blocked This issue can't be worked at the moment labels Jan 11, 2025
@Jim8y
Copy link
Contributor Author

Jim8y commented Jan 11, 2025

as discussed in the meeting, please review this pr and merge into master branch.

All changes in this pr are actually reviewed previously, just make sure.

if (!Path.IsPathRooted(path))
{
// Combine with the executable directory if relative
var executablePath = AppDomain.CurrentDomain.BaseDirectory;
Copy link
Member

@cschuchardt88 cschuchardt88 Jan 11, 2025

Choose a reason for hiding this comment

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

This can be set to whatever. Better to use AppContext.BaseDirectory

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a collection branch, no direct change should be made here, please update in a pr.

@Jim8y Jim8y marked this pull request as ready for review January 14, 2025 06:21
@@ -51,6 +60,7 @@ public ECPoint[] GetDesignatedByRole(DataCache snapshot, Role role, uint index)
}

[ContractMethod(CpuFee = 1 << 15, RequiredCallFlags = CallFlags.States | CallFlags.AllowNotify)]
[Obsolete]
Copy link
Contributor

@nan01ab nan01ab Jan 14, 2025

Choose a reason for hiding this comment

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

Add some additional information about Obsolete?

Copy link
Member

Choose a reason for hiding this comment

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

BTW, this method is not obsolete and shouldn't be marked as obsolete. I'd say we need to revert this change.

@@ -38,7 +38,8 @@
"HF_Aspidochelone": 1730000,
"HF_Basilisk": 4120000,
"HF_Cockatrice": 5450000,
"HF_Domovoi": 5570000
"HF_Domovoi": 5570000,
"HF_Echidna": 5570001
Copy link
Member

@AnnaShaleva AnnaShaleva Jan 16, 2025

Choose a reason for hiding this comment

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

We shouldn't enable it in this PR. Remove these values; we'll set the proper ones in a separate PR before the release.

Comment on lines -313 to 314
[ContractMethod(CpuFee = 1 << 15, RequiredCallFlags = CallFlags.ReadStates, Name = "getTransaction")]
[ContractMethod(CpuFee = 1 << 15, RequiredCallFlags = CallFlags.ReadStates, Name = nameof(GetTransaction))]
private Transaction GetTransactionForContract(ApplicationEngine engine, UInt256 hash)
Copy link
Member

Choose a reason for hiding this comment

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

I won't do this. GetTransaction is a separate Ledger method that is not related to GetTransactionForContract; it's just about the fact that these methods have the same name.

Copy link
Member

Choose a reason for hiding this comment

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

Nothing changed here, the first letter is lowecase during abi construction

@@ -51,6 +60,7 @@ public ECPoint[] GetDesignatedByRole(DataCache snapshot, Role role, uint index)
}

[ContractMethod(CpuFee = 1 << 15, RequiredCallFlags = CallFlags.States | CallFlags.AllowNotify)]
[Obsolete]
Copy link
Member

Choose a reason for hiding this comment

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

BTW, this method is not obsolete and shouldn't be marked as obsolete. I'd say we need to revert this change.

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.

7 participants