merge ntwk/wallaby into feat/nv18-fevm.

Unfortunately some important changes to make this branch
consistent and functional only existed on the wallaby branch.
So this commit brings them in sync.
This commit is contained in:
Raúl Kripalani 2022-12-23 18:20:44 +00:00
parent f44bd27f7b
commit a469840290
5 changed files with 121 additions and 22 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
NETWORKS=(devnet mainnet caterpillarnet butterflynet testing testing-fake-proofs calibrationnet)
NETWORKS=(devnet wallaby mainnet caterpillarnet butterflynet testing testing-fake-proofs calibrationnet)
set -e
@ -14,6 +14,11 @@ VERSION="$1" # actors version
RELEASE="$2" # actors release name
RELEASE_OVERRIDES=("${@:3}")
if [[ ${VERSION#v} -ge 10 ]]; then
NETWORKS+=("devnet-wasm")
fi
echo "Downloading bundles for actors version ${VERSION} release ${RELEASE}"
echo "With release overrides ${RELEASE_OVERRIDES[*]}"

View File

@ -66,19 +66,19 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
}, {
Network: "calibrationnet",
Version: 8,
ManifestCid: MustParseCid("bafy2bzacedrdn6z3z7xz7lx4wll3tlgktirhllzqxb766dxpaqp3ukxsjfsba"),
ManifestCid: MustParseCid("bafy2bzaceadjiedlhn5333ndcwdfniif7fwy7f2xliw5ztzisy5arnwwrga36"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzacecruossn66xqbeutqx5r4k2kjzgd43frmwd4qkw6haez44ubvvpxo"),
"cron": MustParseCid("bafk2bzaceaxlezmclw5ugldhhtfgvn7yztux45scqik3ez4yhwiqhg5ssib44"),
"init": MustParseCid("bafk2bzaceadyfilb22bcvzvnpzbg2lyg6npmperyq6es2brvzjdh5rmywc4ry"),
"multisig": MustParseCid("bafk2bzacec66wmb4kohuzvuxsulhcgiwju7sqkldwfpmmgw7dbbwgm5l2574q"),
"paymentchannel": MustParseCid("bafk2bzaceblot4pemhfgwb3lceellwrpgxaqkpselzbpqu32maffpopdunlha"),
"reward": MustParseCid("bafk2bzaceayah37uvj7brl5no4gmvmqbmtndh5raywuts7h6tqbgbq2ge7dhu"),
"storagemarket": MustParseCid("bafk2bzacebotg5coqnglzsdrqxtkqk2eq4krxt6zvds3i3vb2yejgxhexl2n6"),
"storageminer": MustParseCid("bafk2bzacea6rabflc7kpwr6y4lzcqsnuahr4zblyq3rhzrrsfceeiw2lufrb4"),
"storagepower": MustParseCid("bafk2bzacecpwr4mynn55bg5hrlns3osvg7sty3rca6zlai3vl52vbbjk7ulfa"),
"system": MustParseCid("bafk2bzaceaqrkllksxv2jsfgjvmuewx5vbzrammw5mdscod6gkdr3ijih2q64"),
"verifiedregistry": MustParseCid("bafk2bzaceaihibfu625lbtzdp3tcftscshrmbgghgrc7kzqhxn4455pycpdkm"),
"account": MustParseCid("bafk2bzacebixfk2xais3ymfbcg4c5jkpuv4rwq4p2sf52ux722pct4eq7lvja"),
"cron": MustParseCid("bafk2bzacebh4mr5k6fzldos74ojlkmrzyrszevqn6qee43mivp2ohx6ysdu6q"),
"init": MustParseCid("bafk2bzacedqqxnw7dudczvrsh44k77adyybrvreax2r34m5owdsjywn4suj5u"),
"multisig": MustParseCid("bafk2bzacebuj4dwgyywano7qlwfakxf6a4ldo4qw3j2zkopkmut7xfsracazi"),
"paymentchannel": MustParseCid("bafk2bzaced4hhfyprxv27c3juwoopxs5hgqnloonbdo646a27wloltvshee3q"),
"reward": MustParseCid("bafk2bzacebgrw23pyymazbd22izvweodncohky7jxw5e664y2lrbbj5tk4cuq"),
"storagemarket": MustParseCid("bafk2bzacecdoyyvwebop4pfwlzo2j6jvy5zbcyrbgrzhij6ykdgf4vkednwpk"),
"storageminer": MustParseCid("bafk2bzacecj3cqml4ldxz5xqzjeg5pvwvrt2iqxr4h4nk7xzu25rfzcsqpd26"),
"storagepower": MustParseCid("bafk2bzaceajqgij7vvnkw2yv7ohmkxeeset7l4xs4lmyfsz4rehmq7t2drop4"),
"system": MustParseCid("bafk2bzacecb6o64qxcrltnpeybusriaxnm74aacydwa6bep3xq6xighrqrc3e"),
"verifiedregistry": MustParseCid("bafk2bzaceduzldddhqwtbnala4wh34xxjdmq3gmzlntxp4jjxd42rq6qw3pec"),
},
}, {
Network: "calibrationnet",
@ -234,6 +234,28 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
"system": MustParseCid("bafk2bzaceb5wpgomztoaxfv2hhgb5xtbmq4t53wev6mg4yonax5glbi4dtcoe"),
"verifiedregistry": MustParseCid("bafk2bzacecpqfg7ixkwcgr6u6nb3xvyrur5yelhtge4w6um4spfwcl432mi64"),
},
}, {
Network: "devnet-wasm",
Version: 10,
ManifestCid: MustParseCid("bafy2bzacedvzcxkoibhejtjvst3klmpar32livkfykq2nworqyv3hmrt3dnxi"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzaceboq6fccqnqyz4u5nefdg4ibqv543w32r35ohawnrsvr6426p6iti"),
"cron": MustParseCid("bafk2bzacebaxieb6h4f666x36gj5fhqdstib7iqg26sxjrbpfqvjh3whbz4wc"),
"datacap": MustParseCid("bafk2bzacebl2gmtbklstvgknyixqfqlpat3otcd4mi3sxh3s6ddzkgvci44v6"),
"eam": MustParseCid("bafk2bzacedg6jdkq4navaloocu5xn2ccawkbsaen7nea4qt2f5bx7hsx7legc"),
"embryo": MustParseCid("bafk2bzacecrloi3xb6bwxsiwtl2chxlgisv5742nkcksahcax3fkrso5wiqrk"),
"ethaccount": MustParseCid("bafk2bzaceco7ybkncres3pxbtobvj4vax34ixgxsm4ny6ffkmyvisttp6ban6"),
"evm": MustParseCid("bafk2bzacealogvmixlpwys4yaqyugq5g5fase3fxoop6ye6ytnvl7t6hszr4o"),
"init": MustParseCid("bafk2bzaceaj6rsvyzgcwhge5w2odgwwm2w24wj66e3254szlbi64micbhp7ss"),
"multisig": MustParseCid("bafk2bzaced4m56freiof73gfpkqzdltjjido7v5u7wyv4ghtj6dsxv7oq2vcs"),
"paymentchannel": MustParseCid("bafk2bzacedxwlhukvemf3pxrycijgfx7k5nf2xnxa7ukqcejseci7zri2b7ts"),
"reward": MustParseCid("bafk2bzacebhd2puwp7lgp3mrjyajf6xqmqgcrqsmmnt5drwzblykgszti76pw"),
"storagemarket": MustParseCid("bafk2bzacead4wgwcquz4craezwhqajyt3marfbirs67lpf2s3kuai6nsvojeq"),
"storageminer": MustParseCid("bafk2bzacebwdhd4g5fg4t4cbprwy2akoejvkqnw7fladxdcfmcis7iy3nkeze"),
"storagepower": MustParseCid("bafk2bzacecfuerkzzu2phm3djd7gqxmzckx7z5p3z457cele4xcevgqii3d6e"),
"system": MustParseCid("bafk2bzaceco6cn3vhesmxtbmlgmhckr2ii2il6qqe5xfzundrdd2jbvmemsco"),
"verifiedregistry": MustParseCid("bafk2bzacebzvnjruy4nu7mfykt6ty6gebz4ikxfkertfb77jng3gizrbe4rfu"),
},
}, {
Network: "mainnet",
Version: 8,
@ -405,4 +427,61 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
"system": MustParseCid("bafk2bzaceb6obdybgoyjvdfxvxg5uxhrpnoixtbof663dllo2eelcuvsfycew"),
"verifiedregistry": MustParseCid("bafk2bzacecnaegov5i37jdpr6rwgviwompt23sghlqjhyseoylxoyzvckvehw"),
},
}, {
Network: "wallaby",
Version: 8,
ManifestCid: MustParseCid("bafy2bzacea3ubm22osjz25jvjxlxw3mnmth234nwn7btnlgfzivd72vwxey4w"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzacec4p6e4h22zjbd6aze7cpgptrn77th2zcbcknopdw7gl2whwg6nds"),
"cron": MustParseCid("bafk2bzacecrt5rc6esuxaoo5bmw5wtxbszefspjrvkuzwuv76r3vwyqdrfmes"),
"init": MustParseCid("bafk2bzaceaajsakyxpwmjom2rl6vovrr3lnwbalq3iajo63mthmyjoc2yn3um"),
"multisig": MustParseCid("bafk2bzacecslb4pivy4z3taqz2hxzars3ldsbo6xpo6loptkxaocx5ibaz4wc"),
"paymentchannel": MustParseCid("bafk2bzacebqhlvedkb2obiyexx4gni3p6vkggsmedawj4pksdrvogwdfimmse"),
"reward": MustParseCid("bafk2bzacebnmq7dntnm2a5fvx2dnsauq33cpgni3eu5nyav3vnhgf6o6wxnbi"),
"storagemarket": MustParseCid("bafk2bzacebjach557t7iuatr2vyhgkjxzru3cjzg2klkcw4u57coukojkhxdc"),
"storageminer": MustParseCid("bafk2bzaceane57jwzkkh53gom26cl7itsll7qkwlhaai6rl25zfpuqgcgxl74"),
"storagepower": MustParseCid("bafk2bzacedmyvrjgtmeoctbvfxcas44yqv6mjodmdl4pdtbkr2shpst7pnmya"),
"system": MustParseCid("bafk2bzaceb3tr7rb7cfefx76oczq4i6ozfhkd3mios3ym6xbh4ymizsj7rp3y"),
"verifiedregistry": MustParseCid("bafk2bzacedeikkqdj7sbhdgfqa7pi6s5anvxhr77xzbpr5h6g4n2micecpfng"),
},
}, {
Network: "wallaby",
Version: 9,
ManifestCid: MustParseCid("bafy2bzaceap66oxkzipcc7ryyz3g63tw5nfxfpfxfqgpfajmjfnjn7r5f5hs6"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzacebl35pckt2lq2egbtw4dnwumsprhijgdnpzpejyz52nnangbtrvhq"),
"cron": MustParseCid("bafk2bzaceb6hamyj3p5k5gonho43iq2weurklwjxmu2tfwauh5km367tsr7ye"),
"datacap": MustParseCid("bafk2bzacedjhrzz5ve5aiq42z4c2jsmlaijxepizyav7n762jzscoq5bdbsmu"),
"init": MustParseCid("bafk2bzacedykjz5rt3mjs4z4k4e7clkvq6rg4lryna3b55atdq4tswtpyzqzs"),
"multisig": MustParseCid("bafk2bzacebr3mz74eiivo4fz3twadquayu7pm4gfy2vmog6cezkgtueazzwdi"),
"paymentchannel": MustParseCid("bafk2bzacecoejzbnotkdresvfw4iol27ovvmssp4sw6gpgtdkvigetlia5gw6"),
"reward": MustParseCid("bafk2bzaceabxy3zkbcl3fjppbps6ioz5tna3zn5wna725yer34wkwdsl5qdui"),
"storagemarket": MustParseCid("bafk2bzacealeandthaeqijxwubc6yf3325jtdprxoxaflonsibrzenkk7b6x2"),
"storageminer": MustParseCid("bafk2bzacedahhuyng3vs3k34nj25slohdkm7r4usxkvccl6rwocxbymkjrdnu"),
"storagepower": MustParseCid("bafk2bzacecmjgay4t2tfjxv6aapl7ishzs2mftohbplfryn2kwzy3riytzyns"),
"system": MustParseCid("bafk2bzaceco2enec4gesvurxqm6opeh4oa3kiwvczqxnmwmm53vkink65zbjs"),
"verifiedregistry": MustParseCid("bafk2bzacecgwv43ousgaiae5lcwj36mjmfgm3lfoczfry6tfvfs2m6qbhdjei"),
},
}, {
Network: "wallaby",
Version: 10,
ManifestCid: MustParseCid("bafy2bzacechtpzlq73tho3je7hnedeut6i6hynb63kk4v24dum32virbc4pye"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzacec63ehicn6roe4hwtktiqjdpn7buw4vewix2fshvk7ruk6bg54bga"),
"cron": MustParseCid("bafk2bzacedgz5736vxapicnbdrk5yrbgwbjizhr5hjglxwkb6sonqpoyaid4u"),
"datacap": MustParseCid("bafk2bzacedmuhap3ephpwcvyqxry54irmw5zaz74abhmnjlwrf6ioihrzcqgu"),
"eam": MustParseCid("bafk2bzaceammyagwzliynju7dzsn7zucxtwkstsmldcwyvbvbnhrftntfrwdi"),
"embryo": MustParseCid("bafk2bzacecrloi3xb6bwxsiwtl2chxlgisv5742nkcksahcax3fkrso5wiqrk"),
"ethaccount": MustParseCid("bafk2bzacedrk5se3gwabwxsxyogz4s3iqa3ujbxfrryvabwys2lrneouuakpg"),
"evm": MustParseCid("bafk2bzaced45hvuklmyyrkr45o4m2xjawxxon3mr5ox2fx7u6524abcygjvre"),
"init": MustParseCid("bafk2bzaceaaonvp6qwru3zhvffjrs72hzgzag7vlngmrz7rghdwsmdll4blsk"),
"multisig": MustParseCid("bafk2bzacedw73tmdl7stykyycxmhsb3iom7notxmx24b2647g3vwmrg2brgqu"),
"paymentchannel": MustParseCid("bafk2bzaced5frgcp6bszhis5kxtm6uko5jlgbuzyczqsj7uavovkayrbizg4s"),
"reward": MustParseCid("bafk2bzaceddc5c45lnbo7i3uknk5zi3qbq6k4rocfoq3n7x3qerehyevjl7ja"),
"storagemarket": MustParseCid("bafk2bzaceafqt55lykve6ex5bw65ueuec6bjcwfmq6vbhwbgjmpt4cztldzle"),
"storageminer": MustParseCid("bafk2bzacebongyek6ijaqzup6fe2kplq24dr3dtvweu5fmfjl236rjhyqv3gs"),
"storagepower": MustParseCid("bafk2bzaceapgnms6ldjpewmniaqawu5sflssycjbwydqvilja66y5wm4lulwq"),
"system": MustParseCid("bafk2bzaceaki4yktxjcaxuj4be4q2ybrjiqcqq7orgzqgmidcavn3dzxyo7ds"),
"verifiedregistry": MustParseCid("bafk2bzaceblfur6m2twrm4bujzco2fmvr4gwspthicebo4woy2k6f3yk42haw"),
},
}}

