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

Fix fee of CreateMultisigAccount #2712

Merged
merged 7 commits into from
May 5, 2022
Merged

Fix fee of CreateMultisigAccount #2712

merged 7 commits into from
May 5, 2022

Conversation

erikzhang
Copy link
Member

Fix #2710

Copy link
Contributor

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

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

Anyone tested it already wrt mainnet compatibility?

@@ -41,13 +41,13 @@ partial class ApplicationEngine
/// The <see cref="InteropDescriptor"/> of System.Contract.CreateStandardAccount.
/// Calculates corresponding account scripthash for the given public key.
/// </summary>
public static readonly InteropDescriptor System_Contract_CreateStandardAccount = Register("System.Contract.CreateStandardAccount", nameof(CreateStandardAccount), 1 << 8, CallFlags.None);
public static readonly InteropDescriptor System_Contract_CreateStandardAccount = Register("System.Contract.CreateStandardAccount", nameof(CreateStandardAccount), CheckSigPrice, CallFlags.None);
Copy link
Contributor

Choose a reason for hiding this comment

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

My gut feeling is that computationally it's more like CheckSigPrice/2, but that needs to be measured of course.

src/neo/SmartContract/ApplicationEngine.Contract.cs Outdated Show resolved Hide resolved
Copy link
Member

@shargon shargon left a comment

Choose a reason for hiding this comment

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

Need to be checked if it was used in mainnet. But code looks good

@Jim8y
Copy link
Contributor

Jim8y commented Apr 28, 2022

I agree with @shargon, changes like this have to be cautious cause it might cause new node fail to synchronize.

@superboyiii

This comment was marked as resolved.

@Jim8y
Copy link
Contributor

Jim8y commented May 1, 2022

We should name every hard fork, to make it more clear which fork we are working on.

Not much change to make based on this pr, just add an enum with a list of hardfork names (including names of future harforks) then match them with the hardfork versions would work.

@superboyiii superboyiii mentioned this pull request May 1, 2022
19 tasks
@superboyiii
Copy link
Member

We should name every hard fork, to make it more clear which fork we are working on.

Not much change to make based on this pr, just add an enum with a list of hardfork names (including names of future harforks) then match them with the hardfork versions would work.

Good idea.

@roman-khimov
Copy link
Contributor

We should name every hard fork, to make it more clear which fork we are working on.

There is also a use case for private networks with "whatever is the latest" hard fork enabled, it should be easy to configure that too.

@erikzhang
Copy link
Member Author

We should name every hard fork, to make it more clear which fork we are working on.

Done.

There is also a use case for private networks with "whatever is the latest" hard fork enabled, it should be easy to configure that too.

Agree. Now you can just delete Hardfork section or leave its contents empty to configure a "whatever is the latest" private network.

@roman-khimov
Copy link
Contributor

BTW, if we're doing this then maybe we can make T4 testnet compatible with 3.2.2? It only requires making #2653 change fork-dependent (see #2673).

Copy link
Member

@shargon shargon left a comment

Choose a reason for hiding this comment

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

Code looks good to me, good change!

@erikzhang
Copy link
Member Author

@shargon Can you revert the commit "T4 testnet compatible with 3.2.2"? We can discuss it in a new issue or pr.

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