Merge remote-tracking branch 'origin/main' into transaction-fetcher

This commit is contained in:
Sean Matthew
2023-10-24 19:02:27 -04:00
6 changed files with 7 additions and 53 deletions

View File

@@ -8,12 +8,6 @@ TEST_TIME=${2:-5}
echo Building corpus.
cargo test -p $PACKAGE
# We configure coverage after building a corpus to only include
# fuzz tests in the coverage report.
echo Configuring coverage.
source <(cargo llvm-cov show-env --export-prefix)
cargo llvm-cov clean --workspace
# Gets the list of tests present in the package.
TESTS=$(cargo test-fuzz --list -p $PACKAGE | head -n -3 | tail -n+9 | cat - <(echo \"--list\"]) | cat - | jq -r ".[]")
@@ -23,7 +17,4 @@ do
set -x
cargo test-fuzz --no-ui --exact -p "$PACKAGE" $test -- -V $TEST_TIME
set +x
done;
echo Building coverage report.
cargo llvm-cov report --lcov --output-path lcov.info
done;

View File

@@ -31,8 +31,6 @@ jobs:
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
@@ -42,20 +40,12 @@ jobs:
with:
command: install
args: cargo-test-fuzz cargo-afl
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run fuzz tests
run: |
./.github/scripts/fuzz.sh ${{ matrix.target }}
env:
AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: 1
- name: Upload coverage data to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
flags: fuzz-tests
fuzz-success:
if: always()

View File

@@ -28,8 +28,6 @@ jobs:
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
@@ -47,23 +45,14 @@ jobs:
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run tests
run: |
cargo llvm-cov nextest --lcov --output-path lcov.info \
cargo nextest run \
--locked --all-features --workspace --exclude examples --exclude ef-tests \
--partition hash:${{ matrix.partition }}/${{ strategy.job-total }} \
-E 'kind(test)'
- name: Upload coverage data to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
flags: integration-tests
sync:
name: sync / 100k blocks
# Only run sync tests in merge groups

View File

@@ -25,8 +25,6 @@ jobs:
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

View File

@@ -27,31 +27,20 @@ jobs:
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run tests
run: |
cargo llvm-cov nextest --lcov --output-path lcov.info \
cargo nextest run \
--locked --all-features --workspace --exclude examples --exclude ef-tests \
--partition hash:${{ matrix.partition }}/${{ strategy.job-total }} \
-E 'kind(lib)' -E 'kind(bin)' -E 'kind(proc-macro)'
- name: Upload coverage data to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
flags: unit-tests
eth-blockchain:
name: ethereum / state tests (stable)
runs-on:

View File

@@ -897,13 +897,10 @@ where
/// Returns the bytes of the transaction for the given hash.
async fn raw_transaction(&self, hash: B256) -> RpcResult<Bytes> {
let tx = self.inner.eth_api.transaction_by_hash(hash).await?;
let mut res = Vec::new();
if let Some(tx) = tx.map(TransactionSource::into_recovered) {
tx.encode(&mut res);
}
Ok(res.into())
Ok(tx
.map(TransactionSource::into_recovered)
.map(|tx| tx.envelope_encoded())
.unwrap_or_default())
}
/// Handler for `debug_getRawReceipts`