## Introduction – Logosouk IGNITE

I am here to share my ideas and adding knowledge from this forum.

If anyone has questions or suggestions, let me know.

Thank You

Logosouk – IGNITE

## script – Did the introduction of VerifyScript cause a backwards incompatible change to consensus?

My question is about the changes to bitcoin done by commit range `(a75560d8, 6ff5f718)`, and their effect on consensus.
Out of this range of four commits (all attributed to satoshi) during the dates July 30th-31st 2010, only the first and last commits are relevant to the question (the two in the middle seem like a build system change, not code).

The two commits (first and second from now on), `a75560d8` and `6ff5f718` are attributed to fixing quite a few vulnerabilities in bitcoin script semantics and execution. For example, in the first commit :

1. Constraints were applied to push and stack sizes
2. The so-called script versioning mechanism was removed, and the various `NOP#` opcodes were added in its place
3. Constraints were applied to bignum operations
4. `OP_RETURN` was changed from merely terminating the script to returning `false` for the entire execution

In the second commit :

1. Constraints were applied on the maximum number of opcodes in the script
2. Execution of unknown opcodes was set to return `false` for the execution
3. The maximum size of the script was reduced by half to 10kb
4. A change to `*SHIFT` opcodes was done (I don’t really uderstand it though)
5. A function called `VerifyScript` was introduced into bitcoin which changed the behavior of script execution

This question is about this list of changes, and whether any of them might be non backwards compatible. Specifically, I will focus on change (5) from the second commit : 6ff5f718:script.cpp

Before this change, at the point of txout redemption, a redeeming transaction’s input’s `scriptSig` and the prevout’s `scriptPubKey` were joined to form a single script by placing an `OP_CODESEPARATOR` between them, and passing the result to `EvalScript` which would execute the script.

Inside `EvalScript`, an empty stack was created and results from the various operations done in the script are pushed onto it. When script execution completes without errors, a boolean is returned; if the stack is not empty then the top element is passed to a `CastToBool` function and and returned (`true` or `false`), and if the stack is empty then `false` is returned.

After the change, the `VerifyScript` function wraps around two separate calls to `EvalScript`, executing `scriptSig` and `scriptPubKey` separately one after the other. The empty stack which was previously created within `EvalScript` is instead created in `VerifyScript` before any script execution begins, and the final check of the stack’s contents (or lack thereof) and `CastToBool` was also moved to `VerifyScript`, to the point after both `scriptSig` and `scriptPubKey` completed their execution.

In `VerifyScript`, first the `scriptSig` from the redeeming transaction is passed to `EvalScript` along with the empty stack. The machine executes the script and results from the operations are pushed to the stack that was passed in with it. If no errors occurred during execution, `true` is returned to `VerifyScript`.
Secondly, if indeed `true` was returned, the `scriptPubKey` from the funding transaction is passed to `EvalScript` along with the stack, which at that point holds the contents left over from `scriptSig`‘s execution.
The `scriptPubKey` is executed, which further manipulates the stack’s contents and if no errors occured, returns `true` back to `VerifyScript`.
Lastly, if `true` was returned, then the check for empty stack and `CastToBool` are done, which determines the final result of script verification.

The reason for this change was cited as being a fix to a possible vulnerability in Script : SE answer, BCTalk thread.
Although it’s orthogonal to this question, it’s why I included the list of changes from commit `a75560d8`.

It’s not too hard to see that considering simple (lacking a checksig) scripts, this change is indeed backwards compatible. At worst, some scripts might become unspendable, but there doesn’t seem to be a case where a previously unspendable script might become spendable as a result of this change.

Even for scripts with a checksig like `p2pk`, `p2pkh` and multisig, the `CHECKSIG` opcode is always taking place in `scriptPubKey`, which was separated from the elements of `scriptSig` by an `OP_CODESEPARATOR` prior to this change. Seemingly, the semantics remained the same – until about two years later.

