Skip to content

Commit

Permalink
Merge branch 'dev' into p-897-parachain-staking-decimal-migration
Browse files Browse the repository at this point in the history
Signed-off-by: WMQ <[email protected]>
  • Loading branch information
wangminqi authored Jul 22, 2024
2 parents cdcbef9 + 7bcdf8b commit c09ac48
Show file tree
Hide file tree
Showing 108 changed files with 3,546 additions and 4,675 deletions.
233 changes: 189 additions & 44 deletions Cargo.lock

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ members = [
'pallets/teebag',
'pallets/vc-management',
'pallets/xcm-asset-manager',
'precompiles/*',
'precompiles/utils/macro',
'primitives/core',
'primitives/core/proc-macros',
'primitives/core/macros',
Expand Down Expand Up @@ -59,6 +57,8 @@ clap = { version = "4.3", features = ["derive"] }
der = { version = "0.6.0", default-features = false }
derive_more = { version = "0.99" }
env_logger = { version = "0.10.2" }
environmental = { version = "1.1.2", default-features = false }
evm = { version = "0.41.1", default-features = false }
impl-trait-for-tuples = { version = "0.2.2" }
log = { version = "0.4", default-features = false }
proc-macro2 = { version = "1" }
Expand All @@ -68,6 +68,7 @@ scale-info = { version = "2.11", default-features = false, features = ["derive"]
parity-scale-codec = { version = "3.6", default-features = false, features = ["derive", "max-encoded-len"] }
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] }
serde_json = { version = "1.0", default-features = false }
slices = { version = "0.2.0" }
hex = { version = "0.4", default-features = false }
hex-literal = { version = "0.4.1", default-features = false }
similar-asserts = { version = "1.5.0" }
Expand Down Expand Up @@ -161,6 +162,7 @@ sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-core-hashing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
Expand All @@ -179,6 +181,7 @@ frame-support = { git = "https://github.com/paritytech/substrate", branch = "pol
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
Expand Down Expand Up @@ -223,7 +226,6 @@ pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", bra
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42", default-features = false }

substrate-fixed = { git = "https://github.com/encointer/substrate-fixed", default-features = false }
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.42", default-features = false }
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.42", default-features = false }
orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.42", default-features = false }

Expand Down Expand Up @@ -257,10 +259,13 @@ pallet-parachain-staking = { path = "pallets/parachain-staking", default-feature
pallet-score-staking = { path = "pallets/score-staking", default-features = false }
pallet-teebag = { path = "pallets/teebag", default-features = false }
pallet-vc-management = { path = "pallets/vc-management", default-features = false }
precompile-utils = { path = "precompiles/utils", default-features = false }
pallet-evm-precompile-assets-erc20 = { path = "precompiles/assets-erc20", default-features = false }
pallet-evm-precompile-bridge-transfer = { path = "precompiles/bridge-transfer", default-features = false }
pallet-evm-precompile-parachain-staking = { path = "precompiles/parachain-staking", default-features = false }
pallet-evm-assertions = { path = "pallets/evm-assertions", default-features = false }
# This is a temporary pallet copy from Astar with polkadot-0.9.43
# The official release of this pallet will be in frontier repo
precompile-utils = { git = "https://github.com/litentry/precompile-utils", branch = "main", default-features = false }

[patch.crates-io]
ring = { git = "https://github.com/betrusted-io/ring-xous", branch = "0.16.20-cleanup" }
27 changes: 0 additions & 27 deletions bitacross-worker/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,33 +117,6 @@ services:
- "${SGX_QCNL:-/dev/null}:/etc/sgx_default_qcnl.conf"
environment:
- RUST_LOG=info,litentry_worker=debug,ws=warn,sp_io=error,substrate_api_client=warn,itc_parentchain_light_client=info,jsonrpsee_ws_client=warn,jsonrpsee_ws_server=warn,enclave_runtime=debug,ita_stf=debug,its_rpc_handler=warn,itc_rpc_client=warn,its_consensus_common=debug,its_state=warn,its_consensus_aura=warn,aura*=warn,its_consensus_slots=warn,itp_attestation_handler=debug,http_req=debug,lc_mock_server=warn,itc_rest_client=debug,lc_credentials=debug,lc_identity_verification=debug,lc_stf_task_receiver=debug,lc_stf_task_sender=debug,lc_data_providers=debug,itp_top_pool=debug,itc_parentchain_indirect_calls_executor=debug,
- TWITTER_OFFICIAL_URL=http://localhost:19527
- TWITTER_AUTH_TOKEN_V2=
- DISCORD_OFFICIAL_URL=http://localhost:19527
- LITENTRY_DISCORD_MICROSERVICE_URL=http://localhost:19527
- DISCORD_AUTH_TOKEN=
- ACHAINABLE_URL=http://localhost:19527
- ACHAINABLE_AUTH_KEY=
- CREDENTIAL_ENDPOINT=http://localhost:9933
- ONEBLOCK_NOTION_KEY=
- ONEBLOCK_NOTION_URL=http://localhost:19527
- SORA_QUIZ_MASTER_ID=SORA_QUIZ_MASTER_ID
- SORA_QUIZ_ATTENDEE_ID=SORA_QUIZ_ATTENDEE_ID
- MORALIS_API_URL=http://localhost:19527/moralis/
- MORALIS_SOLANA_API_URL=http://localhost:19527/moralis_solana/
- KARAT_DAO_API_URL=http://localhost:19527/karat_dao/
- MAGIC_CRAFT_API_URL=http://localhost:19527/magic_craft/
- MAGIC_CRAFT_API_KEY=
- DAREN_MARKET_API_URL=http://localhost:19527/daren_market/
- MORALIS_API_KEY=
- NODEREAL_API_KEY=NODEREAL_API_KEY
- NODEREAL_API_URL=http://localhost:19527
- NODEREAL_API_CHAIN_NETWORK_URL=http://localhost:19527/nodereal_jsonrpc/
- GENIIDATA_URL=http://localhost:19527
- CONTEST_LEGEND_DISCORD_ROLE_ID=CONTEST_LEGEND_DISCORD_ROLE_ID
- CONTEST_POPULARITY_DISCORD_ROLE_ID=CONTEST_POPULARITY_DISCORD_ROLE_ID
- CONTEST_PARTICIPANT_DISCORD_ROLE_ID=CONTEST_PARTICIPANT_DISCORD_ROLE_ID
- BLOCKCHAIN_INFO_API_URL=http://localhost:19527/blockchain_info/
networks:
- litentry-test-network
healthcheck:
Expand Down
2 changes: 1 addition & 1 deletion bitacross-worker/docker/litentry/rococo-dev-2106.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"polkadotXcm": {
"safeXcmVersion": 3
},
"tokens": {
"assets": {
"balances": []
},
"identityManagement": {
Expand Down
54 changes: 0 additions & 54 deletions bitacross-worker/docker/multiworker-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,33 +118,6 @@ services:
- "${SGX_QCNL:-/dev/null}:/etc/sgx_default_qcnl.conf"
environment:
- RUST_LOG=info,litentry_worker=debug,ws=warn,sp_io=error,substrate_api_client=warn,itc_parentchain_light_client=info,jsonrpsee_ws_client=warn,jsonrpsee_ws_server=warn,enclave_runtime=debug,ita_stf=debug,its_rpc_handler=warn,itc_rpc_client=warn,its_consensus_common=debug,its_state=warn,its_consensus_aura=warn,aura*=warn,its_consensus_slots=warn,itp_attestation_handler=debug,http_req=debug,lc_mock_server=warn,itc_rest_client=debug,lc_credentials=debug,lc_identity_verification=debug,lc_stf_task_receiver=debug,lc_stf_task_sender=debug,lc_data_providers=debug,itp_top_pool=debug,itc_parentchain_indirect_calls_executor=debug,
- TWITTER_OFFICIAL_URL=http://localhost:19527
- TWITTER_AUTH_TOKEN_V2=
- DISCORD_OFFICIAL_URL=http://localhost:19527
- LITENTRY_DISCORD_MICROSERVICE_URL=http://localhost:19527
- DISCORD_AUTH_TOKEN=
- ACHAINABLE_URL=http://localhost:19527
- ACHAINABLE_AUTH_KEY=
- CREDENTIAL_ENDPOINT=http://localhost:9933
- ONEBLOCK_NOTION_KEY=
- ONEBLOCK_NOTION_URL=http://localhost:19527
- SORA_QUIZ_MASTER_ID=SORA_QUIZ_MASTER_ID
- SORA_QUIZ_ATTENDEE_ID=SORA_QUIZ_ATTENDEE_ID
- MORALIS_API_URL=http://localhost:19527/moralis/
- MORALIS_SOLANA_API_URL=http://localhost:19527/moralis_solana/
- KARAT_DAO_API_URL=http://localhost:19527/karat_dao/
- MAGIC_CRAFT_API_URL=http://localhost:19527/magic_craft/
- MAGIC_CRAFT_API_KEY=
- DAREN_MARKET_API_URL=http://localhost:19527/daren_market/
- MORALIS_API_KEY=
- NODEREAL_API_KEY=NODEREAL_API_KEY
- NODEREAL_API_URL=http://localhost:19527
- NODEREAL_API_CHAIN_NETWORK_URL=http://localhost:19527/nodereal_jsonrpc/
- GENIIDATA_URL=http://localhost:19527
- CONTEST_LEGEND_DISCORD_ROLE_ID=CONTEST_LEGEND_DISCORD_ROLE_ID
- CONTEST_POPULARITY_DISCORD_ROLE_ID=CONTEST_POPULARITY_DISCORD_ROLE_ID
- CONTEST_PARTICIPANT_DISCORD_ROLE_ID=CONTEST_PARTICIPANT_DISCORD_ROLE_ID
- BLOCKCHAIN_INFO_API_URL=http://localhost:19527/blockchain_info/
networks:
- litentry-test-network
healthcheck:
Expand Down Expand Up @@ -177,33 +150,6 @@ services:
- "${SGX_QCNL:-/dev/null}:/etc/sgx_default_qcnl.conf"
environment:
- RUST_LOG=info,litentry_worker=debug,ws=warn,sp_io=error,substrate_api_client=warn,itc_parentchain_light_client=info,jsonrpsee_ws_client=warn,jsonrpsee_ws_server=warn,enclave_runtime=debug,ita_stf=debug,its_rpc_handler=warn,itc_rpc_client=warn,its_consensus_common=debug,its_state=warn,its_consensus_aura=warn,aura*=warn,its_consensus_slots=warn,itp_attestation_handler=debug,http_req=debug,lc_mock_server=warn,itc_rest_client=debug,lc_credentials=debug,lc_identity_verification=debug,lc_stf_task_receiver=debug,lc_stf_task_sender=debug,lc_data_providers=debug,itp_top_pool=debug,itc_parentchain_indirect_calls_executor=debug,
- TWITTER_OFFICIAL_URL=http://localhost:19527
- TWITTER_AUTH_TOKEN_V2=
- DISCORD_OFFICIAL_URL=http://localhost:19527
- LITENTRY_DISCORD_MICROSERVICE_URL=http://localhost:19527
- DISCORD_AUTH_TOKEN=
- ACHAINABLE_URL=http://localhost:19527
- ACHAINABLE_AUTH_KEY=
- CREDENTIAL_ENDPOINT=http://localhost:9933
- ONEBLOCK_NOTION_KEY=
- ONEBLOCK_NOTION_URL=http://localhost:19527
- SORA_QUIZ_MASTER_ID=SORA_QUIZ_MASTER_ID
- SORA_QUIZ_ATTENDEE_ID=SORA_QUIZ_ATTENDEE_ID
- MORALIS_API_URL=http://localhost:19527/moralis/
- MORALIS_SOLANA_API_URL=http://localhost:19527/moralis_solana/
- KARAT_DAO_API_URL=http://localhost:19527/karat_dao/
- MAGIC_CRAFT_API_URL=http://localhost:19527/magic_craft/
- MAGIC_CRAFT_API_KEY=
- DAREN_MARKET_API_URL=http://localhost:19527/daren_market/
- MORALIS_API_KEY=
- NODEREAL_API_KEY=NODEREAL_API_KEY
- NODEREAL_API_URL=http://localhost:19527
- NODEREAL_API_CHAIN_NETWORK_URL=http://localhost:19527/nodereal_jsonrpc/
- GENIIDATA_URL=http://localhost:19527
- CONTEST_LEGEND_DISCORD_ROLE_ID=CONTEST_LEGEND_DISCORD_ROLE_ID
- CONTEST_POPULARITY_DISCORD_ROLE_ID=CONTEST_POPULARITY_DISCORD_ROLE_ID
- CONTEST_PARTICIPANT_DISCORD_ROLE_ID=CONTEST_PARTICIPANT_DISCORD_ROLE_ID
- BLOCKCHAIN_INFO_API_URL=http://localhost:19527/blockchain_info/
networks:
- litentry-test-network
healthcheck:
Expand Down
10 changes: 0 additions & 10 deletions bitacross-worker/scripts/litentry/release/config.json.eg

This file was deleted.

2 changes: 1 addition & 1 deletion node/src/chain_specs/litentry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ fn generate_genesis(
parachain_system: Default::default(),
polkadot_xcm: PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION) },
transaction_payment: Default::default(),
tokens: Default::default(),
assets: Default::default(),
teebag: TeebagConfig {
allow_sgx_debug_mode: true,
admin: None,
Expand Down
2 changes: 1 addition & 1 deletion node/src/chain_specs/litmus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ fn generate_genesis(
parachain_system: Default::default(),
polkadot_xcm: PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION) },
transaction_payment: Default::default(),
tokens: Default::default(),
assets: Default::default(),
teebag: TeebagConfig {
allow_sgx_debug_mode: true,
admin: None,
Expand Down
2 changes: 1 addition & 1 deletion node/src/chain_specs/rococo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ fn generate_genesis(
polkadot_xcm: PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION) },
vc_management: VCManagementConfig { admin: Some(root_key.clone()) },
transaction_payment: Default::default(),
tokens: Default::default(),
assets: Default::default(),
ethereum: Default::default(),
evm: Default::default(),
teebag: TeebagConfig {
Expand Down
2 changes: 1 addition & 1 deletion node/src/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Litentry. If not, see <https://www.gnu.org/licenses/>.

///! EVM tracing RPC support.
//! EVM tracing RPC support.
use crate::evm_tracing_types::{EthApi as EthApiCmd, EvmTracingConfig};

use fc_rpc::OverrideHandle;
Expand Down
2 changes: 1 addition & 1 deletion pallets/bridge-transfer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub mod pallet {

type ResourceId = bridge::ResourceId;

type BalanceOf<T> = <<T as bridge::Config>::Currency as Currency<
pub type BalanceOf<T> = <<T as bridge::Config>::Currency as Currency<
<T as frame_system::Config>::AccountId,
>>::Balance;

Expand Down
5 changes: 2 additions & 3 deletions pallets/bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ pub mod pallet {
pallet_prelude::*,
{self as system},
};
use parity_scale_codec::{Decode, Encode, EncodeLike};
use scale_info::TypeInfo;
use parity_scale_codec::EncodeLike;
use sp_runtime::{
traits::{AccountIdConversion, Dispatchable},
RuntimeDebug, SaturatedConversion,
SaturatedConversion,
};
use sp_std::prelude::*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,49 +1,54 @@
[package]
name = "pallet-evm-precompile-assets-erc20"
authors = ["Trust Computing GmbH <[email protected]>"]
edition = '2021'
name = 'precompile-utils'
version = '0.1.0'

[dependencies]
assert_matches = { workspace = true }
impl-trait-for-tuples = { workspace = true }
log = { workspace = true }
num_enum = { workspace = true }
parity-scale-codec = { workspace = true }
sha3 = { workspace = true }
similar-asserts = { workspace = true, optional = true }
slices = { workspace = true }

precompile-utils-macro = { path = "macro" }
precompile-utils = { workspace = true }

fp-evm = { workspace = true }
# Substrate
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-evm = { workspace = true }
pallet-assets = { workspace = true }
pallet-balances = { workspace = true }
parity-scale-codec = { workspace = true, features = ["max-encoded-len"] }
sp-core = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }
xcm = { workspace = true }

# There's a problem with --all-features when this is moved under dev-deps
evm = { git = "https://github.com/rust-blockchain/evm", rev = "b7b82c7e1fc57b7449d6dfa6826600de37cc1e65", default-features = false, optional = true }
# Frontier
fp-evm = { workspace = true }
pallet-evm = { workspace = true }

[dev-dependencies]
hex-literal = { workspace = true }
derive_more = { workspace = true }
serde = { workspace = true }
sha3 = { workspace = true }
scale-info = { workspace = true }

precompile-utils = { workspace = true, features = ["testing"] }
pallet-timestamp = { workspace = true, features = ["std"] }

[features]
default = ["std"]
std = [
"evm/std",
"parity-scale-codec/std",
"fp-evm/std",
"frame-support/std",
"frame-system/std",
"pallet-assets/std",
"pallet-evm/std",
"pallet-balances/std",
"precompile-utils/std",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
"xcm/std",
]
testing = ["similar-asserts", "std"]
runtime-benchmarks = []
Loading

0 comments on commit c09ac48

Please sign in to comment.