From 84ac5757f82fd095e5b68123680b62850ab9198d Mon Sep 17 00:00:00 2001 From: austinabell Date: Fri, 3 Jan 2020 07:16:01 +1300 Subject: [PATCH 1/6] update libp2p version --- blockchain/chain_sync/Cargo.toml | 2 +- node/Cargo.toml | 4 +--- node/ferret-libp2p/Cargo.toml | 4 +--- node/ferret-libp2p/src/behaviour.rs | 2 +- node/network/Cargo.toml | 4 +--- 5 files changed, 5 insertions(+), 11 deletions(-) diff --git a/blockchain/chain_sync/Cargo.toml b/blockchain/chain_sync/Cargo.toml index a4b0bed46d33..5e1edc421a0a 100644 --- a/blockchain/chain_sync/Cargo.toml +++ b/blockchain/chain_sync/Cargo.toml @@ -6,4 +6,4 @@ edition = "2018" [dependencies] blocks = {path = "../blocks"} -libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" } +libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" } diff --git a/node/Cargo.toml b/node/Cargo.toml index 9abdfd8a456e..91b7dd998a52 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -4,14 +4,12 @@ version = "0.1.0" authors = ["ChainSafe Systems "] edition = "2018" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] network = { path = "network" } ferret-libp2p = { path = "ferret-libp2p"} utils = { path = "utils" } -libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" } +libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" } tokio = "0.1.22" futures = "0.1.29" clap = "2.33.0" diff --git a/node/ferret-libp2p/Cargo.toml b/node/ferret-libp2p/Cargo.toml index 1bfa77c563cf..4e98f9e40f76 100644 --- a/node/ferret-libp2p/Cargo.toml +++ b/node/ferret-libp2p/Cargo.toml @@ -4,10 +4,8 @@ version = "0.1.0" authors = ["ChainSafe Systems "] edition = "2018" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] -libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" } +libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" } utils = { path = "../utils" } tokio = "0.1.22" futures = "0.1.29" diff --git a/node/ferret-libp2p/src/behaviour.rs b/node/ferret-libp2p/src/behaviour.rs index c253268b6772..20fd0e03d73a 100644 --- a/node/ferret-libp2p/src/behaviour.rs +++ b/node/ferret-libp2p/src/behaviour.rs @@ -61,7 +61,7 @@ impl NetworkBehaviourEventProcess { fn inject_event(&mut self, message: GossipsubEvent) { - if let GossipsubEvent::Message(_, message) = message { + if let GossipsubEvent::Message(_, _, message) = message { self.events.push(MyBehaviourEvent::GossipMessage { source: message.source, topics: message.topics, diff --git a/node/network/Cargo.toml b/node/network/Cargo.toml index 57e2ebf9140d..68766b5ef13e 100644 --- a/node/network/Cargo.toml +++ b/node/network/Cargo.toml @@ -4,12 +4,10 @@ version = "0.1.0" authors = ["ChainSafe Systems "] edition = "2018" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] ferret-libp2p = { path = "../ferret-libp2p" } futures = "0.1.29" tokio = "0.1.22" -libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" } +libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" } log = "0.4.8" slog = "2.5.2" \ No newline at end of file From 71a465ba3cd457ccc460dad0935e95165d680d67 Mon Sep 17 00:00:00 2001 From: austinabell Date: Fri, 3 Jan 2020 15:52:59 +1300 Subject: [PATCH 2/6] try adding workaround to CI --- .github/workflows/ci-rust.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci-rust.yml b/.github/workflows/ci-rust.yml index 94f15783d4cd..8e7878d0b762 100644 --- a/.github/workflows/ci-rust.yml +++ b/.github/workflows/ci-rust.yml @@ -22,6 +22,13 @@ jobs: toolchain: stable override: true + # TODO: Remove once libp2p fork fixed + - name: Update protobuf version + uses: actions-rs/cargo@v1 + with: + command: update + args: -p protobuf --precise 2.8.1 + - name: Cargo test uses: actions-rs/cargo@v1 with: @@ -77,6 +84,13 @@ jobs: override: true - run: rustup component add clippy + # TODO: Remove once libp2p fork fixed + - name: Update protobuf version + uses: actions-rs/cargo@v1 + with: + command: update + args: -p protobuf --precise 2.8.1 + - name: Run cargo clippy uses: actions-rs/cargo@v1 with: From a26f095c24669cb58ab3c4bcccfa48946b89d66b Mon Sep 17 00:00:00 2001 From: austinabell Date: Fri, 3 Jan 2020 16:01:13 +1300 Subject: [PATCH 3/6] newlines for consistency lol --- node/ferret-libp2p/Cargo.toml | 2 +- node/network/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/node/ferret-libp2p/Cargo.toml b/node/ferret-libp2p/Cargo.toml index 4e98f9e40f76..11dde8d91d58 100644 --- a/node/ferret-libp2p/Cargo.toml +++ b/node/ferret-libp2p/Cargo.toml @@ -12,4 +12,4 @@ futures = "0.1.29" log = "0.4.8" slog = "2.5.2" serde = "1.0" -serde_derive = "1.0" \ No newline at end of file +serde_derive = "1.0" diff --git a/node/network/Cargo.toml b/node/network/Cargo.toml index 68766b5ef13e..9997b7c0e9c8 100644 --- a/node/network/Cargo.toml +++ b/node/network/Cargo.toml @@ -10,4 +10,4 @@ futures = "0.1.29" tokio = "0.1.22" libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" } log = "0.4.8" -slog = "2.5.2" \ No newline at end of file +slog = "2.5.2" From 36c17320fa5a0cf7b65e630403ecd929178dc0d0 Mon Sep 17 00:00:00 2001 From: austinabell Date: Fri, 3 Jan 2020 16:09:47 +1300 Subject: [PATCH 4/6] update publish syntax --- .github/workflows/ci-rust.yml | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci-rust.yml b/.github/workflows/ci-rust.yml index 8e7878d0b762..d3ca5785a689 100644 --- a/.github/workflows/ci-rust.yml +++ b/.github/workflows/ci-rust.yml @@ -63,7 +63,7 @@ jobs: with: path: ~/.cargo/registry key: ${{ runner.os }}-cargo-registry-v0-${{ github.sha }} - restore-keys: ${{ runner.os }}-cargo-registry-v0- + restore-keys: ${{ runner.os }}-cargo-registry-v0- - name: Cache cargo index uses: actions/cache@v1 with: @@ -98,20 +98,20 @@ jobs: args: -- -D warnings publish_docs: - name: Publish Documentation - needs: [clippy, test] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Install Rust - run: rustup update beta && rustup default beta - - name: Build documentation - run: cargo doc --no-deps --all-features - - name: Publish documentation - run: | - cd target/doc - git init - git add . - git -c user.name='ci' -c user.email='ci' commit -m 'Deploy documentation' - git push -f -q https://git:${{ secrets.github_token }}@github.com/${{ github.repository }} HEAD:gh-pages - if: github.event_name == 'push' && github.event.ref == 'refs/heads/master' + if: github.event_name == 'push' && github.event.ref == 'refs/heads/master' + name: Publish Documentation + needs: [clippy, test] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Install Rust + run: rustup update beta && rustup default beta + - name: Build documentation + run: cargo doc --no-deps --all-features + - name: Publish documentation + run: | + cd target/doc + git init + git add . + git -c user.name='ci' -c user.email='ci' commit -m 'Deploy documentation' + git push -f -q https://git:${{ secrets.github_token }}@github.com/${{ github.repository }} HEAD:gh-pages From 8592abae5180cc836116e334308b94ae4907b864 Mon Sep 17 00:00:00 2001 From: austinabell Date: Fri, 3 Jan 2020 16:14:15 +1300 Subject: [PATCH 5/6] Add version workaround for docs as well --- .github/workflows/ci-rust.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci-rust.yml b/.github/workflows/ci-rust.yml index d3ca5785a689..70caefe0de53 100644 --- a/.github/workflows/ci-rust.yml +++ b/.github/workflows/ci-rust.yml @@ -106,6 +106,14 @@ jobs: - uses: actions/checkout@master - name: Install Rust run: rustup update beta && rustup default beta + + # TODO: Remove once libp2p fork fixed + - name: Update protobuf version + uses: actions-rs/cargo@v1 + with: + command: update + args: -p protobuf --precise 2.8.1 + - name: Build documentation run: cargo doc --no-deps --all-features - name: Publish documentation From ec1a7bec5c0d3a79cbc0b3bc5b2f2aefcfd75dc2 Mon Sep 17 00:00:00 2001 From: austinabell Date: Sun, 5 Jan 2020 17:48:11 +1300 Subject: [PATCH 6/6] Update libp2p version to not have to use workaround --- .github/workflows/ci-rust.yml | 23 ++--------------------- blockchain/chain_sync/Cargo.toml | 2 +- node/Cargo.toml | 2 +- node/ferret-libp2p/Cargo.toml | 2 +- node/network/Cargo.toml | 2 +- 5 files changed, 6 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci-rust.yml b/.github/workflows/ci-rust.yml index 70caefe0de53..00f8f93c168c 100644 --- a/.github/workflows/ci-rust.yml +++ b/.github/workflows/ci-rust.yml @@ -22,13 +22,6 @@ jobs: toolchain: stable override: true - # TODO: Remove once libp2p fork fixed - - name: Update protobuf version - uses: actions-rs/cargo@v1 - with: - command: update - args: -p protobuf --precise 2.8.1 - - name: Cargo test uses: actions-rs/cargo@v1 with: @@ -39,12 +32,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + - name: Toolchain setup uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable override: true + - run: rustup component add rustfmt - name: Run cargo fmt uses: actions-rs/cargo@v1 @@ -84,13 +79,6 @@ jobs: override: true - run: rustup component add clippy - # TODO: Remove once libp2p fork fixed - - name: Update protobuf version - uses: actions-rs/cargo@v1 - with: - command: update - args: -p protobuf --precise 2.8.1 - - name: Run cargo clippy uses: actions-rs/cargo@v1 with: @@ -107,13 +95,6 @@ jobs: - name: Install Rust run: rustup update beta && rustup default beta - # TODO: Remove once libp2p fork fixed - - name: Update protobuf version - uses: actions-rs/cargo@v1 - with: - command: update - args: -p protobuf --precise 2.8.1 - - name: Build documentation run: cargo doc --no-deps --all-features - name: Publish documentation diff --git a/blockchain/chain_sync/Cargo.toml b/blockchain/chain_sync/Cargo.toml index 5e1edc421a0a..a39909d28de8 100644 --- a/blockchain/chain_sync/Cargo.toml +++ b/blockchain/chain_sync/Cargo.toml @@ -6,4 +6,4 @@ edition = "2018" [dependencies] blocks = {path = "../blocks"} -libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" } +libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "776d13ef046358964c7d64cda3295a3a3cb24743" } diff --git a/node/Cargo.toml b/node/Cargo.toml index 91b7dd998a52..075d9f83f44c 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -9,7 +9,7 @@ network = { path = "network" } ferret-libp2p = { path = "ferret-libp2p"} utils = { path = "utils" } -libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" } +libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "776d13ef046358964c7d64cda3295a3a3cb24743" } tokio = "0.1.22" futures = "0.1.29" clap = "2.33.0" diff --git a/node/ferret-libp2p/Cargo.toml b/node/ferret-libp2p/Cargo.toml index 11dde8d91d58..28b6287a6495 100644 --- a/node/ferret-libp2p/Cargo.toml +++ b/node/ferret-libp2p/Cargo.toml @@ -5,7 +5,7 @@ authors = ["ChainSafe Systems "] edition = "2018" [dependencies] -libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" } +libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "776d13ef046358964c7d64cda3295a3a3cb24743" } utils = { path = "../utils" } tokio = "0.1.22" futures = "0.1.29" diff --git a/node/network/Cargo.toml b/node/network/Cargo.toml index 9997b7c0e9c8..c80c486565e3 100644 --- a/node/network/Cargo.toml +++ b/node/network/Cargo.toml @@ -8,6 +8,6 @@ edition = "2018" ferret-libp2p = { path = "../ferret-libp2p" } futures = "0.1.29" tokio = "0.1.22" -libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" } +libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "776d13ef046358964c7d64cda3295a3a3cb24743" } log = "0.4.8" slog = "2.5.2"