Looking at the wiki page for `OP_CHECKSIG` wiki-checksig, steps (2) to (4) explain how to go from `scriptCode` to `subScript`, and specifically what happens when an `OP_CODESEPARATOR` exists in `scriptCode` :

1. A new subScript is created from the `scriptCode` (the `scriptCode` is the actually executed script – either the `scriptPubKey` for non-segwit,
non-P2SH scripts, or the `redeemscript` in non-segwit P2SH scripts). The
script from the immediately after the most recently parsed
`OP_CODESEPARATOR` to the end of the script is the `subScript`. If there
is no `OP_CODESEPARATOR` the entire script becomes the `subScript`
2. Any occurrences of `sig` are deleted from subScript, if present (it is not standard to have a signature in an input script of a
transaction)
3. Any remaining `OP_CODESEPARATORS` are removed from `subScript`

Now, prior to commit `6ff5f718`, when `scriptSig` and `scriptPubKey` were joined to form a single script, the `scriptCode` would look like :

``````<scriptSig> CODESEPARATOR <scriptPubKey>
``````

With checksig operations taking place in `scriptPubKey`, making `subScript` be everything to the right of `CODESEPARATOR` – basically `<scriptPubKey>` itself (unless more codeseparators or if signatures consumed by a checksig also exist in `scriptPubKey`).

After the commit, there would actually be two separate executions with `scriptSig` first and `scriptPubKey` second, where each execution would have its own `scriptCode` and subsequently its own `subScript`.
Now, Because checksig operations are still only being done in `scriptPubKey`, it appears that `subScript` would remain the same, but what would happen if a `CHECK(MULTI)SIG` opcode gets executed in `scriptSig`?

In January 24th 2012, block 163685 was mined which contained transaction `eb3b82c0884e3efa6d8b0be55b4915eb20be124c9766245bcc7f34fdac32bccb`.
This transaction, the two immediately after it, and its funding at `b8fd633e7713a43d5ac87266adc78444669b987a56b3a65fb92d58c2c4b0e84d` which were also mined in the same block are all mentioned in BIP-17, which is an alternative implementation of `p2sh` semantics :

• `OP_CHECKHASHVERIFY` will re-define the existing `OP_NOP2` opcode, and will function as follows when executed:

• First, hash the end of the prior script (in the general case, `scriptSig`; if no prior script, a null string is hashed) beginning
from the last evaluated `OP_CODESEPARATOR` onward (or from the
beginning of the script, if no `OP_CODESEPARATOR` was present)

• Then, compare this with the item on the top of the stack (if there is none, the script fails immediately)
• If the hashes match, do nothing, proceed as if an `OP_NOP`; if they do not match, the script fails immediately. Note that in the case of a
matched hash, the top stack item (the hash being compared with) is not
popped off the stack. This is for backward compatibility.

Notice how in bip17 the `redeemScript` is given as an actual executable script in `scriptSig`, rather than a single data push of a blob as is the case with bip16. Even though older nodes will not enforce the `hash160` of `scriptSig` to be equal to the 20 bytes value from prevout’s `scriptPubKey`, they would still have to execute it and validate any `CHECK(MULTI)SIG` operations within.

I’m assuming here that these bip17 example transactions were mined and validated by nodes running software that was recent in Jan. 2012, but suppose there were still nodes on the network running older software, and specifically ones running versions `v0.3.6` and lower. Would these older nodes be able to come to consensus with the newer nodes about the validity of block 163685?

Going over the funding transaction `b8fd633e7713a43d5ac87266adc78444669b987a56b3a65fb92d58c2c4b0e84d`, and looking at the output at index 1, we see the `scriptPubKey` (`NOP2` is actually a non active `OP_CHECKHASHVERIFY`)

``````0x14 0x2a9bc5447d664c1d0141392a842d23dba45c4f13 NOP2 DROP
``````

And in the spending transaction `eb3b82c0884e3efa6d8b0be55b4915eb20be124c9766245bcc7f34fdac32bccb`, from the input at index 1, we have the `scriptSig`

