GithubHelp home page GithubHelp logo

Comments (2)

cmjc avatar cmjc commented on July 20, 2024

Originally raised in autonity repo - transferred here per comment by @Jason-Zhangxin-Chen , see closed issue autonity/autonity#954

Hi @cmjc, from your context, rule NO. 10 is not defined in the rule set:

    // Must match autonity/types.go
    enum Rule {
        PN,
        PO,
        PVN,
        PVO,
        PVO12,
        C,
        C1,

        InvalidProposal, // The value proposed by proposer cannot pass the blockchain's validation.
        InvalidProposer, // A proposal sent from none proposer nodes of the committee.
        Equivocation    // Multiple distinguish votes(proposal, prevote, precommit) sent by validator.
    }

    // @dev return true if sending the event can lead to slashing
    function canSlash(address _offender, Rule _rule, uint256 _block) public view returns (bool) {
        uint256 _severity = _ruleSeverity(_rule);
        uint256 _epoch = autonity.getEpochFromBlock(_block);

        return slashingHistory[_offender][_epoch] < _severity ;
    }

As the typing system limits the input of _rule should be a type of Rule, from inside the canSlash funtion we cannot capture such error. Thus from AUT tool side, we can do some check on it. This issue so move to Aut tool.

from aut.

aiman avatar aiman commented on July 20, 2024

@cmjc I'm not satisfied that this is an autcli issue and so I'm reopening the original ticket.

from aut.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.