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 Witness limits #1958

Merged
merged 7 commits into from
Oct 3, 2020
Merged

Fix Witness limits #1958

merged 7 commits into from
Oct 3, 2020

Conversation

shargon
Copy link
Member

@shargon shargon commented Sep 24, 2020

The committee signature (21/11) can't fit with the current limits.

@erikzhang
Copy link
Member

@neo-project/ngd-shanghai Test?

// Invocation = 11 * (64 + 2) = 726
InvocationScript = reader.ReadVarBytes(744);
// Verification = m + (PUSH_PubKey * 21) + length + null + syscall = 1 + ((2 + 33) * 21) + 2 + 1 + 5 = 744
VerificationScript = reader.ReadVarBytes(760);
Copy link
Contributor

Choose a reason for hiding this comment

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

These seem to be too perfectly calculated to me. I'd rather have some simpler values here like 2048 or 4096 so that we would have at least some reserve for the future.

Copy link
Member Author

Choose a reason for hiding this comment

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

1024 and 1024 ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't have any strong opinion here. 2048 seems to be a bit more future-proof to me, but 1024 is already better than 744/760.

@shargon
Copy link
Member Author

shargon commented Sep 30, 2020

@neo-project/ngd-shanghai any update?

@shargon shargon merged commit f37638b into neo-project:master Oct 3, 2020
@shargon shargon deleted the fix-witness branch October 3, 2020 14:08
roman-khimov added a commit to nspcc-dev/neo-go that referenced this pull request Oct 7, 2020
ShawnYun pushed a commit to ShawnYun/neo that referenced this pull request Jan 8, 2021
* Fix Witness max size

* Fix comment

* Fix comment

* Change it to use constants

* Changed to 1024

* Fix UT
cloud8little pushed a commit to cloud8little/neo that referenced this pull request Jan 24, 2021
* Fix Witness max size

* Fix comment

* Fix comment

* Change it to use constants

* Changed to 1024

* Fix UT
ixje added a commit to CityOfZion/neo-mamba that referenced this pull request Feb 2, 2021
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.

3 participants