``````0 0x47 0x30440220276d6dad3defa37b5f81add3992d510d2f44a317fd85e04f93a1e2daea64660202200f862a0da684249322ceb8ed842fb8c859c0cb94c81e1c5308b4868157a428ee01 CODESEPARATOR 1 0x21 0x0232abdc893e7f0631364d7fd01cb33d24da45329a00357b3a7886211ab414d55a 1 CHECKMULTISIG
``````

Consider first how software from `v0.3.7` and above would construct the `subScript` for the `CHECKMULTISIG` in `scriptSig`. We begin with a `scriptCode` which is exactly `scriptSig`, and since a `CODESEPARATOR` is executed, `subScript` becomes :

``````1 0x21 0x0232abdc893e7f0631364d7fd01cb33d24da45329a00357b3a7886211ab414d55a 1 CHECKMULTISIG
``````

Now consider how software from `v0.3.6` and below would construct the `subScript` for the same `CHECKMULTISIG`. Our `scriptCode` is no longer made from only `scriptSig`, but from a joining of it and `scriptPubKey` by a `CODESEPARATOR`. The `scriptCode` would look like :

``````0 0x47 0x30440220276d6dad3defa37b5f81add3992d510d2f44a317fd85e04f93a1e2daea64660202200f862a0da684249322ceb8ed842fb8c859c0cb94c81e1c5308b4868157a428ee01 CODESEPARATOR 1 0x21 0x0232abdc893e7f0631364d7fd01cb33d24da45329a00357b3a7886211ab414d55a 1 CHECKMULTISIG CODESEPARATOR 0x14 0x2a9bc5447d664c1d0141392a842d23dba45c4f13 NOP2 DROP
``````

Recall the rules from the wiki. At the point when `CHECKMULTISIG` is executed, `subScript` is everything from the point after the last executed `CODESEPARATOR` and until the end of the script, with all `CODESEPARATOR`s on the right hand side of the checksig operator removed :

``````1 0x21 0x0232abdc893e7f0631364d7fd01cb33d24da45329a00357b3a7886211ab414d55a 1 CHECKMULTISIG 0x14 0x2a9bc5447d664c1d0141392a842d23dba45c4f13 NOP2 DROP
``````

If this is correct, then it appears that old nodes with versions `v0.3.6` and below cannot agree on which is the correct `sighash` for this spending transaction, but since I can’t realistically run any such old version software, I can’t be absolutely sure. I did patch a recent bitcoin core version with some changes that enabled me to simulate validation of tx `eb3b82c0884e3efa6d8b0be55b4915eb20be124c9766245bcc7f34fdac32bccb`, and as expected it did not pass validation. I will add the two sighashes below along with the public key and signature for comparison.

So my question is, is there something I’m misunderstanding or perhaps missed that would allow pre-`v0.3.7` and post-`v0.3.7` nodes to come to consensus about the validity of block 163685?

(also relevant : this SE question)

``````Pubkey : 0232abdc893e7f0631364d7fd01cb33d24da45329a00357b3a7886211ab414d55a
``````

Pre-`v0.3.7` sighash (does not validate) :

``````01000000
02
00
FFFFFFFF
3C 51210232abdc893e7f0631364d7fd01cb33d24da45329a00357b3a7886211ab414d55a51ae142a9bc5447d664c1d0141392a842d23dba45c4f13b175
FFFFFFFF
02
E0FD1C0000000000 19 76a914380cb3c594de4e7e9b8e18db182987bebb5a4f7088ac
C0C62D0000000000 17 142a9bc5447d664c1d0141392a842d23dba45c4f13b175
00000000
01000000

sha256  : 1EB276326D72CB358F6C275D6542F76EED4E36364727CB82D40A116244EBDDB5
sha256d : 11491E74778E1FA8C40CC8E07E1F835677CF1AC81F54255EC1C7125C1894939A
``````

Post-`v0.3.7` sighash (does validate) :

``````01000000
02
00
FFFFFFFF
25 51210232abdc893e7f0631364d7fd01cb33d24da45329a00357b3a7886211ab414d55a51ae
FFFFFFFF
02
E0FD1C0000000000 19 76a914380cb3c594de4e7e9b8e18db182987bebb5a4f7088ac
C0C62D0000000000 17 142a9bc5447d664c1d0141392a842d23dba45c4f13b175
00000000
01000000

sha256  : 3858A592C15A47F3058010689883DECCD4AF41F5367B9776429613DFB3339883
``````

## What is a sitemap? Do you really need it? This short introduction should help you make the decision! | Proxies-free

JavaScript is deactivated. For a better experience, please enable JavaScript in your browser before continuing.

Regardless of whether you don't have much (or no) background information about web improvement, you are probably familiar with search engine optimization (SEO). This is a broad term for an enormous number of procedures that you can use to improve the ranking of your website in web search engines. A large number of the SEO strategies that you will learn to focus on are keywords. However, there are various tasks that are similarly basic.

For example, the best thing you can do to build your natural traffic is to create a sitemap. Perhaps you imagine what a sitemap is? Is it easier for web indexes to understand and list your content? Fortunately, you don't need any background information to create one for your website.

Article source: https://www.temok.com/blog/what-is-a-sitemap/

## introduction

Hello everybody,

I am Prajith Khan

I just joined this forum a few hours ago and look forward to receiving and sharing a lot of useful insights here!😃

## Introduction to Forex – Discussions & Help

The TopGold Forum quickly becomes the most important online financial goal on the Internet.

We are an authority and a first class forum for professional investors, forex traders, affiliates and individuals looking to make a living online or just want to make more money.

If this is your first visit, be sure to read the FAQ by clicking the link above. You must register before you can post: click the register link above to continue.

## Proof theory – reasons for the inapplicability of the complete introduction to the tour expansion

It is known that the expansion of tours is a rather bad heuristic to generate short Hilton cycles even in the planar Euclidean case. This is surprising when you learn about it for the first time.
The surprise is due to the fact that the heuristic appears to resemble full induction if you start with the convex hull of the set of points as the base case and then insert the next point as the point that causes the least increase in length of the tour:

Framework:

• The relative order of the points on the convex hull is the same as for the shortest tour of all points.

Induction step:

• if that's the tour $$T_n$$ through the first $$left | CH right | + n$$ points is optimal, then the shortest tour $$T_ {n + 1}$$ with an additional point is optimal again ($$left | CH right |$$ is the number of points on the convex hull and $$n geq 0)$$,

Question:

What are the reasons that prove that the greedy expansion of the tour is not a variant of the full introduction?

What I am looking for is evidence that clearly indicates which of the conditions for the applicability of full induction are violated by a greedy extension of the tour.

## problem

The problem definition is here. For a brief summary:

• An IntCode program is an array of Ints
• The program counter begins with index 0, reads an opcode there, followed by 0 or more arguments for the next indexes, and then goes to the index after the last argument
• opcode 1 takes 3 arguments, `a`. `b`, and `z`and sets `program(z) = program(a) + program(b)`
• opcode 2 does the same thing, but multiplies instead
• opcode 99 takes 0 arguments and stops the program

In part 1 we take the input, replacing index 1 with 12 and index 2 with 2 (`restore 12 2`), run the program and return index 0.

In part 2 (not shown in the link unless you solve part 1) we find which Ints have to replace indices 1 and 2 to get a result where index 0 is 19690720.

With this code, I think it could probably be easier. I tried to separate the program counter logic from the command execution logic (`interpret` vs `step`), but apparently you needed a strange combiner `whileWith`, I was wondering if there are better combiners to express this type of loop or if there is a completely different approach.

I was considering wrapping `step` in the `ContT` or `ExceptT`This would make it possible to reduce part of the nesting by using the early exit instead. However, I wasn't sure which way was the best in terms of extensibility.

## code

``````import Control.Arrow (second)
import Data.Array
import Data.Array.ST
import Data.List (find)

data Status = InvalidOp | Terminated | Running | InvalidAddress
deriving (Show, Eq)

