
Security News
Scaling Socket from Zero to 10,000+ Organizations
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.
fmg-nitro-adjudicator
Advanced tools
NitroAdjudicator.solConsensusApp.solThe consensus application (or consensus game) is the unique application that runs in Nitro ledger channels. Its purpose is to allow ledger channel participants to safely update how the funds in the ledger channel are distributed, by way of unanimous consensus. Recall that a ledger channel can allocate to other channels as well as the participants themselves.
The consensus application is compatible with Nitro protocol, and therefore specifies some AppAttributes to be included in each commitment as well as a validTransition function which helps the nitro-adjudicator to settle disputes.
The application specific data are organised thus:
enum UpdateType { Consensus, Proposal }
struct AppAttributes {
uint32 numVotes;
uint256[] proposedAllocation;
address[] proposedDestination;
UpdateType updateType;
}
and are in addition to (in fact a branch of) the core commitment data:
struct CommitmentStruct {
address channelType;
uint32 nonce;
address[] participants;
uint8 commitmentType;
uint32 turnNum;
uint32 numVotes;
address[] destination;
uint256[] allocation;
bytes appAttributes;
}
Valid transitions conform to the following diagram:
graph LR
linkStyle default interpolate basis
0.Consensus -->|Pass| 0.Consensus
0.Consensus -->|Propose| 1.Proposal
1.Proposal -->|Add a vote| 1.Proposal
1.Proposal -->|Propose Alternative| 1.Proposal
1.Proposal -->|New Consensus| 0.Consensus
1.Proposal -->|Veto| 0.Consensus
Note that this state machine is transitioned cyclicly by n players.
New Consensus
A1. PreFS; allocation: [5,5]; destination: [0xa,0xb]; proposedAllocation: [5,5]; proposedDestination: [0xa,0xb]; furtherVotesRequired: 0B2. PreFS; allocation: [5,5]; destination: [0xa,0xb]; proposedAllocation: [5,5]; proposedDestination: [0xa,0xb]; furtherVotesRequired: 0A3. PostFS; allocation: [5,5]; destination: [0xa,0xb]; proposedAllocation: [5,5]; proposedDestination: [0xa,0xb]; furtherVotesRequired: 0B4. PostFS; allocation: [5,5]; destination: [0xa,0xb]; proposedAllocation: [5,5]; proposedDestination: [0xa,0xb]; furtherVotesRequired: 0A5. App/Proposal; allocation: [5,5]; destination: [0xa,0xb]; proposedAllocation: [10]; proposedDestination: [0xChannel]; furtherVotesRequired: 1B6. App/Consensus; allocation: [10]; destination: [0xChannel]; proposedAllocation: []; proposedDestination: []; furtherVotesRequired: 0Veto
A1. PreFS; allocation: [5,5]; destination: [0xa,0xb]; proposedAllocation: [5,5]; proposedDestination: [0xa,0xb]; furtherVotesRequired: 0B2. PreFS; allocation: [5,5]; destination: [0xa,0xb]; proposedAllocation: [5,5]; proposedDestination: [0xa,0xb]; furtherVotesRequired: 0A3. PostFS; allocation: [5,5]; destination: [0xa,0xb]; proposedAllocation: [5,5]; proposedDestination: [0xa,0xb]; furtherVotesRequired: 0B4. PostFS; allocation: [5,5]; destination: [0xa,0xb]; proposedAllocation: [5,5]; proposedDestination: [0xa,0xb]; furtherVotesRequired: 0A5. App/Proposal; allocation: [5,5]; destination: [0xa,0xb]; proposedAllocation: [10]; proposedDestination: [0xChannel]; furtherVotesRequired: 1B6. App/Consensus; allocation: [5,5]; destination: [0xa,0xb]; proposedAllocation: []; proposedDestination: []; furtherVotesRequired: 0New Consensus
A1. PreFS; allocation: [5,5,5]; destination: [0xa,0xb,0xc]; proposedAllocation: [5,5,5]; proposedDestination: [0xa,0xb,0xc]; furtherVotesRequired: 0B2. PreFS; allocation: [5,5,5]; destination: [0xa,0xb,0xc]; proposedAllocation: [5,5,5]; proposedDestination: [0xa,0xb,0xc]; furtherVotesRequired: 0C3. PreFS; allocation: [5,5,5]; destination: [0xa,0xb,0xc]; proposedAllocation: [5,5,5]; proposedDestination: [0xa,0xb,0xc]; furtherVotesRequired: 0A4. PostFS; allocation: [5,5,5]; destination: [0xa,0xb,0xc]; proposedAllocation: [5,5,5]; proposedDestination: [0xa,0xb,0xc]; furtherVotesRequired: 0B5. PostFS; allocation: [5,5,5]; destination: [0xa,0xb,0xc]; proposedAllocation: [5,5,5]; proposedDestination: [0xa,0xb,0xc]; furtherVotesRequired: 0C6. PostFS; allocation: [5,5,5]; destination: [0xa,0xb,0xc]; proposedAllocation: [5,5,5]; proposedDestination: [0xa,0xb,0xc]; furtherVotesRequired: 0A7. App/Proposal; allocation: [5,5,5]; destination: [0xa,0xb,0xc]; proposedAllocation: [15]; proposedDestination: [0xChannel]; furtherVotesRequired: 2B8. App/Proposal; allocation: [5,5,5]; destination: [0xa,0xb,0xc]; proposedAllocation: [15]; proposedDestination: [0xChannel]; furtherVotesRequired: 1C9. App/Consensus; allocation: [15]; destination: [0xChannel]; proposedAllocation: []; proposedDestination: []; furtherVotesRequired: 0FAQs
Unknown package
We found that fmg-nitro-adjudicator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.

Research
Socket Threat Research maps a rare inside look at OtterCookie’s npm-Vercel-GitHub chain, adding 197 malicious packages and evidence of North Korean operators.

Research
Socket researchers identified a malicious Chrome extension that manipulates Raydium swaps to inject an undisclosed SOL transfer, quietly routing fees to an attacker wallet.