Binary file not shown.

View File

@ -226,6 +226,16 @@ func (sm *StateManager) callInternal(ctx context.Context, msg *types.Message, pr
Data: make([]byte, 65),
},
}
default:
// XXX: Hack to make sending from f099 (and others) "just work".
// REMOVE ME.
msgApply = &types.SignedMessage{
Message: *msg,
Signature: crypto.Signature{
Type: crypto.SigTypeSecp256k1,
Data: make([]byte, 65),
},
}
}
ret, err = vmi.ApplyMessage(ctx, msgApply)

View File

@ -650,16 +650,22 @@ func (a *EthModule) EthSendRawTransaction(ctx context.Context, rawTx ethtypes.Et
}
func (a *EthModule) ethCallToFilecoinMessage(ctx context.Context, tx ethtypes.EthCall) (*types.Message, error) {
var err error
var from address.Address
if tx.From == nil {
if tx.From == nil || *tx.From == (ethtypes.EthAddress{}) {
// TODO: We're sending from the "burnt funds" account for now, because we need to
// send from an actual account till we deploy an EVM _account_ to this address, not
// an empty EVM contract.
//
// See https://github.com/filecoin-project/ref-fvm/issues/1173
from = builtinactors.BurntFundsActorAddr
// Send from the filecoin "system" address.
from, err = (ethtypes.EthAddress{}).ToFilecoinAddress()
if err != nil {
return nil, fmt.Errorf("failed to construct the ethereum system address: %w", err)
}
//from, err = (api.EthAddress{}).ToFilecoinAddress()
//if err != nil {
// return nil, fmt.Errorf("failed to construct the ethereum system address: %w", err)
//}
} else {
// The from address must be translatable to an f4 address.
var err error
from, err = tx.From.ToFilecoinAddress()
if err != nil {
return nil, fmt.Errorf("failed to translate sender address (%s): %w", tx.From.String(), err)
@ -1637,8 +1643,8 @@ func newEthTxReceipt(ctx context.Context, tx ethtypes.EthTx, lookup *api.MsgLook
BlockHash: blockHash,
BlockNumber: blockNumber,
Type: ethtypes.EthUint64(2),
LogsBloom: EmptyLogsBloom,
Logs: make([]ethtypes.EthLog, 0),
Logs: []ethtypes.EthLog{}, // empty log array is compulsory when no logs, or libraries like ethers.js break
LogsBloom: ethtypes.EmptyEthBloom[:],
}
if receipt.To == nil && lookup.Receipt.ExitCode.IsSuccess() {
@ -1662,7 +1668,6 @@ func newEthTxReceipt(ctx context.Context, tx ethtypes.EthTx, lookup *api.MsgLook
// TODO return a dummy non-zero bloom to signal that there are logs
// need to figure out how worth it is to populate with a real bloom
// should be feasible here since we are iterating over the logs anyway
receipt.LogsBloom = make([]byte, 256)
receipt.LogsBloom[255] = 0x01
receipt.Logs = make([]ethtypes.EthLog, 0, len(events))