CertiK reviewed BOSagora (BOSagora - CL) on 9 Jun 2024: 7 findings, 0 critical; 2 marked fixed, 5 open.
Report hosted on skynet.certik.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 0 | 0 | 0 |
| Medium | 0 | 0 | 1 |
| Low | 5 | 0 | 1 |
Repository: - agora-cl Commit hash: - [`87ad355e94635ccf7fe4b2fb1cf5e308fcd9e5d5`](https://github.com/bosagora/agora-cl/tree/87ad355e94635ccf7fe4b2fb1cf5e308fcd9e5d5) Files: - agora-cl/WORKSPACE The WORKSPACE file specifies the external libraries, tools, and packages that the project depends on. It uses Bazel's repository rules to fetch and integrate these dependencies into the project's build environment. However, the dependency `com_grail_bazel_toolchain`'s repo `https://github.com/grailbio/bazel-toolchain` has been changed to `https://github.com/bazel-contrib/toolchains_llvm`, which would bring the error while building the project.
Repository: - agora-cl In the Prysm codebase, several issues were identified and resolved following the release of version 4.0.5. However, these fixes have not been implemented in the agora-cl codebase. While these issues may not be critical, addressing them would enhance the project's resilience and overall robustness. ### Consensus-Related Issues - [*Fix sandwich attack on honest reorgs #12418*](https://github.com/prysmaticlabs/prysm/pull/12418) - [*fixed erroneous panic #12450*](https://github.com/prysmaticlabs/prysm/pull/12450) ### Sync-Related Issues - [*Checkpoint sync: get block using state.latest_block_header.slot #12447*](https://github.com/prysmaticlabs/prysm/pull/12447) - [*fix: late block task wait for initial sync #12526*](https://github.com/prysmaticlabs/prysm/pull/12526) - [*fix: prune invalid blocks during initial sync #12591*](https://github.com/prysmaticlabs/prysm/pull/12591) - [*Use last optimistic status on batches #12741*](https://github.com/prysmaticlabs/prysm/pull/12741) - [*set optimistic status in head at init sync #12748*](https://github.com/prysmaticlabs/prysm/pull/12748) - [*Check block exists in pending queue before requesting from peer #13013*](https://github.com/prysmaticlabs/prysm/pull/13013) - [*Fix Pending Queue Expiration Bug #13104*](https://github.com/prysmaticlabs/prysm/pull/13104) - [*Ignore Pubsub Messages Hitting Context Deadlines #13716*](https://github.com/prysmaticlabs/prysm/pull/13716) ### State-Related Issues - [*Handle Epoch Boundary Misses #12579*](https://github.com/prysmaticlabs/prysm/pull/12579) - [*fix: set current and prev epoch participations for interop genesis #12814*](https://github.com/prysmaticlabs/prysm/pull/12814) - [*blockchain: Check nilness before accessing head in IsOptimistic #13439*](https://github.com/prysmaticlabs/prysm/pull/13439) ### Cache-Related Issues - [*fix: update committee cache epoch + 1 #12667*](https://github.com/prysmaticlabs/prysm/pull/12667) - [*Fix Update Of Committee Cache #12668*](https://github.com/prysmaticlabs/prysm/pull/12668) - [*Fix: use correct context for UpdateCommitteeCache #12691*](https://github.com/prysmaticlabs/prysm/pull/12691) - [*Don't prune proposer ID cache in a loop #12996*](https://github.com/prysmaticlabs/prysm/pull/12996) - [*Fix minor issue in blsToExecChange message validator #13498*](https://github.com/prysmaticlabs/prysm/pull/13498) ### P2P-Related Issues - [*Fix the bug that return 500 in /eth/v1/node/peers interface #12483*](https://github.com/prysmaticlabs/prysm/pull/12483) - [*Fix minor issue in blsToExecChange message validator #13498*](https://github.com/prysmaticlabs/prysm/pull/13498) ### RPC/API-Related Issues - [*Fix Epoch Participation Parsing #12534*](https://github.com/prysmaticlabs/prysm/pull/12534) - [*Fix Uint256 Json Parsing #12540*](https://github.com/prysmaticlabs/prysm/pull/12540) - [*Fix: Size of SyncCommitteeBits should be 64 bytes (512 bits) instead of 512 bytes #12586*](https://github.com/prysmaticlabs/prysm/pull/12586) - [*Return historical roots in Capella state #12642*](https://github.com/prysmaticlabs/prysm/pull/12642) - [*Fix Pagination Panic #12932*](https://github.com/prysmaticlabs/prysm/pull/12932) - [*Handle hex in Blocker, Stater and optimistic mode checker #12979*](https://github.com/prysmaticlabs/prysm/pull/12979) - [*Enhance Validation for Block by Root RPC Requests #13184*](https://github.com/prysmaticlabs/prysm/pull/13184) ### Config-Related Issues - [*Add missing config yamls for domains #12442*](https://github.com/prysmaticlabs/prysm/pull/12442) - [*Increase validator client startup proposer settings deadline #12533*](https://github.com/prysmaticlabs/prysm/pull/12533) ### Log-Related Issues - [*log the right blocknumber #12529*](https://github.com/prysmaticlabs/prysm/pull/12529) - [*Correct log level for 'Could not send a chunked response' #12562*](https://github.com/prysmaticlabs/prysm/pull/12562) ### Others - [*Release Lock Before Panicking #12464*](https://github.com/prysmaticlabs/prysm/pull/12464) - [*Reopenning fix for keystore field name change to align with EIP2335 #12530*](https://github.com/prysmaticlabs/prysm/pull/12530) - [*Ensure File Does Not Exist #12536*](https://github.com/prysmaticlabs/prysm/pull/12536) - [*Fix prysmctl writing empty JSON/YAML files #12599*](https://github.com/prysmaticlabs/prysm/pull/12599) - [*Fix Withdrawals Marshalling #13066*](https://github.com/prysmaticlabs/prysm/pull/13066) - [*fix segmentation fork when Capella for epoch is MaxUint64 #13126*](https://github.com/prysmaticlabs/prysm/pull/13126) - [*Fix port logging in bootnode #13457*](https://github.com/prysmaticlabs/prysm/pull/13457)
Repository: - agora-cl Commit hash: - [`87ad355e94635ccf7fe4b2fb1cf5e308fcd9e5d5`](https://github.com/bosagora/agora-cl/tree/87ad355e94635ccf7fe4b2fb1cf5e308fcd9e5d5) Files: - agora-cl/go.mod - agora-cl/cmd/prysmctl/testnet/generate_genesis.go In agora-cl, the agora-el is supposed to be the dependency package. However, the project is importing **github.com/ethereum/go-ethereum v1.11.3** instead of the agora-el, which will not maintain the agora-specific features which will bring inconsistent issues. Take `generate-genesis` functionality as an example, when using functionality like `generate-genesis`, the following fields will be ignored in the generated gensesis.json: ```json "bosagoraBlock": ..., "bosagora": { "commonsBudget": "0x", "commonsBudgetReward": ..., "lastCommonsBudgetRewardBlock": ... }, ```
Repository: - agora-cl Commit hash: - [`87ad355e94635ccf7fe4b2fb1cf5e308fcd9e5d5`](https://github.com/bosagora/agora-cl/tree/87ad355e94635ccf7fe4b2fb1cf5e308fcd9e5d5) Files: - agora-cl/beacon-chain/core/altair/block.go - agora-cl/agora/block_rewards.go The function `ValidatorRewardPerEpoch` calculates the validator's reward based on its `effectiveBalance` relative to the `totalBalance` within a specific epoch. The calculation follows this formula: > ValidatorRewardPerEpoch = effectiveBalance * allocatedValidatorRewardsPerEpoch / totalBalance **agora-cl/agora/block_rewards.go** ```go=50 func ValidatorRewardPerEpoch(secondsSinceGenesis uint64, totalBalance uint64, effectiveBalance uint64, cfg RewardConfig) (uint64, error) { if totalBalance <= 0 { return 0, errors.New("active balance can't be 0") } allocatedValidatorRewardsPerEpoch := new(big.Int).SetUint64(AllocatedValidatorRewardsPerEpoch(secondsSinceGenesis, cfg)) increments := new(big.Int).SetUint64(effectiveBalance / cfg.EffectiveBalanceIncrement) bigTotalBalance := new(big.Int).SetUint64(totalBalance) bigEffectiveBalance := new(big.Int).SetUint64(cfg.EffectiveBalanceIncrement) bigEffectiveBalance.Mul(bigEffectiveBalance, increments) bigEffectiveBalance.Mul(bigEffectiveBalance, allocatedValidatorRewardsPerEpoch) bigEffectiveBalance.Div(bigEffectiveBalance, bigTotalBalance) return bigEffectiveBalance.Uint64(), nil } ``` The function is invoked in processes such as attestation and epoch precompute. However, in the `SyncRewards` function, replacing the constant `EffectiveBalance` with `EffectiveBalanceIncrement` is not suitable for calculating the base rewards per increment. **agora-cl/beacon-chain/core/altair/block.go** ```go=157 func SyncRewards(secondsSinceGenesis uint64, activeBalance uint64) (proposerReward, participantReward uint64, err error) { cfg := params.BeaconConfig() totalActiveIncrements := activeBalance / cfg.EffectiveBalanceIncrement agoraConfig := agora.MakeAgoraRewardConfig(cfg) baseRewardPerInc, err := agora.ValidatorRewardPerEpoch(secondsSinceGenesis, activeBalance, cfg.EffectiveBalanceIncrement, agoraConfig) if (err != nil) { return 0, 0, err } totalBaseRewards := baseRewardPerInc * totalActiveIncrements ... } ``` To compute `totalBaseRewards` efficiently, it is advisable to utilize the `AllocatedValidatorRewardsPerEpoch` function from the `block_rewards.go` file, avoiding complex and unnecessary computations.
Repository: - agora-cl Commit hash: - [`87ad355e94635ccf7fe4b2fb1cf5e308fcd9e5d5`](https://github.com/bosagora/agora-cl/tree/87ad355e94635ccf7fe4b2fb1cf5e308fcd9e5d5) Files: - agora-cl/deps.bzl - agora-cl/go.mod - agora-cl/go.sum The go crypto library has released a security update to fix a vulnerability identified as CVE-2023-48795. This vulnerability affects the SSH (Secure Shell) protocol. The version of the libp2p library being used falls within the range of versions affected by CVE-2023-39533 and CVE-2023-40583. It is highly recommended to upgrade the dependency to a patched version of the library, which will help mitigate the security risks associated with these vulnerabilities. References: - [*Update Our Golang Crypto Library #13415*](https://github.com/prysmaticlabs/prysm/pull/13415) - [*libp2p-CVE-2023-39533*](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-39533) - [*libp2p-CVE-2023-40583*](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-40583)
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (29)
1,045 projects reviewed · 1,376 reports · latest May 2025
See CertiK’s auditsSomething wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.
Tell us