-
Notifications
You must be signed in to change notification settings - Fork 41
[6.0.0] Header.checkPow method #968
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
Conversation
|
JS test was failing due to #1023 , fixed now |
| case fixed: FixedCost => | ||
| if (method.sinceVersion > 0 && E.context.currentErgoTreeVersion < method.sinceVersion) { | ||
| syntax.error(s"Method ${method.name} is not supported in tree version ${E.context.currentErgoTreeVersion}") | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be the first code fragment versioned by tree version (rather than activatedVersion). Maybe use activatedVersion instead? dApps usually don't care about versions, and hence requiring a minimal tree version may require dApp upgrades.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible, however, there are some questions to resolve then :
- NewFeature implementation by you was expecting this:
override def isSupportedIn(vc: VersionContext): Boolean =
vc.activatedVersion >= sinceVersion && vc.ergoTreeVersion >= sinceVersion
why ?
- what does tree version mean at all ? How tree of version v+1 is different from tree version v?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rollback versioning by tree and changed NewFeature definition. The question about versioning semantics still remains.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This "vc.activatedVersion >= sinceVersion && vc.ergoTreeVersion >= sinceVersion" was an intermediate version, which was fixed in the in my original more recent PRs.
The tree version is more about bytecode format, see for example switch from v0, to v1, there size has become required. However, there is also a relation between tree version and block version, s.t. treeVersion <= activatedScriptVersion.
data/shared/src/main/scala/sigma/pow/Autolykos2PowValidation.scala
Outdated
Show resolved
Hide resolved
|
@aslesarenko comments addressed, please make another pass |
aslesarenko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, also see comment about tree version.
In this PR, a new method added to check Ergo header's proof-of-work