Skip to content

Commit a273520

Browse files
authored
E3: Prune TotalDifficulty canonical markers (#11809)
Implements ethereum/execution-apis#570
1 parent b346ece commit a273520

File tree

18 files changed

+10
-159
lines changed

18 files changed

+10
-159
lines changed

cmd/rpcdaemon/graphql/eip-1767.graphqls.ref

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,6 @@ type Block {
154154
mixHash: Bytes32!
155155
# Difficulty is a measure of the difficulty of mining this block.
156156
difficulty: BigInt!
157-
# TotalDifficulty is the sum of all difficulty values up to and including
158-
# this block.
159-
totalDifficulty: BigInt!
160157
# OmmerCount is the number of ommers (AKA uncles) associated with this
161158
# block. If ommers are unavailable, this field will be null.
162159
ommerCount: Int

cmd/rpcdaemon/graphql/geth-schema.graphqls.ref

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,6 @@
190190
mixHash: Bytes32!
191191
# Difficulty is a measure of the difficulty of mining this block.
192192
difficulty: BigInt!
193-
# TotalDifficulty is the sum of all difficulty values up to and including
194-
# this block.
195-
totalDifficulty: BigInt!
196193
# OmmerCount is the number of ommers (AKA uncles) associated with this
197194
# block. If ommers are unavailable, this field will be null.
198195
ommerCount: Int

cmd/rpcdaemon/graphql/graph/generated.go

Lines changed: 0 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/rpcdaemon/graphql/graph/model/models_gen.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/rpcdaemon/graphql/graph/schema.graphqls

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,6 @@ type Block {
192192
mixHash: Bytes32!
193193
# Difficulty is a measure of the difficulty of mining this block.
194194
difficulty: BigInt!
195-
# TotalDifficulty is the sum of all difficulty values up to and including
196-
# this block.
197-
totalDifficulty: BigInt!
198195
# OmmerCount is the number of ommers (AKA uncles) associated with this
199196
# block. If ommers are unavailable, this field will be null.
200197
ommerCount: Int

cmd/rpcdaemon/graphql/graph/schema.resolvers.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/rpcdaemon/graphql/query_block.graphql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
stateRoot
2626
timestamp
2727
transactionsRoot
28-
totalDifficulty
2928
transactions {
3029
createdContract {
3130
address

cmd/rpcdaemon/postman/RPC_Testing.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@
290290
" \"size\": \"0x3e1\",",
291291
" \"stateRoot\": \"0xb3f9408d80048b6f206951c4e387f8da37fb8510eccc18527865fa746c47bbc5\",",
292292
" \"timestamp\": \"0x56bff9bb\",",
293-
" \"totalDifficulty\": \"0x6332227c16fd7c67\",",
294293
" \"transactions\": [",
295294
" \"0x730724cb08a6eb17bf6b3296359d261570d343ea7944a17a9d7287d77900db08\",",
296295
" \"0xef2ea39c20ba09553b2f3cf02380406ac766039ca56612937eed5e7f3503fb3a\",",
@@ -336,7 +335,7 @@
336335
"raw": "{{HOST}}",
337336
"host": ["{{HOST}}"]
338337
},
339-
"description": "Returns information about a block given the block's number.\r\n\r\n**Parameters**\r\n\r\nTAG - Integer block number or one of \"earliest\", \"latest\" or \"pending\"\r\n\r\nBoolean - If true it returns the full transaction objects, if false only the hashes of the transactions\r\n\r\n**Returns**\r\n\r\nObject - An object of type Block defined as:\r\n\r\nnumber: QUANTITY - The block number or null when pending\r\n\r\nhash: DATA, 32 Bytes - Hash of the block or null when pending\r\n\r\nparentHash: DATA, 32 Bytes - Hash of the parent block\r\n\r\nnonce: DATA, 8 bytes - Hash of the proof of work or null when pending\r\n\r\nsha3Uncles: DATA, 32 Bytes - SHA3 of the uncles data in the block\r\n\r\nlogsBloom: DATA, 256 Bytes - The bloom filter for the block's logs or null when pending\r\n\r\ntransactionsRoot: DATA, 32 Bytes - The root of the transaction trie of the block\r\n\r\nstateRoot: DATA, 32 Bytes - The root of the final state trie of the block\r\n\r\nreceiptsRoot: DATA, 32 Bytes - The root of the receipts trie of the block\r\n\r\nminer: DATA, 20 Bytes - The address of the beneficiary to whom the mining rewards were given\r\n\r\ndifficulty: QUANTITY - Integer of the difficulty for this block\r\n\r\ntotalDifficulty: QUANTITY - Integer of the total difficulty of the chain until this block\r\n\r\nextraData: DATA - The extra data field of this block\r\n\r\nsize: QUANTITY - Integer the size of this block in bytes\r\n\r\ngasLimit: QUANTITY - The maximum gas allowed in this block\r\n\r\ngasUsed: QUANTITY - The total used gas by all transactions in this block\r\n\r\ntimestamp: QUANTITY - The unix timestamp for when the block was collated\r\n\r\ntransactions: ARRAY - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter\r\n\r\nuncles: ARRAY - Array of uncle hashes\r\n\r\n"
338+
"description": "Returns information about a block given the block's number.\r\n\r\n**Parameters**\r\n\r\nTAG - Integer block number or one of \"earliest\", \"latest\" or \"pending\"\r\n\r\nBoolean - If true it returns the full transaction objects, if false only the hashes of the transactions\r\n\r\n**Returns**\r\n\r\nObject - An object of type Block defined as:\r\n\r\nnumber: QUANTITY - The block number or null when pending\r\n\r\nhash: DATA, 32 Bytes - Hash of the block or null when pending\r\n\r\nparentHash: DATA, 32 Bytes - Hash of the parent block\r\n\r\nnonce: DATA, 8 bytes - Hash of the proof of work or null when pending\r\n\r\nsha3Uncles: DATA, 32 Bytes - SHA3 of the uncles data in the block\r\n\r\nlogsBloom: DATA, 256 Bytes - The bloom filter for the block's logs or null when pending\r\n\r\ntransactionsRoot: DATA, 32 Bytes - The root of the transaction trie of the block\r\n\r\nstateRoot: DATA, 32 Bytes - The root of the final state trie of the block\r\n\r\nreceiptsRoot: DATA, 32 Bytes - The root of the receipts trie of the block\r\n\r\nminer: DATA, 20 Bytes - The address of the beneficiary to whom the mining rewards were given\r\n\r\ndifficulty: QUANTITY - Integer of the difficulty for this block\r\n\r\nextraData: DATA - The extra data field of this block\r\n\r\nsize: QUANTITY - Integer the size of this block in bytes\r\n\r\ngasLimit: QUANTITY - The maximum gas allowed in this block\r\n\r\ngasUsed: QUANTITY - The total used gas by all transactions in this block\r\n\r\ntimestamp: QUANTITY - The unix timestamp for when the block was collated\r\n\r\ntransactions: ARRAY - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter\r\n\r\nuncles: ARRAY - Array of uncle hashes\r\n\r\n"
340339
},
341340
"response": []
342341
},
@@ -368,7 +367,6 @@
368367
" \"size\": \"0x3e1\",",
369368
" \"stateRoot\": \"0xb3f9408d80048b6f206951c4e387f8da37fb8510eccc18527865fa746c47bbc5\",",
370369
" \"timestamp\": \"0x56bff9bb\",",
371-
" \"totalDifficulty\": \"0x6332227c16fd7c67\",",
372370
" \"transactions\": [",
373371
" \"0x730724cb08a6eb17bf6b3296359d261570d343ea7944a17a9d7287d77900db08\",",
374372
" \"0xef2ea39c20ba09553b2f3cf02380406ac766039ca56612937eed5e7f3503fb3a\",",
@@ -870,7 +868,6 @@
870868
" \"size\": \"0x21a\",",
871869
" \"stateRoot\": \"0x1e6e030581fd1873b4784280859cd3b3c04aa85520f08c304cf5ee63d3935add\",",
872870
" \"timestamp\": \"0x55ba4242\",",
873-
" \"totalDifficulty\": \"0xffd003ffe\",",
874871
" \"transactionsRoot\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",",
875872
" \"uncles\": []",
876873
" }",
@@ -949,7 +946,6 @@
949946
" \"size\": \"0x21a\",",
950947
" \"stateRoot\": \"0x1e6e030581fd1873b4784280859cd3b3c04aa85520f08c304cf5ee63d3935add\",",
951948
" \"timestamp\": \"0x55ba4242\",",
952-
" \"totalDifficulty\": \"0xffd003ffe\",",
953949
" \"transactionsRoot\": \"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",",
954950
" \"uncles\": []",
955951
" }",

cmd/rpctest/rpctest/type.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ type OtsFullBlock struct {
326326
StateRoot string `json:"stateRoot"`
327327
Timestamp string `json:"timestamp"`
328328

329-
TotalDifficulty hexutil.Big `json:"totalDifficulty"`
330329
TransactionCount uint64 `json:"transactionCount"`
331330
Transactions []OtsTransaction `json:"transactions"`
332331
TxRoot libcommon.Hash `json:"transactionsRoot"`

docs/readthedocs/source/rpc/index.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,6 @@ Object - An object of type Block defined as:
265265
* - ``QUANTITY``
266266
- ``difficulty``
267267
- Integer of the difficulty for this block
268-
* - ``QUANTITY``
269-
- ``totalDifficulty``
270-
- Integer of the total difficulty of the chain until this block
271268
* - ``DATA``
272269
- ``extraData``
273270
- The extra data field of this block

0 commit comments

Comments
 (0)