Skip to content

Commit

Permalink
update eos mechanics to latest antelope version
Browse files Browse the repository at this point in the history
  • Loading branch information
YaroShkvorets committed Sep 18, 2024
1 parent 2e3cfae commit 8e9df34
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ members = [
prost = "0.11"
prost-types = "0.11"
substreams = "0.5"
substreams-antelope = "0.3.4"
substreams-antelope = "0.4.2"
substreams-ethereum = "0.9"
substreams-bitcoin = "1"
substreams-sink-kv = "0.1.3"
Expand Down
3 changes: 2 additions & 1 deletion eosmechanics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ crate-type = ["cdylib"]
prost = { workspace = true }
prost-types = { workspace = true }
substreams = { workspace = true }
substreams-antelope = { workspace = true }
# substreams-antelope = { workspace = true }
substreams-antelope = "0.5"
substreams-sink-kv = { workspace = true }
substreams-sink-prometheus = { workspace = true }
2 changes: 1 addition & 1 deletion eosmechanics/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ run:

.PHONY: gui
gui:
substreams gui -e telos.substreams.pinax.network:443 prom_out -s 273976005 -t +1000
substreams gui -e kylin.substreams.pinax.network:443 prom_out -s 273976005 -t +1000

.PHONY: sink
sink:
Expand Down
4 changes: 2 additions & 2 deletions eosmechanics/proto/v1/eosmechanics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ package eosmechanics.v1;

message ProducerUsage {
string producer = 1; // the name of the block producer
int64 cpu_usage = 2; // cpu usage of the eosmechanics transaction
int64 cpu_usage = 2; // cpu usage of the eosmechanics transaction
}

message ScheduleChange {
string producer = 1; // current block producer
uint32 schedule_version = 2; // version of the schedule
repeated string active_schedule = 3; // active schedule of the block producers
repeated string active_schedule = 3; // active schedule of the block producers
repeated string pending_schedule = 4; // pending schedule of the block producers
repeated string remove_from_schedule = 5; // block producers to be removed from the active schedule
repeated string add_to_schedule = 6; // block producers to be added to the active schedule
Expand Down
2 changes: 1 addition & 1 deletion eosmechanics/src/maps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn map_producer_usage(block: Block) -> Result<ProducerUsage, Error> {
// Producer is found in the block header
let producer = block.header.as_ref().unwrap().producer.clone();

for trx in block.executed_transaction_traces() {
for trx in block.transaction_traces() {
// CPU usage is found in the transaction receipt
let cpu_usage = trx.receipt.as_ref().unwrap().cpu_usage_micro_seconds as i64;

Expand Down
4 changes: 2 additions & 2 deletions eosmechanics/substreams.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package:
url: https://github.com/pinax-network/substreams
doc: Block Producer Benchmarks

imports:
prometheus: https://github.com/pinax-network/substreams-sink-prometheus.rs/releases/download/v0.1.9/substreams-sink-prometheus-v0.1.9.spkg
# imports:
# prometheus: https://github.com/pinax-network/substreams-sink-prometheus.rs/releases/download/v0.2.0/substreams-sink-prometheus-v0.2.0.spkg

binaries:
default:
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.75.0"
channel = "1.76.0"
components = ["rustfmt"]
targets = ["wasm32-unknown-unknown"]

0 comments on commit 8e9df34

Please sign in to comment.