Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Why `source addres` is so important when a contract address being created?

Why source addres is so important when a contract address being created?

In whitepaper: 2.1.2. Source and destination addresses of a message.

 Any message
has both a source address and a destination address. Its source address is
the address of the account (smart contract) that has created the message
while processing some transaction; the source address cannot be changed
or set arbitrarily, and smart contracts heavily rely on this property. By
contrast, when a message is created, any well-formed destination address
may be chosen; after that, the destination address cannot be changed.
33
Votes Newest

Answers


Both the source and destination addresses are important in a message for various reasons:

Traceability and Accountability: The source address indicates the origin of the message, i.e., the account (smart contract) that created the message while processing a transaction. Having a fixed, unchangeable source address ensures that the origin of the message is known and cannot be tampered with. This helps establish a clear chain of actions within the network, making it possible to trace and audit transactions.

Security: The fact that the source address cannot be arbitrarily changed or set adds a layer of security to the TON blockchain. Smart contracts rely on the immutability of the source address to prevent malicious actors from forging or manipulating messages. This helps maintain the integrity of the transactions and overall security of the network.

Interaction between Smart Contracts: In a multi-chain architecture like TON, different smart contracts on different workchains may need to communicate and interact with each other. The source and destination addresses in a message allow for proper routing and execution of cross-contract interactions. By ensuring that the source address is fixed and unchangeable, the receiving contract can trust the origin of the message, and the correct execution of the intended actions can be ensured.

Message Routing: As mentioned in the passage, when a message is created, any well-formed destination address can be chosen. Once set, the destination address cannot be changed. This design choice, along with the fixed source address, ensures that the routing of messages between accounts and smart contracts is efficient and secure.

In summary, having a fixed and unchangeable source address in a message is essential for maintaining traceability, security, and proper execution of transactions and interactions between smart contracts in the TON blockchain. The combination of fixed source and destination addresses enables efficient and secure message routing within the network.

1
1
Posted one year ago
7K Views
1 Answer
one year ago
one year ago
Tags