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

DATA-1787 Add proxy fields to contracts table #8

Merged
merged 1 commit into from
Jul 23, 2024
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
33 changes: 30 additions & 3 deletions src/main/java/io/blockchainetl/ethereum/domain/Contract.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ public class Contract {
@JsonProperty("is_erc1155")
private Boolean isErc1155;

@Nullable
@JsonProperty("proxy_type")
private String proxyType;

@Nullable
@JsonProperty("implementation_address")
private String implementationAddress;

@Nullable
@JsonProperty("block_timestamp")
private Long blockTimestamp;
Expand Down Expand Up @@ -121,6 +129,22 @@ public void setErc1155(Boolean erc1155) {
this.isErc1155 = erc1155;
}

public String getProxyType() {
return proxyType;
}

public void setProxyType(String proxyType) {
this.proxyType = proxyType;
}

public String getImplementationAddress() {
return implementationAddress;
}

public void setImplementationAddress(String implementationAddress) {
this.implementationAddress = implementationAddress;
}

public Long getBlockTimestamp() {
return blockTimestamp;
}
Expand Down Expand Up @@ -162,16 +186,17 @@ public boolean equals(Object o) {
Objects.equal(isErc20, contract.isErc20) &&
Objects.equal(isErc721, contract.isErc721) &&
Objects.equal(isErc1155, contract.isErc1155) &&
Objects.equal(proxyType, contract.proxyType) &&
Objects.equal(implementationAddress, contract.implementationAddress) &&
Objects.equal(blockTimestamp, contract.blockTimestamp) &&
Objects.equal(blockNumber, contract.blockNumber) &&
Objects.equal(blockHash, contract.blockHash);
}

@Override
public int hashCode() {
return Objects.hashCode(type, address, chainId, bytecode, functionSighashes, isErc20, isErc721, isErc1155, blockTimestamp,
blockNumber,
blockHash);
return Objects.hashCode(type, address, chainId, bytecode, functionSighashes, isErc20, isErc721, isErc1155,
proxyType, implementationAddress, blockTimestamp, blockNumber, blockHash);
}

@Override
Expand All @@ -185,6 +210,8 @@ public String toString() {
.add("isErc20", isErc20)
.add("isErc721", isErc721)
.add("isErc1155", isErc1155)
.add("proxyType", proxyType)
.add("implementationAddress", implementationAddress)
.add("blockTimestamp", blockTimestamp)
.add("blockNumber", blockNumber)
.add("blockHash", blockHash)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ protected void populateTableRowFields(TableRow row, String element) {
row.set("is_erc20", contract.getErc20());
row.set("is_erc721", contract.getErc721());
row.set("is_erc1155", contract.getErc1155());
row.set("proxy_type", contract.getProxyType());
row.set("implementation_address", contract.getImplementationAddress());
row.set("block_number", contract.getBlockNumber());
row.set("block_hash", contract.getBlockHash());
}
Expand Down
2 changes: 1 addition & 1 deletion terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ resource "google_dataflow_flex_template_job" "zkevm_imtbl_mainnet_job" {
project = "${terraform.workspace}-im-data"
runner = "DataflowRunner"
workerMachineType = "n1-standard-1"
maxNumWorkers = 1
maxNumWorkers = 4
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jasadams-imtbl - Any specific insights or issues you came across that prompted this increase?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really @roopak-immutable, I just realised that with the maximum workers set to 1 we effectively have autoscaling disabled. With the transaction growth we were experiencing, it won't be much longer before we will need at least 2 workers. Just getting ahead of the game and creating some headroom. FYI, its still been sitting at 1 worker since I changed it in dev

diskSizeGb=30
enableStreamingEngine=true
region=local.region
Expand Down
Loading