mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-11-30 06:20:02 +00:00
revive-runner: enable PVM logs (#442)
This PR fixes a small oversight from #431: Set the debug config of the revive-runner `Runtime` such that we get the PVM logs back. Since the revive runner runtime is mainly meant for debugging, I further decided to enable unlimited contract sizes and disable [EIP 3607](https://eips.ethereum.org/EIPS/eip-3607) too. --------- Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
1 parent
13070a4bdf
commit
d8c23130bb
4 files changed
+16
-2
No files matched your search
@@ -17,6 +17,7 @@ Supported `polkadot-sdk` rev: `unstable2507`
|
|||||||
- The supported `polkadot-sdk` release is `unstable2507`.
|
- The supported `polkadot-sdk` release is `unstable2507`.
|
||||||
- The `INVALID` opcode and OOB memory accesses now consume all remaining gas.
|
- The `INVALID` opcode and OOB memory accesses now consume all remaining gas.
|
||||||
- Emit the `call_evm` and `delegate_call_evm` syscalls for contract calls.
|
- Emit the `call_evm` and `delegate_call_evm` syscalls for contract calls.
|
||||||
|
- The `revive-runner` can execute arbitrarily large contract blobs.
|
||||||
|
|
||||||
### Fixed:
|
### Fixed:
|
||||||
- The missing `STOP` instruction at the end of `code` blocks.
|
- The missing `STOP` instruction at the end of `code` blocks.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ pragma solidity ^0.8;
|
|||||||
"contract": "BlockHash"
|
"contract": "BlockHash"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"data": "4545454545454545454545454545454545454545454545454545454545454545"
|
"data": "e8ec043305d4cfbb51936ae25b50e0a4352d8eaab03d0f66d8d543e65a9a9668"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ use std::time::Duration;
|
|||||||
use hex::{FromHex, ToHex};
|
use hex::{FromHex, ToHex};
|
||||||
use pallet_revive::{AddressMapper, ExecReturnValue, InstantiateReturnValue};
|
use pallet_revive::{AddressMapper, ExecReturnValue, InstantiateReturnValue};
|
||||||
use polkadot_sdk::frame_support::traits::Currency;
|
use polkadot_sdk::frame_support::traits::Currency;
|
||||||
use polkadot_sdk::pallet_revive::{Config, Pallet};
|
use polkadot_sdk::pallet_revive::{Config, DebugSettings, Pallet};
|
||||||
use polkadot_sdk::*;
|
use polkadot_sdk::*;
|
||||||
use polkadot_sdk::{
|
use polkadot_sdk::{
|
||||||
pallet_revive::ContractResult,
|
pallet_revive::ContractResult,
|
||||||
@@ -89,6 +89,17 @@ impl ExtBuilder {
|
|||||||
.build_storage()
|
.build_storage()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
pallet_revive::GenesisConfig::<Runtime> {
|
||||||
|
debug_settings: Some(DebugSettings::new(
|
||||||
|
true, // allow unlimited contract size
|
||||||
|
true, // bypass EIP 3607
|
||||||
|
true, // enable PVM logs
|
||||||
|
)),
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
|
.assimilate_storage(&mut t)
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
pallet_balances::GenesisConfig::<Runtime> {
|
pallet_balances::GenesisConfig::<Runtime> {
|
||||||
balances: self.balance_genesis_config,
|
balances: self.balance_genesis_config,
|
||||||
dev_accounts: None,
|
dev_accounts: None,
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ impl pallet_timestamp::Config for Runtime {}
|
|||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const UnstableInterface: bool = true;
|
pub const UnstableInterface: bool = true;
|
||||||
|
pub const DebugFlag: bool = true;
|
||||||
pub const DepositPerByte: Balance = 1;
|
pub const DepositPerByte: Balance = 1;
|
||||||
pub const DepositPerItem: Balance = 2;
|
pub const DepositPerItem: Balance = 2;
|
||||||
pub const CodeHashLockupDepositPercent: Perbill = Perbill::from_percent(0);
|
pub const CodeHashLockupDepositPercent: Perbill = Perbill::from_percent(0);
|
||||||
@@ -87,6 +88,7 @@ impl pallet_revive::Config for Runtime {
|
|||||||
type ChainId = ConstU64<420_420_420>;
|
type ChainId = ConstU64<420_420_420>;
|
||||||
type FindAuthor = Self;
|
type FindAuthor = Self;
|
||||||
type NativeToEthRatio = ConstU32<{ crate::ETH_RATIO as u32 }>;
|
type NativeToEthRatio = ConstU32<{ crate::ETH_RATIO as u32 }>;
|
||||||
|
type DebugEnabled = DebugFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FindAuthor<<Runtime as frame_system::Config>::AccountId> for Runtime {
|
impl FindAuthor<<Runtime as frame_system::Config>::AccountId> for Runtime {
|
||||||
|
|||||||
Reference in new issue
Block a user