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

spec updates #20

Merged
merged 4 commits into from
Nov 26, 2018
Merged

spec updates #20

merged 4 commits into from
Nov 26, 2018

Conversation

arnetheduck
Copy link
Member

random stuff encountered while reading spec

* move consts to top
* move some functions to validator.nim
* add some validator functoin smoke tests
@mratsim mratsim mentioned this pull request Nov 26, 2018
Copy link
Contributor

@mratsim mratsim left a comment

Choose a reason for hiding this comment

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

LGTM, pending our type janitor @tersec.

Regarding attempting to call undeclared routine init, this comes nimcrypto when Nim tries to resolve the symbol in digest too early. The rootcause is that the proc is a generic proc and symbol resolution is too early in generics. See also the meta Nim issue: nim-lang/Nim#8677.

Regarding odd shuffling, tracked in #1

# Re-hash the `source` to obtain a new pattern of bytes
source = blake2_256.digest source.data
# Iterate through the `source` bytes in 3-byte chunks
# XXX "attempting to call undeclared routine init"
Copy link
Contributor

Choose a reason for hiding this comment

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

You probably need a mixin init

Copy link
Contributor

@mratsim mratsim Nov 26, 2018

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

mixin init here doesn't seem to help - added a comment for now, will dig into it later

beacon_chain/private/helpers.nim Outdated Show resolved Hide resolved
beacon_chain/private/helpers.nim Outdated Show resolved Hide resolved
beacon_chain/private/helpers.nim Show resolved Hide resolved
status: ACTIVE
), 1024)

# XXX the shuffling looks really odd, probably buggy
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks! added links to code, to keep track

arnetheduck and others added 2 commits November 26, 2018 09:44
* link to resources for shuffling
* describe get_beacon_proposer
* hints for solving init issue
@tersec tersec merged commit 41d45d4 into master Nov 26, 2018
@arnetheduck arnetheduck deleted the random-spec-updates branch November 26, 2018 19:01
etan-status pushed a commit that referenced this pull request May 12, 2022
* Update file headers, copyright date

* Rename files and hopefully fix nimble

* Forgot to change path in tests

* Update readme
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.

4 participants