newtype Program = Program {
getInts :: Array Int Int
} deriving (Show)

-- Execute the instruction starting at `start`
step :: STArray s Int Int -> Int -> Int -> ST s Status
step arr len start = do
case op of
99 -> return Terminated
_ -> do
(i, j, store) <- forM (start+1..start+3) (readArray arr)
if not \$ all inBounds (i, j, store) then
else do
(a, b) <- forM (i, j) (readArray arr)
case op of
1 -> writeArray arr store (a+b) >> return Running
2 -> writeArray arr store (a*b) >> return Running
_ -> return InvalidOp

where inBounds ix = 0 <= ix && ix < len

interpret :: Program -> Program
interpret (Program prog) = Program \$ runSTArray \$ do
let len = succ . uncurry subtract \$ bounds prog
mArr <- thaw prog
whileWith (== Running) (0, 4..len-1)
(step mArr len)
return mArr

let nums = fmap read \$ split ',' str
in
Program \$ listArray (0, length nums - 1) nums

restore :: Int -> Int -> Program -> Program
restore a b = Program . (// ((1, a), (2, b))) . getInts

-- pt 2

findNounVerb :: Program -> Int -> Maybe (Int, Int)
findNounVerb prog target =
find ((== target) . (! 0) . getInts . interpret . (\$ prog) . uncurry restore) \$
((n, v) | n <- (0..1000), v <- (0..n))

-- util --

split :: Eq a => a -> (a) -> ((a))
split _ () = ()
split k xs = curr : split k rest
where (curr, rest) = second (drop 1) \$ span (/= k) xs

whileWith :: (Monad m) => (ret -> Bool) -> (inp) -> (inp -> m ret) -> m ()
whileWith _ () _ = return ()
whileWith pred (x:xs) step = do
res <- step x
when (pred res) \$
whileWith pred xs step

-- end util --

main :: IO ()
main = do

-- pt 1:
putStrLn "Part 1:"
let output = (! 0) . getInts . interpret . restore 12 2 \$ prog
putStrLn \$ "Output: " ++ show output
putStrLn ""

-- pt 2:
putStrLn "Part 2:"
let Just (noun, verb) = findNounVerb prog 19690720
putStrLn \$ "Noun: " ++ show noun ++ "n" ++ "Verb: " ++ show verb
print \$ 100*noun + verb

$$```$$
``````

## Introduction of the Marina One residences in D01

Marina One residences is a development of M + S, a joint development of Temasek Holdings from Singapore and Khazanah Nasional Berhad from Malaysia. Marina One is a historic development collaboration, a rare integrated development with luxury residences, offices, retail stores served by 3 MRT stations and 4 MRI lines in the heart of Marina Bay. Marina One Residences Phase 2 has started and is very well received with attractive prices.

Marina One Residences Prices can be observed excitingly in the upward trend of the real estate market. In block 21, only limited units remain with a very attractive price of 2,200 psf on average.

The Marina One Residences are located flat in the heart of Marina Bay. All units can enjoy the unparalleled accessibility with the 3 MRI and the unobstructed view of the sea or the garden "Green Heart", which is the heart of the development.

Contact the New Condo Launch 2020 development team at 6100 3447 or visit http://www.condolaunchsg.com/properties/ma…one-residences/ for more information on Marina 1.

## Javascript – Is there a discussion about the introduction of aliases for window.URL.createObjectURL ()?

Is there a suggestion for ES2020 (or later) regarding the introduction of aliases for `window.URL.createObjectURL()` ?

So that I can write the following:

``````let myBlobURL = window.URL.createObjectURL(myBlob, 'my-blob-url');
``````

and then:

``````example.com/my-blob-url
``````

is a alias that points to the generated URL that was created by `window.URL.createObjectURL()` ?

## Introduction!!!

Hello everybody,

I am new to this forum, my name is Debby Tompkins. I love to know why I'm here. I hope to get some really good ideas for trading and the digital ways of making money.

Many thanks