Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OP: compare with btc-staking contract to see if there is anything we are missing #25

Open
maurolacy opened this issue Jul 31, 2024 · 2 comments

Comments

@maurolacy
Copy link
Collaborator

@bap2pecs cloned issue babylonchain/babylon-contract#209 on 2024-07-09:

  • Config.babylon is the /babylon cw contract, which is irrelevant to us

  • Params.max_active_finality_providers is used for compute total votes in compute_active_finality_providers. we don't need it in the cw contract

  • BTC_HEIGHT - we might need it to map L2 block to BTC height to query FP slashing status

  • Config.denom seems not used anywhere - do we need it?

@maurolacy
Copy link
Collaborator Author

@bap2pecs commented on 2024-07-09:

Config.demon is set in


pub fn instantiate(

    mut deps: DepsMut,

    _env: Env,

    info: MessageInfo,

    msg: InstantiateMsg,

) -> Result<Response<BabylonMsg>, ContractError> {

    nonpayable(&info)?;

    let denom = deps.querier.query_bonded_denom()?;

    let config = Config {

        denom,

        babylon: info.sender,

    };

    CONFIG.save(deps.storage, &config)?;

@SebastianElvis @maurolacy could you help explain what demon is used for in the btc-staking contract? I think it's likely irrelevant to our OP contract but just want to confirm

@maurolacy
Copy link
Collaborator Author

@bap2pecs commented on 2024-07-09:

@SebastianElvis @maurolacy iiuc max_active_finality_providers is needed to save some compute on-chain.

but what if the first max_active_finality_providers number of FPs doesn't have 2/3 votes but if we count the long tail one, there is?

regardless, since we will be calculating the total vp offchain with the help of an indexer we will build ourself, does it imply we don't need it?

cc @parketh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant