-
Notifications
You must be signed in to change notification settings - Fork 662
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
Implement difficulty calculation for homestead #35
Conversation
345aa91
to
d750c6e
Compare
('header', BlockHeader), | ||
('transactions', CountableList(HomesteadTransaction)), | ||
('uncles', CountableList(BlockHeader)) | ||
] |
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.
Side note:
It would be nice if rlp objects supported proper inheritance in much the same way as django models work. We'd need a metaclass to inherit from and a Field
class of some sort for each field. Would be a better/nicer interface and would allow more fine-grained subclassing
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.
Indeed, that'd be nice
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.
I'm gonna open an issue over there.
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.
in case anyone cares ethereum/pyrlp#44
if fixture_name.startswith('Homestead'): | ||
evm = EVM.configure( | ||
'HomesteadEVM', | ||
vm_configuration=[(0, HomesteadVM)]) |
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.
note
It would be great if we can figure out an API for re-configuring start block numbers that was more elegant. Fully re-specifying the vm_configuration
is not elegant. It isn't clear what this looks like but seemed worth surfacing to get more people thinking about it.
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.
Yeah, I agree the current approach is not the most elegant, but if this turns out to be the only place where we'd use it, it may not be worth the effort. I'll add a TODO to make sure we re-evaluate the possibility of doing what you suggest later, if that's ok with you.
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.
Sounds great. Just leaving these things as I see them to try and keep both a record and a personal understanding of where some of the "bodies are buried". Not even sure it's worth the TODO.
Just looked over this. Looks good. Lemme know what the status is and whether you're ready for final review/merge. |
d750c6e
to
d95ba73
Compare
I've added a TODO for the API to reconfigure start blocks; if you're ok with that I think this is ready for final review/merge |
will merge when it is green. Thanks |
No description provided.