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

Implement difficulty calculation for homestead #35

Merged
merged 1 commit into from
Jul 25, 2017

Conversation

gsalgado
Copy link
Contributor

No description provided.

@gsalgado gsalgado force-pushed the homestead-difficulty branch from 345aa91 to d750c6e Compare July 24, 2017 14:40
('header', BlockHeader),
('transactions', CountableList(HomesteadTransaction)),
('uncles', CountableList(BlockHeader))
]
Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Member

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)])
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

@pipermerriam
Copy link
Member

Just looked over this. Looks good. Lemme know what the status is and whether you're ready for final review/merge.

@gsalgado gsalgado force-pushed the homestead-difficulty branch from d750c6e to d95ba73 Compare July 24, 2017 17:43
@gsalgado
Copy link
Contributor Author

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

@pipermerriam
Copy link
Member

will merge when it is green. Thanks

@pipermerriam pipermerriam merged commit b19c50b into ethereum:master Jul 25, 2017
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.

2 participants