Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release candidate: 0.10.0 #4047

Closed
wants to merge 53 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
3412528
chore: make platform team code owner of CI settings.toml and localnet…
kylezs Sep 7, 2023
bc78b5c
fix: scale encoding skip phantom data (#3967)
dandanlen Sep 7, 2023
70c79ea
fix: clear failed broadcasters after abort (#3972)
dandanlen Sep 8, 2023
3428541
Test: add/improve handover tests (#3959)
msgmaxim Sep 8, 2023
ee0c33c
fix: submit eip1559 transactions (#3973)
kylezs Sep 8, 2023
cecdb18
feat: backup RPC (#3951)
kylezs Sep 8, 2023
2910f65
chore: Rename EmergencyWithdrawalAddress: LiquidityRefundAddress (#3970)
syan095 Sep 8, 2023
8b21a53
feat: governance-pre-authorised-calls (#3964)
Janislav Sep 11, 2023
3e1bcd5
fix: fund-redeem test (#3982)
kylezs Sep 11, 2023
4f52fbd
test: minor improvements on important epoch boundary test (#3985)
kylezs Sep 12, 2023
bfb4cff
feat: add new archive node service file (#3937)
tomjohnburton Sep 12, 2023
ae25141
Redact endpoint secrets in logs (#3989)
j4m1ef0rd Sep 14, 2023
d488abe
chore: remove unused StartWitnessing and StopWitnessing events (#3995)
kylezs Sep 14, 2023
5704eea
feat: qualify nodes by minimum cfe version (#4003)
dandanlen Sep 14, 2023
be94580
feat: Calculate ccm gas limit (#3935)
syan095 Sep 14, 2023
1a9afbb
Test: extra backup rewards tests (#3993)
msgmaxim Sep 18, 2023
c786a51
feat: [PRO-823] bind-nodes-executor-to-address (#3987)
Janislav Sep 18, 2023
35d03ae
test: authority rotation integration tests (#3909)
syan095 Sep 18, 2023
e6f23d1
Set default pool fee in bouncer to 20 basis points (#4008)
martin-chainflip Sep 19, 2023
e073d5f
chore: re-introduce settings migration for backup rpc (#4017)
kylezs Sep 19, 2023
e897e01
fix: use stderr for cli messages (#4022)
dandanlen Sep 19, 2023
a430524
chore: Update @chainflip-io/cli and ethers package in bouncer (#4014)
niklasnatter Sep 19, 2023
90f3720
Feature: Add dry run CLI and use it in register_account_role (#3992)
syan095 Sep 19, 2023
d3cac69
Prometheus metrics for p2p (#3918)
marcellorigotti Sep 20, 2023
b7d089c
fix: update cfe version record even if Idle (#4002)
msgmaxim Sep 20, 2023
33fafcc
LP API bouncer test (#3806)
j4m1ef0rd Sep 20, 2023
7a0b627
test: improve test coverage for tokenholder governance (#4007)
msgmaxim Sep 20, 2023
ef4746f
chore: unify blockheightprovider mocks (#4030)
kylezs Sep 20, 2023
aa0a377
chore: run settings test affected by env sequentially (#4032)
kylezs Sep 20, 2023
6afcf11
chore: track caller of SC storage api calls (#4031)
kylezs Sep 20, 2023
6e28100
CFE detect incorrect network (#4016)
j4m1ef0rd Sep 21, 2023
608512d
feat: Witnesser dispatch call filter (#4001)
syan095 Sep 21, 2023
2c2d85f
feat: subcribe_price and depth rpc (#3978)
AlastairHolmes Sep 22, 2023
8f6f5ed
refactor: deposit address expiry preparation (#4033)
kylezs Sep 22, 2023
3c58b2f
CFE RPC Client optional genesis hash check for tests (#4041)
j4m1ef0rd Sep 25, 2023
946294f
Prometheus metric ceremony (#4034)
marcellorigotti Sep 25, 2023
32d1f59
feat: speedy scc (PRO-777 PRO-593) (#3986)
AlastairHolmes Sep 25, 2023
4d8577b
doc: amm and pools pallet (#4005)
AlastairHolmes Sep 25, 2023
55a9429
CLI binding executor address (#4042)
j4m1ef0rd Sep 25, 2023
351de4c
fix: log instead of error on try-runtime
dandanlen Sep 27, 2023
d422fb7
feat: runtime upgrade utils fix for no-std
dandanlen Sep 27, 2023
0b2d8c7
Fix: ensure existing p2p connection is removed before reconnecting (#…
msgmaxim Sep 26, 2023
cfaa9b1
refactor: use async closures for SC specific witnessing functionality…
kylezs Sep 26, 2023
32cca61
feat: add initiated_at block number for egresses (#4046)
kylezs Sep 27, 2023
2e449e2
fix: warn -> info (#4060)
AlastairHolmes Sep 29, 2023
f85b615
refactor(custom-rpc): simplify return types (#4059)
acdibble Sep 28, 2023
225db44
Fix: correctly handle peer updates while waiting to reconnect (#4052)
msgmaxim Sep 28, 2023
45bf160
feat: size limit for CCM (#4015)
syan095 Sep 29, 2023
ea1f806
chore: remove unused config items (#4064)
dandanlen Sep 29, 2023
c5a3b26
chore: remove using ngrok from CI (#4074)
tomjohnburton Oct 4, 2023
b908b19
test: check emissions with compounding (#4057)
msgmaxim Oct 4, 2023
ebd381f
chore: runtime storage migrations
dandanlen Sep 26, 2023
6af3af1
chore: version bump 0.9.3->0.10.0, spec version 22
dandanlen Oct 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[env]
CF_ETH_CONTRACT_ABI_ROOT = { value = "eth-contract-abis", relative = true }
CF_ETH_CONTRACT_ABI_TAG = "perseverance-0.9-rc6"
CF_ETH_CONTRACT_ABI_TAG = "v0.8.0"


# Note: If you just want to save typing command commands, you can install tab completions for most shells. Type
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/bouncer/ @martin-chainflip
/state-chain/custom-rpc/ @chainflip-io/web
/engine/config/CI/config/Settings.toml @chainflip-io/platform
/localnet/ @chainflip-io/platform
21 changes: 0 additions & 21 deletions .github/workflows/_40_post_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Setup ngrok
run: |
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null
echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list
sudo apt update
sudo apt install ngrok

- name: Configure NodeJS
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -79,20 +72,6 @@ jobs:
chmod +x ${{ env.BINARIES_LOCATION }}/chainflip-*
./localnet/manage.sh

- name: Expose endpoints for Polkadot and Chainflip
env:
NGROK_AUTHTOKEN: ${{ secrets.CF_NGROK_AUTHTOKEN }}
continue-on-error: true
run: |
ngrok http http://localhost:9944 --log-format=logfmt --log=/tmp/ngrok-chainflip-node.log &
ngrok http http://localhost:9945 --log-format=logfmt --log=/tmp/ngrok-polkadot.log &
sleep 10

- name: Get ngrok URLs
continue-on-error: true
id: ngrok-urls
run: python3 ./ci/scripts/get_ngrok_urls.py

- name: Run EinfachHeuteLeiderNicht.exe
if: inputs.simple_bouncer
working-directory: bouncer
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ localnet/init/polkadot/docker-compose.yml
!localnet/init/keyshare/**/*.log
!localnet/init/data/**/*.log

localnet/init/config/Settings.toml.*.backup

# Local CFE config
engine/config/Local.toml

Expand Down
33 changes: 24 additions & 9 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions api/bin/chainflip-broker-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Chainflip team <https://github.com/chainflip-io>"]
name = "chainflip-broker-api"
version = "0.9.3"
version = "0.10.0"
edition = "2021"

[package.metadata.deb]
Expand All @@ -22,7 +22,6 @@ name = "chainflip-broker-api"
[dependencies]
chainflip-api = { path = "../../lib" }
cf-utilities = { package = "utilities", path = "../../../utilities" }
cf-chains = { path = '../../../state-chain/chains', default-features = false }

anyhow = "1.0.66"
clap = { version = "3.2.23", features = ["derive"] }
Expand Down
63 changes: 2 additions & 61 deletions api/bin/chainflip-broker-api/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use anyhow::anyhow;
use cf_utilities::{
task_scope::{task_scope, Scope},
AnyhowRpcError,
Expand All @@ -11,10 +10,8 @@ use chainflip_api::{
};
use clap::Parser;
use futures::FutureExt;
use hex::FromHexError;
use jsonrpsee::{core::async_trait, proc_macros::rpc, server::ServerBuilder};
use serde::{Deserialize, Serialize};
use sp_rpc::number::NumberOrHex;
use std::path::PathBuf;
use tracing::log;

Expand All @@ -40,39 +37,6 @@ impl From<chainflip_api::SwapDepositAddress> for BrokerSwapDepositAddress {
}
}

#[derive(Serialize, Deserialize)]
pub struct BrokerCcmChannelMetadata {
gas_budget: NumberOrHex,
message: String,
cf_parameters: Option<String>,
}

fn parse_hex_bytes(string: &str) -> Result<Vec<u8>, FromHexError> {
hex::decode(string.strip_prefix("0x").unwrap_or(string))
}

impl TryInto<CcmChannelMetadata> for BrokerCcmChannelMetadata {
type Error = anyhow::Error;

fn try_into(self) -> Result<CcmChannelMetadata, Self::Error> {
let gas_budget = self
.gas_budget
.try_into()
.map_err(|_| anyhow!("Failed to parse {:?} as gas budget", self.gas_budget))?;
let message =
parse_hex_bytes(&self.message).map_err(|e| anyhow!("Failed to parse message: {e}"))?;

let cf_parameters = self
.cf_parameters
.map(|parameters| parse_hex_bytes(&parameters))
.transpose()
.map_err(|e| anyhow!("Failed to parse cf parameters: {e}"))?
.unwrap_or_default();

Ok(CcmChannelMetadata { gas_budget, message, cf_parameters })
}
}

#[rpc(server, client, namespace = "broker")]
pub trait Rpc {
#[method(name = "registerAccount")]
Expand All @@ -85,7 +49,7 @@ pub trait Rpc {
destination_asset: Asset,
destination_address: String,
broker_commission_bps: BasisPoints,
channel_metadata: Option<BrokerCcmChannelMetadata>,
channel_metadata: Option<CcmChannelMetadata>,
) -> Result<BrokerSwapDepositAddress, AnyhowRpcError>;
}

Expand Down Expand Up @@ -122,10 +86,8 @@ impl RpcServer for RpcServerImpl {
destination_asset: Asset,
destination_address: String,
broker_commission_bps: BasisPoints,
channel_metadata: Option<BrokerCcmChannelMetadata>,
channel_metadata: Option<CcmChannelMetadata>,
) -> Result<BrokerSwapDepositAddress, AnyhowRpcError> {
let channel_metadata = channel_metadata.map(TryInto::try_into).transpose()?;

Ok(self
.api
.broker_api()
Expand Down Expand Up @@ -188,24 +150,3 @@ async fn main() -> anyhow::Result<()> {
})
.await
}

#[cfg(test)]
mod test {
use super::*;
use cf_utilities::assert_err;

#[test]
fn test_decoding() {
assert_eq!(parse_hex_bytes("0x00").unwrap(), vec![0]);
assert_eq!(parse_hex_bytes("cf").unwrap(), vec![0xcf]);
assert_eq!(
parse_hex_bytes("0x00112233445566778899aabbccddeeff").unwrap(),
vec![
0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd,
0xee, 0xff
]
);
assert_eq!(parse_hex_bytes("").unwrap(), b"");
assert_err!(parse_hex_bytes("abc"));
}
}
2 changes: 1 addition & 1 deletion api/bin/chainflip-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["Chainflip team <https://github.com/chainflip-io>"]
edition = '2021'
build = 'build.rs'
name = "chainflip-cli"
version = "0.9.3"
version = "0.10.0"

[dependencies]
anyhow = "1.0"
Expand Down
Loading