maticnetwork / bor

Official repository for the Polygon Blockchain
https://polygon.technology/
GNU Lesser General Public License v3.0
1.01k stars 487 forks source link

`bor` Developer Mode Does Not Include Recent Hardforks #1182

Closed nlordell closed 2 months ago

nlordell commented 8 months ago

System information

Bor client version: 1.2.7 (run using Docker image sha256:d161c1faf5e376ecafdcfb13fc77f74ecb9d96f83958eb1e3100bba88d476aed).

Heimdall client version: N/A

OS & Version: Linux

Environment: Devnet

Type of node: Devnode

Additional Information: None

Overview of the problem

Looking through the bor server startup, it looks like when running in dev mode (bor server -dev) that the AllCliqueProtocolChanges chain configuration is used instead of AllDevChainProtocolChanges (which is what is used in Geth). In particular, the Clique chain configuration does not include HFs past London, which means that some of the goodies in the later hardforks are not available, and generally speaking bor server -dev does not behave close to how Mainnet and Mumbai do.

In particular, if you want to spin up a -dev server to test the RIP-7212 precompile, this is not possible AFAICT.

Reproduction Steps

  1. Start bor server -dev
  2. Try and use a recent feature past London HF

Additional Information

In particular, one way to test this is to try and use the RIP-7212 precompile. In particular, the following cURL incantation can be used to send an eth_call RPC request to check the precompile's response:

curl -s -X POST "$NODE_URL" -H 'Content-Type: application/json' --data '@-' <<JSON | jq
{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "eth_call",
  "params": [
    {
      "to": "0x0000000000000000000000000000000000000100",
      "data": "0xbb5a52f42f9c9261ed4361f59422a1e30036e7c32b270c8807a419feca6050232ba3a8be6b94d5ec80a6d9d1190a436effe50d85a1eee859b8cc6af9bd5c2e184cd60b855d442f5b3c7b11eb6c4e0ae7525fe710fab9aa7c77a67f79e6fadd762927b10512bae3eddcfe467828128bad2903269919f7086069c8c4df6c732838c7787964eaac00e5921fb1498a60f4606766b3d9685001558d1a974e7341513e"
    },
    "latest"
  ]
}
JSON

If I set NODE_URL to be a Mumbai node, I get the expected output that this is a valid signature:

{
  "jsonrpc": "2.0",
  "id": 42,
  "result": "0x0000000000000000000000000000000000000000000000000000000000000001"
}

However, if I run it against a bor server -dev -http -http.api eth local dev node, the output will be empty bytes because the precompile is not enabled.

{
  "jsonrpc": "2.0",
  "id": 42,
  "result": "0x"
}
manav2401 commented 7 months ago

Hi, thanks for reporting this issue. We'll try to get this resolved by using an appropriate config which has the recent most hard forks.

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

nlordell commented 7 months ago

I'm fairly sure this is still an issue.

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

nlordell commented 6 months ago

This is still an issue

github-actions[bot] commented 5 months ago

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

nlordell commented 5 months ago

Comment.

github-actions[bot] commented 5 months ago

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

nlordell commented 5 months ago

The issue is still relevant.

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

nlordell commented 4 months ago

Dear bot, this is still relevant.

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

nlordell commented 3 months ago

Issue is still relevant and not yet fixed.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] commented 2 months ago

This issue was closed because it has been stalled for 28 days with no activity.