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

feat: add cmd to print actor codes and methods in CSV format to stdout #1155

Merged
merged 14 commits into from
Apr 18, 2023

Conversation

kasteph
Copy link
Contributor

@kasteph kasteph commented Mar 13, 2023

Resolves: #1148

This PR

  • introduces one new subcommand, chain actor-methods
  • refactors old subcommand, chain actor-codes
  • both prints to stdout in a CSV format
  • does not add a new Task since this doesn't need to be run per epoch

./lily chain actor-codes

name,family,code
fil/1/account,account,bafkqadlgnfwc6mjpmfrwg33vnz2a
fil/2/account,account,bafkqadlgnfwc6mrpmfrwg33vnz2a
fil/3/account,account,bafkqadlgnfwc6mzpmfrwg33vnz2a
fil/4/account,account,bafkqadlgnfwc6nbpmfrwg33vnz2a
fil/5/account,account,bafkqadlgnfwc6njpmfrwg33vnz2a
fil/6/account,account,bafkqadlgnfwc6nrpmfrwg33vnz2a
fil/7/account,account,bafkqadlgnfwc6nzpmfrwg33vnz2a
fil/8/account,account,bafk2bzacecruossn66xqbeutqx5r4k2kjzgd43frmwd4qkw6haez44ubvvpxo
fil/9/account,account,bafk2bzaceavfgpiw6whqigmskk74z4blm22nwjfnzxb4unlqz2e4wg3c5ujpw
fil/10/account,account,bafk2bzacebhfuz3sv7duvk653544xsxhdn4lsmy7ol7k6gdgancyctvmd7lnq
fil/1/cron,cron,bafkqactgnfwc6mjpmnzg63q
fil/2/cron,cron,bafkqactgnfwc6mrpmnzg63q
fil/3/cron,cron,bafkqactgnfwc6mzpmnzg63q
fil/4/cron,cron,bafkqactgnfwc6nbpmnzg63q
fil/5/cron,cron,bafkqactgnfwc6njpmnzg63q
fil/6/cron,cron,bafkqactgnfwc6nrpmnzg63q
fil/7/cron,cron,bafkqactgnfwc6nzpmnzg63q
fil/8/cron,cron,bafk2bzaceaxlezmclw5ugldhhtfgvn7yztux45scqik3ez4yhwiqhg5ssib44
fil/9/cron,cron,bafk2bzaceb7hxmudhvkizszbmmf2ur2qfnfxfkok3xmbrlifylx6huw4bb3s4
fil/10/cron,cron,bafk2bzacecw2yjb6ysieffa7lk7xd32b3n4ssowvafolt7eq52lp6lk4lkhji
fil/1/init,init,bafkqactgnfwc6mjpnfxgs5a
fil/2/init,init,bafkqactgnfwc6mrpnfxgs5a
fil/3/init,init,bafkqactgnfwc6mzpnfxgs5a
fil/4/init,init,bafkqactgnfwc6nbpnfxgs5a
fil/5/init,init,bafkqactgnfwc6njpnfxgs5a
fil/6/init,init,bafkqactgnfwc6nrpnfxgs5a
fil/7/init,init,bafkqactgnfwc6nzpnfxgs5a
fil/8/init,init,bafk2bzaceadyfilb22bcvzvnpzbg2lyg6npmperyq6es2brvzjdh5rmywc4ry
fil/9/init,init,bafk2bzaceczqxpivlxifdo5ohr2rx5ny4uyvssm6tkf7am357xm47x472yxu2
fil/10/init,init,bafk2bzacedhxbcglnonzruxf2jpczara73eh735wf2kznatx2u4gsuhgqwffq
fil/1/storagemarket,storagemarket,bafkqae3gnfwc6mjpon2g64tbm5sw2ylsnnsxi
fil/2/storagemarket,storagemarket,bafkqae3gnfwc6mrpon2g64tbm5sw2ylsnnsxi
fil/3/storagemarket,storagemarket,bafkqae3gnfwc6mzpon2g64tbm5sw2ylsnnsxi
fil/4/storagemarket,storagemarket,bafkqae3gnfwc6nbpon2g64tbm5sw2ylsnnsxi
fil/5/storagemarket,storagemarket,bafkqae3gnfwc6njpon2g64tbm5sw2ylsnnsxi
fil/6/storagemarket,storagemarket,bafkqae3gnfwc6nrpon2g64tbm5sw2ylsnnsxi
fil/7/storagemarket,storagemarket,bafkqae3gnfwc6nzpon2g64tbm5sw2ylsnnsxi
fil/8/storagemarket,storagemarket,bafk2bzacebotg5coqnglzsdrqxtkqk2eq4krxt6zvds3i3vb2yejgxhexl2n6
fil/9/storagemarket,storagemarket,bafk2bzacebkfcnc27d3agm2bhzzbvvtbqahmvy2b2nf5xyj4aoxehow3bules
fil/10/storagemarket,storagemarket,bafk2bzacecclsfboql3iraf3e66pzuh3h7qp3vgmfurqz26qh5g5nrexjgknc
fil/1/storageminer,storageminer,bafkqaetgnfwc6mjpon2g64tbm5sw22lomvza
fil/2/storageminer,storageminer,bafkqaetgnfwc6mrpon2g64tbm5sw22lomvza
fil/3/storageminer,storageminer,bafkqaetgnfwc6mzpon2g64tbm5sw22lomvza
fil/4/storageminer,storageminer,bafkqaetgnfwc6nbpon2g64tbm5sw22lomvza
fil/5/storageminer,storageminer,bafkqaetgnfwc6njpon2g64tbm5sw22lomvza
fil/6/storageminer,storageminer,bafkqaetgnfwc6nrpon2g64tbm5sw22lomvza
fil/7/storageminer,storageminer,bafkqaetgnfwc6nzpon2g64tbm5sw22lomvza
fil/8/storageminer,storageminer,bafk2bzacea6rabflc7kpwr6y4lzcqsnuahr4zblyq3rhzrrsfceeiw2lufrb4
fil/9/storageminer,storageminer,bafk2bzacebz4na3nq4gmumghegtkaofrv4nffiihd7sxntrryfneusqkuqodm
fil/10/storageminer,storageminer,bafk2bzacedu4chbl36rilas45py4vhqtuj6o7aa5stlvnwef3kshgwcsmha6y
fil/1/multisig,multisig,bafkqadtgnfwc6mjpnv2wy5djonuwo
fil/2/multisig,multisig,bafkqadtgnfwc6mrpnv2wy5djonuwo
fil/3/multisig,multisig,bafkqadtgnfwc6mzpnv2wy5djonuwo
fil/4/multisig,multisig,bafkqadtgnfwc6nbpnv2wy5djonuwo
fil/5/multisig,multisig,bafkqadtgnfwc6njpnv2wy5djonuwo
fil/6/multisig,multisig,bafkqadtgnfwc6nrpnv2wy5djonuwo
fil/7/multisig,multisig,bafkqadtgnfwc6nzpnv2wy5djonuwo
fil/8/multisig,multisig,bafk2bzacec66wmb4kohuzvuxsulhcgiwju7sqkldwfpmmgw7dbbwgm5l2574q
fil/9/multisig,multisig,bafk2bzacec6gmi7ucukr3bk67akaxwngohw3lsg3obvdazhmfhdzflkszk3tg
fil/10/multisig,multisig,bafk2bzacebv5gdlte2pyovmz6s37me6x2rixaa6a33w6lgqdohmycl23snvwm
fil/1/paymentchannel,paymentchannel,bafkqafdgnfwc6mjpobqxs3lfnz2gg2dbnzxgk3a
fil/2/paymentchannel,paymentchannel,bafkqafdgnfwc6mrpobqxs3lfnz2gg2dbnzxgk3a
fil/3/paymentchannel,paymentchannel,bafkqafdgnfwc6mzpobqxs3lfnz2gg2dbnzxgk3a
fil/4/paymentchannel,paymentchannel,bafkqafdgnfwc6nbpobqxs3lfnz2gg2dbnzxgk3a
fil/5/paymentchannel,paymentchannel,bafkqafdgnfwc6njpobqxs3lfnz2gg2dbnzxgk3a
fil/6/paymentchannel,paymentchannel,bafkqafdgnfwc6nrpobqxs3lfnz2gg2dbnzxgk3a
fil/7/paymentchannel,paymentchannel,bafkqafdgnfwc6nzpobqxs3lfnz2gg2dbnzxgk3a
fil/8/paymentchannel,paymentchannel,bafk2bzaceblot4pemhfgwb3lceellwrpgxaqkpselzbpqu32maffpopdunlha
fil/9/paymentchannel,paymentchannel,bafk2bzacec4kg3bfjtssvv2b4wizlbdk3pdtrg5aknzgeb3a6rmksgurpynca
fil/10/paymentchannel,paymentchannel,bafk2bzacea7ngq44gedftjlar3j3ql3dmd7e7xkkb6squgxinfncybfmppmlc
fil/1/storagepower,storagepower,bafkqaetgnfwc6mjpon2g64tbm5sxa33xmvza
fil/2/storagepower,storagepower,bafkqaetgnfwc6mrpon2g64tbm5sxa33xmvza
fil/3/storagepower,storagepower,bafkqaetgnfwc6mzpon2g64tbm5sxa33xmvza
fil/4/storagepower,storagepower,bafkqaetgnfwc6nbpon2g64tbm5sxa33xmvza
fil/5/storagepower,storagepower,bafkqaetgnfwc6njpon2g64tbm5sxa33xmvza
fil/6/storagepower,storagepower,bafkqaetgnfwc6nrpon2g64tbm5sxa33xmvza
fil/7/storagepower,storagepower,bafkqaetgnfwc6nzpon2g64tbm5sxa33xmvza
fil/8/storagepower,storagepower,bafk2bzacecpwr4mynn55bg5hrlns3osvg7sty3rca6zlai3vl52vbbjk7ulfa
fil/9/storagepower,storagepower,bafk2bzaceburxajojmywawjudovqvigmos4dlu4ifdikogumhso2ca2ccaleo
fil/10/storagepower,storagepower,bafk2bzacedu3c67spbf2dmwo77ymkjel6i2o5gpzyksgu2iuwu2xvcnxgfdjg
fil/1/reward,reward,bafkqaddgnfwc6mjpojsxoylsmq
fil/2/reward,reward,bafkqaddgnfwc6mrpojsxoylsmq
fil/3/reward,reward,bafkqaddgnfwc6mzpojsxoylsmq
fil/4/reward,reward,bafkqaddgnfwc6nbpojsxoylsmq
fil/5/reward,reward,bafkqaddgnfwc6njpojsxoylsmq
fil/6/reward,reward,bafkqaddgnfwc6nrpojsxoylsmq
fil/7/reward,reward,bafkqaddgnfwc6nzpojsxoylsmq
fil/8/reward,reward,bafk2bzaceayah37uvj7brl5no4gmvmqbmtndh5raywuts7h6tqbgbq2ge7dhu
fil/9/reward,reward,bafk2bzacebpptqhcw6mcwdj576dgpryapdd2zfexxvqzlh3aoc24mabwgmcss
fil/10/reward,reward,bafk2bzacea3yo22x4dsh4axioshrdp42eoeugef3tqtmtwz5untyvth7uc73o
fil/1/system,system,bafkqaddgnfwc6mjpon4xg5dfnu
fil/2/system,system,bafkqaddgnfwc6mrpon4xg5dfnu
fil/3/system,system,bafkqaddgnfwc6mzpon4xg5dfnu
fil/4/system,system,bafkqaddgnfwc6nbpon4xg5dfnu
fil/5/system,system,bafkqaddgnfwc6njpon4xg5dfnu
fil/6/system,system,bafkqaddgnfwc6nrpon4xg5dfnu
fil/7/system,system,bafkqaddgnfwc6nzpon4xg5dfnu
fil/8/system,system,bafk2bzaceaqrkllksxv2jsfgjvmuewx5vbzrammw5mdscod6gkdr3ijih2q64
fil/9/system,system,bafk2bzaceaue3nzucbom3tcclgyaahy3iwvbqejsxrohiquakvvsjgbw3shac
fil/10/system,system,bafk2bzacea4mtukm5zazygkdbgdf26cpnwwif5n2no7s6tknpxlwy6fpq3mug
fil/1/verifiedregistry,verifiedregistry,bafkqaftgnfwc6mjpozsxe2lgnfswi4tfm5uxg5dspe
fil/2/verifiedregistry,verifiedregistry,bafkqaftgnfwc6mrpozsxe2lgnfswi4tfm5uxg5dspe
fil/3/verifiedregistry,verifiedregistry,bafkqaftgnfwc6mzpozsxe2lgnfswi4tfm5uxg5dspe
fil/4/verifiedregistry,verifiedregistry,bafkqaftgnfwc6nbpozsxe2lgnfswi4tfm5uxg5dspe
fil/5/verifiedregistry,verifiedregistry,bafkqaftgnfwc6njpozsxe2lgnfswi4tfm5uxg5dspe
fil/6/verifiedregistry,verifiedregistry,bafkqaftgnfwc6nrpozsxe2lgnfswi4tfm5uxg5dspe
fil/7/verifiedregistry,verifiedregistry,bafkqaftgnfwc6nzpozsxe2lgnfswi4tfm5uxg5dspe
fil/8/verifiedregistry,verifiedregistry,bafk2bzaceaihibfu625lbtzdp3tcftscshrmbgghgrc7kzqhxn4455pycpdkm
fil/9/verifiedregistry,verifiedregistry,bafk2bzacebh7dj6j7yi5vadh7lgqjtq42qi2uq4n6zy2g5vjeathacwn2tscu
fil/10/verifiedregistry,verifiedregistry,bafk2bzacec67wuchq64k7kgrujguukjvdlsl24pgighqdx5vgjhyk6bycrwnc
fil/9/datacap,datacap,bafk2bzaceanmwcfjfj65xy275rrfqqgoblnuqirdg6zwhc6qhbfhpphomvceu
fil/10/datacap,datacap,bafk2bzaceaot6tv6p4cat3cg5fknq22htosw3p5rwyijmdsraatwqyc4qyero
fil/10/evm,evm,bafk2bzaceblpgzid4qjfavuiht6uwvq2lznshklk2qmf5akm3dzx2fczdqdxc
fil/10/eam,eam,bafk2bzacec5untyj6cefdsfm47wckozw6wt6svqqh5dzh63nu4f6dvf26fkco
fil/10/placeholder,placeholder,bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro
fil/10/ethaccount,ethaccount,bafk2bzacebiyrhz32xwxi6xql67aaq5nrzeelzas472kuwjqmdmgwotpkj35e

