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

[Merge] rename random to prevRandao as per latest KilnV2 specs #5046

Merged
merged 3 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"type" : "string",
"format" : "byte"
},
"random" : {
"prev_randao" : {
"pattern" : "^0x[a-fA-F0-9]{64}$",
"type" : "string",
"description" : "Bytes32 hexadecimal",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"type" : "string",
"format" : "byte"
},
"random" : {
"prev_randao" : {
"pattern" : "^0x[a-fA-F0-9]{64}$",
"type" : "string",
"description" : "Bytes32 hexadecimal",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public BeaconBlockBodyBellatrix(
executionPayload.stateRoot,
executionPayload.receiptsRoot,
executionPayload.logsBloom,
executionPayload.random,
executionPayload.prevRandao,
executionPayload.blockNumber,
executionPayload.gasLimit,
executionPayload.gasUsed,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ protected void applyAdditionalFields(MutableBeaconState state) {
latestExecutionPayloadHeader.stateRoot,
latestExecutionPayloadHeader.receiptsRoot,
latestExecutionPayloadHeader.logsBloom,
latestExecutionPayloadHeader.random,
latestExecutionPayloadHeader.prevRandao,
latestExecutionPayloadHeader.blockNumber,
latestExecutionPayloadHeader.gasLimit,
latestExecutionPayloadHeader.gasUsed,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public ExecutionPayload(
@JsonProperty("state_root") Bytes32 stateRoot,
@JsonProperty("receipts_root") Bytes32 receiptsRoot,
@JsonProperty("logs_bloom") Bytes logsBloom,
@JsonProperty("random") Bytes32 random,
@JsonProperty("prev_randao") Bytes32 prevRandao,
@JsonProperty("block_number") UInt64 blockNumber,
@JsonProperty("gas_limit") UInt64 gasLimit,
@JsonProperty("gas_used") UInt64 gasUsed,
Expand All @@ -59,7 +59,7 @@ public ExecutionPayload(
stateRoot,
receiptsRoot,
logsBloom,
random,
prevRandao,
blockNumber,
gasLimit,
gasUsed,
Expand All @@ -78,7 +78,7 @@ public ExecutionPayload(
executionPayload.getStateRoot(),
executionPayload.getReceiptsRoot(),
executionPayload.getLogsBloom(),
executionPayload.getRandom(),
executionPayload.getPrevRandao(),
executionPayload.getBlockNumber(),
executionPayload.getGasLimit(),
executionPayload.getGasUsed(),
Expand Down Expand Up @@ -114,7 +114,7 @@ public ExecutionPayload(
stateRoot,
receiptsRoot,
logsBloom,
random,
prevRandao,
blockNumber,
gasLimit,
gasUsed,
Expand Down Expand Up @@ -153,7 +153,7 @@ public String toString() {
.add("stateRoot", stateRoot)
.add("receiptsRoot", receiptsRoot)
.add("logsBloom", logsBloom)
.add("random", random)
.add("prevRandao", prevRandao)
.add("blockNumber", blockNumber)
.add("gasLimit", gasLimit)
.add("gasUsed", gasUsed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ public abstract class ExecutionPayloadCommon {
@Schema(type = "string", format = "byte")
public final Bytes logsBloom;

@JsonProperty("prev_randao")
@Schema(
type = "string",
format = "byte",
pattern = PATTERN_BYTES32,
description = DESCRIPTION_BYTES32)
public final Bytes32 random;
public final Bytes32 prevRandao;

@JsonProperty("block_number")
@Schema(type = "string", format = "uint64")
Expand Down Expand Up @@ -110,7 +111,7 @@ public ExecutionPayloadCommon(
@JsonProperty("state_root") Bytes32 stateRoot,
@JsonProperty("receipts_root") Bytes32 receiptsRoot,
@JsonProperty("logs_bloom") Bytes logsBloom,
@JsonProperty("random") Bytes32 random,
@JsonProperty("prev_randao") Bytes32 prevRandao,
@JsonProperty("block_number") UInt64 blockNumber,
@JsonProperty("gas_limit") UInt64 gasLimit,
@JsonProperty("gas_used") UInt64 gasUsed,
Expand All @@ -123,7 +124,7 @@ public ExecutionPayloadCommon(
this.stateRoot = stateRoot;
this.receiptsRoot = receiptsRoot;
this.logsBloom = logsBloom;
this.random = random;
this.prevRandao = prevRandao;
this.blockNumber = blockNumber;
this.gasLimit = gasLimit;
this.gasUsed = gasUsed;
Expand All @@ -140,7 +141,7 @@ public ExecutionPayloadCommon(
this.stateRoot = executionPayload.getStateRoot();
this.receiptsRoot = executionPayload.getReceiptsRoot();
this.logsBloom = executionPayload.getLogsBloom();
this.random = executionPayload.getRandom();
this.prevRandao = executionPayload.getPrevRandao();
this.blockNumber = executionPayload.getBlockNumber();
this.gasLimit = executionPayload.getGasLimit();
this.gasUsed = executionPayload.getGasUsed();
Expand All @@ -164,7 +165,7 @@ public boolean equals(final Object o) {
&& Objects.equals(stateRoot, that.stateRoot)
&& Objects.equals(receiptsRoot, that.receiptsRoot)
&& Objects.equals(logsBloom, that.logsBloom)
&& Objects.equals(random, that.random)
&& Objects.equals(prevRandao, that.prevRandao)
&& Objects.equals(blockNumber, that.blockNumber)
&& Objects.equals(gasLimit, that.gasLimit)
&& Objects.equals(gasUsed, that.gasUsed)
Expand All @@ -182,7 +183,7 @@ public int hashCode() {
stateRoot,
receiptsRoot,
logsBloom,
random,
prevRandao,
blockNumber,
gasLimit,
gasUsed,
Expand All @@ -200,7 +201,7 @@ public String toString() {
.add("stateRoot", stateRoot)
.add("receiptsRoot", receiptsRoot)
.add("logsBloom", logsBloom)
.add("random", random)
.add("prevRandao", prevRandao)
.add("blockNumber", blockNumber)
.add("gasLimit", gasLimit)
.add("gasUsed", gasUsed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public ExecutionPayloadHeader(
@JsonProperty("state_root") Bytes32 stateRoot,
@JsonProperty("receipts_root") Bytes32 receiptsRoot,
@JsonProperty("logs_bloom") Bytes logsBloom,
@JsonProperty("random") Bytes32 random,
@JsonProperty("prev_randao") Bytes32 prevRandao,
@JsonProperty("block_number") UInt64 blockNumber,
@JsonProperty("gas_limit") UInt64 gasLimit,
@JsonProperty("gas_used") UInt64 gasUsed,
Expand All @@ -57,7 +57,7 @@ public ExecutionPayloadHeader(
stateRoot,
receiptsRoot,
logsBloom,
random,
prevRandao,
blockNumber,
gasLimit,
gasUsed,
Expand All @@ -77,7 +77,7 @@ public ExecutionPayloadHeader(
executionPayloadHeader.getStateRoot(),
executionPayloadHeader.getReceiptsRoot(),
executionPayloadHeader.getLogsBloom(),
executionPayloadHeader.getRandom(),
executionPayloadHeader.getPrevRandao(),
executionPayloadHeader.getBlockNumber(),
executionPayloadHeader.getGasLimit(),
executionPayloadHeader.getGasUsed(),
Expand Down Expand Up @@ -110,7 +110,7 @@ public ExecutionPayloadHeader(
stateRoot,
receiptsRoot,
logsBloom,
random,
prevRandao,
blockNumber,
gasLimit,
gasUsed,
Expand Down Expand Up @@ -149,7 +149,7 @@ public String toString() {
.add("stateRoot", stateRoot)
.add("receiptsRoot", receiptsRoot)
.add("logsBloom", logsBloom)
.add("random", random)
.add("prevRandao", prevRandao)
.add("blockNumber", blockNumber)
.add("gasLimit", gasLimit)
.add("gasUsed", gasUsed)
Expand Down
Loading