Summary
A finalized Intelligent Contract deployment on Bradbury received gl.message.chain_id == 1, while Bradbury's EVM RPC and the current network documentation report chain ID 4221.
This may be a Bradbury execution-context configuration defect or an undocumented distinction between the GenVM field and the EVM chain ID. The current documentation appears to describe them as the same network identifier.
Documentation
Reproduction
The contract stores the field during initialization:
self.deployment_chain_id = gl.message.chain_id
Source:
https://github.com/Leokings/digital-deliverable-verifier/blob/73b8ed3d729eb52deff691e04babe0841dc2b7d6/contracts/DigitalDeliverableVerifier.py#L759
Bradbury artifacts:
- contract:
0x91d6E838b93c9CCA32Ab964d096949210F60b1DF
- deployment tx:
0xffb61c378c31f7689905e536f6e9cbccd8ccda49b980a24e56f0fc207535d834
- evaluation tx:
0x7fa6613923f792bcf570b5741dc06ded9e37dac9a27f021398bc6df52b6ea320
- both transactions are
FINALIZED
eth_chainId through the Bradbury RPC: 4221
- stored
deployment_chain_id returned by get_policy(): 1
- terminal decision records also contain
chain_id: 1
Full public test record:
https://github.com/Leokings/digital-deliverable-verifier/blob/main/docs/BRADBURY_TEST_RECORD.md
Value 1 is also the direct-test VM's default, but it is not Bradbury's documented ID:
https://github.com/genlayerlabs/genlayer-testing-suite/blob/343e3a358f9e235a93b49c60721ce7676585ff07/gltest/direct/vm.py#L160-L165
Requested clarification
- Should
gl.message.chain_id equal eth_chainId on Bradbury?
- If
1 is intentional, what domain does it identify, and can the documentation name that domain explicitly?
- If it is unintentional, can the Bradbury execution context be configured to supply
4221?
This matters for contracts that include gl.message.chain_id in domain-separated commitments. It did not affect this verifier's authorization, evidence evaluation, scoring, or validator consensus, but integrations should not have to guess whether the embedded value is the EVM network ID.
Summary
A finalized Intelligent Contract deployment on Bradbury received
gl.message.chain_id == 1, while Bradbury's EVM RPC and the current network documentation report chain ID4221.This may be a Bradbury execution-context configuration defect or an undocumented distinction between the GenVM field and the EVM chain ID. The current documentation appears to describe them as the same network identifier.
Documentation
gl.message.chain_idis described as the “Current chain ID”:genlayer-docs/pages/developers/intelligent-contracts/features/transaction-context.mdx
Line 20 in 7208bbf
4221:genlayer-docs/pages/developers/networks.mdx
Lines 18 to 26 in 7208bbf
https://github.com/genlayerlabs/genlayer-studio/blob/c94072951e483510329670aa427fba3fa6944f45/backend/node/base.py#L1035-L1040
eth_chainIdreturns that same configured value:https://github.com/genlayerlabs/genlayer-studio/blob/c94072951e483510329670aa427fba3fa6944f45/backend/protocol_rpc/endpoints.py#L2318-L2319
Reproduction
The contract stores the field during initialization:
Source:
https://github.com/Leokings/digital-deliverable-verifier/blob/73b8ed3d729eb52deff691e04babe0841dc2b7d6/contracts/DigitalDeliverableVerifier.py#L759
Bradbury artifacts:
0x91d6E838b93c9CCA32Ab964d096949210F60b1DF0xffb61c378c31f7689905e536f6e9cbccd8ccda49b980a24e56f0fc207535d8340x7fa6613923f792bcf570b5741dc06ded9e37dac9a27f021398bc6df52b6ea320FINALIZEDeth_chainIdthrough the Bradbury RPC:4221deployment_chain_idreturned byget_policy():1chain_id: 1Full public test record:
https://github.com/Leokings/digital-deliverable-verifier/blob/main/docs/BRADBURY_TEST_RECORD.md
Value
1is also the direct-test VM's default, but it is not Bradbury's documented ID:https://github.com/genlayerlabs/genlayer-testing-suite/blob/343e3a358f9e235a93b49c60721ce7676585ff07/gltest/direct/vm.py#L160-L165
Requested clarification
gl.message.chain_idequaleth_chainIdon Bradbury?1is intentional, what domain does it identify, and can the documentation name that domain explicitly?4221?This matters for contracts that include
gl.message.chain_idin domain-separated commitments. It did not affect this verifier's authorization, evidence evaluation, scoring, or validator consensus, but integrations should not have to guess whether the embedded value is the EVM network ID.