From bcccbc66af9806bffe35a058a6113062481dcbbd Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Fri, 2 Feb 2024 15:13:08 +0300 Subject: [PATCH] added handling for revert reason Signed-off-by: DenisRybas --- docker-compose.yml | 24 +----------------------- network/config/besu/.env | 2 +- network/config/besu/config.toml | 1 + vdr/src/error/mod.rs | 1 + 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6ee221f3..fd515942 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,17 +17,10 @@ x-besu-def: /opt/besu/bin/besu \ --config-file=/config/config.toml \ --p2p-host=$$(hostname -i) \ + --revert-reason-enabled=true \ --rpc-http-api=EEA,WEB3,ETH,NET,TRACE,DEBUG,ADMIN,TXPOOL,PERM,${BESU_CONS_ALGO:-QBFT} \ --rpc-ws-api=EEA,WEB3,ETH,NET,TRACE,DEBUG,ADMIN,TXPOOL,PERM,${BESU_CONS_ALGO:-QBFT} ; - - - - - - - - x-ethsignerProxy-def: ðsignerProxy-def image: consensys/ethsigner:${ETHSIGNER_VERSION:-latest} @@ -176,16 +169,6 @@ services: quorum-dev-quickstart: ipv4_address: 172.16.239.40 - - - - - - - - - - prometheus: image: "prom/prometheus" volumes: @@ -234,11 +217,6 @@ services: quorum-dev-quickstart: ipv4_address: 172.16.239.35 - - - - - volumes: public-keys: prometheus: diff --git a/network/config/besu/.env b/network/config/besu/.env index a032ac09..7dc7cb84 100644 --- a/network/config/besu/.env +++ b/network/config/besu/.env @@ -1,4 +1,4 @@ LOG4J_CONFIGURATION_FILE=/config/log-config.xml - +BESU_REVERT_REASON_ENABLED=true diff --git a/network/config/besu/config.toml b/network/config/besu/config.toml index c5af9d42..b3cf5567 100644 --- a/network/config/besu/config.toml +++ b/network/config/besu/config.toml @@ -5,6 +5,7 @@ logging="INFO" data-path="/opt/besu/data" host-allowlist=["*"] min-gas-price=0 +revert-reason-enabled=true # rpc rpc-http-enabled=true diff --git a/vdr/src/error/mod.rs b/vdr/src/error/mod.rs index 7afc96e8..2dab478a 100644 --- a/vdr/src/error/mod.rs +++ b/vdr/src/error/mod.rs @@ -68,6 +68,7 @@ impl From for VdrError { Web3Error::Unreachable => VdrError::ClientNodeUnreachable, Web3Error::InvalidResponse(err) => VdrError::ClientInvalidResponse(err), Web3Error::Rpc(err) => VdrError::ClientTransactionReverted(json!(err).to_string()), + Web3Error::Revert(err) => VdrError::ClientTransactionReverted(err), _ => VdrError::ClientUnexpectedError(value.to_string()), };