diff --git a/SECURITY.md b/SECURITY.md index 642372cd1c..bf115fab85 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -92,7 +92,7 @@ Here's a list of strategies that are helpful for getting started on Wormhole: - Check out places where there are unit/integration tests, but they lack sufficient [negative test](https://en.wikipedia.org/wiki/Negative_testing) coverage. - Review different smart contract implementations (eg. Solana, EVM, CosmWasm, Move) and attempt to understand how and why they are different. - Does one chain have a safety check that another chain doesn't? - - Does one chain have a specific set of nuances / gotchas that that were missed on another chain? + - Does one chain have a specific set of nuances / gotchas that were missed on another chain? - Consider going beyond the source code - Review the deployed contracts on chain. Is something odd that may have been missed? diff --git a/algorand/MEMORY.md b/algorand/MEMORY.md index 5f9bd5f53a..7c591930cf 100644 --- a/algorand/MEMORY.md +++ b/algorand/MEMORY.md @@ -234,7 +234,7 @@ pop ``` -The first byte (`0x06`) is the version identifier. This matches `#pragma version 6` in the TEAL file. `0x20` is the `intcblock` instruction. It takes a byte that represents how many ints are stored (1 here) in this section, and then a list of ints (here, it’s just 1). `0x81` is the `pushint` instruction, and here we push `0x0`. This means that that this program was compiled with the template variables filled with zeros. This 0 is at offset 5 in the bytecode, which agrees with the `'position': 5'` field of the above data structure for `TMPL_ADDR_IDX`. The `0x48` opcode next is the pop instruction. Next, `0x80` is a `pushbytes` instruction, which first takes the a varint for the length of the byte array, then the byte array. Here, since the length is 0, there are no bytes following, instead `0x48` pops immediately. This byte array is at position 8, which corresponds to `TMPL_EMITTER_ID` above. +The first byte (`0x06`) is the version identifier. This matches `#pragma version 6` in the TEAL file. `0x20` is the `intcblock` instruction. It takes a byte that represents how many ints are stored (1 here) in this section, and then a list of ints (here, it’s just 1). `0x81` is the `pushint` instruction, and here we push `0x0`. This means that this program was compiled with the template variables filled with zeros. This 0 is at offset 5 in the bytecode, which agrees with the `'position': 5'` field of the above data structure for `TMPL_ADDR_IDX`. The `0x48` opcode next is the pop instruction. Next, `0x80` is a `pushbytes` instruction, which first takes a varint for the length of the byte array, then the byte array. Here, since the length is 0, there are no bytes following, instead `0x48` pops immediately. This byte array is at position 8, which corresponds to `TMPL_EMITTER_ID` above. diff --git a/aptos/nft_bridge/README.md b/aptos/nft_bridge/README.md index 4f2111aaf3..ad887371b2 100644 --- a/aptos/nft_bridge/README.md +++ b/aptos/nft_bridge/README.md @@ -71,7 +71,7 @@ When transferring a native token out for the first time, we When transferring an NFT from a collection on a foreign chain to Aptos, a corresponding "wrapped" collection is created. The module responsible for this -is [wrapped.move](sources/wrapped.move). The collection name is the the NFT name +is [wrapped.move](sources/wrapped.move). The collection name is the NFT name field from the transfer VAA. To avoid collisions here, each NFT is minted into a freshly created creator account, implemented as a resource account. diff --git a/docs/query_proxy.md b/docs/query_proxy.md index 1baedd8f2b..e74b2f7ff7 100644 --- a/docs/query_proxy.md +++ b/docs/query_proxy.md @@ -143,7 +143,7 @@ The following are the Solana call types. Both require the `chain` parameter plus - `solAccount`, requires the `account` parameter. - `solPDA`, requires the `programAddress` parameter. -The Solana account and and program address can be expressed as either a 32 byte hex string starting with "0x" or as a base 58 value. +The Solana account and program address can be expressed as either a 32 byte hex string starting with "0x" or as a base 58 value. #### Wild Card Contract Addresses diff --git a/terra/docs/token_upgrades.md b/terra/docs/token_upgrades.md index 570db603ae..69f9dba5e5 100644 --- a/terra/docs/token_upgrades.md +++ b/terra/docs/token_upgrades.md @@ -56,5 +56,5 @@ Currently there is no implementation of a token contract migration function that ## Historical note: -In Aug 2022, an attempt to upgrade the the token contracts was made, but failed due to the gas error: +In Aug 2022, an attempt to upgrade the token contracts was made, but failed due to the gas error: https://finder.terra.money/classic/tx/FE39E9549770F59E2AAA1C6B0B86DDF36A4C56CED0CFB0CA4C9D4CC9FBE1E5BA. A subsequent upgrade changed the code id of *new* wrapped contracts to 767, but did not perform the migration for old contracts. This means that currently (as of Dec 2023), some wrapped tokens are still on the old code id, and some (the ones deployed after Aug 2022) are on the new code. This discrepancy is fine in the current case, because it only affects the rendering of the token name (https://github.com/wormhole-foundation/wormhole/commit/c832b123fcfb017d55086cb4d71241370ed270c6). diff --git a/whitepapers/0003_token_bridge.md b/whitepapers/0003_token_bridge.md index 735db90a70..20d18ab065 100644 --- a/whitepapers/0003_token_bridge.md +++ b/whitepapers/0003_token_bridge.md @@ -237,11 +237,11 @@ NewContract [32]uint8 ## Caveats ### Transfer completion -A user who initiated a transfer should call `completeTransfer` within 24 hours. Guardian Sets are guaranteed to be valid for at least 24 hours. If the user waits longer, it could be that the Guardian Set has changed between the time where the transfer was initiated and the the time the user attempts to redeem the VAA. Let's call the Guardian Set at the time of signing `setA` and the Guardian Set at the time of redeeming on the target chain `setB`. +A user who initiated a transfer should call `completeTransfer` within 24 hours. Guardian Sets are guaranteed to be valid for at least 24 hours. If the user waits longer, it could be that the Guardian Set has changed between the time where the transfer was initiated and the time the user attempts to redeem the VAA. Let's call the Guardian Set at the time of signing `setA` and the Guardian Set at the time of redeeming on the target chain `setB`. If `setA != setB` and more than 24 hours have passed, there are multiple options for still redeeming the VAA on the target chain: -1. The quorum of Guardians that signed the VAA may still be part of `setB`. In this case, the VAA merely needs to be modified to have the new Guardian Set Index along with any `setA` only guardian signatures removed to make a valid VAA. The updated VAA can then be be redeemed. The typescript sdk includes a [`repairVaa()`](../sdk/js/src/utils/repairVaa.ts) function to perform this automatically. -2. The intersection between `setA` and `setB` is greater than 2/3 of `setB`, but not all signatures of the VAA are from Guardians in `setB`. Then it may be possible to gather signatures from the other Guardians from other sources. E.g. Wormholescan provides an API under (/api/v1/observations/:chain/:emitter/:sequence)[https://docs.wormholescan.io/#/Wormscan/find-observations-by-sequence]. +1. The quorum of Guardians that signed the VAA may still be part of `setB`. In this case, the VAA merely needs to be modified to have the new Guardian Set Index along with any `setA` only guardian signatures removed to make a valid VAA. The updated VAA can then be redeemed. The typescript sdk includes a [`repairVaa()`](../sdk/js/src/utils/repairVaa.ts) function to perform this automatically. +2. The intersection between `setA` and `setB` is greater than 2/3 of `setB`, but not all signatures of the VAA are from Guardians in `setB`. Then it may be possible to gather signatures from the other Guardians from other sources. E.g. Wormholescan provides an API under [/api/v1/observations/:chain/:emitter/:sequence](https://docs.wormholescan.io/#/Wormscan/find-observations-by-sequence). 3. A Guardian may send a signed re-observation request to the network using the `send-observation-request` admin command. A new valid VAA with an updated Guardian Set Index is generated once enough Guardians have re-observed the old message. Note that this is only possible if a quorum of Guardians is running archive nodes that still include this transaction. ### Setup of wrapped assets diff --git a/whitepapers/0006_nft_bridge.md b/whitepapers/0006_nft_bridge.md index 608ea8beb8..52d58711d8 100644 --- a/whitepapers/0006_nft_bridge.md +++ b/whitepapers/0006_nft_bridge.md @@ -130,11 +130,11 @@ NewContract [32]uint8 ## Caveats ### Transfer completion -A user who initiated a transfer should call `completeTransfer` within 24 hours. Guardian Sets are guaranteed to be valid for at least 24 hours. If the user waits longer, it could be that the Guardian Set has changed between the time where the transfer was initiated and the the time the user attempts to redeem the VAA. Let's call the Guardian Set at the time of signing `setA` and the Guardian Set at the time of redeeming on the target chain `setB`. +A user who initiated a transfer should call `completeTransfer` within 24 hours. Guardian Sets are guaranteed to be valid for at least 24 hours. If the user waits longer, it could be that the Guardian Set has changed between the time where the transfer was initiated and the time the user attempts to redeem the VAA. Let's call the Guardian Set at the time of signing `setA` and the Guardian Set at the time of redeeming on the target chain `setB`. If `setA != setB` and more than 24 hours have passed, there are multiple options for still redeeming the VAA on the target chain: -1. The quorum of Guardians that signed the VAA may still be part of `setB`. In this case, the VAA merely needs to be modified to have the new Guardian Set Index along with any `setA` only guardian signatures removed to make a valid VAA. The updated VAA can then be be redeemed. The typescript sdk includes a [`repairVaa()`](../sdk/js/src/utils/repairVaa.ts) function to perform this automatically. -2. The intersection between `setA` and `setB` is greater than 2/3 of `setB`, but not all signatures of the VAA are from Guardians in `setB`. Then it may be possible to gather signatures from the other Guardians from other sources. E.g. Wormholescan provides an API under (/api/v1/observations/:chain/:emitter/:sequence)[https://docs.wormholescan.io/#/Wormscan/find-observations-by-sequence]. +1. The quorum of Guardians that signed the VAA may still be part of `setB`. In this case, the VAA merely needs to be modified to have the new Guardian Set Index along with any `setA` only guardian signatures removed to make a valid VAA. The updated VAA can then be redeemed. The typescript sdk includes a [`repairVaa()`](../sdk/js/src/utils/repairVaa.ts) function to perform this automatically. +2. The intersection between `setA` and `setB` is greater than 2/3 of `setB`, but not all signatures of the VAA are from Guardians in `setB`. Then it may be possible to gather signatures from the other Guardians from other sources. E.g. Wormholescan provides an API under [/api/v1/observations/:chain/:emitter/:sequence](https://docs.wormholescan.io/#/Wormscan/find-observations-by-sequence). 3. A Guardian may send a signed re-observation request to the network using the `send-observation-request` admin command. A new valid VAA with an updated Guardian Set Index is generated once enough Guardians have re-observed the old message. Note that this is only possible if a quorum of Guardians is running archive nodes that still include this transaction. ### Setup of wrapped assets