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

cmd,core,eth,params,tests: enable 2565 for yolov3 #22213

Merged
merged 4 commits into from
Jan 28, 2021

Conversation

s1na
Copy link
Contributor

@s1na s1na commented Jan 22, 2021

There were a few things that I think can only be done later, like setting bootnodes, genesis data, etc. In those cases I only renamed the variable but didn't touch the values.

Also the bls_fuzzer depended on those precompiles being exported so I created another set just for that.

I'm planning to tinker around with this a bit more make sure I haven't left anything out.

@holiman
Copy link
Contributor

holiman commented Jan 22, 2021

Haven't reviewed in-depth yet, but it looks more or less like what I had expected 👍

@s1na
Copy link
Contributor Author

s1na commented Jan 22, 2021

It seems like some blockchain and state tests are failing because the Berlin tests are not based on YoloV3. When I add the BLS precompiles and unset the modexp flag they pass.

@holiman
Copy link
Contributor

holiman commented Jan 25, 2021

It seems like some blockchain and state tests are failing because the Berlin tests are not based on YoloV3.

Yes, that makes sense. It's one reason why I tried to get everyone to implemenet YOLOv1, YOLOv2 etc, instead of aliasing it as Berlin, because we'd wind up in exactly this scenario where we have a mismatch of the definitions.

Rant aside, we'll just have to skip these tests, which can be done in tests/block_test.go and tests/state_test.go

if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 133519467574834 // "yolov2"
cfg.NetworkId = 133519467574834 // "yolov3"
Copy link
Contributor

Choose a reason for hiding this comment

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

I also made this mistake when updating yolov1 to yolov2. But actually:

>>> import codecs
>>> codecs.decode(hex(133519467574834)[2:], "hex")
b'yolov2'

So this should be changed from 133519467574834 to 133519467574835

Copy link
Contributor

Choose a reason for hiding this comment

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

Or, even better, you can fix it so we don't do the same mistake again, and change it t

new(big.Int).SetBytes([]byte("yolov3")).Uint64()

var YoloV2Bootnodes = []string{
// YoloV3Bootnodes are the enode URLs of the P2P bootstrap nodes running on the
// YOLOv3 ephemeral test network.
// TODO: Set Yolov3 bootnodes
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can leave this as is, and reuse both nodekey and IP.

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

I think this is OK. The problem is that unless we also merge 2718/2930, we don't have a correct yolov3. So maybe we should disable --yolov3 here (just comment out the flag), and then un-comment it in 2718/2930.
That would make it possible to merge this, and then rebase 2718, and run yolov3 from that PR without

  1. merging that PR to master, and
  2. Having a confusing misconfigured --yolov3 mode on master

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

Ok, I disabled the --yolov3 switch now, so I think this is good to go.
@karalabe PTAL?

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