---
# System prepended metadata

title: Untitled

---

When I try to use go-ethereum ethclient subscribe against polygon-edge node, I'm getting the following error.
```
json: cannot unmarshal non-string into Go struct field Header.difficulty of type *hexutil.Big
```
​
Delving into details I found out that polygon-edge block header format differs for  eth_subscribe and other eth_* methods 
​
## eth_subscribe 
​
```json
{
	"jsonrpc": "2.0",
	"method": "eth_subscription",
	"params": {
		"subscription":"08efc7c7-4123-4d61-9dc6-a2c92b30af1b",
		"result": {"ParentHash":"0x6b7408bf8117370562e6be64ed43bf66696df926fe8f5adc1a06e6317ddd665e","Sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","Miner":"0x0000000000000000000000000000000000000000","StateRoot":"0x47e3ef6f51924e2aac36205da88561b7e5e87456cc5eaeae2cceea7956bd8ea3","TxRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","ReceiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","LogsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","Difficulty":602008,"Number":602008,"GasLimit":5242880,"GasUsed":0,"Timestamp":1656657487,"ExtraData":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD49uqU/dkB9Tn+xHhmQrMERkrNsdSLR+6UuwNX+5kHiDgvKg7GhbyS/qrYmmy4QVLd17MUY/giZy1SvOOmdpZcbSkfXlEUINeqVjrp3HHPM+ifkunLlZtal36Np8j2k8lfFgndi4v/ub6Ib4TxhZEB+Ia4QUJT/XBGaZ+pRSUd6R2wJn7entj1mi8PTbtr3z6/PnmNDy3DUmHObcsIrj9SGZn6w5SjqvcLaqV5oVbdJdRW7NYAuEEmxVdaeeRK5R9YUz/hEVpMbL/os4yhAcyc+vxS45yEYmYsYyali/feXyxyo+Hcm8z+BeBMdw4HjAQSdTzGai3jAA==","MixHash":"0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365","Nonce":"0x0000000000000000","Hash":"0x1eef69a11b40b519ba701c82a48a10de66ff293afe9596e7083d1867169308a6"}
	}
}
```
​
Check out:
"Difficulty":602008,
"Number":602008
​
​
whilst other methods return
"difficulty":"0x92f98",
"number":"0x92f98"
​
​
​
curl https://polygon.coub.me/polygon/ \
    -X POST \
    -H "Content-Type: application/json" \
    --data '{"method":"eth_getBlockByHash","params":["0x1eef69a11b40b519ba701c82a48a10de66ff293afe9596e7083d1867169308a6",false],"id":1,"jsonrpc":"2.0"}'
	
```json	
{"jsonrpc":"2.0","id":1,"result":{"parentHash":"0x6b7408bf8117370562e6be64ed43bf66696df926fe8f5adc1a06e6317ddd665e","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","miner":"0x0000000000000000000000000000000000000000","stateRoot":"0x47e3ef6f51924e2aac36205da88561b7e5e87456cc5eaeae2cceea7956bd8ea3","transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","difficulty":"0x92f98","totalDifficulty":"0x92f98","size":"0x31c","number":"0x92f98","gasLimit":"0x500000","gasUsed":"0x0","timestamp":"0x62be964f","extraData":"0x0000000000000000000000000000000000000000000000000000000000000000f8f6ea94fdd901f539fec4786642b304464acdb1d48b47ee94bb0357fb990788382f2a0ec685bc92feaad89a6cb84152ddd7b31463f822672d52bce3a676965c6d291f5e511420d7aa563ae9dc71cf33e89f92e9cb959b5a977e8da7c8f693c95f1609dd8b8bffb9be886f84f1859101f886b8414253fd7046699fa945251de91db0267ede9ed8f59a2f0f4dbb6bdf3ebf3e798d0f2dc35261ce6dcb08ae3f521999fac394a3aaf70b6aa579a156dd25d456ecd600b84126c5575a79e44ae51f58533fe1115a4c6cbfe8b38ca101cc9cfafc52e39c8462662c6326a58bf7de5f2c72a3e1dc9bccfe05e04c770e078c0412753cc66a2de300","mixHash":"0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365","nonce":"0x0000000000000000","hash":"0x1eef69a11b40b519ba701c82a48a10de66ff293afe9596e7083d1867169308a6","transactions":[],"uncles":[]}}
```
​
In go-ethereum Header structure is defined as 
```golang
	type Header struct {
		ParentHash  *common.Hash    `json:"parentHash"       gencodec:"required"`
		UncleHash   *common.Hash    `json:"sha3Uncles"       gencodec:"required"`
		Coinbase    *common.Address `json:"miner"`
		Root        *common.Hash    `json:"stateRoot"        gencodec:"required"`
		TxHash      *common.Hash    `json:"transactionsRoot" gencodec:"required"`
		ReceiptHash *common.Hash    `json:"receiptsRoot"     gencodec:"required"`
		Bloom       *Bloom          `json:"logsBloom"        gencodec:"required"`
		Difficulty  *hexutil.Big    `json:"difficulty"       gencodec:"required"`
		Number      *hexutil.Big    `json:"number"           gencodec:"required"`
		GasLimit    *hexutil.Uint64 `json:"gasLimit"         gencodec:"required"`
		GasUsed     *hexutil.Uint64 `json:"gasUsed"          gencodec:"required"`
		Time        *hexutil.Uint64 `json:"timestamp"        gencodec:"required"`
		Extra       *hexutil.Bytes  `json:"extraData"        gencodec:"required"`
		MixDigest   *common.Hash    `json:"mixHash"`
		Nonce       *BlockNonce     `json:"nonce"`
		BaseFee     *hexutil.Big    `json:"baseFeePerGas" rlp:"optional"`
	}
​
```
​
It requres Difficulty field to be hex string. 
I notice that polygon-edge is the only ethereum compatible node which has this issue.
​
## Versions
polygon-edge version v0.4.1
go-ethereum v1.10.20