Bugfix on Core network (step 2)

Bugfix on Core network (step 2)

Dear Core validators,

As a continuation of the Bugfix on Core network (step 1) please create and vote on the second ballot with the following parameters:

 - ballot type:       Modify Proxy Contract Ballot
 - proposed address:  0xECa443E8E1Ab29971a45A9c57a6a9875701698A5
 - contract type:     RewardByBlock
 - ballot end:        set this to 1 week ahead

Contract type RewardByBlock became available for voting on Core after the ballot from step 1 had been approved.

The new ballot would replace existing implementation of RewardByBlock contract with https://blockscout.com/poa/core/address/0xeca443e8e1ab29971a45a9c57a6a9875701698a5/contracts which introduces the actual bugfix as described in the comment Bugfix test on Sokol testnet (step 1)


@varasev would you mind explaining why there is some bridge minting in reward function? I don’t think it’s outlined in the changelog

1 Like

Yes, the RewardByBlock implementation contains a few functions needed by erc-to-native bridge which is only used in xDai network at the moment.

Since we don’t have such a bridge in Core, these functions are not used in RewardByBlock for Core. In the source code https://blockscout.com/poa/core/address/0xeca443e8e1ab29971a45a9c57a6a9875701698a5/contracts you can see that bridgesAllowed getter (lines 248-255) returns zero addresses. It means that addExtraReceiver function cannot be used by anyone, so bridge minting is not possible for Core.

Note that the current RewardByBlock implementation in Core also contains the same functions: https://blockscout.com/poa/core/address/0xce9b9788cc009071dee9ccbc805d0089b3b74cd7/contracts (see the same bridgesAllowed getter on the lines 243-250).

If you compare the current implementation and the new one, you will see that they differ only by these lines:

if (miningKey == address(0)) {
    // Return empty arrays
    return (new address[](0), new uint256[](0));

The ballot is expired. Please, finalize it.

Ballot has been finalized - good to go.

1 Like