Skip to content

Commit

Permalink
Merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
ameba23 committed Dec 18, 2024
2 parents a71521b + 147fdf4 commit 9d2f80d
Show file tree
Hide file tree
Showing 22 changed files with 325 additions and 32 deletions.
25 changes: 13 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@ At the moment this project **does not** adhere to
structure, and the `NodeInfoChanged` event were removed from the Staking Extension pallet. The
`AttestationHandler` config type was added to the Staking Extension pallet. The `KeyProvider` and
`AttestationQueue` config types were removed from the Attestation pallet.
- In [#1128](https://github.com/entropyxyz/entropy-core/pull/1128) mnemonics can no longer be passed
in via a command line argument, file, or environment variable. Instead they are randomly generated
internally.
- In [#1179](https://github.com/entropyxyz/entropy-core/pull/1179) the format of TDX Quote input data has
been changed.
- In [#1147](https://github.com/entropyxyz/entropy-core/pull/1147) a field is added to the
chainspec: `jump_started_signers` which allows the chain to be started in a pre-jumpstarted state
for testing. If this is not desired it should be set to `None`.

### Added
- [#1128](https://github.com/entropyxyz/entropy-core/pull/1128) adds an `/info` route to `entropy-tss`
which can be used to get the TSS account ID and x25519 public key.
- In [#1068](https://github.com/entropyxyz/entropy-core/pull/1068) an extra type `PckCertChainVerifier`
was added to the staking extension pallet's `Config` trait.
- In [#1123](https://github.com/entropyxyz/entropy-core/pull/1123/) the `change_endpoint()` and
Expand All @@ -36,11 +24,24 @@ At the moment this project **does not** adhere to
- In [#1153](https://github.com/entropyxyz/entropy-core/pull/1153/) the program runtime was updated to accept
multiple oracle inputs, this means any programs that were compiled and used need to be recompiled to the new
runtime
- In [#1128](https://github.com/entropyxyz/entropy-core/pull/1128) mnemonics can no longer be passed
in to `entropy-tss` via the `--mnemonic` command line argument, a file, or an environment variable.
Instead they are randomly generated internally and can be retrieved with the `/info` HTTP route.
- In [#1179](https://github.com/entropyxyz/entropy-core/pull/1179) the format of TDX Quote input data has
been changed.
- In [#1147](https://github.com/entropyxyz/entropy-core/pull/1147) a field is added to the
chainspec: `jump_started_signers` which allows the chain to be started in a pre-jumpstarted state
for testing. If this is not desired it should be set to `None`.

### Added
- In [#1128](https://github.com/entropyxyz/entropy-core/pull/1128) an `/info` route was added to `entropy-tss`
which can be used to get the TSS account ID and x25519 public key.
- Protocol message versioning ([#1140](https://github.com/entropyxyz/entropy-core/pull/1140))
- CLI command to get oracle headings ([#1170](https://github.com/entropyxyz/entropy-core/pull/1170))
- Add TSS endpoint to get TDX quote ([#1173](https://github.com/entropyxyz/entropy-core/pull/1173))
- Add TDX test network chainspec ([#1204](https://github.com/entropyxyz/entropy-core/pull/1204))
- Test CLI command to retrieve quote and change endpoint / TSS account in one command ([#1198](https://github.com/entropyxyz/entropy-core/pull/1198))
- On-chain unresponsiveness reporting [(#1215)](https://github.com/entropyxyz/entropy-core/pull/1215)

### Changed
- Use correct key rotation endpoint in OCW ([#1104](https://github.com/entropyxyz/entropy-core/pull/1104))
Expand Down
28 changes: 16 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ serde ={ version="1.0", default-features=false, features=["derive"] }
entropy-shared={ version="0.3.0", path="../shared", default-features=false }
subxt ={ version="0.35.3", default-features=false, features=["jsonrpsee"] }
num ="0.4.3"
thiserror ="2.0.6"
thiserror ="2.0.8"
futures ="0.3"
sp-core ={ version="31.0.0", default-features=false, features=["full_crypto", "serde"] }
tracing ="0.1.41"
Expand Down
Binary file modified crates/client/entropy_metadata.scale
Binary file not shown.
2 changes: 1 addition & 1 deletion crates/kvdb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ edition ='2021'
# Common
rand ={ version="0.8", default-features=false }
serde ={ version="1.0", features=["derive"] }
thiserror="2.0.6"
thiserror="2.0.8"
hex ="0.4.3"

# Substrate
Expand Down
2 changes: 1 addition & 1 deletion crates/protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ x25519-dalek ={ version="2.0.1", features=["static_secrets"] }
futures ="0.3"
hex ="0.4.3"
blake2 ="0.10.4"
thiserror ="2.0.6"
thiserror ="2.0.8"
snow ="0.9.6"
getrandom ={ version="0.2", features=["js"] }
rand_core ={ version="0.6.4", features=["getrandom"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/test-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ edition ='2021'
[dependencies]
entropy-client={ version="0.3.0", path="../client" }
clap ={ version="4.5.23", features=["derive"] }
colored ="2.0.4"
colored ="2.2.0"
subxt ="0.35.3"
sp-core ="31.0.0"
anyhow ="1.0.94"
Expand Down
2 changes: 1 addition & 1 deletion crates/threshold-signature-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ edition ='2021'
# Common
serde ={ version="1.0", default-features=false, features=["derive"] }
serde_json ="1.0"
thiserror ="2.0.6"
thiserror ="2.0.8"
anyhow ="1.0.94"
blake2 ="0.10.4"
x25519-dalek ={ version="2.0.1", features=["static_secrets"] }
Expand Down
2 changes: 2 additions & 0 deletions pallets/attestation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ pallet-staking-reward-curve ={ version="11.0.0" }
tdx-quote ={ version="0.0.1", features=["mock"] }
rand_core ="0.6.4"

pallet-slashing={ version="0.3.0", path="../slashing", default-features=false }

[features]
default=['std']
runtime-benchmarks=['frame-benchmarking', 'tdx-quote/mock', 'pallet-session']
Expand Down
13 changes: 13 additions & 0 deletions pallets/attestation/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ frame_support::construct_runtime!(
Historical: pallet_session_historical,
BagsList: pallet_bags_list,
Parameters: pallet_parameters,
Slashing: pallet_slashing,
}
);

Expand Down Expand Up @@ -342,6 +343,18 @@ impl pallet_parameters::Config for Test {
type WeightInfo = ();
}

parameter_types! {
pub const ReportThreshold: u32 = 5;
}

impl pallet_slashing::Config for Test {
type RuntimeEvent = RuntimeEvent;
type AuthorityId = UintAuthorityId;
type ReportThreshold = ReportThreshold;
type ValidatorSet = Historical;
type ReportUnresponsiveness = ();
}

// Build genesis storage according to the mock runtime.
pub fn new_test_ext() -> sp_io::TestExternalities {
let mut t = system::GenesisConfig::<Test>::default().build_storage().unwrap();
Expand Down
5 changes: 3 additions & 2 deletions pallets/propagation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ sp-staking ={ version="27.0.0", default-features=false }
entropy-shared={ version="0.3.0", path="../../crates/shared", default-features=false, features=[
"wasm-no-std",
] }
pallet-registry={ version="0.3.0", path="../registry", default-features=false }
pallet-attestation={ version="0.3.0", path="../attestation", default-features=false }
pallet-programs={ version="0.3.0", path="../programs", default-features=false }
pallet-registry={ version="0.3.0", path="../registry", default-features=false }
pallet-staking-extension={ version="0.3.0", path="../staking", default-features=false }
pallet-attestation={ version="0.3.0", path="../attestation", default-features=false }

[dev-dependencies]
parking_lot="0.12.3"
Expand All @@ -49,6 +49,7 @@ sp-keystore ={ version="0.35.0" }
sp-npos-elections ={ version="27.0.0", default-features=false }
pallet-parameters ={ version="0.3.0", path="../parameters", default-features=false }
pallet-oracle ={ version='0.3.0', path='../oracle', default-features=false }
pallet-slashing ={ version="0.3.0", path="../slashing", default-features=false }

[features]
default=['std']
Expand Down
13 changes: 13 additions & 0 deletions pallets/propagation/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ frame_support::construct_runtime!(
Parameters: pallet_parameters,
Attestation: pallet_attestation,
Oracle: pallet_oracle,
Slashing: pallet_slashing,
}
);

Expand Down Expand Up @@ -394,6 +395,18 @@ impl pallet_attestation::Config for Test {
type Randomness = TestPastRandomness;
}

parameter_types! {
pub const ReportThreshold: u32 = 5;
}

impl pallet_slashing::Config for Test {
type RuntimeEvent = RuntimeEvent;
type AuthorityId = UintAuthorityId;
type ReportThreshold = ReportThreshold;
type ValidatorSet = Historical;
type ReportUnresponsiveness = ();
}

// Build genesis storage according to the mock runtime.
pub fn new_test_ext() -> sp_io::TestExternalities {
let mut t = system::GenesisConfig::<Test>::default().build_storage().unwrap();
Expand Down
1 change: 1 addition & 0 deletions pallets/registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ sp-io ={ version="31.0.0", default-features=false }
sp-npos-elections ={ version="27.0.0", default-features=false }
sp-staking ={ version="27.0.0", default-features=false }
pallet-oracle ={ version='0.3.0', path='../oracle', default-features=false }
pallet-slashing ={ version="0.3.0", path="../slashing", default-features=false }

[features]

Expand Down
2 changes: 1 addition & 1 deletion pallets/registry/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ benchmarks! {
let network_verifying_key =
synedrion::ecdsa::VerifyingKey::try_from(network_verifying_key.as_slice()).unwrap();

// We substract one from the count since this gets incremented after a succesful registration,
// We subtract one from the count since this gets incremented after a succesful registration,
// and we're interested in the account we just registered.
let count = <Registered<T>>::count() - 1;
let derivation_path =
Expand Down
13 changes: 13 additions & 0 deletions pallets/registry/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ frame_support::construct_runtime!(
Programs: pallet_programs,
Parameters: pallet_parameters,
Oracle: pallet_oracle,
Slashing: pallet_slashing,
}
);

Expand Down Expand Up @@ -380,6 +381,18 @@ impl pallet_parameters::Config for Test {
type WeightInfo = ();
}

parameter_types! {
pub const ReportThreshold: u32 = 5;
}

impl pallet_slashing::Config for Test {
type RuntimeEvent = RuntimeEvent;
type AuthorityId = UintAuthorityId;
type ReportThreshold = ReportThreshold;
type ValidatorSet = Historical;
type ReportUnresponsiveness = ();
}

// Build genesis storage according to the mock runtime.
pub fn new_test_ext() -> sp_io::TestExternalities {
let mut t = system::GenesisConfig::<Test>::default().build_storage().unwrap();
Expand Down
2 changes: 2 additions & 0 deletions pallets/staking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ p256 ={ version="0.13.2", default-features=false, features=["ecdsa"
rand ={ version="0.8.5", default-features=false, features=["alloc"] }

pallet-parameters={ version="0.3.0", path="../parameters", default-features=false }
pallet-slashing={ version="0.3.0", path="../slashing", default-features=false }
entropy-shared={ version="0.3.0", path="../../crates/shared", features=[
"wasm-no-std",
], default-features=false }
Expand Down Expand Up @@ -69,6 +70,7 @@ std=[
'pallet-balances/std',
'pallet-parameters/std',
'pallet-session/std',
'pallet-slashing/std',
'pallet-staking/std',
'scale-info/std',
'sp-consensus-babe/std',
Expand Down
Loading

0 comments on commit 9d2f80d

Please sign in to comment.