./lily chain actor-methods

actor_family,method_name,method_number
account,Constructor,1
account,PubkeyAddress,2
account,AuthenticateMessage,2643134072
cron,Constructor,1
cron,EpochTick,2
init,Constructor,1
init,Exec,2
init,Exec4,3
storagemarket,Constructor,1
storagemarket,AddBalance,2
storagemarket,AddBalanceExported,822473126
storagemarket,WithdrawBalance,3
storagemarket,WithdrawBalanceExported,2280458852
storagemarket,PublishStorageDeals,4
storagemarket,PublishStorageDealsExported,2236929350
storagemarket,VerifyDealsForActivation,5
storagemarket,ActivateDeals,6
storagemarket,OnMinerSectorsTerminate,7
storagemarket,ComputeDataCommitment,8
storagemarket,CronTick,9
storagemarket,GetBalanceExported,726108461
storagemarket,GetDealDataCommitmentExported,1157985802
storagemarket,GetDealClientExported,128053329
storagemarket,GetDealProviderExported,935081690
storagemarket,GetDealLabelExported,46363526
storagemarket,GetDealTermExported,163777312
storagemarket,GetDealTotalPriceExported,4287162428
storagemarket,GetDealClientCollateralExported,200567895
storagemarket,GetDealProviderCollateralExported,2986712137
storagemarket,GetDealVerifiedExported,2627389465
storagemarket,GetDealActivationExported,2567238399
storageminer,Constructor,1
storageminer,ControlAddresses,2
storageminer,ChangeWorkerAddress,3
storageminer,ChangeWorkerAddressExported,3302309124
storageminer,ChangePeerID,4
storageminer,ChangePeerIDExported,1236548004
storageminer,SubmitWindowedPoSt,5
storageminer,PreCommitSector,6
storageminer,ProveCommitSector,7
storageminer,ExtendSectorExpiration,8
storageminer,TerminateSectors,9
storageminer,DeclareFaults,10
storageminer,DeclareFaultsRecovered,11
storageminer,OnDeferredCronEvent,12
storageminer,CheckSectorProven,13
storageminer,ApplyRewards,14
storageminer,ReportConsensusFault,15
storageminer,WithdrawBalance,16
storageminer,WithdrawBalanceExported,2280458852
storageminer,ConfirmSectorProofsValid,17
storageminer,ChangeMultiaddrs,18
storageminer,ChangeMultiaddrsExported,1063480576
storageminer,CompactPartitions,19
storageminer,CompactSectorNumbers,20
storageminer,ConfirmChangeWorkerAddress,21
storageminer,ConfirmChangeWorkerAddressExported,2354970453
storageminer,RepayDebt,22
storageminer,RepayDebtExported,3665352697
storageminer,ChangeOwnerAddress,23
storageminer,ChangeOwnerAddressExported,1010589339
storageminer,DisputeWindowedPoSt,24
storageminer,PreCommitSectorBatch,25
storageminer,ProveCommitAggregate,26
storageminer,ProveReplicaUpdates,27
storageminer,PreCommitSectorBatch2,28
storageminer,ProveReplicaUpdates2,29
storageminer,ChangeBeneficiary,30
storageminer,ChangeBeneficiaryExported,1570634796
storageminer,GetBeneficiary,31
storageminer,ExtendSectorExpiration2,32
storageminer,GetOwnerExported,3275365574
storageminer,IsControllingAddressExported,348244887
storageminer,GetSectorSizeExported,3858292296
storageminer,GetAvailableBalanceExported,4026106874
storageminer,GetVestingFundsExported,1726876304
storageminer,GetPeerIDExported,2812875329
storageminer,GetMultiaddrsExported,1332909407
multisig,Constructor,1
multisig,Propose,2
multisig,ProposeExported,1696838335
multisig,Approve,3
multisig,ApproveExported,1289044053
multisig,Cancel,4
multisig,CancelExported,3365893656
multisig,AddSigner,5
multisig,AddSignerExported,3028530033
multisig,RemoveSigner,6
multisig,RemoveSignerExported,21182899
multisig,SwapSigner,7
multisig,SwapSignerExported,3968117037
multisig,ChangeNumApprovalsThreshold,8
multisig,ChangeNumApprovalsThresholdExported,3375931653
multisig,LockBalance,9
multisig,LockBalanceExported,1999470977
multisig,UniversalReceiverHook,3726118371
paymentchannel,Constructor,1
paymentchannel,UpdateChannelState,2
paymentchannel,Settle,3
paymentchannel,Collect,4
storagepower,Constructor,1
storagepower,CreateMiner,2
storagepower,CreateMinerExported,1173380165
storagepower,UpdateClaimedPower,3
storagepower,EnrollCronEvent,4
storagepower,CronTick,5
storagepower,UpdatePledgeTotal,6
storagepower,Deprecated1,7
storagepower,SubmitPoRepForBulkVerify,8
storagepower,CurrentTotalPower,9
storagepower,CurrentTotalPowerNetworkRawPowerExported,931722534
storagepower,CurrentTotalPowerMinerRawPowerExported,3753401894
storagepower,CurrentTotalPowerMinerCountExported,1987646258
storagepower,CurrentTotalPowerMinerConsensusCountExported,196739875
reward,Constructor,1
reward,AwardBlockReward,2
reward,ThisEpochReward,3
reward,UpdateNetworkKPI,4
verifiedregistry,Constructor,1
verifiedregistry,AddVerifier,2
verifiedregistry,RemoveVerifier,3
verifiedregistry,AddVerifiedClient,4
verifiedregistry,AddVerifiedClientExported,3916220144
verifiedregistry,Deprecated1,5
verifiedregistry,Deprecated2,6
verifiedregistry,RemoveVerifiedClientDataCap,7
verifiedregistry,RemoveExpiredAllocations,8
verifiedregistry,RemoveExpiredAllocationsExported,2421068268
verifiedregistry,ClaimAllocations,9
verifiedregistry,GetClaims,10
verifiedregistry,GetClaimsExported,2199871187
verifiedregistry,ExtendClaimTerms,11
verifiedregistry,ExtendClaimTermsExported,1752273514
verifiedregistry,RemoveExpiredClaims,12
verifiedregistry,RemoveExpiredClaimsExported,2873373899
verifiedregistry,UniversalReceiverHook,3726118371
datacap,Constructor,1
datacap,MintExported,116935346
datacap,DestroyExported,2624896501
datacap,NameExported,48890204
datacap,SymbolExported,2061153854
datacap,TotalSupplyExported,114981429
datacap,BalanceExported,3261979605
datacap,TransferExported,80475954
datacap,TransferFromExported,3621052141
datacap,IncreaseAllowanceExported,1777121560
datacap,DecreaseAllowanceExported,1529376545
datacap,RevokeAllowanceExported,2765635761
datacap,BurnExported,1434719642
datacap,BurnFromExported,2979674018
datacap,AllowanceExported,4205072950
datacap,GranularityExported,3936767397
evm,Constructor,1
evm,Resurrect,2
evm,GetBytecode,3
evm,GetBytecodeHash,4
evm,GetStorageAt,5
evm,InvokeContractDelegate,6
evm,InvokeContract,3844450837
eam,Constructor,1
eam,Create,2
eam,Create2,3
eam,CreateExternal,4
placeholder,Constructor,1
ethaccount,Constructor,1

@kasteph kasteph requested a review from frrist March 13, 2023 18:42
@kasteph
Copy link
Contributor Author

kasteph commented Mar 14, 2023

usage: ./lily chain actor-codes --persist=true --storage=<storage name in config.toml>

commands/chain.go Outdated Show resolved Hide resolved
schemas/v1/19_actor_mappings.go Outdated Show resolved Hide resolved
schemas/v1/19_actor_mappings.go Outdated Show resolved Hide resolved
commands/chain.go Show resolved Hide resolved
schemas/v1/19_actor_mappings.go Outdated Show resolved Hide resolved
@kasteph kasteph requested a review from frrist March 20, 2023 15:10
@birdychang birdychang self-requested a review April 6, 2023 07:24

func init() {
patches.Register(
19,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to this commit, we should change the version from 19 to 20.

@kasteph kasteph merged commit 57d6749 into master Apr 18, 2023
@kasteph kasteph deleted the kasteph/1148 branch April 18, 2023 17:01
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

Successfully merging this pull request may close these issues.

Add command to populate database with actor codes and versions
4 participants