filecoin-project / sentinel

Filecoin Network monitoring and analysis tools.
https://lilium.sh
Other
27 stars 14 forks source link

Minor update #225

Open vinhloc30796 opened 1 year ago

vinhloc30796 commented 1 year ago

Add short description to guide how to find mapping between method name to method number

frrist commented 1 year ago

Thanks for getting this started @vinhloc30796 ❤️. You can now rebase this onto master, the changes this was based on have merged.

frrist commented 1 year ago

Here are some ideas for the layout for message number to method name mapping::

Miner Actor

Codes

Version Code
0 bafkqaetgnfwc6mjpon2g64tbm5sw22lomvza
2 bafkqaetgnfwc6mrpon2g64tbm5sw22lomvza
3 bafkqaetgnfwc6mzpon2g64tbm5sw22lomvza
4 bafkqaetgnfwc6nbpon2g64tbm5sw22lomvza
5 bafkqaetgnfwc6njpon2g64tbm5sw22lomvza
6 bafkqaetgnfwc6nrpon2g64tbm5sw22lomvza
7 bafkqaetgnfwc6nzpon2g64tbm5sw22lomvza
8 bafk2bzacea6rabflc7kpwr6y4lzcqsnuahr4zblyq3rhzrrsfceeiw2lufrb4
9 bafk2bzacebz4na3nq4gmumghegtkaofrv4nffiihd7sxntrryfneusqkuqodm

Methods

Method Name Method Number
Constructor 1
ControlAddresses 2
ChangeWorkerAddress 3
ChangePeerID 4
SubmitWindowedPoSt 5
PreCommitSector 6
ProveCommitSector 7
ExtendSectorExpiration 8
TerminateSectors 9
DeclareFaults 10
DeclareFaultsRecovered 11
OnDeferredCronEvent 12
CheckSectorProven 13
ApplyRewards 14
ReportConsensusFault 15
WithdrawBalance 16
ConfirmSectorProofsValid 17
ChangeMultiaddrs 18
CompactPartitions 19
CompactSectorNumbers 20
ConfirmUpdateWorkerKey 21
RepayDebt 22
ChangeOwnerAddress 23
DisputeWindowedPoSt 24
PreCommitSectorBatch 25
ProveCommitAggregate 26
ProveReplicaUpdates 27

Account Actor

Codes

// TODO

Methods

Method Name Method Number
Constructor 1
PubkeyAddress 2

Cron Actor

Codes

// TODO

Methods

Method Name Method Number
Constructor 1
EpochTick 2

Init Actor

Codes

// TODO

Methods

Method Name Method Number
Constructor 1
Exec 2

Market Actor

Codes

// TODO

Methods

Method Name Method Number
Constructor 1
AddBalance 2
WithdrawBalance 3
PublishStorageDeals 4
VerifyDealsForActivation 5
ActivateDeals 6
OnMinerSectorsTerminate 8
CronTick 9

Multisig Actor

Codes

// TODO

Methods

Paych Actor

Codes

// TODO

Methods

Power Actor

Codes

// TODO

Methods

Reward Actor

Codes

// TODO

Methods

System Actor

Codes

// TODO

Methods

Verifreg Actor

Codes

// TODO

Methods

frrist commented 1 year ago

You could put the details from the above on its own page and link to it from the Message section of the page: https://lilium.sh/data/chain/#messages

If you want to automate printing the actor codes here is some prior art: https://github.com/frrist/print-actor-versions/blob/main/main.go (its very incomplete, but gives a general idea of the packages to import and things to call. Feel free to copy and paste the code wherever you need it.)

frrist commented 1 year ago

@vinhloc30796 please don't merge this until conflicts are addressed and a second round of review is had

vinhloc30796 commented 1 year ago

@frrist I couldn't find out a good way to get v8 & v9's code from https://github.com/filecoin-project/go-state-types - but made a best attempt so far. Will send in another PR on your other go script