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

Rename get_hash_tree_root to get_deposit_root #1279

Closed
wants to merge 1 commit into from

Conversation

JustinDrake
Copy link
Contributor

Improve naming

@JustinDrake JustinDrake added the general:presentation Presentation (as opposed to content) label Jul 8, 2019
@djrtwo
Copy link
Contributor

djrtwo commented Jul 23, 2019

The deposit contract is already under bytecode formalization and I believe changing a name changes it's internal identified representation. Would rather just close this

@JustinDrake
Copy link
Contributor Author

I believe changing a name changes it's internal identified representation

Do you mean the bytecode changes?

@ralexstokes
Copy link
Member

the function selector bytes will change if the name changes -- function is identified by first four bytes of keccack(fn-sig) where the fn-sig is the function-name(function-args*)... vyper inherited this dispatch machinery from solidity. it shouldn't affect the semantics of the bytecode but does constitute a bytecode change...

@JustinDrake
Copy link
Contributor Author

I guess we can put in this cleanup if we do end up changing the bytecode for whatever reason.

@JustinDrake
Copy link
Contributor Author

Reopening to bundle with #1341 😂

@JustinDrake JustinDrake reopened this Aug 7, 2019
@JustinDrake JustinDrake added post-freeze (substantive) Substantive consensus change non-critical for long-lived cross-client testnets and removed general:presentation Presentation (as opposed to content) labels Aug 7, 2019
@daejunpark
Copy link
Contributor

In terms of the bytecode formal verification we are currently working on, the function name change wouldn't be a big problem, and I think we can manage to adjust our work to such a simple change.

But this change will result in having two functions with similar names and interfaces: get_deposit_count and get_deposit_root, which may lead to cases where clients make mistakes confusing their name.

@JustinDrake
Copy link
Contributor Author

the function name change wouldn't be a big problem, and I think we can manage to adjust our work to such a simple change

❤️

this change will result in having two functions with similar names and interfaces: get_deposit_count and get_deposit_root

The Eth1Data object also has two corresponding properties with the same deposit_ prefix:

class Eth1Data(Container):
    deposit_root: Hash  # Populated with `get_deposit_root` from the deposit contract
    deposit_count: uint64  # Populated with `get_deposit_count` from the deposit contract
    block_hash: Hash

@JustinDrake
Copy link
Contributor Author

Closing in favour of #1362

@djrtwo djrtwo deleted the JustinDrake-patch-22 branch August 19, 2019 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
post-freeze (substantive) Substantive consensus change non-critical for long-lived cross-client testnets scope:deposit contract
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants